Modified 04/13/09This schematic and source code are intended
for demonstration purposes only.
They are offered "as-is". Use at your own risk.
Code and circuits (and more) are here.
This circuit is a battery characterizer that applies a fixed load to a charged NiCad or NiMH cell and measures milliamp-hour capacity as it discharges.
There is no single load that can be applied to a battery to measure milliamp-hours. It depends on the battery type, it's intended application, etc. This device is simply one methodology that gives me a relative idea of the performance of NiCad and NiMH batteries in my drawer. Discharge is approximately 200mA which is approximately 0.1C for AA size cells or packs constructed with AA size cells.
When NuMH¹ batteries come into being, I'll update this device to handle those too.
Click on photo to display full size image.
Connect an 8-16VDC power supply to the battery characterizer.
Insert the cell(s) or connect the battery pack to be tested. After a charged cell is inserted in a socket, the unit waits for the voltage to stabilize (to avoid false measurements during first contact,) then the internal resistance is measured for later display when the cell test is complete. Thereafter, the cell is placed in TEST mode, the load is turned on, and milliamp-hours are accumulated. When the cell voltage falls below the cutoff voltage (1.0V per cell,) TEST mode is terminated and the load is turned off. DONE mode thereafter displays the total milliamp-hours and starting internal resistance until the cell is removed from the socket.
Socket #5 is designed for multiple-cell packs. The number of cells is calculated from the initial measured charged voltage and is in turn used to calculate the proper cutoff voltage by dividing by the nominal 1.2V per-cell voltage.
The TEST screen displays "T" and the cell number and it's accumulated milliamp-hours.
The DONE screen displays "D" and the cell number, the total accumulated milliamp-hours (rounded to the nearest 100,) and the internal resistance (rounded to the nearest tenth) of the charged cell at the beginning of the test.
The DETAIL screens display various measured and calculated parameters during TEST and DONE cycles. This set of screens is invoked by pressing the button for longer than a half second. The various screens sequentially appear for two-seconds each. DETAIL mode is ended when the complete set of screens has been displayed, or if the button is pressed momentarily.
If all sockets are empty, the display shows a message to that effect.
// crystal frequency (Hz) #define CRYSTAL_FREQ 4000000 // actual power supply voltage (volts) #define VDD 5.02 // cell nominal voltage (volts) #define CELL_NOM_VOLTAGE 1.2 // voltage at which mAh accumlation stops (volts) #define CUTOFF_VOLTAGE 1.0 // actual load resistances (ohms) #define LOAD_0_OHMS 4.9 #define LOAD_1_OHMS 4.9 #define LOAD_2_OHMS 4.9 #define LOAD_3_OHMS 4.9 #define LOAD_4_OHMS 19.5 // actual FET RDS(on) resistance (ohms) #define FET_RDS_OHMS 0.17 // actual scaling resistors R1 and R2 for channel 5 (ohms) #define R1 5350 #define R2 10220 // display time for logo screens (normally 750 mS) #define LOGO_TIME 750 // wait time for which voltage is displayed after a cell is inserted into a socket (seconds) #define INITIAL_DELAY 2 // wait time after which display goes into rolling status mode (seconds) #define STATUS_DELAY 10 // screen cycle time when in rolling status mode (seconds) #define SCREEN_CYCLE_DELAY 2 // screen cycle time when in cell detail mode (mS) #define DETAIL_CYCLE_DELAY 1500 // restart IRQ timer at adjusted value for 1-second accuracy (0-255, higher makes shorter IRQ tick) #define IRQ_RESTART_TICK 3 // time at cutoff voltage required to end test (seconds, normally 60) #define AUTOSTOP_TIME 60 // button time after which unit will display cell details (31mS interrupt counts, normally 16, ~= 0.5 second) #define BUTTON_DETAIL_TIME 16 // button time after which unit will reset (31mS interrupt counts, normally 128, ~= 4 seconds) #define BUTTON_RESET_TIME 128 // round to nearest 10's or 100's #define ROUNDNUM 100 // socket definitions #define SOCKET_1 0 #define SOCKET_5 4 // overvoltage definitions #define CH_1_4_OVERVOLTAGE 2.0 #define CH_5_OVERVOLTAGE 6.0
1 - "Nuclear Metal Hydride"