Filtering and protection of opto isolated inputs

Discussion in 'General Electronics Chat' started by cmartinez, Oct 20, 2015.

  1. cmartinez

    Thread Starter AAC Fanatic!

    Jan 17, 2007
    3,574
    2,543
    I'm going to control a closed-loop step motor and driver using only two signals: step and direction.
    These two outputs will be connected to the driver (whose inputs are opto-isolated) as follows:

    Capture.JPG

    An MCU will be switching the optoisolators' LEDs, by sinking current when its assigned pins go low.

    Question: if I were to use long wires (say, up to 10m), is some form of filtering and protection needed at the MCU side, such as diodes, or RC snubbers, other than the obvious twisted-pairs shown in the diagram?
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    I would divide up that 200 ohm into two in series, and after the first one put a zener diode and a small cap like 47pf to ground.
     
  3. cmartinez

    Thread Starter AAC Fanatic!

    Jan 17, 2007
    3,574
    2,543
    Thanks, but no can do... the circuit shown on the right is internal to the step motor driver, and I can't modify it.
    I have complete control on the circuit on the left, though.
     
  4. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Sorry I didn't read carefully enough, but then again the thread title said protection of inputs, not outputs.
    What you can do for the protection of the MCU is a standard one diode to Vcc and one diode to Gnd, schottkys preferably.
     
    cmartinez likes this.
  5. cmartinez

    Thread Starter AAC Fanatic!

    Jan 17, 2007
    3,574
    2,543
    Exactly what I had in mind, actually. But my main concern is the avoidance of spurious triggering of the opto-isolators... I've seen it happening in other circuits, and I don't know what to do about it.
     
  6. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,292
    1,255
    "Most" opto-isolators are pretty slow which makes them good with the noise. You might check the minimum pulse width spec on the controller to get an idea.
     
    cmartinez likes this.
  7. Sensacell

    Well-Known Member

    Jun 19, 2012
    1,132
    267
    I have had trouble with this setup using higher voltage micro-stepping drives.
    We had a motion control camera rig with 48 V drives, when we replaced them with larger, high voltage drives, the system became unstable.

    The EMI from the motor leads couples to the opto input and causes missed steps and general mayhem.
    10 meters is asking for trouble. I think it's the internal capacitance of the opto that does it, between input and output.
    My solution was to use shielded cables to the motors, made the system stable.
     
    cmartinez likes this.
  8. cmartinez

    Thread Starter AAC Fanatic!

    Jan 17, 2007
    3,574
    2,543
    thiking along the same line here... I'm also going to use filters before supply input to the drivers.
     
Loading...