2.4 Current Mirrors
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.