Let's design our own UPS

Regular inverter type?
Yes but its a little more complicated than that. Off the shelf components but there are switching transfers, the charger isn't just chucked on the battery when the power comes back on because that has led to component failure, and also, at those currents, relays melt (the terminals fall off too) so a contactor is called for.

The show is currently run using a MSP430 microcontroller programmed in C.

If I had a lot of money to spend on batteries I would build a big-ass inverter (think 10kVA) by doing it simple, no boost stage, just a large bank of batteries delivering 300V DC at 100Ah and then use a push-pull stage with tough IGBTs or MOSFETS to generate a clean sine wave. Its a little more complicated as reactive loads are a pain in the ass, as well as things that turn on and off by themselves that cause inrush currents..
 
Still want to continue with this project, my challenge is the power path - ensure the batteries are only used when the AC power is out.
You can do this with a relay, you just need to understand that the relay will be a wear-and-tear item because it would be very difficult to try and switch on the zero crossing, although I haven't tried solid state relays.

This is something you want under software control, not mechanically or manually.
Also, the other problem is a lot of inverters have soft-start so you technically need to keep them running, so that's why I opted for the on-line design, the charger is a 60A power supply strong enough to charge the batteries and run the inverter.

I also advise to not try and disable the soft-start, the inverter will fail quickly, them output transistors will fail in a short period of time
 
You can do this with a relay, you just need to understand that the relay will be a wear-and-tear item because it would be very difficult to try and switch on the zero crossing, although I haven't tried solid state relays.

This is something you want under software control, not mechanically or manually.
Also, the other problem is a lot of inverters have soft-start so you technically need to keep them running, so that's why I opted for the on-line design, the charger is a 60A power supply strong enough to charge the batteries and run the inverter.

I also advise to not try and disable the soft-start, the inverter will fail quickly, them output transistors will fail in a short period of time
Surely this approach will result in the power dropping (killing my electronics) during the switch over between mains and battery?
 
Surely this approach will result in the power dropping (killing my electronics) during the switch over between mains and battery?
There is two things I need to understand here.
Are you doing this the old-school UPS style? (APC et, al) or are you doing the on-line approach I use.

UPS units always quote a transfer time, in milli-seconds. Yes that means the load is switched from one source to another. Its fine if its a computer or such, because the mains is rectified and a relatively large capacitor is used on the DC side of the primary side, usually enough to "hold up" the power supply while transfer takes place.

On a purely resistive load like a lamp you might notice a flicker as the transfer takes place.

On my set up, the pure sinewave inverter runs ALL the time, hence no load transfer. The approach taken was to choose a DC power supply strong enough to run the inverter without a battery and then use it to run the inverter and charge the battery. It works on small (600VA) inverters like mine and this setup has been running since December 2018. The problem came in that the PSU sometimes refused to start when the power came back, it needed a bit of a delay to start up before driving a load, and that is where the relay/contactor comes in. The microcontroller monitors the incoming Eskom and when its deemed stable (usually 5 - 15 seconds) then it will connect the PSU to the battery, which then charges along with the inverter running.

It started off with a small battery but then I put bigger batteries as I increased the load.
At the moment it powers the entire bedroom (various chargers, bedside lamps) the DVR PC and the IP cameras.
 
There is two things I need to understand here.
Are you doing this the old-school UPS style? (APC et, al) or are you doing the on-line approach I use.

UPS units always quote a transfer time, in milli-seconds. Yes that means the load is switched from one source to another. Its fine if its a computer or such, because the mains is rectified and a relatively large capacitor is used on the DC side of the primary side, usually enough to "hold up" the power supply while transfer takes place.

On a purely resistive load like a lamp you might notice a flicker as the transfer takes place.

On my set up, the pure sinewave inverter runs ALL the time, hence no load transfer. The approach taken was to choose a DC power supply strong enough to run the inverter without a battery and then use it to run the inverter and charge the battery. It works on small (600VA) inverters like mine and this setup has been running since December 2018. The problem came in that the PSU sometimes refused to start when the power came back, it needed a bit of a delay to start up before driving a load, and that is where the relay/contactor comes in. The microcontroller monitors the incoming Eskom and when its deemed stable (usually 5 - 15 seconds) then it will connect the PSU to the battery, which then charges along with the inverter running.

It started off with a small battery but then I put bigger batteries as I increased the load.
At the moment it powers the entire bedroom (various chargers, bedside lamps) the DVR PC and the IP cameras.
What stops the battery from getting overcharged?
 
Its a lead-acid battery. In the same way as a car's alternator, the voltage is kept constant at 13.8V and the battery draws current until it is charged, then it goes into what is commonly called the float-charge mode.
If I understand correctly, you have a 60A charger going to a battery (or batteries)? What prevents the charger from boiling the batteries with 60A when the battery is discharged after load shedding?

Or do you have a number of batteries in parallel?
 
If I understand correctly, you have a 60A charger going to a battery (or batteries)? What prevents the charger from boiling the batteries with 60A when the battery is discharged after load shedding?

Or do you have a number of batteries in parallel?
I will reply when I am out of a meeting I am going into, but there is a prevalent lack of knowledge about how lead acid batteries work and the mode of charging them. The theory is in textbooks with the associated mathematics... but like I said before... think car alternator, same kind of charging setup
 
I will reply when I am out of a meeting I am going into, but there is a prevalent lack of knowledge about how lead acid batteries work and the mode of charging them. The theory is in textbooks with the associated mathematics... but like I said before... think car alternator, same kind of charging setup
1635334247594.png
1635334272806.png
 
CYCLE USE is exactly that- 14.4V which is what my inverter is charging at, and the inverter I made.
STANDBY USE is float charge, usually 13.6 - 13.8V DC

STANDBY = occasional use
CYCLE = when Eskom fscks us

Those are standard values.

A flat/depleted battery will usually drop down to 10.6V under load, it varies on how heavy the load is, but its around 10.6 ~ 11.2V and it falls after a short period of time. There's also no possibility of drawing a short burst of high current, the voltage just goes down to 10.6 or lower.

When you connect that battery to a charger which is typically a 13.6V power supply of limited current, the battery will take as much current as it can. For example, a 1.5A power supply, charging a 7.2Ah "alarm battery" the voltage will drop but 1.5A will be pulled from the power supply. This will go on for about an hour, then the voltage rises as the current drawn becomes less and less. The net result (for any lead acid battery) is a curve as shown:

1635352421800.png

If your charging source is able to supply 60A, or in the case of a car alternator, around 130A, then the battery voltage will rise to the 13.8V determined by the regulator, and the battery will draw as much current as it can in the process, around 30-50A depending on the battery.

So I exploited this, I used a switched mode PSU capable of supplying 80A, which is enough to run the inverter at full load without a battery, but with the inverter loaded to 50% there is enough current to run the inverter and to charge the battery.

As for the "boiling the battery" this happens if you charge at high voltages > 16V then yes, the battery tends to boil, with a strong hydrogen sulphide (rotten egg) odour that escapes through the vents. This happened sometimes in older cars, particularly the Alfa, where the regulator in the alternator would die and then the battery would take the punishment of whatever voltage was being sent its way. A car's alternator can generate quite a high voltage if not regulated but as with normal AC generators, the excitation current is controlled on the slip rings and a three phase diode rectifier is used to get DC

Float charging, as used in most modern alarm systems is simply supplying a regulated 13.8V DC supply to the battery. When there's lots of loadshedding, notice how quickly that ruins the battery because the battery needs to be charged at 14.4V.

I built this inverter in December 2018 when I stripped my moer at the LS at the time. Its now October 2021 and its still working.

There is also confusion about other types of batteries.
Lithium-ion batteries are completely different and require charging profiles, currents and voltages tightly controlled by software. Do it wrong and you end up with a fire or explosion. Li-ion polymer batteries are only now becoming very commonplace in inverters, but their voltages are usually multiples of 3.6V.

These batteries have a completely different way of charging and that adds cost and expense.
 
CYCLE USE is exactly that- 14.4V which is what my inverter is charging at, and the inverter I made.
STANDBY USE is float charge, usually 13.6 - 13.8V DC

STANDBY = occasional use
CYCLE = when Eskom fscks us

Those are standard values.

A flat/depleted battery will usually drop down to 10.6V under load, it varies on how heavy the load is, but its around 10.6 ~ 11.2V and it falls after a short period of time. There's also no possibility of drawing a short burst of high current, the voltage just goes down to 10.6 or lower.

When you connect that battery to a charger which is typically a 13.6V power supply of limited current, the battery will take as much current as it can. For example, a 1.5A power supply, charging a 7.2Ah "alarm battery" the voltage will drop but 1.5A will be pulled from the power supply. This will go on for about an hour, then the voltage rises as the current drawn becomes less and less. The net result (for any lead acid battery) is a curve as shown:

View attachment 1176208

If your charging source is able to supply 60A, or in the case of a car alternator, around 130A, then the battery voltage will rise to the 13.8V determined by the regulator, and the battery will draw as much current as it can in the process, around 30-50A depending on the battery.

So I exploited this, I used a switched mode PSU capable of supplying 80A, which is enough to run the inverter at full load without a battery, but with the inverter loaded to 50% there is enough current to run the inverter and to charge the battery.

As for the "boiling the battery" this happens if you charge at high voltages > 16V then yes, the battery tends to boil, with a strong hydrogen sulphide (rotten egg) odour that escapes through the vents. This happened sometimes in older cars, particularly the Alfa, where the regulator in the alternator would die and then the battery would take the punishment of whatever voltage was being sent its way. A car's alternator can generate quite a high voltage if not regulated but as with normal AC generators, the excitation current is controlled on the slip rings and a three phase diode rectifier is used to get DC

Float charging, as used in most modern alarm systems is simply supplying a regulated 13.8V DC supply to the battery. When there's lots of loadshedding, notice how quickly that ruins the battery because the battery needs to be charged at 14.4V.

I built this inverter in December 2018 when I stripped my moer at the LS at the time. Its now October 2021 and its still working.

There is also confusion about other types of batteries.
Lithium-ion batteries are completely different and require charging profiles, currents and voltages tightly controlled by software. Do it wrong and you end up with a fire or explosion. Li-ion polymer batteries are only now becoming very commonplace in inverters, but their voltages are usually multiples of 3.6V.

These batteries have a completely different way of charging and that adds cost and expense.
I was pointing to the 0.25C (25A) charge current. 50A would shorten its life no?
 
I was pointing to the 0.25C (25A) charge current. 50A would shorten its life no?
I cannot see why that would be the case.
This commercial inverter I have, it slowly raises the battery charge current as soon as the power comes on, pushing as much as 50-60A, fans blowing.

If that current would shorten its life then how come you get a good life expectancy out of a car battery...
 
I cannot see why that would be the case.
This commercial inverter I have, it slowly raises the battery charge current as soon as the power comes on, pushing as much as 50-60A, fans blowing.

If that current would shorten its life then how come you get a good life expectancy out of a car battery...
because a car battery is always full?
 
because a car battery is always full?
Nope.
Have you ever started a vehicle where the battery was dead as a doornail? I have.
Used jumper cables from one car to the dead vehicle, and the moment I could get that dead vehicle to start, there was enough current to run the headlights, so yes, the battery was pulling as much as it could, hence some occasional fan belt squeal but it settled down as soon as the vehicle was out of the storage facility where it had been abandoned.

Vehicle was abandoned by a company during covid-19, when lockdowns eased they sold it on auction, and to get it home, I had to get the engine to crank, but yes, crank it did, and the alternator provided the amps to charge that battery, run the headlights and all the on board systems. Got the vehicle home. Of course battery is damaged, due to the deep discharge the plates are bent and sulphated to hell and back but the point remains... understanding how these things work, the characteristics and chemistry of a lead acid battery is key!
 
Its a lead-acid battery. In the same way as a car's alternator, the voltage is kept constant at 13.8V and the battery draws current until it is charged, then it goes into what is commonly called the float-charge mode.
So does the charger that you use go into float mode and reduce the amps to keep the battery topped up at its rated amps?
 
So does the charger that you use go into float mode and reduce the amps to keep the battery topped up at its rated amps?
The battery does it.... the battey just pulls less and less current and then settles around 800mA after a good 22 hours.

This is used extensively in gate motors, surprised people don't know this. And your car's alternator can't adjust how much current it delivers, if it did, your headlight brightness would go all whacko
 
The battery does it.... the battey just pulls less and less current and then settles around 800mA after a good 22 hours.

This is used extensively in gate motors, surprised people don't know this. And your car's alternator can't adjust how much current it delivers, if it did, your headlight brightness would go all whacko
Why does the battery have a label saying "recommended charge current 25A"? What happens when you use a 100A?
 
Why does the battery have a label saying "recommended charge current 25A"? What happens when you use a 100A?
So that you are aware that the battery will suck 25A or thereabouts (as these behind me do) when the charger is on.

As for what happens when you have a charger capable of 100A, about 25A is drawn for about an hour and a half, then it goes down.

As for what happens when your charger is too small (like one of mine was), when the power comes back on, the charger says goodbye, nice knowing you.

The home-made inverter, the charger I used there, can do 80A, it battles and moans a bit because the batteries are sucking 30A to charge and the inverter is sucking the rest but it can do 80A, the batteries draw never more than 30-40A when charging.

I also confirmed this on the Synapse inverter I bought, as it displays the current while charging, and that follows the curve I drew, precisely.

I was taught these things in high school by a BSc engineer who worked for Plessey.
He showed me how alarm systems charge their batteries.... its a simple 13.8 - 14.2V regulated power supply and since the alarm battery draws less current than a deep cycle battery when its time to charge, it just works. Texecom, Paradox, FBII and many others used this for decades.
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X