Voltage Controlled Switch

Thread Starter


Joined Dec 23, 2011
This link was in an old thread: http://forum.allaboutcircuits.com/attachment.php?attachmentid=1106&d=1185625596

I think it is a starting point for what I want to do, which is to switch on a relay when the voltage hits a point between 12 and 15 volts (adjustable), and to switch off the relay when the voltage falls below 11 to 14 volts (again, adjustable, independently). I'd also like to do a circuit that would be the inverse of this, would turn on the relay when the voltage drops below the 11 to 14 volts, and off when above the 12 to 15 volt range -- but, in both cases, I'd like to be able to adjust these voltage settings independently of each other. Can anyone help?



Joined Dec 26, 2010
This sounds like a a straightforward comparator application. You would need the following things:

  • A level comparator, like say an LM339, LM311, (there are loads of them). http://www.ti.com/lit/ds/symlink/lm311-n.pdf http://www.ti.com/lit/ds/symlink/lm339-n.pdf
  • A reference voltage device (unless you already have a regulated supply. This sort of thing (again, there are loads of them). http://cds.linear.com/docs/Datasheet/1009ff.pdf
  • A few resistors, to divide the input (and if necessary the reference voltage) down as needed to suit the comparator input range - and add a little bit of positive feedback.
  • Unless the relay coil is really low current, probably an output transistor. BJTs require a resistor chosen to set their base current.
  • A diode across the relay coil, to prevent a big voltage surge when it turns off.


Joined Dec 26, 2010
The circuit in your link is of this general kind, although the use of a PNP transistor with a relay returned to common is not quite so usual.

As shown however, the feedback resistor (1M) appears to be providing negative feedback, which will not give you the hysteresis you require.


Joined Mar 14, 2008
You could use a LM311 comparator as shown in the schematic.

For two independent set points use two control pots in place of the one shown in the schematic.

Connect the two pots through an analog switch, such as a 4051, 4052, or 4053, to the (-) LM311 input.

Connect the switch address lines such that one switch is on when the LM311 output is high and the other is on when the LM311 output is low.

That will give you two independently adjustable voltage set points for the high and low trigger points (the high voltage when the output is low and the low voltage when the output is high).

Note: Remove the 1M feedback resistor from the circuit. It is not needed for this application.