Home     Contact     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
 Home      Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   

SMPS with Battery Backup and NiMH Charger using the LM2595Author
Giorgos Lazaridis
March 29, 2013

The two circuits combined
Some time ago I presented a small circuit with the MCP1640, the High Efficiency Battery Boost Regulator using the MCP1640. My original intention was to combine it with this one and make a complete power supply unit with SMPS technology, dual voltage output, battery charger and power failure signal output. And here it is!

Circuit Description
I designed this circuit for the same reason that i designed the SMPS Boost regulator with the MCP1640 - To gain experience in SMPS technology. This time i use the high power LM2595 buck regulator.

The circuit accepts any AC voltage from 8 to 45 Volts. This wide input voltage range is a remarkable feature! Plus, it can provide up to 1 ampere of current at 5 volts! Imagine what wold take to design a linear power supply to provide 5V 1A power from 45 volts! A huge power dissipation of 40 Watts! Your soldering iron provides probably less heat! The LM2595 has an efficiency which varies from 75% to 95%. Typically, the previously descried system has an efficiency of 80%, which means that the system will dissipate about 1 Watt of heat...

Here is the schematic of this circuit:
Click to enlarge

The AC input is rectified through the B1 bridge rectifier. A U LC filter decouples the circuit from the input (C4,L1,C1) and smooths the input voltage. The R1-R2 voltage divider along with the charge capacitor C3 perform a delay-startup. This part may be omitted if the delay-startup is not necessary. The heart of the circuit is the LM2595 with the catch diode D1, the inductor L2 and the filtering capacitor C2. This is where the step-down is done.

I've included several outputs. X1-6,7 and 8 are the PSU outputs. X1-6 is the ground terminal. X1-8 provides a rectified and filtered output of the raw AC input. Remember to calculate the RMS to peak conversion. If for example the AC input is 24VAC, the output at this terminal will be 34 Volts DC. The output X1-7 provides 5V to power any external circuit needed.

These are the outputs on the PCB
This circuit features also a trickle battery charger and a power failure output. The trickle charger is a simple transistor constant current driver. R4 and D2 sets the base voltage. R4 gets power from the output of the SMPS chip, therefore the output of the zener diode is quite stable. T1 controls the current through the batteries. The batteries are connected at X1-2 (positive) and X1-1 (negative). D3 blocks any current flow from the batteries back to the LM2595 when the power is off. R3 sets the charging current. I've set my trickle charger to about 30mA, that is C/100 for my 3000mAh batteries (look below). Finally, a protective fuse ensures that the charging current will not increase due to some malfunction of failure of the current driver.

The Power Failure output (X1-5) is actually a transistor switch which is LOW when the SMPS operates, and is pulled HIGH (to the battery level) through R6 when the SMPS is not working (when there is no power). This pairs perfectly with the MCP1640 Boost regulator

The power failure output (X1-5) comes form the collector of a transistor which is pulled high through R6 to the battery positive lead. This matches perfectly with the MCP1640 SMPS Boost regulator, but you can simply remove R6 and convert the Power Failure output to an open-collector which you can pull high to your desired voltage. This output is kept LOW as long as the SMPS chip operates, and is pulled high when the main power is removed.

Two words about battery trickle chargers
First of all, what is a trickle charger? A trickle charger is a battery chargers which provides only the minimum amount of current allowed by the battery capacity. These chargers have the lowest charging time possible, but they can operate continuously without endangering the batteries.

A typical battery charger starts with a fast-charging. It provides a high current to charge the batteries fast. This causes the batteries to heat and generate gases inside. Therefore, this fast charge cannot be maintained for long time, because gases built internal pressure and the batteries may explode or burst in flames. The charger senses the battery temperature and other parameters such as the voltage difference, to switch to trickle charging when necessary.

Each manufacturer suggests different trickle current for his batteries. This is defined by C divided by a number, where C represents the capacity. C/100 for a battery with 2000 mAh tells that the trickle current should be 2000/100=20mA. Some manufacturers may represent this as a multiplication like 0.01 C, which is exactly the same thing (0.01x2000=20mA). Duracell suggests C/300 for some of its products. Energizer suggests C/40.


The original PCB had to be fixed, with the sword and the axe....
There is one particular reason why i usually do not upload PCBs - That is because the first prototypes may have errors, some are obvious, some are not. I'm not a PCB pro designer you see. But since i receive many requests for the PCBs, i decided to upload them as well. Just keep one thing in mind - I'm not a PCB designer, so you may find bugs. Especially PCBs with high frequency portions have very specific rules which I'm not aware of.

Anyway, this PCB had some very obvious mistakes which i had to correct. The original files were incorrect. I fixed the errors with the sword and the axe onto the PCB. Plus, i use mainly SMD components and i recommend you do so as well. So, here are the PCB files:

Download file
PCB Artwork. Version 2.0, EPS format

Download file
PCB Artwork. Version 2.0, PDF format

Download file
PCB Parts Layout, Version 2.0

Bill Of Materials [BOM]
R147K R0805
R247K R0805
R368 Ohms R0805
R41K5 R0805
R54K7 R0805
R62K2 R0805
C1220uF 63V Electrolytic
C2100uF 63V Electrolytic
C30.1uF Ceramic C0603
C4220uF 63V Electrolytic
L1100uH 0411/12
L2Chilisin SDS1306T-151M-S 150uH 1.5A
D23.3V Zener MiniMELF
D31N4007 MELF
U1LM2595 TO263-5
F1100mA fuse

Here it is!
When power is applied, the circuit provides 5V and charges the battery. The Power Failure output is LOW keeping the SMPS boost regulator OFF Power is removed from the board. The Power Failure output is pulled HIGH, the SMPS gets power from the batteries and lights the LEDs



  Email (shall not be published)


Notify me of new posts via email

Write your comments below:
BEFORE you post a comment:You are welcome to comment for corrections and suggestions on this page. But if you have questions please use the forum instead to post it. Thank you.


  • At 24 March 2014, 22:38:31 user Scott wrote:   [reply @ Scott]
    • @Giorgos Lazaridis Oh I know very well what you're talking about. I'm one of the Electronics Techs in a facility that populates PCBs for high-end customers (ie, Raytheon, Boeing, etc.). I deal with "project managers" everyday, but on the other side of things.

  • At 24 March 2014, 8:49:33 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Scott Yep i know. My solution though has no detection so it is always trickle charger and takes an age to charge. I've applied this technique to a commercial product with an LM317 trickle charger for security lights. Because when you design a commercial product, there is always this guy named "product manager" from which you receive these emails starting with "cheap cheap cheap" and ending with "cheap cheap cheap". In the middle he explains why the product must be cheap (cheap cheap) totally ignoring your engineering solutions :D
      Which is fun (fun fun) after all!

  • At 23 March 2014, 20:33:31 user Scott wrote:   [reply @ Scott]
    • @Giorgos Lazaridis It's only a trickle charger once the batteries are fully charged. As I said, it's a SMART CHARGER that detects the level of charge and supplies voltage/current appropriate to the level. Actual charge time is about 1 hour 36 minutes with up to 1 amp of charge current.


  • At 23 March 2014, 7:29:49 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Scott Better choice. A trickle charger may take days to charge a discharged battery

  • At 23 March 2014, 3:32:11 user Scott wrote:   [reply @ Scott]
    • @Giorgos Lazaridis I actually changed directions and went with a MAX712CPE smart charger circuit. I needed something that can maintain a 5 cell Ni-MH pack.

  • At 22 March 2014, 16:00:38 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Scott I'm not quite sure because this is rather old, but i think there is a lib somewhere provided. Have you found it? Maybe it has a different part name

  • At 13 February 2014, 0:47:50 user Scott wrote:   [reply @ Scott]
    • I don't suppose I could get the Eagle .lbr of U1 from you?

      I'm going to put a MC14536B IC on the board set to 15 minutes. If power isn't restored within that time, my Raspberry Pi will shut itself down safely.

  • At 2 July 2013, 19:16:01 user Xavier LOPEZ-DOCE wrote:   [reply @ Xavier LOPEZ-DOCE]
    • Hi Giorgos,

      Thank you very much for theese circuits, the "SMPS with Battery Backup and NiMH Charger using the LM2595" and the "SMPS Boost regulator with the MCP1640".

      My English is awful and my skills in Electronics are moderate so, Can you send me a simply diagram of how to connect both circuits and the batteries?

      Thanks again and best regards from Madrid,


  • At 2 April 2013, 20:06:36 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @cheerio Whenever allowed, i use mesh instead of solid because my printer (and most commercial printers) do not print large dark surfaces very well. They reduce ink in the middle to save toner.

  • At 2 April 2013, 16:37:33 user cheerio wrote:   [reply @ cheerio]
    • Why did you use a mesh style gnd plane?

    reddit this Reddit this

     HOT in heaven!

    NEW in heaven!

    New Theory: AC electric motor working principle

     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS   

    Site design: Giorgos Lazaridis
    © Copyright 2008
    Please read the Terms of services and the Privacy policy