Over the last couple of decades the use of rechargeable batteries has grown enormously, and for most common applications there are ASICs which control battery management with very little additional circuitry. In the last few weeks, however, I have encountered two issues where non-standard solutions are useful, and in each case a less well known feature of many voltage references complicated the design. The issues are the measurement of battery capacity, and the charging of a lead-acid battery from a solar panel with minimal power dissipation in the control circuitry.
I built both of these at the same time, and when I tested the first prototypes the hysteresis of the comparators was much greater than it was designed to be. The circuit used is shown in Figure 1 and consists of an ADR291 or ADR292 voltage reference driving the non-inverting input of an AD822 or an AD8667 op-amp through a small resistor, R in. The output of the op-amp goes to this input via a large resistor, R fb, and a 1N4148 diode to provide hysteresis. This has an accurate threshold as the voltage on the inverting input goes low since the feedback through R fb only happens when the op-amp output is greater than the reference voltage and the diode conducts. The hysteresis of this circuit is R in(V+ - V ref - V diode)/(Rin + R fb) where V + is the op-amp positive supply voltage and Vdiode is the voltage drop in the 1N4148 diode.
Figure 1: Simple threshold circuit - which does not work with some references!
When I designed this circuit I assumed that if I used 1MΩ as R fb the current (approx 10μA) flowing into the reference output would flow in the resistor chain R1 + R2 + R3 (see the simplified schematic of these references in Figure 2) and the