Let's design our own UPS

I had the same suspicion...

Yip. If a manufacturer doesn't claim it's "pure sine wave" then it almost certainly isn't. No, sane manufacturer will add that expense to their product and not market the feature.
 
PCB Schematic strawman
0-0-0-0-0-0-0-0-0-0-0
-- that's the 10 different DC jacks that people want all with different voltages on :)

The hardest thing (as you can see from the thread) is deciding what people want!
 
We will just need to start compiling a bill of materials, so as to figure out how much space we'll need on the PCB.
 
Yeh ultimately I dont think you need a pcb here.
Tonnes of 18650 holders plus lithium chargers, dischargers and buck-boosters on banggood AliExpress.
Spend your time figuring out how to put all those parts together + packaging :)
 
Yeh ultimately I dont think you need a pcb here.
Tonnes of 18650 holders plus lithium chargers, dischargers and buck-boosters on banggood AliExpress.
Spend your time figuring out how to put all those parts together + packaging :)
You could take this approach. PCBs will make things quite a bit neater though.
 
PCB Schematic strawman
0-0-0-0-0-0-0-0-0-0-0
-- that's the 10 different DC jacks that people want all with different voltages on :)

The hardest thing (as you can see from the thread) is deciding what people want!

You get adjustable buck converters would make the most sense to have two outputs adjustable to a range of voltages.
 
Well ok. First version cobble stuff together.

2nd version with 1000 orders, put same components on one pcb!
Fair enough. Prototyping can be a bit of a cowboy endeavour, not as strict as you'd be when you're going to do a run of many of the things.
 
So I have all the different components from Yebo electronics and Netram


Here is my issue I can't wrap my head around (maybe the solution is easy and I am complicating it):

What I can't figure out is what is needed for the device to power the outputs from the Source and only switch to battery of the source is dead.

I don't want to pull from the battery unless needed


At first I was just going to wire the input to a Buck/boost converter and then from there two wires go to the battery charger and two wires goes to the output of the batteries directly (but not sure if that will like cause a loopback or surge or something) idea was path of least resistance so should pull from input and then if that fails it will do battery.

Although my gut says the answer here is I need some kind of voltage divider and a transistor to open and close the circuits, circuit A is source as input and circuit B is source as battery

How far miss am I?

(was also thinking of using diodes, so the mains input is between the output and the battery input that way it won't feed back into the battery directly, but if the mains input is out the battery should immediately take over. So from the mains input there will also be wires out to the charging circuit, let me see if I can go draw something)
 
Last edited:
So I have all the different components from Yebo electronics and Netram
Can you post links to the items so we can look up the datasheets?

At first I was just going to wire the input to a Buck/boost converter and then from there two wires go to the battery charger and two wires goes to the output of the batteries directly (but not sure if that will like cause a loopback or surge or something) idea was path of least resistance so should pull from input and then if that fails it will do battery.
I think the BMS will do the switching, so the output of your charger is connected to the BMS and your load. When the batteries are fully charged, the BMS disconnects them and the load is powered by the charger. When your mains disappears, the output of the charger drops to zero and the BMS connects the batteries. When your mains is restored, the batteries are charged through the BMS until they are fully charged again.
 
So I have all the different components from Yebo electronics and Netram


Here is my issue I can't wrap my head around (maybe the solution is easy and I am complicating it):

What I can't figure out is what is needed for the device to power the outputs from the Source and only switch to battery of the source is dead.

I don't want to pull from the battery unless needed


At first I was just going to wire the input to a Buck/boost converter and then from there two wires go to the battery charger and two wires goes to the output of the batteries directly (but not sure if that will like cause a loopback or surge or something) idea was path of least resistance so should pull from input and then if that fails it will do battery.

Although my gut says the answer here is I need some kind of voltage divider and a transistor to open and close the circuits, circuit A is source as input and circuit B is source as battery

How far miss am I?

(was also thinking of using diodes, so the mains input is between the output and the battery input that way it won't feed back into the battery directly, but if the mains input is out the battery should immediately take over. So from the mains input there will also be wires out to the charging circuit, let me see if I can go draw something)
This application note may give you a nudge in the right direction:

ww1.microchip.com/downloads/en/AppNotes/01149c.pdf

This is a very simple example, a simple IC to manage charging of a single cell, with the ability to power whatever device you have from the DC input voltage while the battery is charging. Considerations include how much current can be supplied, both by the battery and by the source. The application note mentions how the circuit is designed to take these factors into account.

Obviously your beefy UPS will need something more serious than this, but the general idea will be the same.
 
Can you post links to the items so we can look up the datasheets?


I think the BMS will do the switching, so the output of your charger is connected to the BMS and your load. When the batteries are fully charged, the BMS disconnects them and the load is powered by the charger. When your mains disappears, the output of the charger drops to zero and the BMS connects the batteries. When your mains is restored, the batteries are charged through the BMS until they are fully charged again.

Source: Wall wart, thinking 9V
Input Regulator - https://www.communica.co.za/products/acm-dc-dc-buck-boost-1-25-35v-4a
BMS (don't know how to wire this) - https://www.communica.co.za/products/cmu-battery-charger-li-on-18650
Batteries (I am thinking 7.4v so series 1 and then parallel 3), 7.4v being semi the `middle` between 5v and 12v which the outputs would be, and good enough for the edge case at 24v.
Output regulators - https://www.communica.co.za/products/acm-dc-dc-buck-boost-1-25-35v-4a

Need to figure out the "uninterruptible" part of UPS, because I don't want to use a relay or the BMS which drops the power before switching.
 
This isn't a BMS. It's a charger IC for a single cell. (You could probably trick it into charging 2-3 parallel cells but its output current might not be enough.) For 1sNp (i.e. all your cells in parallel, no series connections), this is fine - you don't need a BMS.

I've seen various BMS options on AliExpress and BangGood, I haven't seen any serious ones on Communica. Not that I've looked recently though. They need to have terminals for each intermediate voltage - i.e. if you are making a 4s battery pack, your BMS would need to have at least 7 wires coming out of it - zero and 15V (these will be thicker wires which are actually carrying current) for the battery side, and the same for the load (and possibly charger, depending on how it's designed, it's been a while since I've looked at it). Then it will have three little wires, which are supposed to measure the voltages between the individual cells - 3.7V, 7.4V, 11.1V. The idea here is that it can see if the individual cells are balanced.
https://www.communica.co.za/products/cmu-battery-charger-li-on-18650
Batteries (I am thinking 7.4v so series 1 and then parallel 3), 7.4v being semi the `middle` between 5v and 12v which the outputs would be, and good enough for the edge case at 24v.
Do you mean 2 series?

In order to make a proper decision here, you'd need to look at your various outputs (i.e. the buck/boost circuitry), figure out their respective efficiencies, and choose your number of series cells based on that. I haven't run any numbers, but buck converters are in general more efficient, so my gut feel is that you'll want to have a battery voltage on the higher end of the range. So 4 or 5 cells in series (roughly 15 or 19V), and then 2 or 3 in parallel depending on (1) how much current you want to supply as the cells have a current rating, and (2) how long you want the thing to be able to last. (2) is probably more of a consideration because lithium cells can generally supply enough current for e-bikes and e-scooters, so your home DC electronics will probably be well within spec.

Need to figure out the "uninterruptible" part of UPS, because I don't want to use a relay or the BMS which drops the power before switching.
Have a look at the application note that I linked. There are various ways to do this. Each has pros and cons.
 
148Wh (if the claimed specs are accurate).
I can almost guarantee that it's going to have a cheap and nasty square wave or modified sine wave inverter in it at that price.
Why would you need pure sine to power a router/laptop that has an SMPS?
 
Have a look at the application note that I linked. There are various ways to do this. Each has pros and cons.
Busy reading that now - above my knowledge, but I understand conceptionally what is happening, just still need to think about the pull up resistor ie how to know went to use it etc.

I made a mistake there, that is the charger, the BMS link I messed up by copying the charger.

This is the BMS I ordered (should get here this week): https://www.banggood.com/3S-40A-Li-....html?cur_warehouse=CN&ID=511646&rmmds=search

Although, I don't understand the BMS completely ie MUST I use 4s or can I do something else?
 
Although, I don't understand the BMS completely ie MUST I use 4s or can I do something else?
This particular BMS that you linked is a 3S one. Doesn't seem to be options, so you'll need to use 3 cells in series.

You do get some, normally the bigger ones (7S+) which can be configured to work with a range of cells, say anything from 7S to 14S. That would probably be overkill for this application.

With a BMS like this you may be able to get away with not using a dedicated charger IC. The BMS can do much of what the charger would do, though your charge profile may not be as smooth. I'd need to look into it when I get more time.
 
Top
Sign up to the MyBroadband newsletter
X