Author Topic: UPS design for 5V supply  (Read 4628 times)

0 Members and 1 Guest are viewing this topic.

Offline aiq25Topic starter

  • Regular Contributor
  • *
  • Posts: 244
  • Country: us
UPS design for 5V supply
« on: May 19, 2018, 06:11:48 pm »
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.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9790
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: UPS design for 5V supply
« Reply #1 on: May 19, 2018, 08:26:31 pm »
Could you just install some supercaps in the clocks?
Cryptocurrency has taught me to love math and at the same time be baffled by it.
Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
BTC: 18813fu8LQEdDwH9YLM1ABed3XwCfeSeFi
 

Offline aiq25Topic starter

  • Regular Contributor
  • *
  • Posts: 244
  • Country: us
Re: UPS design for 5V supply
« Reply #2 on: May 19, 2018, 10:21:53 pm »
Yes 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.

Yes 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.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9790
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: UPS design for 5V supply
« Reply #3 on: May 19, 2018, 10:36:53 pm »
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.
Cryptocurrency has taught me to love math and at the same time be baffled by it.
Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
BTC: 18813fu8LQEdDwH9YLM1ABed3XwCfeSeFi
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21608
  • Country: us
Re: UPS design for 5V supply
« Reply #4 on: May 19, 2018, 11:06:08 pm »
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.
 

Offline aiq25Topic starter

  • Regular Contributor
  • *
  • Posts: 244
  • Country: us
Re: UPS design for 5V supply
« Reply #5 on: May 21, 2018, 02:05:56 am »
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.

Well 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.
 

Offline aiq25Topic starter

  • Regular Contributor
  • *
  • Posts: 244
  • Country: us
Re: UPS design for 5V supply
« Reply #6 on: May 21, 2018, 02:07:23 am »
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.

Yeah, 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.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9790
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: UPS design for 5V supply
« Reply #7 on: May 21, 2018, 04:46:34 am »
Well 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.
Open it up and take a look. The RTC is going to be the chip that has the 32kHz crystal connected to it.
Cryptocurrency has taught me to love math and at the same time be baffled by it.
Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
BTC: 18813fu8LQEdDwH9YLM1ABed3XwCfeSeFi
 

Offline slugrustle

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
Re: UPS design for 5V supply
« Reply #8 on: May 22, 2018, 01:49:38 am »
I wondered what you meant by
Quote
Once I create the short the circuit does not work anymore.
until 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 devices https://media.giphy.com/media/Eb4HAUeQrq608/giphy.gif

I 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.
« Last Edit: May 22, 2018, 01:51:40 am by slugrustle »
 
The following users thanked this post: aiq25

Offline slugrustle

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
Re: UPS design for 5V supply
« Reply #9 on: May 22, 2018, 02:27:03 am »
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 of https://www.intersil.com/content/dam/Intersil/documents/icl7/icl7673.pdf

The LTC4412 is also purpose made for this sort of thing. See Figure 2 on page 10 of http://www.analog.com/media/en/technical-documentation/data-sheets/4412fb.pdf

If 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.
« Last Edit: May 22, 2018, 03:50:13 am by slugrustle »
 
The following users thanked this post: aiq25

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1338
  • Country: nz
Re: UPS design for 5V supply
« Reply #10 on: May 22, 2018, 05:36:38 am »
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...
 
The following users thanked this post: aiq25

Offline aiq25Topic starter

  • Regular Contributor
  • *
  • Posts: 244
  • Country: us
Re: UPS design for 5V supply
« Reply #11 on: June 05, 2018, 03:51:25 am »
I wondered what you meant by
Quote
Once I create the short the circuit does not work anymore.
until 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.

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.

Thank 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.
 

Offline aiq25Topic starter

  • Regular Contributor
  • *
  • Posts: 244
  • Country: us
Re: UPS design for 5V supply
« Reply #12 on: June 05, 2018, 03:52:55 am »
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...

Thanks I will look into this.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->