ESP Logo
 Elliott Sound Products Project 196 

Charger for 12V Battery Operated Equipment

© November 2019, Rod Elliott (ESP)


This project is basically a 12V version of Project 98, with the difference being that this project is for a single 12V supply.  While it's not as useful for preamps (or small power amps) that run from ±12V, there are still many applications.  Not all of these will be audio related, since a 12V battery backup system is also useful for electronic clock drives, or even surveillance equipment.  Like the original project, remembering to turn the charger on or off is no longer a problem!

The idea is that the charger is left permanently connected, and while that would normally introduce some hum into the supply line, the output noise is very low.  There's no sensor - power is available permanently.  There are no hard to find parts either, every part is either readily available or can be substituted for something you already have that has similar specifications.  Originally, I planned to use the same discrete regulator circuit as Project 98, but it quickly became apparent that an IC regulator was much easier, and probably cheaper as well.

A 12V SLA (sealed lead-acid) battery requires a float charge voltage of 13.5 to 13.8V (at 25°C).  The voltage is critical, and if exceeded (or the ambient temperature around the battery is significantly above or below the 'standard' temperature), then the battery life will be reduced.  It is worth noting that few of the commercially available chargers make these corrections, and fewer still are designed to provide a proper float charge.  This project is suitable for any project that needs a 4-12AH battery - anything larger will need more current than the circuit is designed to supply.

Just what is float charge?  It is simply a method for maintaining the charge in a cell or battery - float charging is used anywhere that lead-acid batteries are used infrequently, but must be kept at full charge when not in use.

I do not intend this simple project to become a full scale article about batteries, but it is very important that you understand that unless looked after very well, any battery will have a much shorter life than normal, and can prove costly to replace.  It is entirely up to the reader to determine the suitability of the charger shown for the intended application.

For low powered circuits, I suggest that the reader also have a look at the article Lithium Cell Charging & Battery Management, and specifically Section 8.  That shows a couple of alternative methods, using Li-Ion (lithium ion) cells or batteries.  Apart from the obvious limitation (they cannot and must not be left on charge permanently), this is a good option, especially for portable equipment and/or test gear.  While recommended for low current applications, Li-Ion cells and batteries can also be used for high-drain devices.  It's no accident that almost all modern portable equipment - especially mobile phones, tablets, laptop PCs, portable 'battery banks', etc. use Li-Ion batteries.

The size of the battery depends on what you are powering, and this circuit is not recommended for high current loads.  SLA batteries should normally be used at no more than 1/10 of the C-rating (C is capacity).  For example, a 7AH battery will power equipment drawing 700mA for 10 hours.  If the discharge current is higher, capacity falls, so you won't get 7A for one hour as the capacity implies.  Most loads will be fairly low current, and if you only draw (say) 200mA, a 7AH battery should provide a running time of about 35 hours (at least when it's new).

In the descriptions below, the battery 'C' rating is mentioned.  This is the capacity, measured in amp-hours (Ah) or mAh (milliamp-hours, for small cells and batteries).  For example, if a 1Ah battery or cell is charged or discharged at a C/10 rate, that means that the charge/ discharge current is 100mA.  Also note that strictly speaking, a battery is a group of cells, usually wired in series, parallel, or a combination of the two (series-parallel).  A cell is just that - a single cell.  Calling it a 'battery' is incorrect, but it's become common usage regardless.

One point is quite critical, and that's the nominal charge current.  It must be greater than the average load current, otherwise the battery will be providing load current continuously and it will eventually discharge completely.  If your load current is (say) 100mA, then the maximum output current from the charger should be at least 200mA.  That way, 100mA is available to recharge the battery while the 100mA load is kept going from the regulator.  Many loads will draw much less, but others may draw more.  Confirm the load current before selecting the current limit resistor (R3).  The value shown should be more than enough for most loads.  Once the battery is charged, the regulator will only be supplying a few milliamps to the battery (float charge), with the load powered normally.

Circuit Description

The charger is shown in Figure 1, and is a conventional (but very simple) regulator, based on the LM317 adjustable regulator IC.  A 3-terminal regulator is suitable for this, because the current required will rarely be higher than IC regulators can provide.  The charger uses a standard 15V transformer, and uses a bridge rectifier to provide a nominal 20V supply for the charger, which requires an output voltage of 13.8V (lead acid).  It is possible to boost the output current of 3-terminal regulators if required (unlikely), and the current limiter circuit will still function properly (except into a short circuit!).  See Figure 2 if you need more than 1A peak charge current.

R3 and Q1 provide current limiting so that heavily discharged batteries will not be damaged, nor damage the charger due to excessive current (not including a shorted output).  Batteries should be charged at C/10 (capacity/10) - so a 7Ah (ampere-hour) battery should be charged at a maximum of 720mA, and the maximum theoretical current set by R3 and Q1 is about 300mA (the actual current is a bit less, at closer to 250mA).  This can be reduced (or increased) if required.  As the cells reach full charge, the charging current will taper off to a few milliamps - just sufficient to maintain the charged state without overcharging.  The current limit is determined by ...

IMAX = 0.65 / R3
IMAX = 0.65 / 2.2 = 295mA

VR1 is used to set the float voltage, and this should be done as accurately as possible - a 10 turn pot is highly recommended to enable you to get an accurate setting.  At 300mA, and with deeply discharged batteries, the dissipation in U1 will be rather high - worst case is over 3 Watts, and a heatsink is essential.  Should more current be needed, this is easily done by reducing the value of R3 - half the value will give double the current and vice versa.  It is important that you ensure that the heatsink for U1 is sufficient for the expected load current.  C1 must be rated at a minimum of 25V - not because of the voltage, but to obtain a sufficiently high ripple current rating, especially when the charger is in current limit mode.  The value shown (470µF) is the minimum suggested, and it can be increased if you prefer.  It will need to be larger if you have a higher current limit than that shown.

The circuit is not designed for particularly high current, so don't expect to be able to get much more than about 1A unless you use a bigger transformer and heatsink for U1.  If the charge current is reduced to C/20 or less, the batteries will take longer to charge but you probably won't even need to worry about setting the float charge voltage too accurately.  This will only work for very low current loads (less than C/25).  You must check the current limiter and make changes to R3 if necessary.  If the output is shorted, U2 will dissipate its internally limited maximum, as the current limiter doesn't work with output voltages below around 1.3 volts.

figure 1
Figure 1 - Charger and Current Limiter

All unmarked diodes are 1N4004 or similar, and R1 is 1/4W - R3 should be 1W.  If higher current than described here is needed, the value of R3 must be reduced, and higher current diodes will be needed for D1...D5.  1N5404 or similar will be fine for up to 2A output current.  For even higher current, use a 10A bridge rectifier, and select a diode for D5 that can handle up to twice the expected output current.  R3 may need to be reduced in value if the current needed is especially high (but less than the IC's maximum of 1.5A).  The value for R3 is determined from ...

R3 = 0.65 / IMAX     Where IMAX is the maximum allowable current (295mA with the value shown).
PR3 = I² × IMAX

The second formula calculates the power dissipation in R3 - for example it's around 650mW for a 1A output (use a 1W resistor).  If current is increased substantially, you'll need a very good heatsink for U1.  In addition, the value of C1 needs to be increased, and you'll need a transformer with a VA rating that's at least equal to the winding voltage times twice the output current.  For example, if you need 1.5A DC (the IC's limit), you'd use a 15V transformer rated for around 45VA.  It may sound like overkill, but a smaller transformer will be overloaded.  Brief overloads won't hurt the transformer, but if it has to charge a flat battery, the current can be maintained for a lengthy period.

A multiturn trimpot is recommended for VR1. C1 and C2 should be rated at 25V or higher.  All other components are as marked.  Q1 can be any small signal NPN transistor.  Mostly, a standard 1N4004 (or similar) diode will be fine for D5 (with current below 500mA), but a Schottky diode can be used for lower voltage drop if you think that's important (it shouldn't be).  For higher current or for a slightly lower voltage drop, us a 1N5004 diode (3A).  The arrangement shown is far more economical than the original in Project 98.  D5 is required to ensure that the battery doesn't keep RL1 energised.

Because an IC regulator has been used, the regulation under load is very good.  Provided the attached electronics (powered by the battery) don't draw wildly varying current, it's just a matter of setting the output voltage carefully once the battery is fully charged and the electronics are operating.  The regulation should be accurate to within 10mV from zero load up to around 200mA (with R3 as shown).  The current limiting does affect regulation a little, but not enough to cause any problems.  The LM317 has internal current limiting (at around 1.5A), but that requires a bigger transformer and is too high for normal float charge usage.  If the output is shorted, U1 will provide the full output current and will get very hot.

The 'Loss of Mains' detector has been included to ensure that the charger is disconnected from the battery when mains power is not available.  By adding the relay (RL1), the battery is completely disconnected from the charger, reducing the current drain only to that drawn by the connected electronics.  While optional, it's recommended.  The resistor (R5) marked 'SOT' needs to be selected to obtain close to 12V across the relay coil.  For example, a 12V relay with a 500 ohm coil will need approximately 330 ohms ½W.  If the loss of AC circuit is not included, the regulator circuit will draw around 6mA from the battery.  Don't bother looking for R4 - it only exists in the Figure 2 version of the circuit.

Note that RL1 is energised continuously as long as mains is present.  While this does use a small amount of energy, it's under 0.5W.  Make sure that the relay contact rating is sufficient to pass the current drawn by the connected circuitry.  A diode is not necessary across the coil of RL1, because the capacitor (C1) discharges relatively slowly and there is no back-EMF.

The relay contacts are connected as normally open (i.e. the relay must be energised to connect the charger).  Because current is generally very low, a small DIL (dual in-line) relay may be quite sufficient, provided that the contact current rating is greater than the load current.  Most DIL relays will manage that with ease, but you must check to make sure.  RL1 can be any low cost relay - there's countless examples from as many suppliers.  Typical coil current is about 20-70mA.

The transformer will typically be rated for around 20-30VA, which will allow a charge current of up to 670mA or 1A respectively.  While a smaller transformer could be used, they are inefficient and usually run hotter than larger versions.  The cost difference isn't that great, although a toroidal transformer will be more costly than a 'conventional (E-I lamination) type.  A suitable E-I transformer shouldn't cost more than around AU$20.

Note that there is no under-voltage cutoff circuitry, so the arrangement shown must never be used if long periods without mains are expected.  If any battery is deeply discharged it will be damaged, so if there is any likelihood of a deep discharge, consider the use of an under-voltage cutout circuit.  Project 184 shows one that is easily adapted to this circuit.  The under-voltage cutoff circuit is connected between the battery and the load.

figure 2
Figure 2 - High Current Charger and Current Limiter

If you need (much) more current, use the circuit shown in Figure 2.  Q2 (TIP35) needs a very good heatsink, but the regulator will need only a small 'flag' type at most.  The diode bridge needs to be higher current, and D5 should be rated for 10A (and may also need a heatsink).  While C1 is shown as 2,200µF, you can increase it if you wish.  It's possible to get up to 5A or more from the circuit shown, but obviously the transformer need to be a much higher rating.  Worst case load at 5A is about 150VA, but if full current is only intermittent you may get away with a smaller one.  The current limiter can't function with a short circuit, and the fuse is essential - it should be a fast blow type, rated for the desired output current.  The current limit resistor (R3) is calculated in the same was as described above, and for 3A it should be a 5W wirewound type.  It's not very likely that you'll need anything as heavy duty as this, but the option is available.


Construction is not critical, and all circuitry can be built on Veroboard or similar.  Resistors can be anything you like, but 1% metal film is preferred for stability.  You will need a heatsink for U1, and a sheet of aluminium of around 100 × 100mm should be enough if it's exposed to the air outside any enclosure.  That has a thermal resistance of about 5°C/W (one side only).  U1 should be insulated from the heatsink, and Silicone pads are acceptable as dissipation is usually fairly low.  Make sure that bypass caps (10µF) are as close as possible to the regulator to prevent high frequency instability.

Wire up all sections as per the circuit diagram shown, taking particular care with polarised components (diodes, electrolytic caps and transistors).  Incorrect polarity will destroy many parts.  When the charger is complete, it should be tested before connecting to the battery.  Large components (e.g. electrolytic caps in high values) may need to be mounted so they have some mechanical support.

If you build the high current version shown in Figure 2, you will almost certainly need a very good heatsink for Q2, and you can't use silicone pads because they aren't good enough.  Thin mica, Kapton or similar is called for, with thermal grease and good mounting technique.  Worst case dissipation can be over 50W, but hopefully that will not be maintained for too long, as that will only happen if there's a fault (a bad battery for example).

The LED indicates that mains power is available and that the battery is on charge.  Feel free to select any colour you prefer, and R6 can be increased in value if the LED is too bright.  Of all the colours, red is probably the least intrusive, with blue being the most intrusive.  Blue LEDs may have a 'cool factor', but if you can see it, it will probably be annoying.  You may disagree, so if you like blue LEDs then by all means use one.  The LED will normally be visible for peace of mind (especially for critical installations).

Ideally, the transformer you select will have an in-built thermal fuse.  These are designed to fail if the transformer overheats, so it's important to ensure that it's big enough to supply the current needed without getting hot.  If a thermal fuse is not fitted, then use the manufacturer's recommended fuse in the AC line.  The fuse must be rated for 230V operation, and will typically be less than 500mA.  Whether you fit a mains (power) switch is up to you, but for something that's intended to run 24-7 it's probably not necessary.


Test the charger circuit first, without the battery connected.  Connect to a suitable 15V AC transformer (a plug-pack (wall wart) type is quite suitable), and a 20VA unit will usually be sufficient).  The use of a 10 ohm 5W resistor in series with one of the transformer leads is recommended for initial tests, so that a fault will not cause excess current and damage.

If all is well, the voltage at the +ve end of C1 should reach about 20V or so referred to GND.  Adjust VR1 until the output of the regulator is at the correct voltage for your batteries (i.e. 13.8V for a 12V SLA battery).  Remove the 10 ohm 'safety' resistor when you are sure that the charger works correctly.  When connecting the battery, observe polarity - neither the battery nor the circuit will be at all happy if the polarity is wrong!

Reconnect the AC supply to the charger - it is time to verify that the current limiter works.  Use the 10 ohm resistor again - but this time, connect it between the +ve and -ve outputs of the charger.  At about 300mA, it will get hot very quickly, but the output voltage (across the 10 ohm resistor) should be around 2.5 to 3V.  Once this is tested and working, you can connect the battery and outboard circuitry.  Note that if you selected a different peak current (by changing the value of R3), then you'll need to add a load that forces current limiting.  You will need to work this out for yourself.  Do Not test with a shorted output, especially the Figure 2 'high current' version!

Once testing is complete and the circuit is working properly, it may be forgotten completely - your batteries will remain charged, and there will be a pure DC supply for your equipment whenever it is being used.  Note that if you use a Ni-Cd battery pack (not recommended for use with float charging), it should be fully discharged a couple of times a year to help minimise the 'memory effect' that these cells can exhibit.  Nickel Metal Hydride (Ni-MH) cells and batteries don't have a memory effect, but are also not recommended for float charging.

Lead-Acid Batteries

All lead-acid chemistries have a definite voltage dependence, based on the temperature of the battery.  The float charge voltage for a 12V (six cell) SLA battery is shown below, with a permissible variation of ±200mV.  Charging below -30°C or above 50°C should be avoided.  Although these batteries have low energy density, they are very safe if used properly.  The graph shown below is based on a nominal 12V (6 cell) battery.  For other voltages, divide by 6 to get the single cell voltage, then multiply by the number of cells.  For example, the single cell voltage is 2.3V (±33mV) so a 24V battery should be charged at 27.6V at 20°C.

figure 3
Figure 3 - SLA Battery Charge Voltage Vs Temperature

The graph shown above is adapted from a Xantrax technical note (Batteries - Temperature Compensated Charging).  Entitled 'Temperature Compensated Charging of Lead Acid Batteries', it dates from 1999.  There is nothing to suggest that this information has changed, and while some other sources may show slightly different requirements, most I've looked at are pretty much the same.  While the graph is for SLA types, the basics don't vary much, despite the different constructions that are available.  These include wet-cell, gel-cell and AGM (absorbed/ absorbent glass mat) types.  Lead acid is a mature technology, and was the first rechargeable battery available (ca. 1859).  Note that lead-acid batteries of all constructions must never be stored in a discharged state, hence the benefit of float charge.  Over-charging causes gassing and loss of electrolyte, and results in the production of oxygen and hydrogen.  This gas mixture is highly explosive!

Li-Po Batteries

While Li-Po (or Li-Ion) batteries would seen the obvious choice for this project, they must use accurate call balancing circuitry when being charged, or there is a serious risk of fire.  As many would know, house fires have occurred all over the world from lithium cells and batteries, with a wide range of affected products.  See Lithium Cell Charging & Battery Management for more details.

I expect that most constructors would prefer a system where it can be left on permanently, without the ever-present risk of the unit burning down the house.  Lithium battery makers (and many of the products that use them) state categorically that the battery or product should not be unattended during charging.  This even applies to many of the single-cell devices that are now common (smart phones being one of the most common).

Because of the risks of lithium, a more stable chemistry is preferable for permanently on-line applications.  Bulk and weight are not problems for gear that you don't have to carry with you, and the ability to leave the system running all the time with little fear of catastrophe should be comforting.

An alternative is lithium iron phosphate (LiFePO4, aka LFP), which are considered by many vendors to be interchangeable with lead-acid batteries [ 3 ].  The float voltage is typically around 13.8V (four cells, charged to 3.45V), but you must confirm that with the supplier before you commit to the (not inconsiderable) cost of a LiFePO4 battery.  They are generally considered to be far safer than Li-Ion batteries, and most have a BMS (battery management system) built in.

Please Note:  There is no guarantee (express or implied) that the circuit described is suitable for LiFePO4 batteries, and it is the end-user's responsibility to determine suitability or otherwise, based on the information available from the battery manufacturer.  ESP shall not be held responsible for any battery damage, fire or other event that may occur when the project is used with any battery - and especially those based on lithium chemistry.

As noted in the panel above, it is your responsibility to verify that the project is suitable for your battery.  This applies especially to lithium chemistry types, but be aware that some 'AGM' (absorbent glass mat) sealed lead-acid batteries also have slightly different charge requirements.  If in any doubt whatsoever, ask the supplier for their recommendations for the most appropriate float charging voltage.  The optimum charge voltage varies fairly widely depending on the material you're reading, so I'm not about to insist on a particular voltage.  The design shown here is not able to provide a varying charge cycle, nor does it cut off (stop charging) when a particular voltage is reached.  The circuits shown are specifically intended for long-term float charging.

  1. Project 98   (ESP)
  2. Charging The Lead Acid Battery   (Battery University)
  3. Lithium Iron Phosphate Battery   (Wikipedia)


HomeMain Index ProjectsProjects Index
Copyright Notice.This article, including but not limited to all text and diagrams, is the intellectual property of Rod Elliott, and is © 2019.  Reproduction or re-publication by any means whatsoever, whether electronic, mechanical or electro-mechanical, is strictly prohibited under International Copyright laws.  The author (Rod Elliott) grants the reader the right to use this information for personal use only, and further allows that one (1) copy may be made for reference while constructing the project.  Commercial use is prohibited without express written authorisation from Rod Elliott.
Page Created and Copyright © Rod Elliott 06 November 2019.