Home      Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science

 SMPS with Battery Backup and NiMH Charger using the LM2595 AuthorGiorgos LazaridisMarch 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 PCB

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:

Bill Of Materials [BOM]
 Resistors R1 47K R0805 R2 47K R0805 R3 68 Ohms R0805 R4 1K5 R0805 R5 4K7 R0805 R6 2K2 R0805 Capacitors C1 220uF 63V Electrolytic C2 100uF 63V Electrolytic C3 0.1uF Ceramic C0603 C4 220uF 63V Electrolytic Inductors L1 100uH 0411/12 L2 Chilisin SDS1306T-151M-S 150uH 1.5A Diodes D1 MBRA340T3 D2 3.3V Zener MiniMELF D3 1N4007 MELF B1 MB4S SOIC-4 Trnsistors-ICs T1 T1MMBT2222ALT1 NPN SOT23 BEC T2 T1MMBT2222ALT1 NPN SOT23 BEC U1 LM2595 TO263-5 Misc F1 100mA 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