# My NiMh battery charger project



## paul.allen (Apr 9, 2013)

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


----------



## abhi555 (Apr 9, 2013)

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


----------



## hiuintahs (Apr 9, 2013)

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.


----------



## paul.allen (Apr 9, 2013)

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.


----------



## paul.allen (Apr 9, 2013)

abhi555 said:


> 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).


----------



## hiuintahs (Apr 9, 2013)

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.


----------



## paul.allen (Apr 9, 2013)

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).


----------



## Illum (Apr 9, 2013)

subscribed


----------



## uk_caver (Apr 9, 2013)

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.


----------



## paul.allen (Apr 9, 2013)

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.


----------



## Power Me Up (Apr 10, 2013)

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


----------



## paul.allen (Apr 11, 2013)

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.


----------



## Mattaus (Apr 11, 2013)

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

Sent from my Galaxy Nexus using Tapatalk 2


----------



## verge (Apr 11, 2013)

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


----------



## Power Me Up (Apr 11, 2013)

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!


----------



## paul.allen (Apr 12, 2013)

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.


----------



## uk_caver (Apr 12, 2013)

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.


----------



## HKJ (Apr 12, 2013)

uk_caver said:


> 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.


----------



## uk_caver (Apr 12, 2013)

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.


----------



## Power Me Up (Apr 12, 2013)

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.


----------



## uk_caver (Apr 12, 2013)

He is using a buck circuit - see post #27 in:
http://www.candlepowerforums.com/vb/showthread.php?358497-What-s-the-SAFEST-NiMH-charger


----------



## Power Me Up (Apr 12, 2013)

uk_caver said:


> 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!


----------



## paul.allen (Apr 12, 2013)

Power Me Up said:


> 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?


----------



## hiuintahs (Apr 12, 2013)

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.


----------



## Power Me Up (Apr 12, 2013)

paul.allen said:


> 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/prod...Sigma-Pi-18-bit-Analogue-to-Digital-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!


----------



## paul.allen (Apr 13, 2013)

*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.


----------



## Power Me Up (Apr 13, 2013)

paul.allen said:


> 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! :thumbsup:



> 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!


----------



## paul.allen (Apr 13, 2013)

> 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!


----------



## write2dgray (Apr 13, 2013)

Definitely interested in a four bay.


----------



## Power Me Up (Apr 13, 2013)

paul.allen said:


> 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.


----------



## paul.allen (Apr 14, 2013)

Power Me Up said:


> 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.



Nah... Cap's and Resistors are relatively cheap. Actually I added a lot of low-pass filtering on this last version and the data from it (I haven't posted it yet) is showing pretty much no noise at all. I think it is definitely time for more bits. Plus, like I said, I am getting to drop the Vref I was using and there are a few other little tweaks I am going to make, cost should all balance out pretty close to what it is right now. I am pretty excited that for about the same cost performance will be much higher (not that it isn't still pretty good right now).


----------



## Power Me Up (Apr 14, 2013)

paul.allen said:


> Nah... Cap's and Resistors are relatively cheap.



Ah - no worries then. For some reason, I was thinking that you would need to go for something a bit more sophisticated.

(It has been a while since I've did training in analog circuit design and it was only pretty basic anyway)



> I am pretty excited that for about the same cost performance will be much higher (not that it isn't still pretty good right).


I'm certainly looking forward to it! My credit card is ready and waiting!


----------



## rmteo (Apr 14, 2013)

paul.allen said:


> 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.


You can get a 32-bit Cortex-M3 MCU from ST (STM32F100xxx family) for less than the price of an 8-bit PIC (and an AVR as well) with far higher specs and performance than any 8-bit device.


----------



## paul.allen (Apr 15, 2013)

I appreciate the heads up about the ST Cortex M3. I was looking at switching to the M0 from NXP for the four battery version, but will take a serious look at the M3 by ST. Cost is about the same but I do like that with ST I would get an M3 instead of an M0.

Picking a microcontroller for a project is always a funny thing, you can search forever and never find the one and only solution. Sometimes I wish there was a Perfect Answer, but there never really is.


----------



## rmteo (Apr 15, 2013)

paul.allen said:


> I appreciate the heads up about the ST Cortex M3. I was looking at switching to the M0 from NXP for the four battery version, but will take a serious look at the M3 by ST. Cost is about the same but I do like that with ST I would get an M3 instead of an M0.


What makes these MCU's particularly useful are its peripheral modules. For example, they have a 12-bit ADC (and a 2-channel, 12-bit DAC) and a RTCC (with battery-backed SRAM and a separate battery power domain) - features not found in any MCHP or ATMEL MCU. You can do just about everything needed in a battery charger/load/analyzer application with a <$2.00 48/64-pin chip without needing any external (read expensive) ICs.


----------



## Power Me Up (Apr 16, 2013)

For the benefit of anyone who hasn't checked Pauls blog recently, he has announced that he's going to put a modified 2 cell version up on kickstarter in about 2 weeks:

http://www.paulallenengineering.com/1/post/2013/04/so-what-is-my-plan.html


----------



## rmteo (Apr 17, 2013)

paul.allen said:


> 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.


The FreeScale Kinetis (Cortex-M4 with DSP) K5x series of measurement MCU's incorporate a 24-channel 16-bit SAR ADC with up to x64 PGA (programmable gain amplifier) and are typically <$10 each. They are very capable in the mixed-signal arena - ideal for this application. Two operational amplifiers allow signal filtering and amplification.
Two transimpedance amplifiers optimized for converting current inputs into 
voltages that can be read by the ADC.
Two high-speed 16-bit ADCs with configurable resolution. Single or 
differential output mode operation for improved noise rejection. 500 ns 
conversion time achievable with programmable delay block triggering.
Two 12-bit DACs for analog waveform generation.
Three high-speed comparators providing fast and accurate motor over-current 
protection by driving PWMs to a safe state.
*Analog voltage reference* provides an accurate reference to analog blocks, 
ADC and DAC, and *replaces external voltage references* to reduce system cost.


----------



## Cereal_Killer (Apr 17, 2013)

paul.allen said:


> 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.


I would be up on top of the list to pre-order one, I don't have any idea the process to build one of these (or any pcb at all) but I can see the amount of work and quality and I would love to support a fellow CPF guy.


----------



## paul.allen (Apr 17, 2013)

*rmteo* I looked into the Kinetis for this board (not for the first one when I used the expensive ADC's. If I remember right, they were not out yet?). I think FreeScale Kinetis is a great M4. The reason why I choose not to go with them was still cost. Cost during development and even in quantities of 100 the Kinetis K5x cost almost 7 times the microcontroller I am using. Now that being said, I have recently decided to add an external ADC, so compared to the microcontroller/ADC combo it is only about twice the cost. 

The 2 battery version is pretty much set. For the 4 cell version... I will take a better look. *rmteo* thanks for the info.

Maybe later we should make a CPF charger. : )


----------



## paul.allen (Apr 17, 2013)

Cereal_Killer said:


> I would be up on top of the list to pre-order one,... I would love to support a fellow CPF guy.



I appreciate it!


----------



## rmteo (Apr 18, 2013)

You mentioned BOM cost in several of your posts so here is something to think about as you work on getting your project funded on kickstarter. Today, you can get a so-called "hobby" charger for <$20 (the one pictured below is $17) with the following features/characteristics:Microprocessor controlled
Delta-peak sensitivity (NiMH/NiCd)
Individual cell balancing
Li-ion, LiPo and LiFe capable
Ni-Cd and NiMH capable
Store function, allows safe storage current
Fast charge Function
Data store/load
Backlit LCD
Internal resistance checker

*Operating voltage range:* 10.0~18.0Volt
*Circuit power:* max.50W for charging, max.5W for discharging
*Charge current range:* 0.1~5.0A
*Discharge current range:* 0.1~1.0A
*Current drain for balancing Li-po:* 300mAh/cell
*NiCd/ NiMH battery cell count:* 1~15cells
*Lithium battery cell count:* 1~6Series
*Pb battery voltage:* 2 to 20V
*Dimension:* 135×100×40mm
*See Rule #3 Do not Hot Link images. Please host on an image site, Imageshack or similar and repost – Thanks Norm*
They all come in a metal casing. You can put together a (fully independent) 2-channel for $34 that will charge all the common chemistries such as NiMH/NiCD, Li-ion, LiPo, LiFe and also Lead Acid. I use one that comes with 4 independent chargers in a single casing that sells for $75. 
*See Rule #3 Do not Hot Link images. Please host on an image site, Imageshack or similar and repost – Thanks Norm*
The neat thing about this approach is that you can charge/discharge/analyze 1-4 cells of different types/chemistries concurrently, eg. you can charge an Eneloop, a Li-Ion, a LiFePo4 and a Lead Acid all at same time. Also you can charge not only single cells but also (balance) charge Lithium chemistries allowing you to charge up to 24 cells (at up to 5A charge current using the 4-channel charger). They do not come with any battery clips as on your charger but you can get all manner of single (or multiple 1-8 cell) AAA, AA, C, D battery holders from Keystone including 18650 and CR123 sizes.


----------



## paul.allen (Apr 18, 2013)

Yeah, I can't compete with that. A while back my friend showed me the exact same charger and I was amazed at all they can do for soo cheap. In the end, I guess it comes down to the parts they are using, the quality of parts they choose, the quantity they are manufacturing and where they are having them made. I can't compete on that level.

The reason I am still doing this project is because I am an engineer and I love to design and make things. I know every detail about how mine works and why I made the decisions I did. I also get to see every detail of what is going on during the charge/cycle, and in a format that is easy to plot and analyze. It's just what I have always wanted. : )


----------



## chandelier7 (Apr 19, 2013)

Hi Paul,

that looks like a great charger!
I think I read all the info you gave about it, sorry if I missed something.
I could only see a tiny switch, nothing else, how do you set if you want to discharge or recycle a battery, or does your charger decide everything on its own?

In another thread someone mentioned a case. I really like the simplicity of your design, but taking it with me on a vacation is a good argument for a case, even more when considering the USB powering and small form factor.
Recently I saw a simple and possibly not so expensive case - how about just a frame of laser-cut perspex? I mean, the top and bottom maybe doesn't even have to be covered like in the example below, even just having a wall around the circuit board should be pretty safe. I like it when you can see the electronics, particularly in a so well designed board like yours.
http://www.diamex.de/dxshop/USB-ISP-Programmer-fuer-AVR-STM32-NXP-Cortex

Best of luck for your project! If the shipping costs to Germany aren't too high, I'd also be in.

Cheers,
Dominique


----------



## paul.allen (Apr 19, 2013)

chandelier7 said:


> I could only see a tiny switch, nothing else, how do you set if you want to discharge or recycle a battery, or does your charger decide everything on its own?



I added a post about this on my blog. Here it is:

"Just want a charge? Flip the switch so it is not in the cycle position (LED by the word cycle is off) and plug it in.

Want to cycle your batteries to break them in or give them a refresh? Flip the switch to cycle and plug it in.

What if you want to drain your batteries fully before charging them? Flip the switch to cycle, plug it in, and once it starts draining them, Flip the switch again (the other way so the cycle light turns off) and walk away.

What if you want to check the full capacity of your batteries but you don't want to wait for the normal cycle setting? Power it up with the switch Not in the cycle position and then once it starts charging the batteries, Flip to the cycle setting. The charger will fully charge your batteries, then discharge them once to check their capacity, then charge them fully again."

As far as the laser-cut Acrylic, I agree with you. I had been thinking if I made a case for this one I would probably end up doing something like that for simplicity and save the more fancy case for my 4 cell version. Appreciate the link. For inspiration I had been looking at the Raspberry Pie case from Adafruit: http://www.adafruit.com/products/1037 Same idea as the link you sent me. 

Not everyone wants a case though so I think I would make it something you could get extra.

Thanks for the encouragement and support!


----------



## paul.allen (May 4, 2013)

After delays in boards and parts, I got my new version with the 18-bit ADC working. I still have some more testing to do but I posted a resolution comparison on my blog: http://www.paulallenengineering.com/blog.html


----------



## Power Me Up (May 5, 2013)

That looks awesome!

Can't wait to get my hands on a couple of these!


----------



## ecrbattery (May 10, 2013)

Hi Paul,

You should rename the thread to "My NiMh battery charger-analyzer project" since this is a MAJOR improvement since the release of the Maha C9000 back in 2006. Yup, it has been nearly 7 years and the C9000 is still the top consumer oriented charger-ananlyzer... until now.

The major advantage over the C9000 is the data logging function. It is like having a $160 CBA built-in to your charger.
I will definately get one of these and looking forward to a future thread on CPF about "PBA (Paul Battery Analyzer !?!) results for NIMH battery" where user post results from your charger-analyzer about various brand, age, discharge currents, etc...


Here are some of my request:

- Reverse polarity protection

- Revamping the mode switching operation into something more simple like a push button (with LED flashing / color change for mode indication). The flip the switch then unplug then replug is over-complicated.

- NiMH AAA charging capability

- A case for portability / travel
Look at my favorite Panasonic BQ-321 charger for inspiration:







- Charging profiles for your software (user adjustable charge rate, discharge rate, cycles etc...)

- Power pack mode to recharge cell phones, electronics (like the Duracell CEF23 charger)

- Modular upgrade options (keep the cost of the base unit down but allow upgrades as needed)
Snap in wall-plug power source at the top
Snap in LCD at the bottom

- Comparsion battery benchmarks chart on your site (like computer hardwarre site comparing CPU/GPU) based on the result from this unit.


You don't have to worry about competing with the cheap hobby chargers since they are not very user friendly.
Those chargers require more attention and knowlege to use (12 Volts power source clamp, selecting the correct chemistry, use the correct adapters, connect to correct battery terminal). They have horrible accuracy (lot of miss termination) for single cell use (such as AA) since they are designed for battery pack. Also, they atract a lot of attention with TSA when travelling (a black box with a bunch of wires sticking out...lol).


----------



## Knight_Light (May 16, 2013)

paul.allen said:


> After delays in boards and parts, I got my new version with the 18-bit ADC working. I still have some more testing to do but I posted a resolution comparison on my blog: http://www.paulallenengineering.com/blog.html


 
Paul we have corresponded before on the forms before you actually started your own thread. Let me tell you your stuff is looking amazing and seems to be improving at an exponential rate. Any idea when your product will be ready for sale?

Also are you familiar with “Cotton Pickers” USB chargers? If not you can find them on CPF forms. How difficult do you think it would be to make something like that for charging AA Eneloops? Say at around 700 mAh.


----------



## paul.allen (May 17, 2013)

Knight_Light said:


> Any idea when your product will be ready for sale?




If I have time I am putting this version up on kickstarter this weekend. The 4 battery version with a case and many of the features people keep requesting is not too far out (from a design sense, not from a project budget) but it is really dependent on the response I get on this current version. I am going to make the finished version no matter what (and have been work on it some in parallel with this one) but money and time are always driving.




Knight_Light said:


> Also are you familiar with “Cotton Pickers” USB chargers? If not you can find them on CPF forms. How difficult do you think it would be to make something like that for charging AA Eneloops? Say at around 700 mAh.




Yes, I am, I think you were the one who first told me about them? The thing with them is they are made using a battery charger IC. There are battery charging IC's for NiMh chemistry, but they are not near as good as those for lithium based rechargable batteries ( just the nature of the charging the different chemistries). So I could make lithium chargers like the "Cotton Pickers" ( that would be ripping off his idea ) but for NiMH it is not as easy.


I typed this all up on my phone so sorry if I made any big mistakes.


----------



## paul.allen (May 17, 2013)

ecrbattery, I will implement almost all your suggestions on my next version. For now I am going to change the 6 pin ISP header at the bottom of my board to a 12 or 16 pin connector (i cant remember off the top of my head, but I have the part) that will allow plugging in modular boards like you said like an LCD, or a serial communication header, buttons... What ever that you could get extra. Some people will want them, others won't care. 

I think it would be awesome to have a site where everyone could post their battery data and compare. I added a feature feature on one of my test boards were it would detect a brand new alkaline if you put one in, and drain it just so I could compare alkalines to my rechargables, and other alkalines.


----------



## Knight_Light (May 17, 2013)

Paul congratulations on getting this far I am a huge fan and would definitely like to see the finished product.



paul.allen said:


> Yes, I am, I think you were the one who first told me about them? The thing with them is they are made using a battery charger IC. There are battery charging IC's for NiMh chemistry, but they are not near as good as those for lithium based rechargable batteries ( just the nature of the charging the different chemistries). So I could make lithium chargers like the "Cotton Pickers" ( that would be ripping off his idea ) but for NiMH it is not as easy.


 
“Cotton Pickers” has been around for a long time and if he is not currently doing this with NiMH then he probably has no interest and/or feels there is not enough interest in this type of project. So by doing something like this I don’t think you are ripping off his idea as much as you are filling a niche market (The size of this market I have no idea.).

So if you reconsider something like that let me know and I am sure I would not be the only one that would help you with ideas and suggestions for this particular type of charger.


----------



## tobrien (May 17, 2013)

is your name really Paul Allen? I love that name haha

it inevitably reminds me of American Psycho, the "Do you like Huey Lewis and The News?" scene

HEY PAUL!

edit: as to the thread, your work looks highly polished and incredibly professional. if you ever make a CC/CV Li-ion charger do let us know!


----------



## paul.allen (May 17, 2013)

Yes, it really is Paul Allen. I will let you know if I ever make a lithium charger.


----------



## paul.allen (May 18, 2013)

I just posted a txt file for those who want to look at the Raw data. I stripped it down to just the basics (none of the info I use for trouble shooting etc.) Voltage, Temperature, Current, Voltage under load.

http://www.paulallenengineering.com/blog.html


----------



## paul.allen (May 24, 2013)

After almost a week, my project finally got aproved and is live on kickstarter. : )


----------



## Trevtrain (May 24, 2013)

Just picked up this thread for the first time tonight.
Looks like a very interesting project and I wish you the best with it.

My electronics knowledge is somewhat basic compared with most posters here I suspect but I have a comment on the Cottonpickers products. I think one of the reasons his chargers are so popular is the fact that they are perfectly matched to the solar panels he sells to power them for off-grid use in remote areas. Those USB based chargers keep a trickle of current going into the cells even when cloud cover reduces the panel's output to less than 100mA.

Can your seemingly much more sophisticated charger perform similar magic on very low and/or fluctuating outputs of the kind typical of a solar source, or does this unit need a stable minimum supply current?

I have a couple of the eneloop USB chargers which appear to fault when the supply current falls but have never been able to determine if any current (at all) is being supplied to the cell in this state. In such circumstances I currently need to put a commercial power box such as one of the 4*18650 units or an ML-102 between the eneloop chargers and the panels as a buffer.
CP supplies a very cheap generic "dumb" charger of the silver USB type but these are putting out a maximum well under 200mA with no termination smarts.
For home use I have a C9000.

Anyway, you may have a quite unexpected market among "outdoor types" if you could make a NiMH charger to fill this gap. I'd buy a couple for sure.


----------



## uk_caver (May 24, 2013)

Thinking about it, I suspect a good-enough (safe, charging cells fairly close to capacity) charger to run off fluctuating power might be rather easier for Lithium than NiMH, for a few reasons.


----------



## uk_caver (May 24, 2013)

[deleted duplicate post]


----------



## Power Me Up (May 25, 2013)

Hi Paul,

Does the international shipping cost go down if we're wanting more than one unit?

If so, how much would the shipping cost be for a pair of these chargers? Also, how much for a pair of chargers plus one of the LCD screens?

I've already pledged $105 for a charger, LCD and international shipping - just wanting to work out how much to add for a second charger. I might just pledge enough for 2 chargers since I don't really need the LCD...


----------



## SemiMan (May 25, 2013)

rmteo said:


> What makes these MCU's particularly useful are its peripheral modules. For example, they have a 12-bit ADC (and a 2-channel, 12-bit DAC) and a RTCC (with battery-backed SRAM and a separate battery power domain) - features not found in any MCHP or ATMEL MCU. You can do just about everything needed in a battery charger/load/analyzer application with a <$2.00 48/64-pin chip without needing any external (read expensive) ICs.




I have used PICs and CortexM0 parts (ST) as well as a few other micros over the years.

Realistically the core of the processor is such a small part of the die as to make almost 0 difference in the cost. Any part that still supports 5V is generally in an older process and hence more expensive.

From a development standpoint, the core is almost meaningless (well except to use 3rd party IP ... stacks, etc.). Sure you learn the tools, some nuances in programming, etc. but for an embedded project, at least on the hardware/non-application side, most of your time is spent learning the peripherals ... and oh how I like peripheral configuration programs, even just to get your started!

If I had something really simple to do tomorrow, I would probably just plop down a PIC cause I find the mental overhead is so low. If it foresaw it needing more complexity, I would drop down a 32 bit micro. Nice thing about PIC (8 or 32) is the rich and very well supported ecosystem. If you have any problem, you can usually try to get it solved. Try to get what you think should be an easy thing solved with a combo Keil tool and ST ARM micro ... ugghhhh..

Semiman


----------



## paul.allen (May 25, 2013)

Power Me Up said:


> Hi Paul,
> 
> Does the international shipping cost go down if we're wanting more than one unit?
> 
> ...



The shipping is kind of a funny thing. There are some places that are not much at all to ship to and others that are borderline outrageous (shipping will be more than the charger). So the way I did it is I am spreading out the shipping cost on everyone. As far as additional shipping cost, no, I know you are in Australia so I will just put them in the package. Maybe you could work something out with anyone else you know who wants one and we could just do a bulk package for all of them?

Thanks Power Me Up.


----------



## paul.allen (May 25, 2013)

SemiMan said:


> I have used PICs and CortexM0 parts (ST) as well as a few other micros over the years.
> 
> Realistically the core of the processor is such a small part of the die as to make almost 0 difference in the cost. Any part that still supports 5V is generally in an older process and hence more expensive.
> 
> ...



Agreed! I was working with another engineer at my work and we were talking about all the different microcontrollers. ARM has really made it so that working with the various core's is not as much an issue, but properly setting up all the peripherals with a new chip can be at times... well very Frustrating!

There are also some really great microcontrollers out there but they are just not well supported and are seriously lacking in their available tool options. For this reason we end up choosing microcontrollers that some my say are less than ideal for a certain task, but are the most straightforward to implement (or that we have previously used). We end up still using PIC's, XMOS and ones from TI, simply because we feel the most comfortable with them.


----------



## paul.allen (May 25, 2013)

Trevtrain said:


> Just picked up this thread for the first time tonight.
> Looks like a very interesting project and I wish you the best with it.
> 
> My electronics knowledge is somewhat basic compared with most posters here I suspect but I have a comment on the Cottonpickers products. I think one of the reasons his chargers are so popular is the fact that they are perfectly matched to the solar panels he sells to power them for off-grid use in remote areas. Those USB based chargers keep a trickle of current going into the cells even when cloud cover reduces the panel's output to less than 100mA.
> ...



Trevtrain, properly powering devices from solar power can be an art in itself. Charging batteries with solar is more of an issue of implementing a good charging algorithm then just the hardware of the charger. The most common way to charge NiMh is with constant current. If your current keeps dropping below what your charger is trying to deliver to the batteries, then you are not going to have much of a constant current. For this reason a lot cheap solar powered chargers just use a trickle charge approach. In general though, uk_caver is right, charging Lithium from solar is easier then NiMh "few reasons."


----------



## Power Me Up (May 25, 2013)

paul.allen said:


> The shipping is kind of a funny thing. There are some places that are not much at all to ship to and others that are borderline outrageous (shipping will be more than the charger). So the way I did it is I am spreading out the shipping cost on everyone. As far as additional shipping cost, no, I know you are in Australia so I will just put them in the package. Maybe you could work something out with anyone else you know who wants one and we could just do a bulk package for all of them?



I don't know anyone else personally that would be wanting them, but I'd be more than happy for other CPF members to join in with me - they could pick them up from me on the south side of Brisbane, or I could post them within Australia.

I'm not sure what the actual postage costs to Australia from the US are, so I'm not sure if it would actually save money to have me take a bulk package and repost them around Australia. Australia Post costs aren't particularly cheap - often it would cost more to send back a faulty item to Hong Kong than it cost including postage to buy it off Ebay!

One scenario where it might work out cheaper is if you would like tracking - It would probably cost around $7.50 (AU $ but they're about the same as US $ at the moment) to send a satchel that could probably hold at least 3 chargers to anywhere in Australia with tracking. A flat rate box that could probably hold 6 chargers would cost about $10 including postage and packaging, again with tracking.

I've just upped my pledge to $160 to cover 2 chargers, an LCD and $20 for postage. It doesn't look like you're going to have any trouble getting this project funded - you're already over 63% with 27 days to go!


----------



## Power Me Up (May 25, 2013)

Also - seeing as you're planning to add a potentiometer to the final version to allow adjustment of the charging rate, would it also be possible to suggest/request the ability to manually adjust the discharge rate as well?

I'm thinking along the lines of an extra resistor and a 3 pin header and jumper for each channel. The jumper can then be used to select the resistor that is used for the discharge.

I wouldn't expect this to add too much to the cost - the only concern would be that the higher current would require a higher power resistor - if you were to aim for 400mA and 1000mA discharge rates say, the resistor for the 1000mA discharge would need to be able to handle up to 2W and I'm not sure if surface mount resistors go that high?


----------



## ecrbattery (May 26, 2013)

Glad to see this "Open Source NiMh Battery Charger/Analyzer" on Kickstarter 

You got my support


----------



## Silgt (May 26, 2013)

Already pledged...good luck :thumbup:

Sent from my GT-N7105 using Tapatalk 2


----------



## Power Me Up (May 27, 2013)

$6033 is now pledged of the $6000 target and there's still 25 days to go!

Woohoo!


----------



## paul.allen (May 27, 2013)

I woke up at 4:00 to use the restroom. When I checked my phone to see what time it was I saw a ton of emails in my inbox. I looked on kickstarter and was surprised to see it already funded! Needless to say, I didn't go back to sleep and instead got to work.

Power Me Up, on Friday I started thinking about adding an adjustment for the discharge rate. I assume most people are wanting to *increase* the discharge rate not decrease it, and really in that case I am mostly limited by heat. I am looking into making the board a little bigger and possibly adding drain resistors with heat sinks, but this is something I am working on... not a reality yet. On my four battery version I had definitely planned to add different discharge rates and was going to use the machined aluminum case as a type of heat sink. I had not really planned on it for this version but like I said, I am toying with it.

Thank you to everyone for all the support and encouragement.


----------



## paul.allen (May 27, 2013)

ecrbattery said:


> Glad to see this "Open Source NiMh Battery Charger/Analyzer" on Kickstarter
> 
> You got my support



Thanks!


----------



## Power Me Up (May 27, 2013)

paul.allen said:


> I woke up at 4:00 to use the restroom. When I checked my phone to see what time it was I saw a ton of emails in my inbox. I looked on kickstarter and was surprised to see it already funded! Needless to say, I didn't go back to sleep and instead got to work.



Sounds good - just don't over do it! :thumbsup:



> Power Me Up, on Friday I started thinking about adding an adjustment for the discharge rate. I assume most people are wanting to *increase* the discharge rate not decrease it, and really in that case I am mostly limited by heat. I am looking into making the board a little bigger and possibly adding drain resistors with heat sinks, but this is something I am working on... not a reality yet. On my four battery version I had definitely planned to add different discharge rates and was going to use the machined aluminum case as a type of heat sink. I had not really planned on it for this version but like I said, I am toying with it.



No worries - I'm still in for 2 even if you can't add it in.

I'm assuming that you've already thought of using multiple smaller resistors? I'm guessing that you don't get a linear increase in heat dissipation with multiple resistors unless they're well spread out...


----------



## SilverFox (May 27, 2013)

Hello Paul,

Congratulations on getting fully funded. This is exciting.

Tom


----------



## InHisName (May 28, 2013)

I like the idea of current choice. What I want may not be economically feasable at this juncture. I want to charge my older "junk" cells at 0.1C rate with no pulsing spikes. Chances are that is what you are doing now. 

I have a number of high internal impedance cells, including some Duraloops now. The easiest way to charge those hi-Z cells is to 'sneak' in the Mah with lowest peak value. Probably for that would be an analog fixed at .1C single channel charger. Except I haven't been able to find one, yet.

I am a big fan of lots of statistics, so I went with the higher cost display model for max enjoyment.


----------



## MarioJP (May 29, 2013)

I could share some info for your statistics as i been doing this for quite some time now all based from my observation. All the information i have gathered so far and the results are interesting. I am going to start by saying that I have a lot of cells that have their resistance so high that i have to charge the cells manually directly just using a 3V AC adapter with a max output of 4A and a multimeter and of course a stopwatch to measure how much current is going into the cell as time elapses. This plays a crucial role to determine how badly damaged these cells really are.

On a healthy cell or let say brand new cell. The amps would just spike instantly and should never be charged this way, however a cell with super high impedance is pretty much safe to connect it directly to the AC adapter and of course using the multimeter to measure the Amps and a stopwatch .

One cell in particular when i flip the switch the meter was measuring 300mA at the beginning. This means, only 300mA is going into the cell without any resistors. (no wonder most chargers have rejected this cell) wow. But in the first couple of minutes the amperage started to climb gradually 345>360>400> gave it another 5 minutes and the meter was reading 800mA and around 8 minutes the cell was being charged at 1Amp. (At this point the cell should start to warm up). in Any case one thing i've noticed is that heat causes the cell's resistance to temporarily drop. Keep in mind that this is only temporarily as when you stop charging and the cell cools the resistance goes back up again. So this makes me to believe that the chemistry is pretty much used up but very strange how it behaves when cells degrade. I am still puzzled by this.

And if you leave the cell connected the amps is going to keep on climbing eventually overheating the cell lol. Remember i have no way to regulate the current.

So basically my findings so far are. The amount of current that goes into the cell* at the beginning *determines just how much resistance the cell has developed. Wish i can get the exact values, but one thing for sure that a direct charge of 300mA going into a cell is pretty high of a resistance.

So this is how the Maha charger is able to distinguish which one is bad/good cell. This Cell is currently being used in a clock that still ticking as of now. I guess clocks hardly draws any current.

So if you want to "sneak in the mAh" You would have to check how much current this cell is accepting in the beginning because i have other cells that has their resistance much much worst that even the AC adapter has trouble pushing current in. this one was reading 150mA going in to the cell on the meter. I tossed this one out and did not bother.

And as for the rest. They measured anywhere from 800mA to 1.5A in the beginning. I think this is a true method of testing the cell's status of when needing to be replaced.


----------



## paul.allen (May 31, 2013)

So I have been working on how to best deal with high impedance cells for a while. Some of my first versions I made just rejected the cell if the impedance was too high. What I am doing now is having it flash a light pattern to say the cell is in pretty bad shape and that you should consider replacing it. If you leave it in, it will start a different charging algorithm than the normal that is designed for batteries with high impedance (which does some of what MarioJP talked about). InHisName to address your question, I am using a buck converter powered directly by the microcontroller and it has a 1200uF cap on the output (so the ripple is not so bad). There is a kind of window of current I can deliver to a given battery, most being between 400mA-1200mA. Now if the battery is a pretty new eneloop (which have a pretty low internal impedance), then with the window I have I can't actually buck low enough to deliver less than 400mA of current to the battery, so I have to pulse that 400mA current at 50% if you wanted a 200mA average. However if you wanted to charge a single eneloop at say 400mA I could do it with no pulsing. Now lets go to an old high impedance battery, if the impedance is high enough, I could not even buck the voltage down at all (the full 5V power) and often the battery will still not pull 400mA. So in the case of wanting to deliver something like 200mA to an old battery (or even 100mA) with out pulsing, if it has a high impedance then that is easy to do.


----------



## hiuintahs (May 31, 2013)

"I am using a buck converter powered directly by the microcontroller"............Powered or controlled? If you don't mind me asking, what exactly does this mean? I know buck converters have a FB pin that you use voltage divider to determine the output voltage and I'm assuming the voltage input is the 5V USB power. The converter IC probably has an Enable pin and so the microcontroller can turn it on and off..............I'm assuming that is what you might mean, where you can implement a duty cycle. I know the Lacrosse doesn't even use a buck regulator to step the voltage down as they are only starting from a 3Vdc source minus a diode drop and they just pulse it at a duty ratio. I know with lithium ion and constant current / constant voltage, I'd use some op-amps and "OR" in the current feedback with the voltage divider signal to the FB pin. Until the voltage hits the maximum set point, it resides in constant current as the buck converter just sets the output voltage to whatever it needs to, to maintain the constant current. This way it automatically trips at a maximum setpoint voltage and the microcontroller responsible for determining delta V or over temperature situation. Anyhow just trying to learn how others might be charging NiMh. Sorry these sentences are all run into each other. For some reason my "Enter" key doesn't work in CPF at the moment.


----------



## paul.allen (May 31, 2013)

I mean I am use the microcontroller to power the buck converter directly. I use one of the PWM pins to power a high-side FET and monitor the current with a high-side current shunt monitor. I then adjust the PWM duty cycle accordingly. There are some trade offs, but the gain is lots of flexibility!


----------



## hiuintahs (May 31, 2013)

paul.allen said:


> I mean I am use the microcontroller to power the buck converter directly. I use one of the PWM pins to power a high-side FET and monitor the current with a high-side current shunt monitor. I then adjust the PWM duty cycle accordingly. There are some trade offs, but the gain is lots of flexibility!


 
OK, thanks for the clarification.


----------



## Power Me Up (Jun 3, 2013)

This project now has $12,103 pledged from 163 backers - congrats Paul!

It's great to see that you're adding in the option for external discharge loads - thanks!

Since you're making this project open source for both the hardware and software, is there any chance of us backers getting to see the source code once the project has been funded rather than waiting until the hardware is ready? That way we can start taking a look at it with a view to being able to make our own changes ASAP. Obviously we won't be able to test any changes until we have our hands on the hardware of course...


----------



## Norm (Jun 3, 2013)

I'm very interested in the 4 cell version shown on your blog.







Norm


----------



## Mr Floppy (Jun 3, 2013)

paul.allen said:


> that will allow plugging in modular boards like you said like an LCD, or a serial communication header, buttons... What ever that you could get extra. Some people will want them, others won't care.



How about something that could interface with say a Raspberry Pi? For instance, reading the data real time and uploading automatically to a website. Being open source, you could possibly work out how to use the Raspberry Pi to control it too.


----------



## tobrien (Jun 4, 2013)

Norm said:


> I'm very interested in the 4 cell version shown on your blog.
> 
> 
> 
> ...



now _that_ looks killer!


----------



## HKJ (Jun 4, 2013)

tobrien said:


> now _that_ looks killer!



It might look good, but I am not sure how practical it is. Two batteries at each side would probably be a better solution.


----------



## Russel (Jun 4, 2013)

HKJ said:


> It might look good, but I am not sure how practical it is. Two batteries at each side would probably be a better solution.



Wouldn't having a battery on each of the four sides promote better heat dissipation?


----------



## HKJ (Jun 4, 2013)

Russel said:


> Wouldn't having a battery on each of the four sides promote better heat dissipation?



Yes, it will, but you have to be much more careful when filling it up.


----------



## InHisName (Jun 4, 2013)

HKJ said:


> Two batteries at each side would probably be a better solution.
> ....and.....
> Yes, it will, but you have to be much more careful when filling it up.


Do I understand that you mean you want an 8-cell version of the concept ?
Careful in what way ?


----------



## MarioJP (Jun 4, 2013)

Open Source Charger.. That's cool


----------



## Russel (Jun 4, 2013)

HKJ said:


> Yes, it will, but you have to be much more careful when filling it up.



I see your point. If all the batteries are in line, it is easier to install them correctly in the charger. All the positive ends facing the same direction. If there is a cell on each side it could become easy to get confused as to which way each battery is suppose to be installed in the charger.


----------



## HKJ (Jun 4, 2013)

InHisName said:


> Do I understand that you mean you want an 8-cell version of the concept ?



That was not my point (But I like 8 cell chargers).



InHisName said:


> Careful in what way ?



Russel got it, see below.



Russel said:


> I see your point. If all the batteries are in line, it is easier to install them correctly in the charger. All the positive ends facing the same direction. If there is a cell on each side it could become easy to get confused as to which way each battery is suppose to be installed in the charger.



That was exactly what I meant.


----------



## ecrbattery (Jun 5, 2013)

A recessed postive terminal will provide reverse polarity protection. 
I hope this will be on the 2-cells charger when it ship.

The charger should also be able to detect when the battery is inserted the wrong way and warn the user.


----------



## paul.allen (Jun 6, 2013)

Sorry I have been out of the loop for a few days. Russel is right about heat dissipation, that was my intention in designing it that way. Also the more isolated that batteries are from each other, the better temperature monitoring of the individual cells. As far as being careful about polarity...  You don't! On the 4 battery version it will use H-bridges (used in motor control to spin the motor both directions) so that it can charge the battery no matter the orientation. Just pop them in, it will detect proper polarity and then charge accordingly! If for some reason the voltage is to low or the cell has been severely driven into reversal (in either case, you have a pretty messed up battery) then it will signal you.

As far as getting it to talk to the raspberry pi... I will make I2C and Serial available but the rest will have to be done by the community.


----------



## Mr Floppy (Jun 6, 2013)

paul.allen said:


> raspberry pi... I will make I2C



Excellent! That opens up a whole lot of possibilities.


----------



## Power Me Up (Jun 20, 2013)

For anyone interested in backing this project but hasn't done so, I'd suggest that you get in and do it ASAP - there's only 48 hours to go before funding closes!!!


----------



## InHisName (Jun 20, 2013)

I just went there and noticed there is an UPDATE #5 that mentions a box (es) to be included for an additional sum. If you kicked early on, you may want to see the blog for details and decide to UP the pledge.

Last minute update:
[h=5]267
Backers[/h] [h=5]$21,641
pledged of $6,000 goal[/h] [h=5]97
minutes to go[/h] 

Goal was only 6,000
Paul, you're going to be REAL busy in from now till Aug.


----------



## paul.allen (Jun 22, 2013)

InHisName said:


> Paul, you're going to be REAL busy in from now till Aug.



Yes I am! My wife has offered to help out with shipping and maybe even loading on the firmware.


----------



## InHisName (Jul 25, 2013)

Paul,
How about a BRIEF summary of progress:
A. On schedule
B. Running behind schedule by X days.
C. Running ahead of schedule by Y days. Yowzer! Slow down guy, or ok if your cardiologist approves.


----------



## paul.allen (Jul 26, 2013)

Sorry I have been silent on here for a while. So you could say I am on schedule for the charger without the LCD, but behind schedule on the one with LCD. When I say on schedule though, it is not where I would have originally thought I would be at this time, however I said on kickstarter I would ship in August and I should still get the first set of battery chargers out by the last week in August (hopefully sooner). Not sure on the LCD version yet, but If I had to guess I would say November. The reason for this is I am moving in September (which is why I wanted to get these out in August) and I am sure that is going to kill a good chunk of the month. The other hold up is software for the LCD, I have had the LCD working beautifully (pretty plots and such) and I have had the charger working, but putting all the code together and the file size is too large to fit on the Atmega328 that I am using to make it "arduino compatible". I am soo using an ARM for the 4 battery version! Anyways, Power Me Up is helping me with it and is doing an awesome job so far! There are a few more things I could say but to keep it BRIEF I will just say over all things are coming along and I am so grateful for those who have offered to help out. There are still some really great people out there!


----------



## AleXis6 (Sep 23, 2013)

paul.allen said:


> Charge Rate for this one is set at a pulsed 800mA rate. At 50% it averages to a 400mA rate.



could you please share the oscilogram of the pulse current which you used.
And what do you think about what is the best oscilogram for charging Ni-Mh?
thank you


----------



## ALW248 (Oct 16, 2013)

InHisName said:


> I want to charge my older "junk" cells at 0.1C rate with no pulsing spikes. Chances are that is what you are doing now.
> 
> I have a number of high internal impedance cells, including some Duraloops now. The easiest way to charge those hi-Z cells is to 'sneak' in the Mah with lowest peak value. Probably for that would be an analog fixed at .1C single channel charger. Except I haven't been able to find one, yet.



La Crosse BC-700 charges all my high impedance cells, many dozens of them.

Before that, I used Eveready FCC2, which charges at about 100mA for AA, even old damaged cells.

http://stereo.50webs.com/


----------



## paul.allen (Oct 19, 2013)

AleXis6 said:


> couldyou please share the oscilogram of the pulse current which youused.



Anoscilogram of what the charger is doing would actually be prettyboring, it is just on for a few seconds at what ever the current isset to (times two) and then off for a few seconds. The on/offtime are the same so it averages out. I am not pulsing likeothers where the power supply voltage is directly pulsed to averagesome current flowing through thebatteries.




AleXis6 said:


> whatdo you think about what is the best oscilogram for chargingNi-Mh?



I haven't said this anywhere but IMO the very best way to charge a cell is to hit it with a square wave that is continuously varying randomly in magnitude and pulse width within some preset parameters that result in an average of the charge current selected. For example, if you are trying to charge a cell at 700mA then the charge current should vary randomly from say 200mA-1200mA and be updated randomly anywhere from 0.3mS-1mS. This not only gives an average of the desired charge current, but also generates all sorts of small mechanical vibrations inside the battery that help with the dispersion and reabsorbtion of gas bubbles, as well as impedes crystal formation. Charging is an electrochemical reaction, but it is also somewhat of a mechanical process too (using"mechanical" loosely). A battery is a physical device. I first experimented with this charging method about 8 months ago with great results but i have never tested it extensively. I figured it was more important to focus on refining the hardware, as the software can always be changed and tweaked later.

There is my opinion. : )


----------



## Power Me Up (Oct 20, 2013)

For anyone interested in the progress on the firmware for this charger, you're welcome to head on over to a site I've set up:

www.ultrasmartcharger.com

A direct link to the forum post with the latest firmware is:
http://www.ultrasmartcharger.com/phpBB3/viewtopic.php?f=3&t=3


----------



## samgab (Oct 20, 2013)

I missed out on the kickstarter for this; didn't discover it until today... But I'll keep a keen eye out for the kickstarter for the next version 2.0! Very interesting.


----------



## Power Me Up (Oct 20, 2013)

samgab said:


> But I'll keep a keen eye out for the kickstarter for the next version 2.0! Very interesting.



Paul has a form where you can enter your details to be notified when the 4 cell version is ready to buy:
http://www.paulallenengineering.com/1/post/2013/07/email-list-for-4-battery-chargeranalyzer.html


----------



## samgab (Oct 20, 2013)

Oh cool, cheers. I'll sign up for that now.


----------



## jtr1962 (Oct 20, 2013)

paul.allen said:


> I haven't said this anywhere but IMO the very best way to charge a cell is to hit it with a square wave that is continuously varying randomly in magnitude and pulse width within some preset parameters that result in an average of the charge current selected. For example, if you are trying to charge a cell at 700mA then the charge current should vary randomly from say 200mA-1200mA and be updated randomly anywhere from 0.3mS-1mS. This not only gives an average of the desired charge current, but also generates all sorts of small mechanical vibrations inside the battery that help with the dispersion and reabsorbtion of gas bubbles, as well as impedes crystal formation. Charging is an electrochemical reaction, but it is also somewhat of a mechanical process too (using"mechanical" loosely). A battery is a physical device. I first experimented with this charging method about 8 months ago with great results but i have never tested it extensively. I figured it was more important to focus on refining the hardware, as the software can always be changed and tweaked later.


I never experimented with this method before but tried "burp" charging ( i.e. small discharge pulses in between charging pulses ) a while back with interesting results. Cells I was charging didn't start getting warm until somewhat later in the charging cycle. Although much maligned, burp charging is supposed to prevent formation of gas bubbles. It would be interesting to combine your method but periodically also do a small discharge pulse.

Most of the commercial chargers like the MH-C9000 simply vary the duty cycle of a charge pulse of constant magnitude in order to get the desired average charging current. I find myself wondering if your method (perhaps combined with burp charging) would be capable of rejuvenating some cells with either high internal resistance and/or high self-discharge.


----------



## Power Me Up (Feb 18, 2014)

For anyone who missed out on getting in on Kick Starter, Paul has made a limited number of the non LCD chargers available for purchase:

http://www.paulallenengineering.com/buy.html


----------



## Power Me Up (May 26, 2014)

For the benefit of anyone who has one of these and hasn't seen the post I've put up: I've released a new firmware version for this charger which you can download from here:
http://www.ultrasmartcharger.com/phpBB3/viewtopic.php?f=3&t=64

A list of changes can be found here:
http://www.ultrasmartcharger.com/phpBB3/viewtopic.php?f=3&t=3&start=10#p485


----------



## kreisl (Nov 27, 2014)

Hello, the last update re the LCD charger was posted 2 months ago. How's everything going since?

I am certainly interested in the USC product series.

There is another geman compact NiMH charger with advanced functionality, called AV4m* or AV4m*, I couldn't be bothered though sorry. I get lost on the AV4m website lol :laughing:


----------

