Building a battery 12V battery charger

Discussion in 'The Projects Forum' started by RayInMS, Mar 30, 2015.

  1. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    Hey All -

    Spring is upon us, and that means I get to cut grass.

    The battery in my riding mower was cranky this weekend (it's been five months since I last cranked it up!), and after multiple attempts I ended up jumping it off using the battery from my mule. Both use a typical 12V lead-acid battery.

    On to the topic, though.

    I'd like to build a charger for these 12V batteries. I was thinking of using an application based on the LM 317, but I have a couple of questions...

    (1) The LM 317 data sheet provides two schematics for battery charging applications. One involves a 0.2 ohm resistor in series between the LM 317 out and the battery. The other is a 50 mA trickle charger. What's the difference?

    (2) I know I need at least 4.5 V more at the input of the LM 317 than the destination battery (12V). Would a 19.5V DC laptop supply (brick-style, I believe it's linear) work for the initial power source? I'm assuming it would (though I need to check the current max to make sure).

    (3) Speaking of current, is there a way to maximize current output from the LM 317 (I believe 1 A is the safest bet) to the battery in question, then slowly reduce it as the battery becomes fully charged? Isn't this called a "floating charge?"

    (4) Would it be possible to build in some type of indicator (LED?) to tell me when the battery has reached full charge (13.8 V for a 12V battery, correct)? Would I use a typical comparator op-amp for this?

    (5) Would I need to house this unit in a metal enclosure? Can I use an ABS box?

    (6) I don't trust internet schematics in general, but I trust advice from members here. Does anybody have an existing schematic they care to share so I don't have to start from scratch?

    I plan on doing this over the next few weeks, so going slow is OK (and preferable). Most of my past projects have been related to building bench supplies (make-work projects, haha!) and LED/555 toys for my kid. This is my first "real world application" project, so I'd like to do it right.
     
  2. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    Many ways to skin the cat.

    First, lead acid batteries are no longer all that, "typical". Absorbent glass mat, sealed lead acid, flooded plate...
    Read the label!

    After we know exactly what you have, you might do anything from a simple, one voltage, float charger to a three stage charger with temperature compensation. You also might find that 5 months with no love has rendered your battery a cripple.
    Start with http://batteryuniversity.com/
     
  3. blocco a spirale

    AAC Fanatic!

    Jun 18, 2008
    1,438
    368
    Is it a vented or sealed lead-acid battery?
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,142
    1,790
    There are many cost effective chargers on the market. Generally it would be appropriate to buy one instead of building one. If you still want to build one you should do some additional research. This article covers most of your basic questions and has some useful data.

    http://www.powerstream.com/SLA.htm
     
  5. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    I'll get the battery details after work today, and report back tomorrow.

    @Papabravo - I know I could buy one, but building one gives me an excuse to go work in the shop!
     
  6. Papabravo

    Expert

    Feb 24, 2006
    10,142
    1,790
    If you want to work in the shop then you need a canned project. Designing one from scratch is going to involve several days in the office learning how to design one and then designing it. It could be quite a while until you get to the shop. Maybe someone here has a canned project, but because they are so cheap and readily available most of us have no interest in them.
     
    RayInMS likes this.
  7. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Papabravo and RayInMS like this.
  8. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    OK, so I checked the manual...it's a 12V lead-acid battery, but it doesn't specify sealed or vented. It does say to keep the vents clean on the battery, so I'm guessing it's a vented lead-acid battery. Is there a substantial difference in developing a charging application for sealed vs. vented LABs?

    The manual says to charge at 6-10 amps for one hour. I'm assuming any application with the LM 317 will be a trickle charger (at perhaps 50 mA?) designed to charge slowly and then float after full charge.

    The LM 317 data sheet offers two examples of charging applications (below):

    317a.PNG

    317b.PNG



    Which model is best suited to my application? What are the primary differences between the two?
     
  9. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,986
    745
    Lead acids need constant voltage of 13.8 to 14.5volts ,so fig 53 is the one, you will need a current slave transistor as the Lm317 wont give more than 1.5 amps.
     
  10. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    I'm not worried about the speed at which the battery will charge, so maxing out the current isn't a priority. Charging with lower current (within the capabilities of the LM 317) at a longer duration is fine.

    Or am I misunderstanding the relationships here?
     
  11. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,986
    745
    At constant voltage the regulator maintains the 13.8v, but the battery decides how much current it needs to lift the voltage ,it takes more current when its flat,so if it needs 5 or more amps to get it going, the regulator wont let more than 1.5amps so it will get hot or burn out, hence the need for a pnp pass transistor,and the current decreases as it gets charged.
     
  12. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    So would I be correct in assuming that this application could be done by using two LM 317s? One for providing a constant voltage of 13.8-14.0 V and one to provide a constant (limited) current source to the battery under charge? Perhaps this could be done by combining the two circuits above?

    Or would it be simpler to use the LM317 as a voltage regulator and then use a power transistor to provide current to the battery (at rates above the 1.5 A capability of the LM 317, as you stated above)?
     
  13. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,986
    745
    one Lm317 and a Tip2955 power transistor on an heatsink, like this.(plus the smoothing caps of course)


    charger.png
     
    Last edited: Mar 31, 2015
    RayInMS likes this.
  14. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    I'm thinking, 5 to 7 amps if it's mostly discharged.
    It's a riding mower. It sits for a week between uses. It only needs a couple of start surges per week.
    I just use a wall wart and an LM317L which will not allow more than 1/10 of an amp and I let my AGM battery float all week at 13.8 volts.
    It's been running like that for 2 years now. No problems. No melty transistors. No bubbles in my unvented battery.
    Primitive, but it works.
     
  15. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    Would I need protection diodes on the output of the LM 317 and the collector of the transistor? To prevent back-feed?
     
  16. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,986
    745
    yes the usual protection is needed..edited
     
  17. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    That was (kinda) my first thought when I was thinking about doing this. But, as Dodgydave said above, wouldn't the battery pull more current than the LM 317 can produce? Does the LM 317 limit the current to 1.5 A or will it experience a catastrophic failure (magic smoke) if the load is pulling more than 1.5 A?
     
  18. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    In this case, the supply produces voltage and ALLOWs current.
    The LM317 comes in several flavors, 1/10 amp, 1/2 amp, 1 amp, 1.5 amp.
    The 317 does an internal limit on the current for both the advertised current limit and overheating caused by too much supply voltage. If your battery is fubar, the LM317 will lock down at its advertised limit and get quite hot. That's why I used a tiny current limit and a tiny wall wart.

    "Must provide current capability far in excess of what is needed" is a matter of opinion.
    I simply disagree.
    Do you crank your engine until the battery is dead and want it charged up in 1 hour?
    or does your machine start in less than 10 seconds and then sit on the charger for a week?
     
    RayInMS likes this.
  19. RayInMS

    Thread Starter Member

    Dec 12, 2012
    89
    1
    Speed is not critical. I'd like this charger to serve two functions:

    (1) If the battery is unable to crank the mower (yet still shows 12V +, or has some life left in it) I'd like to be able to charge it over the course of several hours (or even over night) and get it back in shape.

    (2) During winter, I'd like to be able to remove the battery and keep it charging (at float). Or if that is not possible, I'd like to be able to give it a nice long charge a day or two before grass cutting season begins.

    I don't need to be able to charge the battery quickly.
     
    Dodgydave likes this.
  20. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    If you are going to build something that might push the LM317 to its limits, you have to understand the need to get rid of heat. This starts with the maximum voltage of your supply compared to the output voltage into a discharged or defective battery. The thermodynamics of this are a whole 'nuther calculation.

    Letting a battery sit undisturbed is a very bad thing. They self-discharge, then they sulphate, then they are dead.
    I simply connected a 1/4 inch guitar jack to my battery and leave it connected to the 1/10 amp charger all the time. If I forget to unplug it, the 1/4 inch guitar plug just unplugs when the cable gets tugged on.
     
Loading...