1
\$\begingroup\$

I was trying to make a sort of UPS circuit with a 12V DC 5Ah power supply and a 12V 5Ah seal-lead battery.

My question is that I don't know how to switch quickly from line supply to battery. I've tried a relay but while switching, power goes down and then up.

The load on this line consists of a microcontroller and an LCD display (1Ah 5V DC). What can I use instead of the relay?

Here is the schematic:

ups 12v

\$\endgroup\$
4
  • \$\begingroup\$ P Channel MOSFET. \$\endgroup\$
    – Majenko
    Commented Jul 4, 2014 at 20:20
  • \$\begingroup\$ Thanks for advice, how can i exactly change relay with P Channel MOSFET? \$\endgroup\$
    – Daniel
    Commented Jul 5, 2014 at 0:37
  • \$\begingroup\$ A hint: you don't actually need to switch out the mains power. When the mains power goes off there is no mains power there to switch out. You only need to switch the battery into or out of the circuit (especially if you are adding a charge circuit later). \$\endgroup\$
    – Majenko
    Commented Jul 5, 2014 at 9:03
  • \$\begingroup\$ Yes i'll add a charge circuit later, and yes i'll need to switch battery in to the LM2596 to feed the circuit. What do you suggest to switch battery when power goes down? \$\endgroup\$
    – Daniel
    Commented Jul 5, 2014 at 9:15

2 Answers 2

2
\$\begingroup\$

Replace C1 with something like 10,000uF/25V and it should work. Eg. Panasonic ECO-S1EA103BA.

You might have to add a small amount of resistance (such as another polyfuse in the 5A supply line) to keep the relay contacts from welding.

You will also need a diode in series with the supply to keep the battery from back-feeding the relay coil.

\$\endgroup\$
15
  • \$\begingroup\$ I'll try whith the capacitor, but where i've to add resistance? are you refferring on relay contact number 3? Another small question, shall I add a resistor on rely coil? \$\endgroup\$
    – Daniel
    Commented Jul 4, 2014 at 21:04
  • \$\begingroup\$ Yes, in series with the 3 will do. \$\endgroup\$ Commented Jul 4, 2014 at 21:17
  • \$\begingroup\$ I've changed the schematic, is it right now? Thanks for all advices \$\endgroup\$
    – Daniel
    Commented Jul 4, 2014 at 21:48
  • \$\begingroup\$ Okay, except the relay should be powered from the other side of D2 \$\endgroup\$ Commented Jul 4, 2014 at 22:30
  • \$\begingroup\$ There should also be a bulk filter capacitor between the bridge rectifier and diode D2 \$\endgroup\$ Commented Jul 4, 2014 at 23:12
1
\$\begingroup\$

I would just use two diodes, and omit the relay. The diodes will prevent either supply from feeding the other, and will automatically draw power from the higher voltage supply. However, this does require that the normal AC supply voltage is slightly higher than the battery voltage, otherwise the battery will be discharged until its voltage is less than the AC supply's.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
4
  • \$\begingroup\$ thanks for your answer, but i need something stable and power supply is 12v like battery \$\endgroup\$
    – Daniel
    Commented Jul 4, 2014 at 21:53
  • \$\begingroup\$ The diode idea is actually way better than your current setup. You have a DC DC so you don't need "something stable", whatever it means, and putting the diodes in series or using a schottky and a normal diode would work also if battery and AC supply voltages are the same. \$\endgroup\$ Commented Jul 4, 2014 at 23:03
  • \$\begingroup\$ I'm not a pro on electronics, and i'm sorry if I offended you, but later i'll put also a recharge circuit and i don't know if your solution will be good as now. If you can make a little schematic about your solution i'll appreciate it for a better understanding. Thank you \$\endgroup\$
    – Daniel
    Commented Jul 5, 2014 at 0:07
  • \$\begingroup\$ Love the simplicity! I used this design to build a 12V UPS for my fibre & WiFi routers. My AC input is from an 18V transformer via a buck converter trimmed to ~14V to keep it above the peak voltage of the smart charger I use for my 12V battery, and still well within my routers' input voltage tolerances. Its been running daily for years, we have frequent blackouts and my internet connection never drops. Thanks Peter! \$\endgroup\$
    – Max Naude
    Commented Mar 30, 2022 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.