Electronic – Driving an opto isolator where ground can swing between 30V and 0V

opto-isolatorpulldown

I have a motor controller that outputs a fault by pulling down its I/O pin (PIN 10). It will also go into fault if you external pull the pin down too.

The MC has two configurable pullups:
A: The output pin is pulled high by a 100K resistor @ 30V.
B: The output pin is pulled high by a 1K resistor @ 6V.

I require an isolated method of monitoring this voltage, my solution is to use an optoisolated that is supplied by the motor controllers 5V output via a 510R resistor.

When the motor controller goes into fault, it will pull down to the ground and turn on the opto.
A diode prevents backfeeding of the 6V (B)/ 30V (A) into the motor controllers 5V rail.

I have tested this and it is working, but is there any negatives, or better solutions?

Diagram

Best Answer

I believe that your circuit looks like this:

schematic

simulate this circuit – Schematic created using CircuitLab

Calculate the current in the opto diode. The opto diode has a drop of roughly 1.3V, the plain diode has a drop of about 0.7V:

= (5.0 - 1.3 - 0.7) / 510 = 5.9 mA

Calculate the current in the opto transistor. Vce at saturation will be about 0.3 V.

= 4.7 / 1k = 4.7 mA

You need a transfer percentage (transistor current / diode current) of:

= 4.7/5.9 = 80%

Now, look at the transfer characteristic table. EL357N (with no letter after it) isn't guaranteed to work. The "A" device is marginal.

If you are using the higher gain part and there is no chance you will ever use a lower one, then you are fine.

But, consider this, one concept that I try to teach young engineers: when margin is cheap, put in a lot. And here I mean cheap in the broadest sense, not just cost. Unless overall power is a concern, make R2 smaller for more margin.

enter image description here