вторник, 24 декабря 2013 г.

Arduino-based battery discharger - logger

Более полугода назад узнал я про такую штуку - arduino. Самое забавное - это аналого-цифровой преобразователь по мизерной цене. С тех пор, в свободные вечера я всё пытался сделать штуку для разрядки разных батареек - уж больно короток век литиевых аккумуляторов, а узнать об его конце очень непросто. Далее текст на английском - всё равно, на русском врятли кто-нибудь это всё найдёт.

Quite recently, about half a year ago, I found a webpage explaining how to make a simple laser engraver controlled by Arduino. For me, Arduino is a very cheap and easy to use analog-to-digital converter; so the first idea was to make a simple battery discharger-logger. This device is very handy for me - nowadays, there are plenty of lithium batteries everywhere from laptops to cameras and flashlights. Unfortunately, these batteries do not last long as their capacity is decreasing over time leaving only 80 mAh in a battery marked 2500 mAh. It is very difficult to notice even so drastic decrease in capacity.
Previously, I tested my batteries approximately once a year, discharging them using a piece of nichrome wire and logging capacity by a webcamera-monitored multimeter. Not very pleasant, accurate way of measurements. Recently, I have finally completed the 4th version of the Arduino-based discharger - it finally works well.

The idea is very simple - to discharge a battery using a 2Ohm resistor, a high-gain transistor connected in a series provides control over discharge current. Two parameters are measured during the discharge: voltage and current. the former is straightforward connection to analog input, the latter is also easy - measuring voltage drop over the 2Ohm resistor and calculating the current.
Of course, doing like this is uninteresting and imprecise. The first problem is the voltage measurement accuracy. Arduino measures voltage by comparing it with REFERENCE voltage (usually 5V) - sounds simple, but real voltage may significantly deviate from 5.00V, so precise voltage reference is needed - I used LM285LP-2-5.. VOLT REF, 2.5V, PRECISION, TO-92 from Farnell. Its precision (1.5%) is much better than the precision provided by Arduino itself (ca 10% according to my measurements) -  quite enought for me.

In order to increase the precision further, I should consider even smaller error sources. The most obvious error source is the time precision. According to my estimations, build-in timer is ca. 0.5% faster than needed (it goes ahead of real time by ca. 2 minutes every 7 hours). I did not want to deal with it - this error is acceptable to me.

To accommodate wider voltage ranges I should ensure that my input voltages are always lower than 2.5V (my reference voltage), so I added 2 voltage dividers. Another issue is the discharge current control. Arduino provides pulse-modulated output signal, which should be smoothed out by a simple RC filter to avoid current pulsations.

Another component is logging. It is possible to use Serial port and send all data to your PC, but it is not convenient to keep your PC turned on, so I used a SD card. Another addition is an LCD display and a few buttons to communicate with the instrument. But do not forget to use large radiator to dissipate the heat from the resistor AND the transistor. The overall schematics look like this (you may download Eagle and Arduino files):
For example, I discharged 2 batteries for Olympus camera at 500 mA produced by Acme and Olympus.
A few pictures below:
 The radiator at the left dissipates the heat generated by the resistor and the transistor. The screen shows the status of the discharge.
Back side is not very clean - there are few wires.

Комментариев нет:

Отправить комментарий