0
\$\begingroup\$

I am trying to detect the presence of +12v on V2 to trigger a digital pin on a micro controller.

I am using an opto isolator as I am under the impression that it is the best way to isolate my circuit from the potentially noisy automotive circuit.

When V2 is activated by the vehicle, it outputs betweeen 9 and 12v, activating the opto and pulls the digital pin low.

However, when V2 is inactive, it is outputting around 2v, which causes the digital pin to read high, with an occasional low. Ideally, I would like to avoid disturbing the vehicle's circuit as much as possible.

How can I ignore V2 unless it is greater than, say, 5v? Is a Zener diode between V2 and R1 the proper way to solve this?

schematic

simulate this circuit – Schematic created using CircuitLab

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

Zener is an OK way.

Or consider a resistor P1 to ground to reduce range of V at pin.
eg adding a 680R P1 to ground will reduce sensitivity.
Lower R = more reduction.
Too low = no operation.

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

A Zener would certainly do the trick.

But you could also accomplish it for cheaper with a voltage divider, by simply adding a second resistor in parallel with the opto. For example, putting another 680 ohm across the opto would double the voltage needed to turn it on.

\$\endgroup\$
  • \$\begingroup\$ Thank you for the response! Since both answers are nearly identical I marked the first one as the accepted answer. \$\endgroup\$ – Ryan Sorensen Nov 17 '14 at 3:31

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.