UPS design for 5V supply - Page 1
Forum section: electronics / projects

author: aiq25
author_rank: Regular Contributor
timestamp: May 19, 2018, 06:11:48 pm
content: Hi. I'm working on a circuit that will use a backup battery to provide power to the circuit once the power from the +5V input is lost. This is for power few clocks I have that I keep having to change the time every time there is an power outage. I'm trying to design this circuit to handle at least 2A so it could be used for other projects in the future.Attached is a schematic I worked on and the two parts work individually: once VIN is 0V, VBAT is turned on. But I'm having an issue when I connect the two different supplies (shorting between Rload1 and Rload2). Once I create the short the circuit does not work anymore. I think this is because the body diode is going from right to left on M2, I put it this way otherwise the diode connects as soon as you have VBAT. I thought this was the issue and tried putting blocking diodes at the output of M2 but this did not help to solve the issue.Any help/feedback is greatly appreciated.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 19, 2018, 08:26:31 pm
content: Could you just install some supercaps in the clocks?

author: aiq25
author_rank: Regular Contributor
timestamp: May 19, 2018, 10:21:53 pm
content: Quote from: aiq25 on May 19, 2018, 10:21:53 pmYes I could but I wanted something that could last for a day or two so I was planning on using Li-Ion as the battery, sometimes the power doesn't come back for some time.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 19, 2018, 10:36:53 pm
content: RTC chips take microamps. Even a small supercap should be enough to keep one going for days, limited by the self discharge of cheap supercaps.

author: james_s
author_rank: Super Contributor
timestamp: May 19, 2018, 11:06:08 pm
content: If I understand the need correctly, you can do what you want with a simple dual Schottky diode. Whichever source is delivering a slightly higher voltage will carry the load.

author: aiq25
author_rank: Regular Contributor
timestamp: May 21, 2018, 02:05:56 am
content: Quote from: NiHaoMike on May 19, 2018, 10:36:53 pmWell I guess I didn't explain it, the clock is one I bought and runs off of 5V, so I don't have access to the RTC chip. The whole module draws about 10mA off current, so I don't think the super caps could hold it for days. Plus I'm working on this project to learn more about electronics and I would really like to figure out why my original circuit didn't work, even if I don't use it.

author: aiq25
author_rank: Regular Contributor
timestamp: May 21, 2018, 02:07:23 am
content: Quote from: james_s on May 19, 2018, 11:06:08 pmYeah, that's what I'm planning on doing if this doesn't work. I wanted to only relay on the battery when VIN is lost, that's why I wanted to use a MOSFET.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 21, 2018, 04:46:34 am
content: Quote from: aiq25 on May 21, 2018, 02:05:56 amOpen it up and take a look. The RTC is going to be the chip that has the 32kHz crystal connected to it.

author: slugrustle
author_rank: Frequent Contributor
timestamp: May 22, 2018, 01:49:38 am
content: I wondered what you meant byQuoteuntil I recreated the simulation. Indeed, the simulator returns an error when Rload1 and Rload2 are connected. Here's what I think is happening:When VIN is 5V, M1 is on, Q2 is on, and M2 is off.When VIN drops below about 2.5V, Q2 turns off. M2 turns on shortly after.Since the emitter of Q2 is tied to Rload, Q2 turns back on. M2 turns off shortly after.This circuit is the electrical version of one of my favorite electromechanical deviceshttps://media.giphy.com/media/Eb4HAUeQrq608/giphy.gifI made something very similar earlier this year. I have an alarm clock that vibrates the bed (beeping alarms don't always work for me), but I wanted to make sure it still runs even if the power is out. It has an internal backup battery, but that just keeps the time. So I made a DC-DC UPS with a two-cell lithium ion battery pack, an LTC4002 battery charger, a SEPIC converter based on the CS5173 with 9V out, and a 12V wall adapter. The wall adapter powers the LTC4002 directly, while the battery and wall adapter are both diode-wired into the input of the SEPIC converter. Since the wall adapter voltage is always higher than the battery pack voltage, the pack only powers the clock when the power goes out.Schematic is attached. There are a lot of through holes; I used jumper wires liberally in order to get a nice continuous ground plane. I messed up the pinouts of the ZXRE250 and triac for the overvoltage crowbar on the wall adapter input, so the triac is soldered on the backside of the board, and the ZXRE250 is replaced with a similar shunt in a TO-92 package carefully bodged onto the SOT-23 footprint. I was working quickly on this one.

author: slugrustle
author_rank: Frequent Contributor
timestamp: May 22, 2018, 02:27:03 am
content: Sorry to double post. Are you planning to use rechargeable batteries? For something as intermittent as this with low power draw, alkaline might work just fine. Also, how do you plan to get 5V out? It's not a standard battery voltage.Have you considered using a power supply ORing controller? The ICL7673 might be a good fit for you; take a look at figure 11 on page 7 ofhttps://www.intersil.com/content/dam/Intersil/documents/icl7/icl7673.pdfThe LTC4412 is also purpose made for this sort of thing. See Figure 2 on page 10 ofhttp://www.analog.com/media/en/technical-documentation/data-sheets/4412fb.pdfIf you would rather make your own out of discrete components, I fully understand the impulse.Edit: I read the other posts a little more carefully. You're planning to use Li-Ion. Do you want to charge the battery/batteries manually as needed, or do you want to make a charging circuit? (There are ICs available for this).If you want to make a charging circuit, I recommend a similar approach to the one I took. Since you have 5V out, if you use 2 Li-Ion cells in series, you can diode wire your cell stack and a wall adapter into the input of a 5V out buck converter. Then you can choose any adapter voltage higher than the cell stack maximum voltage and an appropriate charger IC. I would recommend buying a premade 2 cell Li-Ion pack with an integrated protection circuit.If you want to go single cell, it's easier to find charging circuits. Single-cell charger chips vary, but many of them are designed to run from USB power (~5V). You could then use a 5V adapter. You'll need a boost converter to get 5V out of a single cell, preferably with a logic-level enable pin. I would configure the setup to turn the boost converter on by default and have a Pmos transistor between the 5V adapter and load that is off by default. Then I would power some small circuit from the 5V adapter before the Pmos transistor that would turn off the boost converter and turn on the Pmos transistor whenever the 5V adapter has high enough output. Again, I recommend a Li-Ion cell with an integrated protection circuit.

author: jbb
author_rank: Super Contributor
timestamp: May 22, 2018, 05:36:38 am
content: If you want a real gold-plated solution, a Monolithic Power MP2633 plus a LiPo (or LiFePO4) might do the trick.Or there’s an LT part (now Analog Devices) which is designed for this...

author: aiq25
author_rank: Regular Contributor
timestamp: June 05, 2018, 03:51:25 am
content: Quote from: slugrustle on May 22, 2018, 01:49:38 amThank you so much. This is what I was looking for. I'm planning on using rechargeable Li-Ion or alkaline batteries (like you mentioned this is pretty low power). I would like to add in a feature if Vbattery drops below 3V, a circuitry will enable to start charging the batteries but this is just a thought. Right now it's just experimental and a thought. I'm thinking this can be applied to other projects, in particular I been thinking about making a air quality sensor for my house and a surveillance system (so I can monitor when I'm away). For the 5V I'm thinking of adding a boost, something around 0.5A to 1A should be good.

author: aiq25
author_rank: Regular Contributor
timestamp: June 05, 2018, 03:52:55 am
content: Quote from: jbb on May 22, 2018, 05:36:38 amThanks I will look into this.