Pages: [1]   Go Down
Author Topic: Arduino-based opensource NiMH battery charger  (Read 9823 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

first post here. I'm developing on an Arduino-based NiMH (for AA or AAA) battery charger, I'm calling it Quite Smart Charger (or QSC). Eventually the project would allow to easily build a DIY smart battery charger that is fast but does not wear the battery through overcharging. Right now I have two sketches, one for discharging and one for charging. However the same circuit handle both charging and discharging so switching between the two is only a software issue (they can be integrated in a single sketch). So far only a single cell is supported. For charge termination I implemented 3 methods: negative delta V, timeout, overvoltage. The negative delta V method is a bit tricky since a 5-10mV voltage dip must be detected. This is the reason I use both HW and SW filtering. Optional temperature dT/dt sensing is on plan. The battery is "sensed", so, to start charging, you just push the battery in, to pause you pull the battery out. Led on 13 pin is ON while waiting for a battery.

I'm trying to keep the number of components to a minimum. However an external (at least 1A) powersuppply is compulsory for fast charging. The circuit I implemented uses an LM2941 (that includes a nice ON/OFF pin) to provide a constant current--see the attached schematic and picture. It uses 3 arduino PIN, 2 digital IO to control charge and discharge (pwrPin, dischargePin), and an analog input to monitor the battery voltage (inputPin). The circuit charges when pwrPin is LOW (and dischargePin LOW). Discharges with dischargePin HIGH (and pwrPin HIGH).

I do heavy filtering both hardware (1k-22uF LPF) and software averaging 8 voltage reads, once a second. 60 voltage acquisitions (1 minute) are stored in a circular buffer and averaged to have a stable reading once a minute to detect the negative delta V or overvoltage.The voltage acquisition is sent once a second to the serial port for logging. Additional info are on the header comment on the sketch file.

The discharge takes place at a constant current monitoring the cumulative energy (in mAh) being discharged.

So, please provide feedback, suggestions or additional ideas/contributions. Also would be nice to have some charge logs (serial dumps) for different cells in order to optimize the charging process.

Eventually we can get the best NiMH charger based on opensource hardware/software smiley-wink.

PS: For NiMH charging info you can refer to:
http://en.wikipedia.org/wiki/Nickel%E2%80%93metal_hydride_battery#Charging
and linked documents.






* charger_schematic.png (354.62 KB, 2646x1116 - viewed 1308 times.)

* charger_photo.jpg (128.83 KB, 945x743 - viewed 882 times.)
* QuiteSmartCharger.ino (7.09 KB - downloaded 271 times.)
* BatteryDischarge.ino (1.27 KB - downloaded 167 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just noticed that to run the discharge sketch you need a tiny library: Voltmeter. I attach it now. Please copy those files in the sketchbook/libraries/Voltmeter folder.

* Voltmeter.cpp (0.53 KB - downloaded 153 times.)
* Voltmeter.h (0.4 KB - downloaded 126 times.)
« Last Edit: February 15, 2012, 01:37:07 pm by Tritemio » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is a great project.  I just started a similar project for 1 to 10 cells.  I have started my experiments with a simple voltage divider consisting of 2 resisters.  This is exciting.  Hopefully I can help contribute to the project!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have pictures or schematics?

How is your project going?
Logged

0
Offline Offline
Full Member
***
Karma: 5
Posts: 240
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tritemeo,

What is the IC called out it seems you have labeled as an LM2961 but I have a hard time finding a datasheet or even a chip with that designation, can you help me out?

Thanks

wade
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was also thinking of making this project but it is not in the priority list right now.
I was just thinking to use the Arduino to measure the charging current and voltage in the battery and program it to stop charging after sensing a certain voltage or current level (indicate that NiMH is full), or may be do a trickle charge.


Good Luck, and keep us posted.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everybody,

I didn't had time to develop further the QSC (Quite Smart Charger) project and unfortunately I'm quite busy right now, but I would gladly give guidance to anybody wants to take over the project.

Actually I was prompted to came back to the forum by a PM (since I have email notification), so if I don't answer please send me a PM and will be much more likely I'll notice it.

@jaydie: you can do the charger as you said (and the overvoltage feature on QSC does exactly that) but I noticed that, during charging at high current (>300mA), the NiMH voltage can reach values as high as 1.8V in some cells, or 1.6V on others. So with a fixed value you will either overcharge some cell or undercharge others. That's why I implemented the negative delta V method, that is not perfect either. So there is a timeout and an overvoltage protection also.

@wwbrown: the IC is the LM2941 low-dropout 1A voltage regulator. The nice thing about this IC is that it has  ON/OFF pin. The LM2941 in TO220 should not be hard to find. You can also build the circuit with a more ubiquitous LM317, that is not low-dropout (you need minimum 2 V between IN and OUT) and does not have an ON/OFF pin, so you need an additional power MOS to shut it down.

@pavels (PM):
1. The charging current is constant and determined by R* value. The only practical way to make the current software programmable in a range of values is using a DC/DC. Or using 2 or 3 different resistors values and select the level that you want with some power-MOS with low Rds-ON.

2. For R* selection you can use 2 0.5W resistors of 3.3 or 4.7ohm in parallel to obtain a current of 760mA or 530mA respectively. I didn't had big problems finding the resistors.

3. As you noticed, the discharge current is not at constant current as it across a resistance. The voltage though is quite constant when the cell is charge. When the voltage begins to go down there is a small energy left. The voltage-time curve is knee-shaped with an almost constant part (of several hours) and a sharp decrease of voltage (in few minutes) once the stored charge is finishing.

4. To charge multiple batteries indipendently you need to duplicate the circuit and the arduino controller.

5. In principle the mot efficient way of charging would be with a DC/DC or even better with a dedicated IC that takes care of the charging like the MAX712, MAX713. But since all the charging logic is implemented by the IC there is no need for the arduino anymore (except if you want to do some fancy display or USB communications).

Hope this information can be helpful.

Tritemio


Logged

Pages: [1]   Go Up
Jump to: