EAGTAC        
Page 1 of 4 1234 LastLast
Results 1 to 30 of 108

Thread: My NiMh battery charger project

  1. #1

    Default My NiMh battery charger project

    It was suggested to me that I start a dedicated thread for this project. I finished the latest version of my NiMh battery charger. I implemented a few suggestions made by some of you, the main one being switching to solid state caps. Here are some pictures:







    There are a few more images on my blog: http://www.paulallenengineering.com/blog.html
    Last edited by paul.allen; 04-11-2013 at 08:55 PM.

  2. #2
    Enlightened abhi555's Avatar
    Join Date
    May 2006
    Location
    Idaho
    Posts
    31

    Default Re: My NiMh battery charger project

    Hi Paul, read your blog, its amazing you could do all this in $45.

  3. #3
    Flashaholic* hiuintahs's Avatar
    Join Date
    Sep 2006
    Location
    Utah
    Posts
    1,791

    Default Re: My NiMh battery charger project

    Nice job Paul. I'm doing a similar project for lithium ion. I just ordered the parts from Digikey and Mouser yesterday. I've got the board all layed out, but want to have the parts in hand to double check the pcb footprints. I'll have to share that with you when I get it done. Those battery clips look like Keystone.

    How are you doing the battery end charge..........voltage? Is that a microcontroller in the middle and a 6 pin header for in-circuit-programming?

    How do you get the board fabricated so cheap.........NRE, photoplots, etc? Did you generate gerber files using software on your computer or did you use one of those on-line type of services? Just curious as to how others do things. Thanks.
    Last edited by hiuintahs; 04-09-2013 at 01:40 PM.

  4. #4

    Default Re: My NiMh battery charger project

    The clips are Keystone. I like them because they partially wrap the batteries when they are clipped in, holding them really nicely. There is an added benefit in that they help conduct heat down to my temperature sensor. And they make a cool clicking noise when you put batteries in or take them out. : )

    End of charge detection is based on looking at a combination of voltage (for a negative dip or flat depending on battery temp and impedance), speed of temperature change and max temp, and the impedance of the battery (as a battery charges it's impedance goes up, that is part of the reason why with a constant current you see a rise in voltage. Of Course it is also a battery Charging, so you will see a rise in voltage from that too!!) and a few combinations. I run some test on the batteries before I start charging to try and "guess" their health. Then I make adjustments to everything based on that. For example an older battery will charge hotter than a new one. This will make the change in temperature at the end less dramatic, because it will rise from an already elevated level. Also Older batteries have a higher impedance (that's why they charge hotter) so to deliver the same amount of current during charging, it takes higher voltages. That same high impedance makes them unable to deliver as much current into a given load during a drain. By watching all of it you can tell a lot about the battery during charging and discharging... the trick is balancing it all.

    Yes that is the microcontroller in the middle and a 6 pin ISP header. I designed the board and then generated gerbers (most board houses like it if you give them gerbers, but it is amazing how many will do it for you if you have one of a handful of industry standard software packages). I use a local place here in Utah, they have a panel sharing program that helps a Lot with cost. That being said, if you are looking for great quality at an amazing price (and don't mind Purple boards, or waiting) then check out http://dorkbotpdx.org/wiki/pcb_order their new ordering site is http://oshpark.com/. I am not affiliated with them, but I have had them make a few boards for me and was really impressed with the quality for the price!! I just wish they would do a different color.

  5. #5

    Default Re: My NiMh battery charger project

    Quote Originally Posted by abhi555 View Post
    Hi Paul, read your blog, its amazing you could do all this in $45.
    My first Charger ever (two years ago) was an ambitious 4 battery board that cost me over $100. I have learned my lesson of how to keep cost down and still get what I want (mostly).

  6. #6
    Flashaholic* hiuintahs's Avatar
    Join Date
    Sep 2006
    Location
    Utah
    Posts
    1,791

    Default Re: My NiMh battery charger project

    I think it's Circuit Graphics that does the panel sharing. I've never used them but did talk to them about it once. Thanks for telling me. I'll have to try them out. NRE at QTC is $155. And Precision Technology has a $350 minimum order. I use PT when doing volume though because it comes out less expensive. Still hard to make a product to sell when the PCB on small quantity is so expensive.

    I'm impressed with your software that you have in that microcontroller. I'm mostly an analog engineer but with the lithium ion charger I've chosen to learn PIC microcontrollers. My last microcontroller project was a Z8 years ago. I don't think I will struggle too much. I just got my PIC programmer a few days ago and should have some parts to play with in the next day or so.

  7. #7

    Default Re: My NiMh battery charger project

    hiuintahs I didn't notice (until your last post) you are also in Utah. Yes Circuit Graphics... although I can't wholeheartedly recommend them. They are hit and miss. I put test etch patterns on all of my boards so that when I pick them up i can immediately see how they did. Sometimes it is pretty bad and then other times (like this last time), Amazing. They say they do down to 8mil spacing on their panel sharing, but I often am able to squeeze by smaller. However there has been a few times when they gave me my board and they didn't even hit 8mil at all! This last board was the best I have Ever seen from them though, they hit sub 1mil on my test pattern. If they could keep that up I would use them for everything. When it really counts (for work) I use a place out of Arizona (they flash gold in house and a few other things).

  8. #8
    *Flashaholic* Illum's Avatar
    Join Date
    Apr 2006
    Location
    Central Florida, USA
    Posts
    13,050

    Default Re: My NiMh battery charger project

    subscribed

  9. #9
    Flashaholic* uk_caver's Avatar
    Join Date
    Feb 2007
    Location
    Central UK
    Posts
    1,381

    Default Re: My NiMh battery charger project

    Is the voltage measurement done on charge?

    I've made some chargers for NiMH packs for caving lights, and for them I did voltage measurements in brief off-charge periods, which seemed to work well but which was rather forced on me anyway - the connectors on the packs couldn't be guaranteed to be free of corrosion (or even mud) so that could have significant effects on impedance for on-charge measurement, and it also seemed easier to measure off-charge since that removed the possibility of noise from charging hampering the measurements. Lacking the ability to easily/reliably measure temperature given an existing 2-wire connection, I programmed multiple termination conditions (quick termination on decent -dV, as well as termination on longer-term 0dV) and that seemed to work well even given relatively low charge rates of around 0.2C.

    I'd considered trying to use impedance as some kind of extra source of information but I suspect it could be unreliable in my case, though I do measure and display it on a charger/analyser version I built for my own use, since it does give a pointer to general pack/connector/wiring condition.

    The SD card on your charger is a great idea for people who want all the details of exactly what has happened, and I'm sure it was providing really useful information during development.

    Thanks for the references re: PCB manufacture - I'm looking to get some driver boards made, and I'll look into the places you mentioned.

  10. #10

    Default Re: My NiMh battery charger project

    The voltage is measured both during charging and like yours, during a "brief off-charge", or in my case a 1.5 seconds discharge (the actual length of this I am still playing with). The SD card was a Big reason why I made my own charger... I wanted to see Everything that goes on during charging (and discharging). It has really helped in the development, as I have had lots off data to pull from when creating and adjusting charge algorithms, Especially when things would go wrong (yes things do go wrong when you are developing), I could see exactly when and why.

  11. #11
    Flashaholic*
    Join Date
    Mar 2007
    Location
    Brisbane, Australia
    Posts
    634

    Default Re: My NiMh battery charger project

    Nice! Are you going to make these available for others to purchase?

  12. #12

    Default Re: My NiMh battery charger project

    I wouldn't be opposed to it. My only reservation is that I would need at least 100 people interested... and I just don't know if there is that kind of market for something like this.

  13. #13
    Flashaholic* Mattaus's Avatar
    Join Date
    Mar 2011
    Location
    Brisbane, Australia
    Posts
    1,766

    Default Re: My NiMh battery charger project

    For a quality charger at this price? Sign me up for a 4-bay charger.

    Sent from my Galaxy Nexus using Tapatalk 2

  14. #14

    Default Re: My NiMh battery charger project

    paul.allen... I'm in for one of your 2-bay or 4-bay nimh charger, whichever comes out first.
    Eveready 2C Flashlight

  15. #15
    Flashaholic*
    Join Date
    Mar 2007
    Location
    Brisbane, Australia
    Posts
    634

    Default Re: My NiMh battery charger project

    What are the maximum/minimum charge & discharge rates? What sort of accuracy are you getting? Are you planning to make the source code for the PIC open source so that others can reprogram it to add extra features? Have you considered a 2V reference so that you could charge and test NiZn cells? Could the micro USB connection be used to communicate with a PC, or is it only for supplying power? For $45 for a 2 cell version, I'd probably take 2 - depending on the answers above. I'd expect that you'd need to charge more than that though unless an increase in volume significantly reduces your costs... Even at a higher price, I'd consider at least one with the right features. Sorry about the lack of formatting - the forum has eaten my paragraph breaks!

  16. #16

    Default Re: My NiMh battery charger project

    Your responses are very encouraging. I think what I am going to do is put the 2 cell version up, as is, on kickstarter and if things go well, I will use the money I raise to produce the prototypes for my 4 cell version that will add different charge rates, a case, buttons and a color LCD.


    Power Me Up, to answer your questions, the discharge rate is set in this version to average about a 5 hour discharge time for most AA batteries (it discharges into a 3.9 ohm resistor). This was chosen because mAh ratings are supposed to be calculated based on a load that will drain a battery in 5 hours. The problem is without knowing the actual capacity of a battery beforehand you can't calculate that load. So a 3.9 ohm resistive load turned out to be a nice average compromise. I did however make sure to use PWM pins for the N-channel fet's that control this load, so that if a different resister was used (which in an earlier version I used a 1.8 ohm) then you could use PWM to vary the discharge rate.


    Charge Rate for this one is set at a pulsed 800mA rate. At 50% it averages to a 400mA rate. However this was more so that it could still use USB and not surpass drawing 500mA. I have a 1 Amp USB power supply and in software did test up to a 1.2Amp charge rate. Anything more then this and the inductor starts to get hot.


    Accuracy right now is down to a change of 1.8mV minimum. When charging, because of the extra noise combined with filtering and averaging I actually get better than that (if you want to learn more as to why, you can look on the internet or ask me in a message).
    For temperature I can detect a change of .18 degree C. I was using a different temperature sensor that gave me more sensitivity with 15mV/degree C, but saved almost a dollar per sensor by going with one that is only 10mV/degree C. It dropped my sensitivity... but not much : )
    Current is accurate to within at least 1.8mA (notice a pattern? it's the 1.8V ref combined with a 10bit ADC) again though, because I only take current measurements during charging, I actually tend to get better than that.


    As far as software, I have feelings both ways about making the code open source. I have spent hundreds of hours testing my code to make sure it is as robust as I can make it. I have also cycled countless batteries for the same reason. I have no problems with making it open source, so long as no one blamed me if they messed up and ruined something.


    Going along with above, if I made the software open source, I would also change things so that you could reprogram and communicate with a PC through the USB.


    Last edited by paul.allen; 04-11-2013 at 11:35 PM.

  17. #17
    Flashaholic* uk_caver's Avatar
    Join Date
    Feb 2007
    Location
    Central UK
    Posts
    1,381

    Default Re: My NiMh battery charger project

    For discharge, had you considered using a constant-current driver chip like an AMC7135, possibly with a little extra load resistance to spread heat generation?
    One of them could could still be used above a low-side current sense resistor if you're measuring discharge current, to take account of any fluctuations, and at ~350mA they're not far off a 0.2C discharge for 2000mAh cells.

    Clearly it's easy to calculate total mAh out even if discharging into a resistor, but having constant discharge current would save anyone having to normalise data from the SD card from constant resistance to constant current.

  18. #18
    HKJ's Avatar
    Join Date
    Mar 2008
    Location
    Copenhagen, Denmark
    Posts
    9,076

    Default Re: My NiMh battery charger project

    Quote Originally Posted by uk_caver View Post
    For discharge, had you considered using a constant-current driver chip like an AMC7135, possibly with a little extra load resistance to spread heat generation?
    One of them could could still be used above a low-side current sense resistor if you're measuring discharge current, to take account of any fluctuations, and at ~350mA they're not far off a 0.2C discharge for 2000mAh cells.

    Clearly it's easy to calculate total mAh out even if discharging into a resistor, but having constant discharge current would save anyone having to normalise data from the SD card from constant resistance to constant current.
    Using a large mos transistor and drive it from a filtered PWM output, makes it possible to do a true adjustable constant current load, this is much better than a AMC7135.
    My website with battery, charger, usb reviews, comparisons & information: https://lygte-info.dk/
    Latest addition is multimeter reviews

  19. #19
    Flashaholic* uk_caver's Avatar
    Join Date
    Feb 2007
    Location
    Central UK
    Posts
    1,381

    Default Re: My NiMh battery charger project

    That's certainly one way (and essentially what I did in my homemade analyser*), but it does require some kind of supervision/feedback.

    (*not quite filtered PWM, but D/A by another means - slow RC circuit on the FET gate, driven by a normally-tristated pin which was only turned on to nudge the voltage up or down as required to keep current constant. That allows driving without hardware PWM but with minimal software intervention. At the expense of slow response, it also allows very fine control through tiny nudges, and response could be speeded up by using a 2-pin drive with 'coarse' and 'fine' resistors.)

    In this instance, I was just thinking of simple / cheap / better-than-resistor.

  20. #20
    Flashaholic*
    Join Date
    Mar 2007
    Location
    Brisbane, Australia
    Posts
    634

    Default Re: My NiMh battery charger project

    That's not quite as good as I was hoping, but my expectations were probably too high considering the cost and size of the device. I'd still like to get one for around that price - especially if it can be reprogrammed. Let me know when you've got your kickstarter set up!

    What's your current thoughts on the charge rate capabilities for the 4 cell version? It'd be good to support you with the 2 cell version just to see what you can do with the 4 cell version - what you've created already looks better made than some commercially made products I've looked at!

    One concern with having it connected to a PC via the USB port would be the limited current available - even USB3 is limited to 900mA and I'm not even sure if all of that is available to the pins that a USB2 cable connects to... I suppose you could use a buck circuit since you only need around 2V for charging.

  21. #21
    Flashaholic* uk_caver's Avatar
    Join Date
    Feb 2007
    Location
    Central UK
    Posts
    1,381

    Default Re: My NiMh battery charger project

    He is using a buck circuit - see post #27 in:
    http://www.candlepowerforums.com/vb/...T-NiMH-charger

  22. #22
    Flashaholic*
    Join Date
    Mar 2007
    Location
    Brisbane, Australia
    Posts
    634

    Default Re: My NiMh battery charger project

    Quote Originally Posted by uk_caver View Post
    He is using a buck circuit - see post #27 in:
    Yes, you're right - sorry - it should have been obvious from the numbers that Paul was giving anyway!

  23. #23

    Default Re: My NiMh battery charger project

    Quote Originally Posted by Power Me Up View Post
    That's not quite as good as I was hoping
    For my first battery charger (over a year and a half ago) I had two external 16bit ADC's (two channels each) used to measure the voltage on each cell (it was a 4 battery version). The ADC I was using was $10, so $20 went just to measuring the voltage of the cells. No current, or temperature (at 16bits, I still measured them with the 10bit ADC). Now I could have used and analog mux and I could have used a cheaper ADC (cheaper or less bits), but either way it still cost more.

    As of right now I am already looking at having to ask around $55 because my cost are so high. I could add an external ADC and analog Mux for an increase of ~ $10 -$15. At that point it would be more like a battery Analyzer than a charger.

    What do you think?

  24. #24
    Flashaholic* hiuintahs's Avatar
    Join Date
    Sep 2006
    Location
    Utah
    Posts
    1,791

    Default Re: My NiMh battery charger project

    Paul, You might consider offering 2 versions..........one that is specialized with the analyizing capability, (sd card, etc) and another that doesn't but is less money. I think the analyzing is a great idea for development but once you know your circuit is working and have the various safety precautions built in, most people would want something they can trust but is less money. Only on CPF will you find the folks that want a more sophisticated charger. Thus you won't be looking at very much volume. So I think it depends on if you would want to take this to the next level of producing it in larger quantities or not.

    I don't know if you have followed any of CPF member, Cottonpickers chargers, but evidently he sells a lot of them. One thing that I think that makes them popular is that they have a voltage display on them and they are pretty simple in the way they operate. They are just based off of a single SOT-23 IC, like the LTC4054. They are lithium-ion chargers though and I think that makes it more simple to design a CC/CV circuit than one that has to manage the termination of a NiMh..........thus the myriad of lithium ion charger IC's. Based on what he sells those for and the level of sophistication of yours........you should get more than $55 unless you were to go into big quantities to get the costs down. Just some thoughts.

  25. #25
    Flashaholic*
    Join Date
    Mar 2007
    Location
    Brisbane, Australia
    Posts
    634

    Default Re: My NiMh battery charger project

    Quote Originally Posted by paul.allen View Post
    What do you think?
    I'm more interested in the analyzer function with charging a secondary feature for me.

    I agree with hiuintahs that it would be worth considering doing versions with and without the extra logging/analyzing features so that it could be cheaper. Of course, splitting it into 2 versions would add extra costs so it might not be worth doing - it really depends on how much cheaper it would make it.

    Which PIC are you using? Does it do I2C? Even if it doesn't handle I2C directly, you could do bit banging and interface to an MCP3424 - it has 4 differential 18 bit ADC channels with programmable gain up to 8x and it has an integrated 2.048V reference. I'm not sure of their individual price, but you can buy boards with a pair of them for 17 UK Pounds which works out to about US$26, so presumably, their individual cost is less than the 16 bit ADC that you were previously using.
    http://www.abelectronics.co.uk/produ...ital-converter

    Maybe you could do the 2 cell version as is and then go all out with the analyzing features for the 4 cell version. I'm still in for at least one of the 2 cell versions at $55 even if you don't have the PC interfacing and programming feature added to it - they could wait for the 4 cell version. I'm pretty time poor myself at the moment, so I probably wouldn't get a chance to play with reprogramming the device myself for some time yet anyway. If I did have spare time, I'd also be working on a similar project that I've been thinking about for a while - with the focus being on the analyzing side. At the rate things are going, it'll probably be 2020 before I get a chance to start on it!

  26. #26

    Default Re: My NiMh battery charger project

    Power Me Up, that is an interesting part, affordable too. I don't mean to be a chip snob or anything but I hadn't really considered microchip for their ADC's (usually microcontrollers, DC/DC converters or some of their sensors). Looking over the datasheet I think I will give it a spin. In the past I have done a lot of audio work and have always liked ADC's from Linear technologies or TI. I think my brain was just stuck on their great ADC's. However, monitoring batteries you don't need the same kind of sampling rate and I think the MCP3424 would do just great. SOLD! : )


    As far as which PIC am I using... an AVR. I don't mind PIC's, in fact I really love the PIC24H series and the DSPIC's. For this project though there was two things driving the choice of AVR. In the 8bit category I like them a bit better (this is not meant to be any sort of war of which one is best, I use lots of different microcontrollers including MSP430's and ARM Cortex) and I was planning (at least in the beginning) to make all of this open source when I was done (because of safety I have been more hesitant lately). You have to admit that with Arduino and Teensy, there has been a shift of support on the internet and in the opensource community for AVR over Microchip. The second reason was cost. Again, this is not really an area I want to argue (I see it to much everywhere), I am just letting you know my opinion and how I came to my decision. In the end nothing is set in stone and if there is some convincing argument for me to change I will. When I first started this I was wanting to use the Stellaris ARM Cortex-M4F (wouldn't that have been Awesome!), but after a while realized they just cost too much... I couldn't justify it.


    As far as two versions, I have thought about that, but really the only difference would be the $1.50 SD card slot. I am still gathering all the same data and analyzing it all the same for a proper charge, I just wouldn't be writing it all to the card. Even if I made it not cycle the batteries that would only save an additional $4.00 in parts.


    The biggest cost is being "Made in USA" and trying to use quality parts.

  27. #27
    Flashaholic*
    Join Date
    Mar 2007
    Location
    Brisbane, Australia
    Posts
    634

    Default Re: My NiMh battery charger project

    Quote Originally Posted by paul.allen View Post
    However, monitoring batteries you don't need the same kind of sampling rate and I think the MCP3424 would do just great. SOLD! : )
    Great! From memory of reading the datasheet for the MCP3424, one of its main intended uses is for monitoring battery charging!

    I haven't done anything with PICs myself yet - was just curious to see what the capabilities are for the one that you've chosen.

    As far as two versions, I have thought about that, but really the only difference would be the $1.50 SD card slot. I am still gathering all the same data and analyzing it all the same for a proper charge, I just wouldn't be writing it all to the card. Even if I made it not cycle the batteries that would only save an additional $4.00 in parts.
    Yep - that makes sense - I'd just stick with the single version that you've got - sounds like it's already a winner!

    The biggest cost is being "Made in USA" and trying to use quality parts.
    Yep quality parts are definitely worth paying extra for. Made in USA doesn't worry me so much (I'm in Australia) but still worth paying a bit more for! I'm leaning more towards getting 2 of the 2 cell versions now and then eagerly await the super duper ultra advanced 4 cell version!

  28. #28

    Default Re: My NiMh battery charger project

    Made in USA doesn't worry me so much (I'm in Australia)
    LOL, I guess the "Made in USA" could have come off wrong (I am glad it seemed to go okay with you). It just seems to cost a lot to have things assembled here, or PCB's fabricated, than in other places of the world.

    I order some samples of the MCP3424 from microchip just now. I will modify the board design to except the new ADC while I wait for them to arrive. The great part is I can drop the voltage ref and add this part with out much of a cost difference, yet a huge performance boost! Thanks again!
    Last edited by paul.allen; 04-13-2013 at 03:26 PM.

  29. #29
    Flashaholic write2dgray's Avatar
    Join Date
    Mar 2009
    Location
    Princeton, NJ
    Posts
    313

    Default Re: My NiMh battery charger project

    Definitely interested in a four bay.
    Looking to buy a LF2XT any age/type/condition. Also very interested in Aleph, Erin, and Tranquility Base stuff, please message me !

  30. #30
    Flashaholic*
    Join Date
    Mar 2007
    Location
    Brisbane, Australia
    Posts
    634

    Default Re: My NiMh battery charger project

    Quote Originally Posted by paul.allen View Post
    LOL, I guess the "Made in USA" could have come off wrong (I am glad it seemed to go okay with you). It just seems to cost a lot to have things assembled here, or PCB's fabricated, than in other places of the world.
    Things are always going to be more expensive when you're paying more than slave labour rates!

    I order some samples of the MCP3424 from microchip just now. I will modify the board design to except the new ADC while I wait for them to arrive. The great part is I can drop the voltage ref and add this part with out much of a cost difference, yet a huge performance boost! Thanks again!
    No problem - glad to help out!

    I guess that there might be some more cost increases to improve the filtering? If there is noise that is significant to a 10 bit ADC, I don't think that you would get much extra benefit from going to even a 12 bit ADC without reducing the noise level.

Page 1 of 4 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •