http://denishennessy.com/2012/04/08/measuring-battery-capacity-with-an-arduino/ This guy tested ten brands of AA batteries while looking for the best bang for the buck. Schematics and code are posted too so this gadget can be replicated. Kevin. KD5ONS