Filtering and protection of opto isolated inputs

Thread Starter

cmartinez

Joined Jan 17, 2007
8,252
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?
 

kubeek

Joined Sep 20, 2005
5,795
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.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,252
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.
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.
 

kubeek

Joined Sep 20, 2005
5,795
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.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,252
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.
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.
 

ronv

Joined Nov 12, 2008
3,770
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.
"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.
 

Sensacell

Joined Jun 19, 2012
3,445
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.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,252
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.
thiking along the same line here... I'm also going to use filters before supply input to the drivers.
 
Top