Wednesday, January 23, 2013

555 Constant Current Lead-Acid Battery Charger

Sealed Lead Acid batteries are often used in amateur radio as a convenient power source for radios, since amateur radio equipment has standardized on 12.6V. The Cal Poly Amateur Radio Club enjoys a steady source of donations of slightly used SLAs, so I got a few of them with need for a battery charger.
Since the SLAs are relatively small, and I only need them charged between radio outings, I opted to build a 1A constant current charger, based on the 555 Battery Charger which won first place in the 555 Design Contest Utility category. Using a 555 is a rather clever way to get two comparators and a Set-Reset latch in a single 8DIP package, which is needed for the high and low trip points. The major difference between my design and Mike's is that instead of using a relay like him, I use an LM317 as a constant current source to limit my batteries charge rate.
Mike's design doesn't need current limiting since he's using it with limited power power supplies (solar panels and/or wind mills) and is charging a relatively large battery bank. Conversely, since I'm using a laptop power supply and charging relatively small batteries, I cared more about actively limiting the charge current.

This charger only implements the constant current stage of your standard lead acid battery charge curve, since that is when most of a battery's capacity is recharged and is much simpler to build than multi-stage controller logic. I appreciated the minimalism of only using a 555, where a three stage charge really only makes sense with a microcontroller.  If I did use a microcontroller, implementing all three stages of the charge cycle would be much easier:

  • Constant current until the battery reaches 14.2V
  • Constant voltage at 14.2V until charge current falls below a set threshold.
  • Float the battery at 13.4-13.8V indefinitely.

As a switchable current source, I used an LM317 (or an LM1117) wired as a constant-current source with a 1.5Ω 1W current sense resistor. Using the LM317 as a constant current source is a relatively clever use of the voltage regulator control loop to maintain 1.25V across a current sense resistor. The 4.7k resistor back to the ADJ pin is arbitrary, as long as it's high enough resistance to allow the 555 to pull the adj pin low.  The 2N3904 between the 555 and the LM317 is used as a level translator, since the 555 is running on 5V where the ADJ pin will be above 14V.

Once built, calibrate the two trim pots feeding the 555 so that the charger kicks in at 11.5V and shuts off when the battery reaches 14.2V. The button pulling pin 2 low forces the charger into charging mode until the battery reaches 14.2V again. Forcing the charger back into standby mode can be accomplished by pulling pin 6 to 5V, but I opted not to include that.

Ideally, I would have a much better heat sink on the current regulator, but 317s are almost indestructible. When it starts to over-heat, it simply folds back the current and charges the battery longer and slower, which is fine for my application.  Not shown in the schematic is the switch which doubles the current sense resistor to 3Ω for a slower charge.

I primarily use this to recharge my small SLAs with a 18V laptop power supply, but used the same connector as my 10W solar panel, so solar charging is an option in the future.  I'll probably play with that at some point.

44 comments:

  1. Could you please explain some more detail about how this 2N3904 part of the circuit works? I've fiddled around it with SPICE and just can't get the idea.

    ReplyDelete
    Replies
    1. It's a buffer (level-translator) between the 5V output of the 555 and the 13V ADJ pin of the *17 regulator. When the 555 output goes low, it pulls the ADJ pin low as well, without the 555 output ever seeing more than 5V.

      Delete
    2. I was also (and still am) confused by this. I'm used to using NPN transistors where the lower voltage is connected to the base, switching the higher voltage on the collector and emitter.

      Looking at your schematic, the base is tied to 5V and will always be on, routing the voltage from the regulator straight into the 555 pin without any level conversion/protection.

      Where am I going wrong with my thinking?

      Delete
    3. The transistor will only turn on when there is a positive voltage across the base-emitter. When the 555 output is high, both the base and emitter are at 5V, so 5V-5V = 0V, and the transistor turns off, preventing any current flowing from the regulator.

      When the 555 output goes low, since the base is tied to 5V, there is now a voltage across the transistor and it turns on. The 555 is able to sink enough current to pull the ADJ pin down to 0V as well.

      Delete
  2. (How) Could this be modified for a 6V SLA?

    ReplyDelete
    Replies
    1. Adjust the two voltage dividers into pins 2 and 6 of the 555 to reach the two set points at half their current voltage. Off the top of my head, I think you'd just need to remove half of the total resistance from the top half. You may also need to worry about the 5V 78L05 voltage reference drooping with a 6V battery voltage; an easy solution is to tie the input of the 78L05 to the power input on the far left of the schematic.

      Delete
  3. I dont understand the rules of charging the battery. Is a battery fully charged when you charge it 15% more what it outputs. 12V to 14.2V? I dont see how Mike version would give the same effect if you stop the charging when it reaches a certain point anyways?

    ReplyDelete
    Replies
    1. Have you watched the video in my follow-up post? I spend almost an hour explaining this.

      Delete
  4. I just watched it and it clarified many things. But I dont understand why 14.2V. If I wanted to charge a 9V battery would I charge it up to 10.35V (+15%)? And what current should I set it to receive? Is 1Amp a standard current for charging batteries?

    ReplyDelete
    Replies
    1. The 14.2V comes from the battery manufacturer, as does the charge current as a fraction of the total battery capacity (i.e. C/4 = 7Ah/4 = 1.75A max charge current. Lead-acid batteries don't come in 9V; do you mean 9V alkaline batteries? They aren't rechargeable.

      Delete
    2. What if I wanted to charge my 9V Nickel Metal Hydride battery or my Iphone. I dont want to overcharge it with too much voltage or current. I just dont what to select for these two unknowns.

      Delete
    3. Those are two completely different things than lead-acid entirely. The iPhone is relatively easy; http://blog.thelifeofkenneth.com/2013/02/diy-usb-power-strip.html

      The NiMH battery is harder, and needs a much more sophisticated charge controller than a 555. I've played with the BQ2002 charge controller before (http://www.ti.com/product/bq2002) but that's another entire blog post worth of project.

      Delete
  5. That's a nice straight forward design. I have one question. Why bother with the lower limt to turn the charger on? why not just let it start when it will and stop when it reaches the upper limit.
    By the way, the 14.2 is fine for wet batteries, but should be trimmed down to 13.85 for AGM or gelled batteries.

    ReplyDelete
    Replies
    1. Because I want to be able to leave batteries plugged into it unsupervised, so if I happen to drain a battery while it's still hooked up to the charger, the charger will kick back in.

      The 14.2V is fine for SLAs as a balancing charge point, since this isn't a float charger. If it had an additional floating charge stage, you would want lower voltages for all chemistries, I would think.

      Delete
  6. can you explain how it is a constant voltage charger ? LM317 is wired as constant current source and 555 IC acts cut-off and cut-in controller by either pulling the ADJ pin Low or high, but where are the parts which "transform" LM317 into Constant Voltage source ?

    ReplyDelete
    Replies
    1. This is not a constant voltage charger. This only implements the initial constant current stage. To set a constant voltage point, you would use the 4.7k resistor from the current sense resistor to ADJ, and add a second resistor from ADJ to the 2N3904 to replace the direct connection I used.

      Delete
  7. can you please explain the use of 4.7 K ohm resistor.....

    ReplyDelete
    Replies
    1. It was an arbitrary selection. I just needed something with high enough resistance to limit the current the 555 needs to dissipate.

      Delete
  8. Hi Kenneth,I am saw all your battery related works it was great :). For charging a 12v,14Ahr battery with a µcontroller.I would like to know whether I am right
    Start with Constant current charging of 4.2A till V=14.2V is reached then switch to constant Voltage of 14.2V till current decreases to .3A

    ReplyDelete
  9. Can I charge two Lead acid 12v/7AH in parallel with this circuit? and how long?
    thanks Kenneth

    ReplyDelete
    Replies
    1. As long as they don't start at different voltages. It will just take twice as long.

      Delete
    2. I used lm317 to make constant voltage at 13,8v and use resistor in series before battery to limiting current, what is the effect for the battery?it was work?

      Delete
  10. Can you please suggest me how to charge a 12V,14AH Lead Acid Battery?
    In constant Current Mode:3.5A till Voltage Reaches 14.1V then switch over to Constant Voltage Mode: 14.1V till current reduces to 10mA.
    Are the above current & voltages considered correct?
    Will my battery be charged properly?

    ReplyDelete
    Replies
    1. Yep. I think it may not ever fall all the way down to 10mA during the constant voltage stage, so you may want to check to see if that actually ever terminates, or if you should use a higher current as your "finished" threshold.

      Delete
    2. Thank you. I would like to know whether charging with 4.2A at starting stage is right or should I do with still more lesser current?

      Delete
    3. 4.2A/14AH is about C/4, which isn't out of line. I wouldn't even bother checking the battery's spec for anything less than C/2.

      Delete
    4. 4.2 is About C/3 and my Battery spec says not to go more than 3.5A in constant voltage mode that is what bothering me.


      How can I test what is the maximum current(means for satisfactory life) I am allowed to inject? Is there any way to check or should go with datasheet only?

      Delete
    5. Here is the datasheet of my Battery.

      www.oremabattery.com/PDF/6-DZM-14.pdf

      Delete
    6. If that's what the datasheet says, I have to say that they probably know more about their batteries than I do. You can do whatever you want, but I don't think 4-6 hour charge cycles are too inconvenient.

      Delete
  11. Good one...
    the 555 part can be replaced by much simpler opamp comparator if one wishes not to have that 11.5V kick in feature.

    ReplyDelete
    Replies
    1. Not really. You need the RS latch in the 555 as well. Without the latch, you may as well just set the 317 up as a voltage regulator. You'd want a set point lower than the 14.2V balancing charge as well.

      Delete
  12. Hi Kenneth, I have a question also.

    I've built a board based on your circuit (with a few minor changes such as moving the 7805 to the main power rail, and no push buttons). I have some confusion as to how the circuit actually goes into the charge mode: Is it the case that when the Adjust pin on the LM317 is conducting (the output of the 555 is LOW and sinking current from it), does that energize the constant current circuit and charge the battery, or is it when the Adjust pin is "floating" (the 555 is HIGH and the transistor is switched off)? You don't have the LED's labeled so it's not immediately obvious, and I'm not an EE, so the concept is unfortunately over my head.

    Also, is the calibration process the same as Mike's original circuit? I.e. you adjust the pot connected to pin 2 so that pin 2 is at 1.667ish Volts when the battery is at 11.5V, and the other pot to adjust pin 6 to 3.333ish Volts when the battery is at 14.2 Volts?

    When I get my board working, I'll put up a blog post of my own and give you the link.

    Btw, I really enjoyed the talk you gave on Lead Acid Batteries, that was incredibly informative.

    Thanks :)

    ReplyDelete
    Replies
    1. The 555 drags the adjust pin to ground to shut down the constant source and reverse-bias the diode. Top LED is green, bottom red.

      I used a variable power supply to calibrate mine. Set it to 11.5V and turned the trimmer until the 555 triggered. Set it to 14.2V and did the same with the other, so pretty much what you said.

      Delete
  13. As promised, here is the link to my blog where I show the circuit board I made based (heavily) on your (and Mike's) design:

    http://thealbuquerqueleftturn.blogspot.com/2013/04/555-based-constant-charge-circuit.html

    ReplyDelete
  14. This is an absolutely MARVELOUS achievement !!!

    Using such nice and easy to find parts im so glad your design won the contest !!!

    I would very much like to recreate your circuit for my 12v SLA battery but its 7Ah and i would like to charge it at 3 Amps, in theory, could i use 3 LM317's to each output 1 Amp so that not one of them works too hard and still be able to give me the 3Amps charging current ?!?

    Just for a faster charger ! lol !

    A Great many thanks in advance for any help and light you could shed towards my goal !
    ( Still learning Electronics, but quite quick to pick things up ;-) )

    ReplyDelete
  15. Me Again lol !

    Ive put this circuit into my fav PCB making program so i can make it at home for my SLA battery, i might need to change the 1N5817/8 to a diode that can handle 3 Amps ? Not sure if i will be able to just use the 1N5817 as its all i have at the moment but do have this diode in my box of tricks:

    http://uk.farnell.com/jsp/search/productdetail.jsp?SKU=1651065

    But would this be okay to use with a forward voltage drop of 1.35v ?!?

    i uploaded the schematic below, please would you be able to say if this would let me charge at 3 Amps ?!?

    http://www.flickr.com/photos/94978288@N08/9411407204/

    Oh and i just added 4 extra capacitors, two on the input and two on the output, they are only 16v each so if i understand it correctly, the voltage value doubles and the capcitence value halves when capacitors are put in series like this ?!?

    These are the highest voltage capacitors i have and i dont want to blow them by using a 16v input ( will be using a laptop 5A PSU lol ! )

    Oh and Last Question, sorry, but out of LED1 and LED2, which is the Red and which is the Green LED's as i couldnt tell which was which in your schematic ;-( ?!?

    Once again thanks so much for the help in advance ! ! !

    kindest regards,

    Anil

    ReplyDelete
    Replies
    1. The diode voltage drop is lost, but if your input is high enough, the difference between 0.2V and 1.3V makes no difference.

      You can parallel current sources, so your 3A extension looks sound.

      The top LED is lit when the charger is shut down, since the 555 pulls the current sources down to shutdown. I made the top LED green and the bottom one red.

      Delete
  16. Thank you so very Very Much Kenneth !!!

    This is exactly what ive needed as my SLA charger doesnt charge and hasnt worked at all for charging my 12v SLA battery so ive been charging it from a breadboard setup for almost 10 months !

    Highly annoying because breadboards arnt made to be used like this so needed a permanent solution !

    Absolutely excellent work youve done here and i hope you carry on sharing you most-excellent and awesome designs - may you succeed in everything you do forever ;-)

    ReplyDelete
  17. Good day to you Kenneth,

    Um i was wondering about something that i havent really been able to find an answer to, hopefully you could help me one last time, lol !?!

    The two resistors, 1.5 Ohms (1 Watt) and the 4.7K tied to the LM317 i assume to be the resistors setting the current output to 1amp but what if i needed 1.35Amps (with a decent heatsink added to the LM317 !) how do i calculate which resistor values to replace/change to enable this ?!?

    The LM317 i am using is limited to 1.5A but i dont think its wise to run it at its full capability (unless theres some serious overkill cooling going on like watercooled LM317, lol) so how would i get it to output 1.35A ?!?

    Once again thanks so much in advance and i promise this should be the last pesky question lol !

    ReplyDelete
    Replies
    1. The current is set by I = 1.25V / R, where R is the 1.5 ohm resistor. The 1.25V value comes from the internal voltage reference in the 317. So honestly, as shown this is actually a 0.83A current source... The 4.7kOhm resistor is a biasing resistor that doesn't need to change for different currents.

      As for heat sinking, the 317 does an amazing job protecting itself, so even if you don't have enough heat sinking for peak loads, the 317 will shut itself down and deliver as much power as it can without overheating.

      Delete
  18. Help !
    Sorry im back again !
    i made the PCB but decided to just make the single LM317 SLA charger first, so only added an on/off switch and also changed the 1watt resistor to 0.91R to give 1.37A and also added a switch to select between that resistor and a 1.2R resistor to give 1.04A outputs, just in case i stressed out the LM317 too much but from your sound advice it doesnt look like it would get that stressed !

    Well it worked for like 10 seconds when i first powered it up but then the LM317 got so hot i had to turn it off, then only powered it up for about 5 seconds with a non contact temperature monitor pointed at it and in the 5-8 seconds i powered it - the LM317 temperature rose rapidly to 80°c (176°F) !!!

    Would you have any idea what could possibly cause this ?

    i can email you my Eagle board files if you wish, would really appreciate the help getting this working !

    a great many thanks in advance once again ;-)

    ReplyDelete
  19. Hi Kenneth,
    I like this schematics, I just finished, but I'm thinking, if my schematics is working just on battery, is possible !? to add another 555 to Light On a LED when battery voltage drop under 10V . Thanks !

    ReplyDelete
  20. Hi,

    What changes would be needed to charge a 6V lead acid battery from a 9V+ input?

    ReplyDelete