The characteristics of the battery, especially the capacity and variation of the voltage on discharge, are needed to be known for circuit design of the battery powered equipments. The technical data of the junk battery is not that always available so that it must be measured by user. But it is hard to record the data by human because the measurement of discharge characteristics takes some hours a cycle. Any data logging system is required to measure the battery characteristics. This project builds a simple automatic battery discharge analyzer.
Right image shows a basic battery measurement system. It records only variation of the voltage while a discharge cycle. There is nothing difficult and it will able to be done with generic instruments but a built instrument specified for the battery measurement is better than generic one. Follows are the implemented functions of the battery discharge analyzer to build in this project.
Supports three different load modes, constant current, constant wattage and resistive. This enables to simulate various battery powered equipments with linear power circuit, switch mode power circuit and simple resister, lamp and heater. The constant current mode is usually used to measure typical characteristics of the battery itself.
The measured data is sent to the PC and recorded to the file.
Supports measurement of series resistance of the battery.
Right image shows the photo and circuit diagram of the built battery discharge analyzer. It is controlled with a PC via a serial port. No external power supply is required because it is powered by RS-232C signals.
The dummy load, constant current circuit, is controlled by a microcontroller. At constant power and resistive mode, the load current is controlled dynamically to simulate the load characteristics from view point of the battery. The current range is divided in three to increase the current resolution over supported current range. The power dissipation at the control transister Q1 can become up to 10 watts at maximum load current so that a thermal control, heat sink and cooling fan, is requierd. The heat sink used in this board can work up to several watts without a fan. When the power dissipation exceeds the limit, a larger heat sink or a cooling fan will be required. The operating voltage range is 0.8 to 4.5 volts and load current is up to 3 amperes. This enables to measure Li-Ion, Ni-Cd, Ni-MH and alkaline cells.
For measurement of battery voltage, four-wire method is used to eliminate an error due to drop out voltage at the wires and contacts. This is needed at high current and low voltage cells, such as Ni-Cd and Ni-MH. I am using JST EHR-2 wire to PCB connector for my projects so that a two contact connector B2B-EH is also added on the board.
All operation of the battery discharge analyzer is commanded with a console. The port setting of the terminal program is N81 38400bps.
The firmware must be programmed into the microcontroller after the circuit board is built. Attach the battery discharge analyzer to the PC via an RS-232C null modem cable. Open the port with a terminal program and the power will on. Check that the Vcc voltage is within 5±0.1 volts. Attach the flash programmer to the ISP connectro and write firmware and fuse value into the microcontroller. The programming can fail if the programmer consumes too high power from the target. In this case, an external power supply is required to the input of the regurator U4.
Next, calibrate the battery discharge analyzer. It does not have trimmer pot on the board and adjust the measured values with stored parameters. On the first power-on, a warning message that "Not calibrated" will be displayed. The calibration is done with the setup shown in right image. The 'c' command executes the calibration procedure and enter the values indicated in the meters.
>c Voltage [mV]:3792 Current 1 [mA]:64 Current 2 [mA]:312 Current 3 [mA]:1505 >
Attach a battery to be measured to the battery discharge analyzer and enter a measurement command with required discharge condition. The command format is shown in below.
m <Load mode> <Load level> <Interval mode> <Output interval> <Ending voltage>
While a measurement, measured values are output to the console. It can be read by spreadsheet in CSV format when it is logged to a text file. The measurement is stopped on: Esc key, voltage drops below ending voltage and current control exceeds the limiting value (except for constant current mode). Following list shows an example to use the measurement command.
>m c 680 t 10 3000 Load current[mA] = 680 Ending voltage[mV] = 3000 Interval[sec] = 10 Time,mV,mA,mAh,mW,J 0:00:00,4147,680,0,2819,2 0:00:10,3988,680,2,2711,30 0:00:20,3968,680,3,2698,57 0:00:30,3953,680,5,2688,83 0:00:40,3943,680,7,2681,110 0:00:50,3934,680,9,2675,137 0:01:00,3924,680,11,2668,164 0:01:10,3914,680,13,2661,190 0:01:20,3909,680,15,2658,217 ...
>m c 680 c 10 3000 Load current[mA] = 680 Ending voltage[mV] = 3000 Interval[mAh] = 10 mAh,mV,mW,J 0,4072,2768,2 10,3884,2641,140 20,3859,2624,280 30,3834,2607,418 ...
Use 'r' command to measure series resistance. It applies two different current and calcurates series resistance with ΔV and ΔI.
>r 0 1000 Rs[mOhm] = 30 >