Fly Electric!

Lithium Battery Tester v1

## This Tester v1 has been replaced with Tester v2 ##

This device tests lithium cells. It does this by measuring cells 'at rest' (Mode 1) or under load (Mode 2). Both modes display the results via it's LEDs. However, Mode 2 is most useful if you can download the data to a PC and use Excel to create the graphs shown above. Take a look at each graph to see the anomalies they reveal.

I have used Microchip's 20 pin PIC16F687 chip and there are 3 others in the same family. Many other PICs with four or more ADCs should work too. I've compiled the program on both CC5X and BoostC compilers.


C source code
| C source code
| device.ini
| PIC Projects | Beginners Guide

The exact workings of the circuit are described in the above C files, and in a more operational manner below. At time of writing WinPic did not support the 16F687 so I created the entry for it's device.ini file (above). You have to add this to their device.ini file if you have a version without this.


* The circuit is powered directly by the first 3 cells so can only be used with 3 and 4 cell packs. With an alternate 5v supply, it could be used with fewer cells as well.

* The voltage of individual cells is reduced by a resistor divider in a similar manner to LVC1. This yields ADC conversion steps equivalent to 0.02v each which is therefore the accuracy of the device.

* The circuit starts in Mode 1. This mode measures each cell 32 times, averages the results and displays these via the LEDs. It continues to do this until interrupted by the push-button. The ADC in the PIC has an error rate of '1' (=0.02v) which means it can interpret each cell differently (by 0.02v) on each iteration (hence the multiple samples). It usually settles after the first few passes and then drifts less often.

* The highest cell, and any that are within 0.02v, are indicated in the top row of LEDs. These are nicely in balance. Any cells that are between 0.02 and 0.1v different are represented by the 2nd row of LEDs (which flash to indicate how many increments of 0.02v they are different from the highest cells). Cells that are >0.1v different appear in the 3rd row of LEDs and each flash now represents 0.2v difference (10x worse than the middle row). 4 flashes are the maximum and this indicates 0.8v or more.


* Mode 2 is intended for load tests (but can be used at any time). The easiest and most realistic way of applying a load is to measure the pack in a plane (on the ground). All you need to do this is to restrain the plane safely and connect the device to the battery's balancing lead. A push-button switch activates Mode 2 (press/release action). Please note that it completes a Mode 1 cycle before starting Mode 2.

* The Mode 2 test measures each cell 64 times over a 3 second period and stores the 256 measurements (64 x 4 cells) in the PIC's EEPROM memory. The 3 seconds should give you plenty of time to activate Mode 2 and open the throttle. The capture period is while all the LEDs are off.

* The LEDs will continue to display Mode 2 results until the button is pushed again. It then goes back to Mode 1. The data in the memory is retained until you perform another Mode 2 measurement (which over-writes the previous records).

* The most meaningful interpretation of the results is to download them to your PC and analyse them as I have done in the graphs at the top of the page. However, all 256 measurements are averaged immediately and displayed via the LEDs as described in Mode 1. The main thing to look out for is the cells being out of balance more under load than when not.

* The Mode 2 measurements are actually 64 iterations of Mode 1. This means each cell is actually measured 2048 times in 3 seconds! (32 x 64). The only reason I am taking so many measurements is that the PIC operates this fast by default and the 32 measurements from Mode 1 create the 3 second timing. It is easy to vary this number in the program so take longer or shorter measurements (4 - 64 recommended).

Click on the links below for other pages.

Home Art of the Possible Absence of Matter Links Updates Email