DIY Universal Battery Charger Circuit with Variable Auto Cut-off Voltage

DIY Universal Battery Charger Circuit with Variable Auto Cut-off Voltage

Hello everyone, happy new year. In this post I’m going to show you how to make your own Universal Battery Charger Circuit from scratch by using which you can charge almost any electronic device or battery in your home.

At very first let me tell you why I had a need for Universal DC Charger. My motorcycle was not starting and it doesn’t have a kick start. That means it can be started only using self-start and for self-motor, the battery must be charged well. But my battery was down. My bike has a Exide XPTZ4 12 volt, 3Ah VRLA maintenance free dry cell battery which should be charged if it’s voltage (with no load) dropped below 12.4 Volts. I also have six Samsung ICR18650-22F batteries with pretty good conditions which I got from my laptop’s old battery pack and  I needed to charge them and use them for a Universal Power Bank – I’ll talk about it in a different post, separately.

I’m a programmer and before starting the actual electronic stuffs, allow me to tell you a funny quote which I have seen somewhere on the internet.

“The second most dangerous thing in the world is a software guy with a soldering iron. The most dangerous thing in the world is a manager who thinks he can code.”

Disclaimer: I’m not responsible if any kind of damage happens to you or your electronics by reading and implementing the concepts and circuits described in this post.

Now, here we go.

Part 1: Typical 12 volt battery charger circuit found on the Internet

If you were searching for a automatic battery charger circuit on the Google, then I guess you’ve seen the circuit below in many websites. If you haven’t, then you may skip to Part 2 of this post as this circuit is not recommended for practical use and in Part 2, you’ll get a much better circuit.

Portable Automatic 12V Battery Charger Circuit Diagram
Portable Automatic 12V Battery Charger Circuit Diagram

Source:

  1. https://www.electronicshub.org/automatic-battery-charger-circuit/
  2. https://electronicpowersupply.blogspot.com/2014/11/make-automatic-12v-portable-battery-charger-circuit.html
  3. https://www.engineersgarage.com/contribution/inverter-battery-charger-with-cut-off
  4. https://engineeringengineashar.wordpress.com/2016/03/25/automatic-battery-charger/

and so on…

The above circuit will not work for you, you will get hardly 50mA output current which is useless as you are not going to charge wrist watch batteries.

This is a very old circuit and I found a discussion about it here which worth reading if you have tried/trying this circuit: https://www.electro-tech-online.com/threads/lm317-battery-charger.149746/

This circuit has a green charging LED which should glow only when load is present. And it has a red LED which should glow when battery gets fully charged.

BUT, in reality – the green LED is always on even there is no load attached with the circuit. And the red LED slowly glows up when battery voltage reaches to 13.3 volts, but we need 14.1 volt to fully charge a typical 12 volt battery. For a higher mAh battery, seeing the red LED glowing with full brightness is one of the luckiest thing in this world as charging rate is less than 50 mA. Along with, this circuit does not have decoupling capacitors with LM317T.

At the first time when I implemented this circuit I had not enough idea about LM317T, Zener Diode, Transistors, and voltage & current control, hence I failed badly. Then I studied about these from my previous diploma 3rd semester book Principles of Electronics By VK MEHTA, read datasheets, watching few YouTube videos and reading some articles, question-answers from various websites (you can check at the end of this post for the resources). Then I have analysed the circuit and modified it according to my need.

My modified version of this circuit: Fixed 12 volt battery charger

Fixed 12 volt battery charger modified by Arpan Das
Fixed 12 volt battery charger on breadboard
Fixed 12 volt battery charger - battery charging status
Fixed 12 volt battery charger - battery full status

Components needed:

  1. 12-0-12 CT (center tapped), 1.5 Amp transformer (I used 12-6-0-6-12 CT, 3 Amp transformer – got it from my old 4440 audio amplifier) (TR1)
  2. 1N4007 Diode ×5 — D1, D2, D3, D7, D8
  3. 11 V, 1 watt zener diode ×1 — D6
  4. RED LED 2.0V 20mA ×1 — D3
  5. GREEN LED 2.0V 20mA ×1 — D4
  6. 470 μf, 25V capacitor ×1 — C1
  7. LM317T voltage regulator ×1 — U1
  8. BD139 NPN transistor ×1 — Q1
  9. 10k ohm POT Preset ×1 — RV1
  10. 1K ohm, 1/4 watt resistor ×2 — R1, R4
  11. 2.2K ohm, 1/4 watt resistor ×1 — R3
  12. 220 ohm, 1/2 watt resistor ×1 — R2
  13. 100 ohm, 1/2 watt resistor × 1 — R5

List of modifications I have made:

  1. Removed R1 from POT terminal to the ground. It is completely unnecessary in my opinion.
  2. Added a resistor of value 1K ohm between emitter of BD139 transistor and anode of red LED. During an experiment, the red LED was gone, hence a 1K ohm resistor needed i.e. R1.
  3. Removed R5 from positive output terminal and placed it in between cathode of diode D5 and cathode of zener diode D6. It was causing the low current issue.
  4. Added D7 between output and input pin, D8 between adjustment and output pin of LM317 for over protection.

In this modified version, R5 is not causing any low current issue. I’ve tested and getting 1.5 A current at max for regular loads. But for batteries, output current is still low. I think the reason is 11 volt zener diode. I’ll try with 14.1 volt zener diode in future and post the result here. A 12 volt battery always has voltage greater than 12 volts and this 12 volt is greater than the breakdown voltage of that 11 volt zener diode. That’s why it causing flow of current between base and emitter of BD139 transistor, hence collector and emitter is sorted – so output voltage of LM317T will be lowered and current will be less. After all – this circuit is OK to try out for the sake of curiosity but not recommended for any practical use.

Part 2: DIY Universal Battery Charger Circuit with Variable Auto Cut-off

After the previous automatic battery charger circuit, I was not satisfied. I have studied required things, gathered information, I get to know how these electronics components works practically. Then I ended up making this circuit below. All my efforts during past 1 week is not wasted – it was a great success in the end; and I cam make many things like this one. I’ll post my upcoming projects here, stay tuned.

DIY Universal charger circuit on breadboard
DIY Universal battery charger circuit on breadboard
DIY Universal charger circuit auto cut off disabled
DIY Universal battery charger circuit auto cut off disabled
DIY Universal charger circuit auto cut off enabled
DIY Universal battery charger circuit auto cut off enabled

What this circuit can do:

  • Has variable voltage range i.e. it can charge 1.5 V to 25 V batteries
  • Can charge at maximum 1.5 Amp
  • Has variable auto cut off wide voltage range
  • Can be used as regulated power supply.

What this circuit cannot do:

  • LM317T is a linear voltage regulator, hence low efficiency
  • LM317T cannot provide more than 1.5 Amp. You may use LM338 for 3Amp or some other alternative.
  • There is no current control. I’ll add current control in next version.

Circuit diagram

DIY Universal charger circuit with auto cut off v1.0
DIY Universal battery charger circuit with auto cut off v1.0

Veroboard implementation:

DIY Universal Battery Charger Veroboard Design Top View
DIY Universal Battery Charger Veroboard Design Top View
DIY Universal Battery Charger Veroboard Design Top View X-Ray
DIY Universal Battery Charger Veroboard Design Top View X-Ray
DIY Universal Battery Charger Veroboard Design Bottom View Solder Side
DIY Universal Battery Charger Veroboard Design Bottom View Solder Side

Veroboard design using LochMaster 4.0: https://goo.gl/92FJqX

Components needed:

  1. 12-0 1.5 A transformer (I used 12-6-0-6-12 CT 3 A) ×1 — T1
  2. LM317T IC ×1 — U1
  3. BD139 ×1 — Q1
  4. BC547 ×1 — Q2
  5. 1N5408 ×5 — D1, D2, D3, D4, D10
  6. 1n4007 ×5 — D5, D6, D7, D8, D9
  7. 20 mA 3 mm GREEN LED ×1 — D11
  8. 20 mA 3 mm RED LED ×1 — D12
  9. 3300 µf, 25/35 v electrolytic capacitor ×1 — C1
  10. 220 nf capacitor ×2 (optional) — C2, C3
  11. 10 µF, 25/63 v ×2 (recommended) electrolytic capacitor — C4, C5
  12. 47 µF, 25/63 v ×1 (recommended) electrolytic capacitor — C6
  13. 4.7k ohm resistor ×2 — R3, R6
  14. 1k ohm ×2 — R4, R5
  15. 220 ohm ×1 — R1
  16. 100 ohm ×1 — R2
  17. 10k ohm preset TRIM POT (code 103) ×2 — RV1, RV2
  18. 1k ohm preset TRIM POT (code 102) ×2 — RV3
  19. 12V DC Relay ×1 — K1
  20. Push button switch with self-lock ×1 — S1
  21. Fuse 5×20 mm holder with 3 Amp fuse (optional) ×1 — F1
  22. DIP 1×2 female connector (optional) — P1
  23. Multimeter for checking voltage of course.
  24. You can use breadboard to test it. Use veroboard (11×29 would be enough) for final implementation., or you can make your own PCB.
  25. Alligator/Crocodile clip ×2 (optional)
  26. Heat sink for LM317T IC ×1

This DIY Universal Battery Charger Circuit has three different units:

  • Rectifier unit (AC  to DC)
  • Voltage regulator unit
  • Variable auto cut off unit
DIY Universal charger circuit with auto cut off v1.0 units
DIY Universal battery charger circuit with auto cut off v1.0 – 3 different units
  • Rectifier unit (AC  to DC)
  • Voltage regulator unit
    • In voltage regulator unit, C2 and C3 capacitors are optional, they are added as decoupling capacitors.
    • C4 is recommended, particularly if the regulator is not in close proximity to the power-supply filter capacitors. A 0.1-µF or 1-µF ceramic or tantalum capacitor provides sufficient bypassing for most applications, especially when adjustment and output capacitors are used.
    • C5 is recommended to improve ripple rejection. It prevents amplification of the ripple as the output voltage is adjusted higher.  C5 helps to stabilize the voltage at the adjustment pin, which also helps reject noise.
    • C6 improves transient response, but is not needed for stability
    • Protection diode D1 is recommended if C6 is used. The diode provides a low-impedance discharge path to
      prevent the capacitor from discharging into the output of the regulator. It also protects the regulator from when a battery is already connected transformer is off.
    • Protection diode D2 is recommended if C5 is used. The diode provides a low-impedance discharge path to prevent the capacitor from discharging into the output of the regulator.
    • You can find more information on LM317T datasheet.
    • Voltage level can be adjusted using RV1 and RV3 Trim POT (preset).
  • Variable auto cut off unit
    • This unit is mainly based on two transistors in Darlington configuration (Q1, Q2), a relay (K1).
    • This unit has a variable resistor RV2 by adjusting it you can set the threshold of auto cut off voltage.
    • The Red LED indicates charging status and the Green LED indicates full charge status i.e. when the output voltage reached to auto cut off threshold.
    • This unit has a push button switch which is used to turn on/off the relay K1.

Main logic behind:

  • The rectifier unit converts 230 V AC to 21 V DC (if 15 V transformer is used)
  • Then the output voltage is regulated and stabilized by the voltage regulator unit.
  • After setting the output voltage, the cut off voltage threshold is set. In that point, connection is cut from the terminals where loads to be connected.
  • Then we turn off the relay switch hence connection is again connected to those output terminals.
  • Now we connect the load to the output terminals. Because of this, output voltage will be dropped which is less than the cut off voltage. At this time, if we turn on the relay switch – the connection will not be cut by the relay until the output voltage reaches to the cut off threshold again i.e. battery get fully charged.

How to operate the Universal Battery Charger Circuit?

  • Step 1: Turn on the switch S1 and rotate the wiper of RV2 (preset) in clockwise direction till the end.
  • Step 2: If you want to charge a 12 V battery, then set the charging voltage to 14.1 + 0.7 = 14.8 V (as diode D10 drops around 0.7 V approximately) by rotating wiper of RV1 (preset) in clockwise direction very slowly until the output voltage reaches to near 14.8 V. Adjust RV3 in same way to set the voltage to exactly 14.8 V (RV3 adds better precision).
  • Step 3: After setting the output voltage, rotate wiper of RV2 in anti-clockwise direction very slowly until the Red LED goes off and the Green LED started glowing.
  • Step 4: Now turn off the relay K1 using the push button S1 and and connect the output P1 to the battery terminals.
  • Step 5: When the battery gets fully charged, the power supply will be automatically cut off from the fully charged battery.

Resources:

Webpages I’ve read and bookmarked during this project:

Youtube videos I’ve seen:

Book I read:

Datasheets:

If you have any query or suggestion, please comment below.

Thank you.

Leave a Reply

Note: Your email address will not be published. Required fields are marked *