2.4 Current Mirrors

The high-side current mirrors monitor charge and discharge voltages and use a dual NPN/PNP transistor pair (ZXTC2045) to implement the current sense circuits. See Figure 2-2 below. The left circuit monitors the charging current between the charger and the battery. The right circuit monitors the discharge current between the battery and the load.
Figure 2-2. Current Monitors

The charge current flowing through R22 generates a sensor voltage = ICHARGE * R22. An identical voltage is generated across R2 due to the forced matching bias of the two PNP transistors of TP3 and TP4. The result is a current flowing from the PNP pair to the NPN pair = (ICHARGE * R22)/R2 or (ICHARGE/1000). So for a 1A charge current, 1 mA of current flows into both NPN collectors.

The current mirror action due to the forced matching bias of the two NPN transistors generates a matched current into R23 and R3, which in turn generates a matching output voltage across R23 and R3. The voltage is = (ICHARGE/1000) * R23. So, for a 1A charge current, an output of 2V is generated across R23.

The current monitoring circuit for the load current operates in a similar manner generating an output voltage = (ICHARGE/1000) * R10.

Both currents can be monitored by the microcontroller ADC, and the integration of total amp-hours both in and out is accomplished in software. Knowing the total charge in and out, as well as the batteries’ capacity, allows for the calculation of the remaining charge in the battery. When combined with the current battery voltage, an estimate of the battery’s health, or remaining life, can then be estimated.