16 Cell NimH charging Circuit? - Page 1
Forum section: electronics / beginners

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 13, 2012, 10:06:45 pm
content: Hi, I just wanted to start by saying this is my first post here but ive been watching the EEVBlog for months. I am not a complete newb when it comes to electronics, Ive taken up micro controllers as a hobby in the last year. Ive been coding for 15 years or so and am an industrial/commercial electrician, I kind of wanted to merge my two interests in life and thats how i got in to electronics. The past few months ive been working on a scratch built robot using an AVR168 (Arduino bootloader) for motor and power control and a parallax propeller for the brain. The reason I chose the AVR was to isolate alot of mundane type code from the robots brain, and I figured with the AVR built in ADC and PWM I could make a very small proto board to handle motor control via serial, and battery charging and monitoring. This is my first real project that is more than a home made dev board/programmer. Right now I have the AVR excepting serial data from the propeller which is connected to a Bluetooth module, and then the AVR sends the correct signals out to an l6205 H-bridge, the AVR chip is also reading the motor encoders, so its only tasks are serial comm, h-bridge control, reading encoders, and battery management. The AVR circuit is still in a breadboard state because I need to figure out exactly how to charge batterys with it.So basically im using 16 2450maH AA battery in series to run the robot, The H-Bridge is directly connected to the batteries and everything else is stepped down via switching regulators. Now here is the issue Im fairly poor :/ and live in a place where I have to order almost everything thing that I dont get from scrapping junk. My original idea was to use this chiphttp://www.newark.com/jsp/search/productdetail.jsp?SKU=89K6070&CMP=KNC-GPLA&mckv=gRlsXeBE|pcrid|13950359421|plid|then I found out maxim wasnt giving samples away anymore and they are not recommended for new designs :/. Also I forgot to mention i need to stick to through hole solutions, none of maxims newer charger handle 16 cells nor are the DIP. So I figured maybe the better way to do this would be to use the AVR/Arduino's 5 analog pins with shunts/dividers to measure the current and voltage along with tempature and just go that route to control the charging logic. I have two usable wal-warts one is 30v 1amps, one 22v 1.25amp. Basically im at the point where im not sure what voltage and current I need to feed these batteries to charge them, Id like to do a 4C type quick charge that turns in to a trickle charge. Not only do I not know exactly what to feed the batteries but im not sure what to use to control the voltage and current coming from the Wal-Wart, im thinking some kind of regulators tied to the arduino for voltage, but how what about current control? Im really hoping someone out there can give me some solid advise, taking 16AAs out and using a 4 battery charger is getting rather annoying.

author: IanB
author_rank: Super Contributor
timestamp: December 14, 2012, 12:36:58 am
content: Just a quick note here, but trying to use 16 NiMH cells in series is likely to be very hard on the cells, and charging is going to be difficult too.Basically you have to rely on all the cells being balanced in charge and equal in capacity so they all reach a full state of charge at the same time, and more importantly so that one cell does not get discharged before the others on discharge.If one cell in a series pack becomes discharged while you are still drawing power from the other cells, then the discharged cell will get reverse polarized and will suffer damage. To avoid this it is important not to discharge the pack too deeply before stopping to recharge it.When charging the reverse may happen. If you do a fast charge then one cell may become fully charged before the others and may get overcharged.So to manage a 16 cell pack the safest charging method is to use a slow 0.1C charge for 12-16 hours. This will avoid overcharging problems and will balance out all the cells. To do this charge just use a constant current supply of 200 mA for 16 hours on a timer.When using the pack, make sure to stop and recharge before the pack becomes too deeply discharged. That will prolong the pack life as long as possible.

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 14, 2012, 07:25:45 am
content: Ok thanks for the advice.This raises a few questions though, the first being if i dont discharge the pack fully how do i know how long to charge for? The second is what is the best way to regulate current/voltage a regulator and power resistor? Lasty should 1c acually be 245mah.

author: dr_p
author_rank: Frequent Contributor
timestamp: December 14, 2012, 08:48:24 am
content: Quote from: rwgast_lowlevellogicdesin on December 14, 2012, 07:25:45 amCheck this for info on Ni-MH charging.1C is current (Amps) and is the actual value of the capacity of the battery, expressed in Amps(or mA, but not Ahor mAh). In your case, 1C= 2450mA. and 0.1C=245mAFYI, charging a 2450mAhbattery with 2450mA takes 1h, but charging the same battery with 245mA takes 10h. This is the general idea, in reality there are other limitations and losses, for instance you cannot charge at 100C in 0.01h.

author: IanB
author_rank: Super Contributor
timestamp: December 14, 2012, 03:28:46 pm
content: Quote from: rwgast_lowlevellogicdesin on December 14, 2012, 07:25:45 amIt's OK to charge for a fixed time at a slow rate even if the pack is not fully discharged. NiMH batteries are designed to handle small amounts of overcharge.0.1C would in principle be 245 mA, however I rounded it down to 200 mA just to be conservative. If you were to perform a capacity test on each of your cells it is unlikely you would measure the full 2450 mAh. Only brand new, high quality cells in tiptop condition can deliver such a high capacity. A charge of 200 mA for 12-16 hours will work just fine. If you want to confirm the fully charged state you can measure the pack voltage at points during the charge and stop charging when the voltage is no longer increasing.

author: AdamSparky
author_rank: Newbie
timestamp: December 14, 2012, 11:33:38 pm
content: It really depends on how paranoid you are about battery cycle life. If you want your batteries to last for many many years, go with the .1C method explained above. If you don't mind replacing the pack every few years, a 1-2C intelligent charge would be fine. Battery power drills run on 15 or so cells in series, are charged at 1C and last many years. If you do it properly, 1-1.5C would be fine, your 4C then trickle method might be z bit intense IMO.There are two ways to intelligently charge nickel batteries, first is temperature delta and other is negative voltage delta. It would be best to use both. As the battery reaches full capacity (while being charged at constant current) two things happen, the temperature rises steeply and the voltage peaks and reduces slightly (but only by about 5mv per cell). You can detect this on your microcontroller and end charge.

author: IanB
author_rank: Super Contributor
timestamp: December 15, 2012, 03:09:55 am
content: It should be mentioned here that power tools normally use NiCd cells rather than NiMH cells and that due to their different characteristics NiCd cells support fast charging better than NiMH cells.If you were to try to charge a 2450 mAh AA size cell at 1C you would be using a charge current of 2.5 A. I speak from experience when I say that NiMH AA cells start to get very hot during charging if you use a 2 A charge current, let alone 2.5 A or more. This happens even with separate cells open to the air. If the cells are bound into a pack it is harder for the heat to escape and the temperature problem will be worse. If you do that you are almost compelled to place a temperature probe inside the pack and use temperature rise to detect the end of charge point.As to a practical answer for the OP, a charger like the Turnigy Accucel 6 that Dave recently examined is quite capable of charging a series pack of NiMH cells at a programmable rate and it supports the use of a temperature probe to help with detecting the end of charge point. Such a charger also supports the low rate balancing charge option that will help to prolong the life of the pack.Now the Accucel 6 only goes up to 15 cells in series, but similar chargers can be found that will go higher. Or maybe just limit the pack to 15 cells and lose a volt on the motor for the sake of convenience?

author: SamD
author_rank: Contributor
timestamp: December 15, 2012, 09:02:32 am
content: A multitude of CC chargers based on the LM317 regulator are available with a quick Google search. You can fashion them as simple or fancy as you please with the primary option being some sort of current meter and a pot- rather than a fixed R value- for varying the current based on pack parameters and personal preference.Granted, this is dirt-simple approach; no delta cut-offs, etc, etc., but it's simple and effective especially if funds are tight. Start out conservatively until you get a feel for current/time/temperature and you can get a idea of what currents you safely charge with without cooking the batts. Better yet, pick up a cheapie wall outlet timer used for your table lamp and set up the charger to cycle (after the pack is fully charged) at a reduced current for a short time every day or two to replace the self discharge that naturally occurs with this batt chemistry.I've a fair assortment of some pretty fancy chargers that will handle almost any protocol…… Oddly, I find myself using a number of simple CC chargers more often than not- with no complaints. WUPMU

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 16, 2012, 12:55:11 am
content: So Ive already constructed the battery pack using thermal compound, and JB Weld. I really need a way to charge the battery pack though so I looked through all my stuff and found a few 6.5 watt 36ohm resistors.Before I try this I want to make sure its safe. I would like to take my roomba's wal wart, which is 22v and 1.25A. Throw three of these resistors in series making 108ohms. Using ohms law this should give me a supply of 203mA@22v, the resistors are 6.5watt as I said and the math shows id need 4.4watt resistors so im in spec there. Then connect the resistors to the + on the walwart to the resistors and then the resistors to the + of the battery pack, then grounds to grounds, this seems like a very simple way to get things charged for the moment and build off of.I was also thinking maybe you could use like a 2n222 putting out 200mA byased with the walwart, would that work, sorry if that sounds stupid im not the greatest with transistors yet.

author: IanB
author_rank: Super Contributor
timestamp: December 16, 2012, 02:38:21 am
content: Well a NiMH cell will reach a voltage of 1.45 to 1.50 V during a slow 200 mA charge, so if you put 16 of them in series your total pack voltage during charging would reach at least 1.45 x 16 = 23.2 V. If your power supply is only 22 V you will not be able to fully charge the pack, but on the other hand you won't be in much danger of overcharging it either.Let's look at your resistor calculation. Suppose the cell voltage is 1.3 V at the beginning of the charge (a reasonable estimate for a typical NiMH cell on slow charge), then the pack voltage will be 1.3 x 16 = 20.8 V. If your supply is 22 V and you want to limit the current to 200 mA then your series resistor needs to be calculated as:R = (22 - 20.8 ) / 0.2 = 6 ohmsSo your estimate of 108 ohms is a little bit off. You can comfortably use something like 5 ohms. If you use 100 ohms your pack will take many days to charge.

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 16, 2012, 02:48:51 am
content: My cells are only rated at 1.2v, the pack is 19.6v with brand new cells out of the pack soldered together. So that should put 22v a little closer to what i need the supply to be.As far as the math im not sure maybe my logic is off but im thinking like this, there's 22v available to the pack so i need to figure out 200mah=22v*R which would make R about 100ohms. Am I suppose to be sizing the resistor based on the voltage droped after the pack..?

author: IanB
author_rank: Super Contributor
timestamp: December 16, 2012, 02:58:00 am
content: If your cells are NiMH cells, they have different voltages depending on measurement conditions.If you measure a cell open circuit with no load applied, then the voltage when empty will be 1.2 V. This is almost universal for all kinds of NiMH cell.If you measure a cell open circuit after charging, then there is no consistency to the voltage. Straight off the charger the voltage may be 1.45 V, but it will decrease over time even without connecting any load. A charged cell could have a voltage in the range 1.33 V to 1.45 V depending on the brand and type of cell and how long it has been sitting after charging.If you measure a cell when it is under charge, then the voltages will be higher. Usually the voltage will be at least 1.3 V, and it can go higher than 1.6 V towards the end of a fast charge.If you measure a cell when it is under load, then the voltages will be lower. Typically the voltage under load will be in the range of 1.1 V to 1.3 V. Full discharge under load is typically figured at a cell voltage of 1.0 to 1.1 V. However, in a pack of 16 cells it is better to be conservative and not go lower than 1.1 V per cell.

author: IanB
author_rank: Super Contributor
timestamp: December 16, 2012, 03:14:03 am
content: Quote from: rwgast_lowlevellogicdesin on December 16, 2012, 02:48:51 amThe current through a resistor depends on the voltagedifferencebetween one end of the resistor and the other. If the power supply is 22 V and the battery is also 22 V, then the voltage difference is 22 - 22 = 0 V. No current will flow.

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 16, 2012, 05:53:09 am
content: :/ Wow so this opens a whole new can worms!First things first how many volts should I be using? What Ive read says 150% the value of the cell so 1.2x.1.5 is 36v none of the numbers above say anything about 36v. Also should I be using 23.2 as my packs voltage for equations sake?I do have a 30v wal wart I can use as I mentioned. Now knowing you calculate the resistor on the voltage difference made me happy at first thinking I could use lower wattage resistors and the 30v walwart. But now that made me realize theres a huge problem, the current wont be constant if a resistor is used. Lets say I use the 36ohm 6.5watt resistor, if the battery pack id 7 volts low when connected to the charger, this resistor will allow the pack to draw almost 500ma and id need a higher wattage resistor. So is there now reliable way to make a charger just based around resistors?I would think you could use a 2n222 to supply up to 600mA of constant current, even a 3904 could theoretically do 200ma@40v corret? just not sure how. Am I wrong about this? I also have a few to220 packages labeled p32a (there from surplus) I belive these may be T p32a power transistors, maybe these would somehow cut it?

author: IanB
author_rank: Super Contributor
timestamp: December 16, 2012, 06:39:56 am
content: It's OK if the current is 500 mA at the beginning of the charge as long as it tails off to 200 mA by the end of the charge. The current doesn't actually need to be constant for a timed slow charge as long as you shorten the charging time appropriately.

author: SamD
author_rank: Contributor
timestamp: December 16, 2012, 09:55:04 am
content: http://english.cxem.net/calc/lm317_calc.php

author: Fraser
author_rank: Super Contributor
timestamp: December 16, 2012, 10:09:11 am
content: I have been charging large cell count batteries for some time. 16 cells can be quite a financial investment if they are good quality. Please don't use a resistor to charge them on the cheap. I hate resistor chargers ! Please take the advice given by others and trickle charge using a very simple and cheap constant current charger at 0.1C using an LM317 regulator and a resistor to set the current.Fraser

author: peter.mitchell
author_rank: Super Contributor
timestamp: December 16, 2012, 11:34:27 am
content: A proper charger for your batteries is not too expensive, the cheapest one from hobbyking capable of charging up to 27 NiMh batteries is only $37+ postagehttp://www.hobbyking.com/hobbyking/store/__12104__HobbyKing_ECO8_150W_7A_8S_Bal_Dis_Cyc_Charger_w_acc_.htmlI think for your battery pack it is a well worthwhile investment, even if just for safety as it supports: temperature cut off, timer cut off and capacity cut off.I think you will need one of these if you want temp cut off:http://www.hobbyking.com/hobbyking/store/__11777__Temperature_Sensor_w_Futaba_plug_.htmlAdditionally you can power it from a variety of power supplies you may have lying around from 11-18v, provided they have the appropriate power rating.

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 16, 2012, 07:40:03 pm
content: Well my issue with buying a charger is that I want the bot to be able to doc and charge itself! For this I need the charging circuit onboard the bot.Yes 16 cells is alot of $$. Like i said im going to monitor the voltage tempature and time using the AVR. Ive been looking at the lm317 chargers, i think id like to go that way with a charger that has a few settings, a 40hr, a 12hr and a 4-6hr. I dont plan on trying to do the 4 to 6 hr charger until I can monitor the batterys. Would probing the first batteries temp be enough, since it wil get the hotest.

author: SeanB
author_rank: Super Contributor
timestamp: December 16, 2012, 07:51:54 pm
content: You want to sense the temperature in the middle of the pack, as that will be the hottest point with the least cooling. The outside cells can be cool while the inner ones are cooking quite easily.

author: IanB
author_rank: Super Contributor
timestamp: December 16, 2012, 08:01:04 pm
content: The first battery will of course not get the hottest--what makes you think that?The cell that gets the hottest will generally be the weakest cell with the lowest actual capacity and/or the highest internal resistance. When you are charging a group of cells in series then normally one of the cells will reach a full state of charge before the others do, unless all the cells are very well matched and balanced. The cell that reaches full charge first is the one that will start to get hot first.Commonly when people are putting 16 cells in series in a pack they will measure and select the cells carefully from a larger set in order to get 16 cells that are closely matched in performance and capacity. This is because cells vary one to another due to manufacturing variances, and occasionally you will get a dud cell. You want to find and eliminate the dud cells and not put one of them in your pack.Have you read up on the various technical notes and manufacturer's literature on the theory and charging of NiMH cells? It is not a simple thing to do.About your charging options, the 12 hour timed charge at 0.1C is the safest and most practical one you can do with a 16s pack like the one that you have. The 40 hour charge would work but it's sort of pointless. The 4-6 hour charge is one of the worst possible options you could pick.There is a good risk of damaging your batteries if you try this, especially if you are not an expert in the theory. The recommended options are either a 1-2 hour charge with intelligent charge control (looking at voltage, voltage change, temperature and temperature change to detect end of charge), or the 12-16 hour timed charge that we have been talking about.If you try a 6 hour charge you may get a weak end of charge signal from the battery and miss the automatic termination at the right point. This will overcharge one or more cells and damage them. Such a charge rate is also too high for a timed end of charge as the batteries will be damaged if you get the timing wrong. Be aware that battery damage may not immediately be evident. It can build up slowly and result in declining pack performance before you are fully aware of the problem.

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 16, 2012, 09:45:59 pm
content: As far as a 4 to 6 hour charge i had planned on reading the packs voltage along with its temp, and cutting the charge when the battery voltage peaks and starts to fall again, if the temp starts getting to hi the plan is to back off on the current. Im under the assumption this is how smart charging works correct? I just figured 6 hours is safer than 2. I have watcbed all daves videos on batteries before asking any questions. The trickle charge is more of a maintence idea in case the pack gets fully discharged.

author: IanB
author_rank: Super Contributor
timestamp: December 16, 2012, 10:09:21 pm
content: Here's a graph of a 1 hr charge applied to a single Eneloop NiMH cell:Notice that the voltage is rising before it starts to fall, and that the fall in voltage is only a few millivolts. The ability to detect the fall in voltage depends on the charging current--larger charging currents produce a more pronounced voltage dip. This is a 1 hr charge. If you were to do the same graph with a 6 hr charge you may not see the voltage dip at all. This makes a 6 hr charge more troublesome than a 1 hr charge, as the danger of missing the termination signal is increased.If you want to see the voltage dip, you also must use a constant current charging supply. If you vary the current this will cause the voltage to vary also and this will hide the expected dip in voltage that marks the end of charge.Now the graph above is for a single cell. If you have a pack of 16 cells your troubles are increased. There is no assurance that all 16 cells will reach the voltage peak and start dipping at the same time. One cell may start dipping while other cells are still climbing. The climb will cancel out the dip and you won't see it. So now you may have one cell being overcharged while other cells are still charging and the charger won't detect the problem.Fundamentally, this is an area you don't want to find yourself in. Making good NiMH chargers is hard, and even experts like Maha Energy get it wrong sometimes.There is one safe way you can build a 16 cell battery charger. That is to use a constant current supply of 0.1C and a timed charge of 12-16 hours.If you value your batteries, all other options are going to require you to buy a commercially designed charger like the Accucel one or something similar. You can of course charge your batteries any way you like. But if you do, be prepared to replace the batteries after you have damaged them. NiMH batteries are somewhat fussy and fragile and need very careful charging and use.

author: IanB
author_rank: Super Contributor
timestamp: December 16, 2012, 10:57:11 pm
content: Just to give you an idea, here is what might happen if you charge NiMH cells at a 6 hour rate:Notice here that there wasn't a detectable drop in voltage at the end of charge. You could of course try and look for the plateau, or you could rely on the temperature rise. There will always be a sharp rise in temperature after the battery is charged as the supplied power has to go somewhere and after the battery can absorb no more the battery pack turns into a heater. However, the Eneloop is a very good cell and the temperature rise is very evident as seen here. With lower quality cells there can be a much less pronounced "corner" to the temperature graph and so detecting exactly when charging is complete is harder.

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: December 17, 2012, 04:27:13 am
content: Alright, i get it now and will no doubt stick to .01c unless i use a commercial charger or a chip like the max317 that can handel 16 cells. From what I understand it would be a good idea to leave switch over to a trickle charge after the 16hrs and leave the pack pluged in while not in use correct? Im just assuming this by how a roomba handels a 14 cell nimh pack.So just out of curiosity how does a commercial charger detect when the voltage slopes, while charhing massive amounts of cells? If i were to say tap each battery and use a 16 channel adc to cut the charger when the first battery starts its discharge slope would that work in theory (im not going too, just curious) i know dave has a new charger teardown on the hobbyking charger (havent gotten to watch yet), does he explain the amswer there?

author: IanB
author_rank: Super Contributor
timestamp: December 17, 2012, 06:23:27 am
content: Actually, it is not a good idea to leave NiMH cells on permanent trickle charge. It puts wear on the cells and will hasten their end of life. For most kinds of NiMH cell it is best to store them in a state of moderate discharge and give them a full charge just before use. However, the modern design of low self-discharge cell like the Eneloop seems to behave differently and storing them fully charged seems to be OK.The commercial chargers do look for the voltage slope, but the better ones use a temperature probe and look at the temperature as well. Also it is recommended to charge at the 1-2 hour rate to maximize the end of charge signal. Lastly, the commercial chargers are fairly clever about exactly how they detect the end of charge condition. They don't just look at one thing in isolation.