3 Code for running a NiMH/NiCd battery tester based on an Arduino Nano.
5 The battery is connected directly across a diode and a low side shunt resistor. The arduino
6 ground is connected to the negative side of the battery. The shunt and battery voltage are monitored
7 over time to calculate the mAh and mWh capacities of the battery. The capacities and the instantaneous
8 voltage and current are displayed on a 4 digit 7 segment display.
10 The diode is there to prevent dropping the battery voltage much below 0.5V. Though I ended up
11 connecting a 4.7Ohm resistor across the diode to spread the power dissipation a bit. The battery
12 voltage will continue decaying slowly below the diode forward voltage.