# Electronic – Voltage comparator – how to get a stable voltage reference from a battery

circuit-design

I'm trying to build a circuit which will be used to monitor the voltage of Li-ion battery. The voltage comparator I'm using is LM393.

Since the whole circuit will be powered by, it the battery will be drained and would not stayed at the constant voltage. The battery stays at 4.2 V when it is fully charged. I want to put the reference voltage at 3.7 V and the actual voltage of the battery at V(in).

I tried to put a voltage divider at the reference voltage but cannot find the resistor values which will satisfy this case.

How do I build the circuit so that the ever changing voltage of the battery gives a stable constant value at the reference node?

#### Best Answer

Here's a circuit I did for a similar question you raised yesterday. It uses a very low-power voltage reference such as the MAX6006 (it consumes less than 1 μA) or the LT1389 which is also sub μA consumption. Because they are shunt references they will work down to quite low battery voltages.

For instance, with 0.5 μA flowing to feed the reference, R3 drops 1.025 volts hence the battery voltage can fall to 2.275 volts before the reference voltage starts to fail in stability and accuracy.

The op-amp is also very low power (less than 0.5 μA current consumption for the LPV521) and therefore is good for monitoring a battery especially as the input bias currents are around 40 fA typically (that's not a lot).: -

If the battery voltage is ramped from 1 volt to 4 volts, you can see the points where the comparator switches: -

As the battery voltage rises, the output triggers on at 3.79 volts and, as the battery voltage falls, the output switches to 0 volts at 3.64 volts. The points are not the same due to a small amount of hysteresis in the circuit caused by R5 and R4.

Link to a similar answer