0
\$\begingroup\$

I am looking to detect, if battery is connected to board or not, by adding optoisolator to a battery and connect it to micro controller, before reverse polarity protection circuit. (Which is MOSFET with LM74700)

I want know if below added circuit (diagram) will be safe from reverse polarity from battery since I am sharing the ground on Phototransistor.

I know the TVS will protect from reverse polarity but will micro controller be safe of reveres polarity

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
\$\begingroup\$

This circuit works:

  • when the battery is installed correctly, a current flows through the optoisolator's LED to ground, and the output is on;
  • when the battery is reversed, a current flows through D1, and the optoisolator is off.

But if you replaced the optoisolator with a transistor, then:

  • when the battery is installed correctly, a current flows through base and emitter to ground, and the output is on;
  • when the battery is reversed, a current flows through D1, and the transistor is off. Because of the voltage drop over D1, the transistor's base will be about 0.7 V below ground, which is harmless.

So the optical isolation does not actually protect against anything.


Using a 15 V Zener at that place is pointless; the optoisolator's LED will already clamp the voltage to about 1.2 V. D1 is useful only for reverse voltage protection, and for that, a 1N4148 is enough.

R2 should be larger; 20 mA is much more current than actually needed. (Especially when you're using a plain transistor.)

\$\endgroup\$
  • \$\begingroup\$ Thanks for the answer , I know the Opto only need 5mA I just want make sure if battery voltage lower than 12V still can work.. \$\endgroup\$ – Shahreza Sep 19 at 15:40
0
\$\begingroup\$

The whole point of an optoisolator is to provide exactly that kind of isolation. So yes, the MCU will not experience any problem regardless of what's connected on the input side.

\$\endgroup\$
  • \$\begingroup\$ Doesn't matter if I am sharing the ground on opto \$\endgroup\$ – Shahreza Sep 18 at 23:42
  • \$\begingroup\$ Why would it? Even if the "12V battery" node goes negative with respect to ground, it can't affect the collector of the optocoupler. \$\endgroup\$ – Dave Tweed Sep 19 at 0:06
  • 2
    \$\begingroup\$ The best feature of an opto is galvanic common mode isolation, the secondary feature is differential isolation protection which can be done without optics. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Sep 19 at 1:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.