Author Topic: [AVR / Components] Need help regarding NiMH AAA charger  (Read 4253 times)

0 Members and 1 Guest are viewing this topic.

Offline NitrusTopic starter

  • Contributor
  • Posts: 12
  • Country: mk
[AVR / Components] Need help regarding NiMH AAA charger
« on: February 07, 2017, 04:00:23 am »
Hi everyone,
I've been trying my hand at making a NiMH charger (I'll explain my project below).
I know the topic has been extensively discussed to hell and back, however surprisingly there are very few open source circuits available online.

My requirements are that it needs to be capable of charging two AAA cells @900mAh each (wired in series), to run off USB +5V, and to be reasonably fast (3, 3.5 hours is acceptable).

I found this one charger circuit and I think it will be suitable for my purposes, however there are a few things in it that I can't wrap my mind around. I tried asking the author however I don't think he's active on that blog anymore.
 :-/O https://arduinoelectronics.wordpress.com/2012/04/20/smart-nimh-battery-power-charger-based-on-attiny85  :-/O

So, if you've taken a look already, you would have seen the Red LED that's used to provide constant current. I'd venture to say that it is a neat trick (even if I disagree with it).
Here come my questions:

1) Can anyone explain to me how that Red LED constant current thing works? I understand as far as forward voltage drop, but not the part about the constant current, not really. I've remade the schematic in a SPICE simulation environment and that LED never blinks for me, which is clearly different from the author's video. I get pulsed current, but not the blink.

2) There is a Schottky below the PNP. Is there any other function to it other than to protect the components behind it from the battery connection?

3) Can the circuit work as-is with +5V, instead of the +12V specified in the schematic? The author says it was designed for 6 cells @2500mAh, however I think it can work as-is for my requirements as well: 2xAAA cells @1800mAh. I only got rid of the linear v.regulator part of the circuit, everything before the Red LED, and replaced the 12V source with 5V. I'd appreciate if anyone can make the corrections (if any), or better yet teach me about what needs to be corrected.

Finally, if anyone can link me a better circuit, I'll gladly take it. Any advice is welcome at this point, I've rarely done anything to do with NiMH/NiCd charging before, other than some research in the past few days.

---

My application is as follows: I need a small circuit to implement within the enclosure of a joystick controller that has two built-in AAA batteries. Ideally I would have wanted to replace those with LiPos and have a single-chip charging setup, but the problem is I can't bloody fit any decent capacity LiPOs in the casing, I'm very limited in terms of space. The current draw of the joystick is about 15mA, which is quite a lot for e.g. those small 250-300mAh LiPOs. It would be discharged in a matter of hours...

So, I'm stuck with NiMH AAAs, and need an intelligent charging solution for the specific situation.
I'm not afraid of AVR, I've got a few different types at my disposal.
Thank you all in advance for anything you can throw at me.
« Last Edit: February 07, 2017, 04:11:38 am by Nitrus »
 

Offline tron9000

  • Frequent Contributor
  • **
  • Posts: 423
  • Country: gb
  • Still an Electronics Lab Tech
    • My Hack-a-day project page
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #1 on: February 07, 2017, 09:43:38 am »
FYI - introduce yourself first - go do that now:https://www.eevblog.com/forum/chat/new-member-please-introduce-yourself/?topicseen
  • I'll give it a shot: The LED is acting like a zener: applying a fixed "regulated" voltage. The LED has a forward voltage of ~2V and the PN junction of Q1 has a drop of ~0.7V. This means that there must be about 1.3V across R3. Current therefore through Q1 and thus into the batteries should be 1.3/R3 and should be constant with respect to the LED voltage. Build it and try it and change the LED colour and you should see a different current through Q1
  • Nope - you hit the nail on the head
  • Nope
« Last Edit: February 07, 2017, 09:49:10 am by tron9000 »
Partsbox.io - orangise your parts!
"If you're green you can only ripen. If you're ripe you can only rot!"
 
The following users thanked this post: Nitrus

Offline NitrusTopic starter

  • Contributor
  • Posts: 12
  • Country: mk
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #2 on: February 07, 2017, 12:31:47 pm »
FYI - introduce yourself first - go do that now

Right, I've gone and done that :)

Thanks for your explanation on 1), it confirmed some of the things I was thinking, I'll mull it over some more. I didn't have anything like the darlington on hand, and only BC517 for now so I'm waiting for those to arrive, which may take a while since when I order components like these, I order in bulk of 50s or 100s from ebay or aliexpress. (more legit places rarely deliver to my country, or delivery costs 10 times as much as the components)
To be perfectly honest I'll be getting surface mounts components sooner than through hole ones, I put an order for typical kit stock of caps and resistors before hand, because I was hoping to design and make it as small as I can.

As for 3), you mean it cannot work as-is, or you have no corrections/suggestions?

Thanks for the help so far!
« Last Edit: February 07, 2017, 12:35:37 pm by Nitrus »
 

Offline tron9000

  • Frequent Contributor
  • **
  • Posts: 423
  • Country: gb
  • Still an Electronics Lab Tech
    • My Hack-a-day project page
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #3 on: February 07, 2017, 02:38:58 pm »
well maybe just, actually. You need a supply greater than the 2 charged AAA's + one schottky diode drop + Vdrop across R3
« Last Edit: February 07, 2017, 02:41:25 pm by tron9000 »
Partsbox.io - orangise your parts!
"If you're green you can only ripen. If you're ripe you can only rot!"
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #4 on: February 08, 2017, 09:17:33 am »
well maybe just, actually. You need a supply greater than the 2 charged AAA's + one schottky diode drop + Vdrop across R3

Don't forget the Vce of the transistor.  It's a darlington so this figure is likely to be quite high, certainly high enough to prevent this working.  It should be possible to use a normal NPN to lower Vce with some circuit adjustments.

Also the current source is configured for 1.5A to 2.5A depending on LED etc. which may be a problem for some USB ports (esp. older laptops) and is likely too high for AAA cells anyway.
 

Offline NitrusTopic starter

  • Contributor
  • Posts: 12
  • Country: mk
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #5 on: February 08, 2017, 10:33:48 am »
Don't forget the Vce of the transistor.  It's a darlington so this figure is likely to be quite high, certainly high enough to prevent this working.  It should be possible to use a normal NPN to lower Vce with some circuit adjustments.
That's true. I've read somewhere that charge rate for AAA NiMH is 400mA tops (1A for AA), so I should be able to find suitable replacements easily, hopefully.

Also the current source is configured for 1.5A to 2.5A depending on LED etc. which may be a problem for some USB ports (esp. older laptops) and is likely too high for AAA cells anyway.
Yes, USB 1.0 & 2.0 are rated at 500mA and USB 3.0 at 900 (although I wouldn't push my luck).
Anyways, where is it configured for 1.5A to 2.5A? To me it looks like it's going to scale down with the Voltage, not sure... Any pointers?


EDIT: I've added my modified schematic, at least what I think would be OK. I could be dead wrong. P.S. The transistor's Vce seems to be not that bad.
« Last Edit: February 08, 2017, 11:42:15 am by Nitrus »
 

Offline tron9000

  • Frequent Contributor
  • **
  • Posts: 423
  • Country: gb
  • Still an Electronics Lab Tech
    • My Hack-a-day project page
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #6 on: February 08, 2017, 12:34:11 pm »
Don't forget the Vce of the transistor.  It's a darlington so this figure is likely to be quite high, certainly high enough to prevent this working.  It should be possible to use a normal NPN to lower Vce with some circuit adjustments.

Yeh no Vce no workie!

I think its darlington so the amount of base current needed doesn't affect the Vf of the LED maybe. hfe of 1000 for TIP127 Vs hfe of 10 for a TIP32 say means 100 times increase in base. This would give to a greater voltage rise across R1 and affect Vf of LED.

« Last Edit: February 08, 2017, 01:10:06 pm by tron9000 »
Partsbox.io - orangise your parts!
"If you're green you can only ripen. If you're ripe you can only rot!"
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #7 on: February 08, 2017, 10:09:53 pm »
Anyways, where is it configured for 1.5A to 2.5A? To me it looks like it's going to scale down with the Voltage, not sure... Any pointers?

It's a constant current circuit, the whole point is that the current should remain fixed irrespective of voltage.  In this case it's a fairly crude current source so there will be a little variation, but the current won't scale with voltage in the way you are hoping.

The current is set by the voltage developed across R3, the 0.3 ohm resistor.  e.g. given a 2v Vf LED and 0.7v drop across each Vbe junction you get I=(2-0.7-0.7)/0.3 = 2 Amps.  To reduce the current, increase the value of R3.
« Last Edit: February 08, 2017, 10:11:41 pm by mikerj »
 

Offline NitrusTopic starter

  • Contributor
  • Posts: 12
  • Country: mk
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #8 on: February 08, 2017, 10:38:26 pm »
The current is set by the voltage developed across R3, the 0.3 ohm resistor.  e.g. given a 2v Vf LED and 0.7v drop across each Vbe junction you get I=(2-0.7-0.7)/0.3 = 2 Amps.  To reduce the current, increase the value of R3.

Ohhh, I see! Thanks, that makes a lot of sense!
Hmm, I think most Red LEDs that I can get my hands on will have a 2.2 Vf, so I'll have to get a 1% resistor that will be in the 1Ohm range: ( 2.2 - 0.7 - 0.7 ) / 1.0 = 0.8 Amps.

Provided that the rest of the circuit stays the same, I think this solved my dilemma.

Finally, one last question, since I've very little experience with NiMH. Well with charging circuits in general really.
As I mentioned previously, I've got 2xAAA that supposedly can be charged at 500mA. I'm wiring them in series because I need upwards of 2.4 Volts, so essentially like a two cell pack.

Do I charge them with 500mA or with 1000mA?
My guess is 1000mA, but I'd rather be safe than sorry :)
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #9 on: February 09, 2017, 01:51:15 am »
Two batteries in series have the same 500mA of current.
A red LED has a range of voltage from maybe 1.8V to about 2.2V. You cannot order a "2.2V" LED, you get whatever is available and it might be only 1.8V.
Transistors also have a range of base-emitter voltage and collector to emitter saturation voltage. Again you get whatever is available.
So the very simple circuit might charge the battery with almost no current or a very high current.
 

Offline NitrusTopic starter

  • Contributor
  • Posts: 12
  • Country: mk
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #10 on: February 09, 2017, 02:38:45 am »
You know, that first sentence you said just dawned realization on me:
Series. Only adding the voltage... {gears grinding} mAh will stay the same (facepalm)
Without thinking I'd foolishly set myself on a path that I somehow imagined would get me more juice... 😧

I will still probably build the circuit. It's going to be useful to have a semi-intelligent NiMH charger.
However, for my application I'm thinking I may go down the Li-ion route and get two CR2/15270 cells and wire them in parallel, then make them go through a v.reg.
Charging solutions will be a lot simpler then.
Discharge rates may be a bother but ultimately it's going to be a simpler implementation...

Then again AAAs will always be cheaper if I need to replace them further down the line... Bah!

I guess no matter which route I go, with my form-factor I wouldn't be able to get much more than 1200mAh, tops. (If I buy better rechargeable AAAs, or two 600mAh 15270s)

Thank you all for the wonderfully educational experience, cheers!
« Last Edit: February 09, 2017, 02:43:41 am by Nitrus »
 

Offline eugenenine

  • Frequent Contributor
  • **
  • Posts: 865
  • Country: us
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #11 on: February 09, 2017, 12:37:04 pm »
Hi everyone,
I've been trying my hand at making a NiMH charger (I'll explain my project below).
I know the topic has been extensively discussed to hell and back, however surprisingly there are very few open source circuits available online.


Ti, Maxim, etc all make NiMH charging IC's with reference designs you can use.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #12 on: February 09, 2017, 10:27:09 pm »
1) Can anyone explain to me how that Red LED constant current thing works? I understand as far as forward voltage drop, but not the part about the constant current, not really. I've remade the schematic in a SPICE simulation environment and that LED never blinks for me, which is clearly different from the author's video. I get pulsed current, but not the blink.

The voltage across R3 is roughly Vled - 2Vbe so about 2 - 1.4 = 0.6 volts so with a 0.3 ohm resistor, 2 amps.

On advantage of using the LED this way is that its temperature coefficient roughly matches the temperature coefficient of one of the transistor Vbe junctions.  If a bipolar transistor was used instead of a Darlington, then the temperature matching would be very good.

Quote
2) There is a Schottky below the PNP. Is there any other function to it other than to protect the components behind it from the battery connection?

In the design shown in the link, the diode is necessary because otherwise the 7.2 volts from the charged battery would likely flow back through the collector-base junction through the LED and also through the emitter-base junction of the transistor when the input supply is removed.

Quote
3) Can the circuit work as-is with +5V, instead of the +12V specified in the schematic? The author says it was designed for 6 cells @2500mAh, however I think it can work as-is for my requirements as well: 2xAAA cells @1800mAh. I only got rid of the linear v.regulator part of the circuit, everything before the Red LED, and replaced the 12V source with 5V. I'd appreciate if anyone can make the corrections (if any), or better yet teach me about what needs to be corrected.

Saturation of the Darlington transistor will be about Vbe + Vce = 0.7 + 0.35 = 1.05 volts.  The resistor has about 0.6 volts across it.  So the total drop is 1.65 volts leaving 3.35 volts to charge two NiMH cells in series.  That could work but does not leave much margin.

The 2.4 to 2.8 volts from 2 NiCd cells is low enough that the reverse protection diode would not be needed.

Quote
Finally, if anyone can link me a better circuit, I'll gladly take it. Any advice is welcome at this point, I've rarely done anything to do with NiMH/NiCd charging before, other than some research in the past few days.

The charging current for NiMH and NiCd batteries does not need to be that exact.  Use a high side transistor switch and rely on the 5 volt supply to be stable and use a resistor to limit the current.  Subtract the charged battery voltage and transistor saturation voltage from 5 volts to find the voltage across the resistor and set it accordingly for the desired current.  USB limits you to 500mA so a single PNP bipolar transistor instead of a Darlington could be used.

 
The following users thanked this post: Nitrus

Offline NitrusTopic starter

  • Contributor
  • Posts: 12
  • Country: mk
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #13 on: February 10, 2017, 12:10:30 pm »
@David yes, I've since found out that the circuit could be minimized and stripped significantly when used with only 2xAAA batteries. For example, there is a wide choice of bipolar transistors that could be used at such small currents, and as you say the diode is not even needed with this application.

Thank you very much for the thorough explanation!
 

Offline tron9000

  • Frequent Contributor
  • **
  • Posts: 423
  • Country: gb
  • Still an Electronics Lab Tech
    • My Hack-a-day project page
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #14 on: February 13, 2017, 09:20:19 am »
Something I would like to know: does the example program use negative delta V detection to determine end of charge or is that not essential?
Partsbox.io - orangise your parts!
"If you're green you can only ripen. If you're ripe you can only rot!"
 

Offline NitrusTopic starter

  • Contributor
  • Posts: 12
  • Country: mk
Re: [AVR / Components] Need help regarding NiMH AAA charger
« Reply #15 on: February 13, 2017, 09:31:40 am »
Something I would like to know: does the example program use negative delta V detection to determine end of charge or is that not essential?

I believe so, the author mentions it in the text:
"We need to constantly read the voltage of the battery being charged, and when there will be a maximum peak voltage followed by a sudden drop of about 20mV, the battery may be considered charged. This phenomenon (called Negative Delta V) is related to the chemistry of this type of battery, and allows to establish precisely the right moment to terminate charging."

In the code it's covered (a bit convoluted) in the voltread() function, line 62 and onwards.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf