The problem I'm trying to solve: I have a vehicle that has 3 wires for the tail/brake light. When the vehicle is on there is 12 V+ between the red and black wires and there is 7 V+ between the red and orange wires. When you hit the brakes the 7 V+ between the red and orange wires steps up to 10 V+.

So I need to create a circuit that will turn on a set of LED lights when the voltage goes above 9 V. Currently, my circuit consists of a voltage divider (changing 12 V down to 9 V), an LM324N op-amp, and an FQI50N06 MOSFET (schematic shows IRF540).

For some reason, on the op-amp, when there is no input, the output is on, when the non-inverting input is higher than the inverting input the output is on, and when the inverting input is higher than the non-inverting input the output is off.

So in my mind, this circuit is working, except when there is no input, then the output should be off.

EDIT: Something that just popped into my head as soon as I posted this: I wonder if putting a diode on the output would prevent the output from being on when there is no input.

Please see the attached schematic:

Voltage Controlled Switch using LM324N


Voltage Controlled Switch using LM324N w/ 100K Resistors


Voltage Controlled Switch using LM324N w/ 153K Resistor

  • 1
    \$\begingroup\$ What do you mean by "no input"? There is nothing at all connected (open circuit)? The inputs are at 0V? Something else? \$\endgroup\$
    – Null
    Sep 29, 2015 at 15:33
  • \$\begingroup\$ Correct, 0V. If I completely disconnect the non-inverting input. If the non-inverting input is 3v+, there's no output. \$\endgroup\$ Sep 29, 2015 at 15:36
  • \$\begingroup\$ You shouldn't have an open circuit at the input(s), which I'm assuming is what you mean by "completely disconnect". Op amps have an input bias current (even if it's very small) and that current needs a path to flow. \$\endgroup\$
    – Null
    Sep 29, 2015 at 15:39
  • 1
    \$\begingroup\$ If you disconnect either input, it effectively goes to almost the supply rail. A 100K resistor from the input to ground will stop that. \$\endgroup\$ Sep 29, 2015 at 15:45
  • 1
    \$\begingroup\$ You LED lights wont get anywhere 12 V due to opamp output swing and gatesource volts needed to drive the FET .consider a P channel design ,it will be cheap because your currents are not high . \$\endgroup\$
    – Autistic
    Sep 29, 2015 at 20:06

1 Answer 1


Note: this circuit is based on the ongoing discussion in chat. I'm posting this to save a schematic which can be simulated on-site. The circuit can/will be modified pending further information. Resistor values are roughly chosen to simply provide proof-of-concept.


simulate this circuit – Schematic created using CircuitLab


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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