# How does this transistor-based voltage detector circuit work?

I was looking to see if there is a low voltage detection circuit that could be made without ICs. I found this circuit but with the given values and configuration I don't understand how it could work. What keeps the LED transistor from conducting first having the lower resistance to its base? Wouldn't the 33-47 kΩ voltage divider only turn off the first transistor at 1.5 V?

• What happens at the base of the "led transistor" when the other transistor is on? Commented Dec 23, 2022 at 14:15
• The 47 k is a potentiometer. Commented Dec 23, 2022 at 14:15
• Hey mike65535, in concept if the first transistor was conducting the base of the second would be pulled down.
– josh
Commented Dec 23, 2022 at 14:28
• Thanks Tyler, Yeah it is
– josh
Commented Dec 23, 2022 at 14:31
• How low a voltage do you want to detect and where would the voltage be applied? Commented Dec 23, 2022 at 14:45

This is a very crude circuit by comparison with supervisory IC circuits and that sort of thing, but we can analyze it for fun.

What it does in general is light the LED for input voltages that are lower than some particular value (adjustable via the 47kΩ potentiometer). Obviously the LED cannot light for 0V so there is a range over which this will work. Maybe it needs 2 or 3V for the LED to dimly light at all. Above the set value the left transistor shunts current from the 33kΩ resistor away from the base of the right transistor and the LED goes off. The left transistor needs, say, 600mV (which varies with temperature and other factors, but roughly) to turn on sufficiently to do that. So let's say you want the LED to turn off at 7.0V. The current through the divider (ignoring base current for now) will be 7V/80kΩ = 88uA for any position of the pot setting. Since it only takes a uA or so of base current into the left transistor to turn the right transistor off, we will continue to ignore base current.

So, the pot should be set so that about 7kΩ is on the 'bottom' and therefore 40kΩ is on the 'top' (about 15%). Let's simulate that:

simulate this circuit – Schematic created using CircuitLab

The 47kΩ pot is set to 0.15 (15%).

Top curve is input voltage from 0 to 12V. Bottom curve is LED current (which is more-or-less proportional to light output from the LED).

With a red LED, as simulated, it will illuminate dimly at a couple volts, get brighter as the voltage increases and then turn off at about 6.8V, as designed.

What are the shortcomings of such a circuit? Depends on the application, of course, if there are no requirements then any circuit (or none) will do.

But, things that are often required- stable switching point with temperature and without adjusting a pot, some hysteresis so the LED snaps on/off (with a battery this will actually have a bit of hysteresis since the internal resistance of the battery helps form a Schmitt trigger), working to a lower voltage, low power consumption so as not to drain the battery as quickly, etc.

Here is what the temperature variation alone looks like (0/25/75°C):

• Tried with 100 < beta(Q1) < 500, switching seems to be "precise" (+/- 20 mV dispersion). NB: R4=1 kOhm, i(r4) peak = ~2 mA. Commented Dec 23, 2022 at 16:15
• @Antonio51 See temperature variation in above plot for a moderate range of 0~70°C. Commented Dec 23, 2022 at 20:11
• Right. I did and found something like this. Also for "beta" varying from 100 to 500. Commented Dec 24, 2022 at 12:35

It animates the current through the circuit which can help in understanding what's going on.

The bottom graph shows the current through the LED.

Use the sliders on the right side to adjust the resistance and voltage.

• Spehro Pefhany and ErikR. Thanks for the reply's. In the Falstad simulation there never appears to be any current flowing through the base of the first transistor regardless of the voltage or resistance settings?
– josh
Commented Dec 23, 2022 at 16:24
• The base current of the first transistor is very small - perhaps only 100uA. But that small base current gets amplified by Q1 and Q2 resulting in a much larger current through the LED. Commented Dec 23, 2022 at 16:28
• Yeah never mind that, I just reset the simulator and it worked.
– josh
Commented Dec 23, 2022 at 16:30
• @josh originally there was an error (short) in the schematic but it got fixed Commented Dec 24, 2022 at 13:05

Here is another picture presentation versus variable D (pot position).

Very "subject" to temperature, quasi not versus beta.

# How to compare voltages

To detect if a voltage is below/above a given value, you need to compare it to that value. This can be done in two ways:

## ... by a threshold element

First, we can apply (a part of) the input voltage to an element with a fixed voltage threshold, for example a diode, LED, base-emitter junction, zener diode, etc. If the input voltage is higher than the threshold, the current will be diverted to the threshold element.

This idea is implemented in the OP's circuit where a part of the input voltage is obtained by the voltage divider and the base-emitter junction of the first transistor serves as a 0.7 V threshold element.

When the threshold is too small (as in the OP's case), it can be increased by adding another or more voltage threshold elements (diodes) in series. In the OP's circuit, another diode can be inserted between the emitter and ground to "lift" the emitter with another 0.7 V.

But this trick will create a problem with the control of the second transistor - it will always be "on". And here it occurs to us to apply the same trick to the second transistor - we can insert another diode in its emitter.

## ... by a voltage comparator

With the same success, we can compare the input voltage with another but reference voltage. For this purpose, the two voltages must be subtracted and the result amplified. We can do it in two ways:

• in series (according to KVL). In this case, the two voltage sources are grounded and the result is "floating". The two voltages have the same polarity (usually positive) so they are subtracted in the loop.

• in parallel (according to KCL). In this case, the two voltage sources have opposite polarity (positive and negative) and are connected through resistors to the output; so they are subtracted and the output is grounded.

Let's see, for example, how the series comparator is implemented.

Transistor comparator. In this case, we can insert the reference voltage source in the emitter of the transistor to "lift" the emitter to the desired level. The result of comparison is applied to the transistor input (base-emitter junction) and amplified.

Op-amp comparator. Here, we connect the reference voltage source to one of the op-amp inputs and the input voltage source to the other. The result of comparison is applied to the op-amp differential input (between the two inputs) and amplified.

# Implementations

## ... without transistors

If you use the fact that an LED is both a threshold element and an indicator, you can make the simplest possible implementations:

1. Low-voltage indicator: Connect the anode of the LED to a reference positive source and its cathode to the input voltage source. The latter must be able to sink the LED current. Of course, you has to increase the reference voltage by the LED forward voltage.

2. High-voltage indicator: Connect the cathode of the LED to a reference positive source and its anode to the input voltage source. The latter must be able to source the LED current and the reference voltage source to sink the LED current. Now you has to decrease the reference positive source voltage by the LED forward voltage.

## ... by one transistor

You can make a more precise low-voltage indicator by adding only one PNP transistor (it is as if we removed the second transistor in the OP's circuit). For this purpose, connect the emitter to the positive reference voltage and the base to the input voltage and insert the LED with a resistor in series between the collector and ground.

# Generalization

You can detect if a voltage is below/above a given value in the following general ways:

1. Current steering: Apply the input voltage to an element with a fixed voltage threshold (diode) and use the current through the element as an output.

2. Diode string: To increase the threshold voltage, connect in series:

• more diodes

3. Series comparison: Subtract the input and reference voltage in a series manner and amplify the result.

4. Parallel comparison: Subtract the input and reference voltage in a parallel manner (through resistances) and amplify the result.

How do we investigate basic transistor amplifier stages? (a related story from my blog Circuit Stories)

Deriving a Series Voltage Summer from Kirchhoff's Voltage Law (my Wikibooks story)

Building a Parallel Voltage Summer (another Wikibooks story)

3-LED voltage indicator (my inventor's story about a similar circuit, Codidact)

# EDIT: A response to OP's comment

I am curious though how that the potentiometer ever functions as a rheostat with all three terminals being continuously active?

The so-called (incorrectly) "potentiometer" is a multi-functional device. It is not a "meter" at all, it is just a resistor with a sliding wiper that can be used as:

## Rheostat (variable resistor)

In this application, we use only two of potentiometer's terminals - end and middle (wiper). When moving the wiper, the resistance, and accordingly, the current between them, vary. The load in series should be low (ideally, zero); then, the current will be entirely determined by the rheostat's resistance.

## Constant resistor

Although this device is designed to be variable, nothing prevents us from using it as a constant as well. In this case, we use only the end potentiometer's terminals.

## Potentiometer (variable voltage divider)

In this application, we apply an input voltage to the whole resistance (between the end terminals) and take some of the partial voltage drops (between the middle and end terminal) as an output voltage. The interesting thing in this configuration is that nothing changes when we move the wiper - neither the resistance nor the current nor the total voltage. All voltages along the resistor film also do not change... only the point at which we measure changes. The load in parallel should be high (ideally, ifinite); then the output voltage will be entirely determined by the potentiometer.