Shunt network

A shunt resistor (70mOhm, 1%) is placed in the charge/discharge path of the battery. The shunt resistor is used to measure the current that flows in and out of the battery. The ATtiny devices are measuring the voltage over the shunt (differentially ADC reading) and can use this information to calculate the current flow and adjust the charge voltage/current accordingly, or terminate the charging.

Since the maximum voltage at the terminals of the shunt depend on the number and type of the batteries connected, a resistor divider network is used to reduce the voltage seen by the ATtiny. The resistor divider network can be configured to 1/2, 1/4, 1/8, 1/12 or 1/16 of the shunt terminal voltages by setting the corresponding jumpers: One set of jumpers (J405) configure the resistor divider on the positive side of the shunt and one set of jumpers (J406) the negative side. The side of the shunt that is considered "positive" is positive while charging a battery. If other resistor divider values are desired the resistors must be replaced.

The ATmega644 can also measure the shunt voltage, but only with 9 bit accuracy, as opposed to the ATtiny, which measure with 10 bit accuracy.

Figure 1. The shunt resistor and configurable divider network (section of the BC100 schematics).

The maximum input voltages to the ATtiny device must be below the supply voltage of the ATtiny, and the differential voltage over the shunt (resistor dividers) must be below the ADC's voltage reference, which is 2.5V (0.1% accuracy). If the differential voltage is low the internal gain stage of the ATtiny can be enabled to get better readings.