Let's design our own UPS

LM317T adjustable positive voltage regulator
This is the answer, The battery still relies on a regulator of some sort microprocessor to control the various stages of charging be it stage 2 to 4 to maintain the service life of the battery. Once the battery reaches its absorption rate, the charger would effectively reduce its amps to keep the battery in its full state. If this microprocessor was excluded and the charger had no regulator to control the various stages for volts and amps, when the battery receives excess than what it can hold. The battery would be over-charging, this now would lead to corrosion on the plates , Over heating,bubbling boiling and in turn this ends up damaging the active material that is on the plates.

Chemical reaction when a battery being discharged sulfuric acid in the electrolyte is being depleted, in the same beat sulfate coats the plates reducing the surface so that the reaction can take place and act as an insulator and charging a battery reverses this, this is another reason why you cannot reverse polarity of a charger on a battery. This is as much as I understand on battery charging and its chemistry.

Nice setup @PaulMurkin Are you using a switched relay to control output?
 
This is the answer, The battery still relies on a regulator of some sort microprocessor to control the various stages of charging be it stage 2 to 4 to maintain the service life of the battery. Once the battery reaches its absorption rate, the charger would effectively reduce its amps to keep the battery in its full state. If this microprocessor was excluded and the charger had no regulator to control the various stages for volts and amps, when the battery receives excess than what it can hold. The battery would be over-charging, this now would lead to corrosion on the plates , Over heating,bubbling boiling and in turn this ends up damaging the active material that is on the plates.

Chemical reaction when a battery being discharged sulfuric acid in the electrolyte is being depleted, in the same beat sulfate coats the plates reducing the surface so that the reaction can take place and act as an insulator and charging a battery reverses this, this is another reason why you cannot reverse polarity of a charger on a battery. This is as much as I understand on battery charging and its chemistry.

Nice setup @PaulMurkin Are you using a switched relay to control output?
The regulator in that scenario is a VOLTAGE REGULATOR... not a CURRENT REGULATOR. The amount of available current is limited due to the 22VA transformer and the amount of heatsinking on the LM317T. Voltage will sag even on the AC output side of the transformer. So no, the current is not really regulated, if you were to short the charger the LM317 would likely die after a while, but that's why we use a fuse.

The switched relay in my UPS is there to give the switched mode power supply I use as a charger (12V 60A DC) time to start up, because if you don't do that, it won't start up and will eventually destroy itself. So after power comes on, there is a power-on delay of 3 seconds, for the PSU to stabilize, and then its output is switched to the battery to charge it. When loadshedding is excessive, i.e. 4 times a day, I cannot get the batteries charged fully enough. Two relays are used because if you use one, it melts, the terminals fall off from the heat. I will be replacing that with a contactor soon.

The inverter powers the load, constantly, there's no switching on the AC side.
 
LOL minced my words there a little sorry and went off topic from Volts to amps :ROFL:, yes you are correct. That is indeed a voltage regulator, still back to the same thing an unregulated 12v source connected directly to a battery to charge it will hurt the battery.
 
LOL minced my words there a little sorry and went off topic from Volts to amps :ROFL:, yes you are correct. That is indeed a voltage regulator, still back to the same thing an unregulated 12v source connected directly to a battery to charge it will hurt the battery.
This is what will hurt the battery... > 15V DC.. it will charge, but when it gets fully charged and that voltage rises to 15V or higher, that's when bad things happen, and the current to do so may actually be irrelevant.
 
To cut down on all the questions, here's the 600VA UPS/inverter/whatsamajigger I made.
Its two years old, the batteries are sh*t but that's besides the point, I will get better ones in December or leave them as is, getting generator anyway

<snip>
So you use the power supply to charge the batteries, I assume?

I assume the power supply is constant voltage, how does it survive the high current draw when the batteries are low?
How are you switching from bulk to float?

I built something many years ago but used off the shelf battery chargers (Smart chargers).
But in the end that kind of setup couldn't be wired into my light circuit as it is V-O-V so went over the Axpert.

getting generator anyway
You think it'll work out cheaper?
 
The DC UPS will probably use a similar design / combination of 18650 cells, but its more than just the battery (that is the easy part)
A DC ups is a good idea because it can power the wifi router and control computer if the Inverter is shutdown for some reason such as overload. It would be more efficient if it was powered directly from the inverter batteries and not an ac charger as mine does.
 
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

I think the power regulations such a City of Capetown actually require 2 disconnect relays for grid safety. I have used online UPSs in computer environments and they are reliable (until some clever electrician fits a red dedicated plug to an angle grinder and causes overload bypass mode). By the way this Siemens UPS had 20 lead acid batteries 240V actually (256V fully charged) and as an experiment I powered one old pc directly from DC 256V and it worked except the screen degaus because the colours were green and purple but it was usable.
 
Last edited:
I think the power regulations such a City of Capetown actually require 2 disconnect relays for grid safety.
They don't have any requirements beyond equivalent IEC standards except that you need an isolator that allows you to bypass the inverter and supply the load directly from grid. That requirement has been subsequently adopted by the 2019 SANS regulations. Hager and ACDC sell changeover switches that comply. If you want to make it electromechanical that is totally up to you, but really there is no win in that since inverters already have internal change-over switches.
 
As mentioned before.. the battery draws current during charging...
As the chemical reaction takes place this current drawn dwindles down to a few hundred milli-amps after some time. The curve I drew is the current drawn versus time

The scenario is completely different for other types of batteries.

I have designed about four chargers during my lifetime for lead acid batteries that went into full mass production. No battery was ever boiled or over-charged that I know of.

I am now going to give you a small-scale example.
Equipment:
Multi-meter (Fluke 77 or similar)
Charger: Output 13.8VDC regulated from a 22VA transformer
Battery: 12V 7.2Ah "gel cel" used for alarms. Condition = FLAT

What happens:
Charger is connected to battery while its output voltage is measured. Immediately the voltage will drop down to some value around 10 volts DC because the battery is sucking as much as the charger can give, typically 1.1A, the regulator in the charger (typically LM317T adjustable positive voltage regulator) is getting nice and hot. 1.1A or slightly more is flowing at this point.

The above carries on for around 60-90 minutes, then the voltage begins to rise across the charger, and the current being drawn from the battery starts to decrease. This continues for another 8 hours or so until the voltage has reached 13.8V matching the set point of the regulator, and the battery is probably drawing 100mA around this time... now its in float charge mode, and the current drawn, will slowly decrease over time down to about 50-60mA after 24 hours.

The charger has done nothing but give... it has not done anything else. I have used this principle on deep cycle lead acid batteries here, using massive switched mode power supplies to charge the batteries. It works.
If only charging to 13.8v depending on the exact lead acid (LA) chemistry, the battery wouldn't be fully charged. In fact I don't think any LA chemistry is fully charged at 13.8v. Skipping the bulk phase means the battery never reaches the critical 100%. LA batteries degrade the longer they spend below 100% SoC, so the battery life is significantly reduced.

The phases of LA chargers and why they are designed that way are very well documented. I'm somewhat confused why you believe that doesn't apply to your case.
 
If only charging to 13.8v depending on the exact lead acid (LA) chemistry, the battery wouldn't be fully charged. In fact I don't think any LA chemistry is fully charged at 13.8v. Skipping the bulk phase means the battery never reaches the critical 100%. LA batteries degrade the longer they spend below 100% SoC, so the battery life is significantly reduced.

The phases of LA chargers and why they are designed that way are very well documented. I'm somewhat confused why you believe that doesn't apply to your case.
Depends on the battery... the ones I designed the chargers for the set point was 13.8V DC as dictated to me by the R&D director. Also that was an example because of this belief of "boiling the battery"

I did a fun experiment to try and boil a battery... I didn't succeed. I don't have 100+ amperes at 15V DC readily available

I charge my home made inverter batteries to what the datasheet says.. 14.2V DC is common.
When P**sKom come with their kuk, I use the "cycle use" value, if there's been no LS for over a month I adjust the charger to the "standby use" value. Its presently a manual process.. I am not going to automate it because I am outta here and will sell the inverter as-is
 
What about the MCU to control the inverter. Would a new dual core 133MHZ chip like the RP2040 be able to do the work? Also the topology, H-bridge half bridge etc.RP2040.png
 
Last edited:
I think you were right. This thread was started in Jan 2021. I don't think a final design has even been put forward yet. You'd be better off rolling your own than to wait for agreement on MyBB.
 
100% correct.

Perhaps we should come up with a output list and just take it from there. something that can cover 100% of DC powered needs & then we leave the AC for another device.

So something like:


Output
4 x 9V 1A DC
4 x 12V 1A DC
5 x USB Type A 5V 1A DC
2 x USB Type C 5 1A DC
1 x USB Type C (PD) 20V <- unsure if this is practical. ?

Any other output needed?
14v and 19v as well. Can power monitors as well.
 
Top
Sign up to the MyBroadband newsletter
X