Electronics > Projects, Designs, and Technical Stuff
Simple 5V UPS Design (not working in SPICE)
aiq25:
I'm looking to design a simple 5V UPS circuit. The UPS will have two inputs: 5V USB and 5V boost from a Li-Ion battery.
I designed something in LTspice but this does not seem to work. Attached is the schematic. Please ignore the 1mOhm resistors, I put them to measure the direction of current flow.
The idea is simple: M3 provides reverse polarity protection for the USB input (not required but wanted to through this in). M3 and M4 should open when there is no voltage present on the USB (denoted in the schematic as "VUSB"). M1 and M2 provide power to the load when VUSB is not present. VBST is the 5V boosted from a Li-Ion battery.
The problem I'm facing is even when VUSB is disconnect from 5V (as shown in the SPICE simulation), there is somehow voltage on the VUSB line and the output voltage is not 5V, rather ~0.8V. When I disconnect the VUSB line from R13 then the circuit seems to work properly (Result 2). I think somehow there is current through M3 and/or M4 that is going to the VUSB line and powering something.
I'm using NPN transistors to control the FET's. I have tried replacing them with N-Channel MOSFET's but that didn't help.
I cannot figure out this problem and would appreciate some feedback.
The MOSFET's I'm using are just for simulation purposes. I have tried others from the LTspice library but similar and/or same results. I don't have any parts picked out yet, just looking to get a concept working.
The end UPS will have to provide 1A to the load. LTspice file is also attached.
jhpadjustable:
What's wrong with just two Schottky diodes?
ETA: At all times, one of the MOSFETs in each pair will behave as exactly that, so why not cut out the middleman?
To answer your question, try pulling VUSB down with ~10k to ground. Collector-base junctions are not ideal diodes. I haven't simulated this design, but the path R9-R8-Q2-R5 arouses my suspicions.
aiq25:
--- Quote from: jhpadjustable on October 25, 2019, 08:41:41 pm ---What's wrong with just two Schottky diodes?
ETA: At all times, one of the MOSFETs in each pair will behave as exactly that, so why not cut out the middleman?
To answer your question, try pulling VUSB down with ~10k to ground. Collector-base junctions are not ideal diodes. I haven't simulated this design, but the path R9-R8-Q2-R5 arouses my suspicions.
--- End quote ---
I was trying to minimize voltage drop and losses.
Thanks for the suggestion, will try it. I think this circuit much more optimized. I was using one of the mosfet to negate the effect of the body diode.
SiliconWizard:
The back-to-back PMOS pair is a good idea to make a switch that will switch off in both directions. (Of course with just one PMOS, due to the body diode, one direction is never off.)
The reason why your approach doesn't work is that it will actually not properly handle all 4 cases: VUSB on/off, VBST on/off. Just think about each case, and how your circuit will behave. You'll see that controlling the MOSFETs correctly is definitely not this simple. For instance, you definitely can't pull up to VUSB to control the upper PMOS pair. When VUSB is not 5V, it won't pull it up to anything, and the transistors will conduct...
Of course the simplest would be to use two diodes. Schottky diodes will have less voltage drop (and thus power loss), but beware of their relatively "high" reverse leakage current. Not necessarily a problem in your application, but just something to keep in mind.
Now if you're OK with the voltage drop (how low can the output of your "UPS" be to still fulfill your requirements?) you'll get with Schottky diodes, but would still like to minimize losses when on the battery, whereas you don't care when on USB, I suggest the following schematic. You may think that duplicating the bottom structure with the transistors for the VUSB path will work, but it won't. There are cases that would make it fail, and the controlling part would get even more involved than this. A bit too much for my liking, so I'm suggesting this. Would still need a few transistors... Check it out, it should work as expected (with priority for VUSB, shutting down the battery path even if the battery is connected when VUSB is present).
If anyone manages to get it right with fewer transistors, don't hesitate to chime in. But make sure all cases are properly covered first.
There are also integrated OR'ing controllers. I suggest looking them up; they are simple to use, integrate more protections and will reduce part count.
Zero999:
The good thing about many of the integrated controllers is they include a charge pump, which enables a single N-MOSFET to be used on the high side, which have a lower on resistance than two P-channel devices in series.
http://www.ti.com/lit/an/slvae57/slvae57.pdf
Navigation
[0] Message Index
[#] Next page
Go to full version