Electronics-Related.com
Forums

How do UPS trigger circuits work?

Started by bob prohaska May 8, 2023
After using a pair of inverter/charger circuits as UPS units for 
some months I've become curious as to how the trigger decides
when to switch from line power to the battery and inverter.

Supposedly they trigger on wrong voltage or frequency, but they
do it in less than a half-cycle, so it seems to be more than a
simple relay. A cursory web search found nothing but I don't 
know the proper name for such an "AC comparator". 

The units in question are from Amazon:
https://www.amazon.com/Ampinvt-Inverter-Charger-Frequency-Batteries/dp/B098QL2VBZ/ref=sr_1_1?crid=1ID8F7MUJFYH8&keywords=ampinvt+800+W+inverter&qid=1683582424&sprefix=ampinvt+800w+inverte%2Caps%2C557&sr=8-1&ufe=app_do%3Aamzn1.fos.f5122f16-c3e8-4386-bf32-63e904010ad0

The docs are useless and tech support is worse. No point asking them.
Apart from those gripes, the units seem to work OK for the price.

I don't need to build anything, but I am curious as to how it's done.

Thanks for reading, any any hints.

bob prohaska

On Mon, 8 May 2023 21:55:47 -0000 (UTC), bob prohaska
<bp@www.zefox.net> wrote:

>After using a pair of inverter/charger circuits as UPS units for >some months I've become curious as to how the trigger decides >when to switch from line power to the battery and inverter. > >Supposedly they trigger on wrong voltage or frequency, but they >do it in less than a half-cycle, so it seems to be more than a >simple relay. A cursory web search found nothing but I don't >know the proper name for such an "AC comparator". > >The units in question are from Amazon: >https://www.amazon.com/Ampinvt-Inverter-Charger-Frequency-Batteries/dp/B098QL2VBZ/ref=sr_1_1?crid=1ID8F7MUJFYH8&keywords=ampinvt+800+W+inverter&qid=1683582424&sprefix=ampinvt+800w+inverte%2Caps%2C557&sr=8-1&ufe=app_do%3Aamzn1.fos.f5122f16-c3e8-4386-bf32-63e904010ad0 > >The docs are useless and tech support is worse. No point asking them. >Apart from those gripes, the units seem to work OK for the price. > >I don't need to build anything, but I am curious as to how it's done. > >Thanks for reading, any any hints. > >bob prohaska
Partly depends on the topology of the inverter/charger or UPS. Not sure about the one on Amazon. An inverter/charger like the one you referenced could use either a separate charger circuit not shared with the inverter OR it could use the same circuitry for charging than it does for inverting. If it is a separate charger, then all it has to do is wait for the AC input to go away and turn off its AC input relay but keep inverting off the battery storage. If combined inverter/charger, it can be more difficult to know when the grid AC is gone so that the inverter does not try to drive the AC input line since the AC load output would be connected directly to the grid or shorepower input. That is more or less how a grid tie inverter works that can sell power back to the grid or AC input. That is called anti-islanding and has strict regulations the company must follow but I don't think this inverter/charger does this function. So that inverter/charger might take a couple of seconds to find that the AC input went away and invert properly. Usually, when the AC grid goes away, there will be a short time where there is NO AC output until things stabilize. If it uses a completely separate charger and inverter, the it can be truly UPS or uninterruptabe power when the grid goes away. One or two AC cycles is typical for a good/fast inverter/charger to transfer. Relays take a couple milliseconds to switch. Lettuce know if you happen to take it apart. The inverter company support or sales people probably won't know how it works. The manual won't say either. boB
On 5/8/2023 2:55 PM, bob prohaska wrote:
> After using a pair of inverter/charger circuits as UPS units for > some months I've become curious as to how the trigger decides > when to switch from line power to the battery and inverter. > > Supposedly they trigger on wrong voltage or frequency, but they
Or "harmful transients", etc. Depends on the UPS and the UPS's topology.
> do it in less than a half-cycle, so it seems to be more than a > simple relay. A cursory web search found nothing but I don't > know the proper name for such an "AC comparator".
A UPS has limits on what it expects of the AC line. E.g., most will gripe if you connect it to a 67Hz 145V supply -- it's not what the device expects. Within the operating limits of the device, you assume a sine wave is present at the input. You know what a sine wave looks like for any given frequency and peak voltage. So, if what you are seeing *now* deviates from what you *expected*, the AC line is not compliant. An online topology just alarms on this condition; it's already been powering the load from battery power even with mains voltage present. They are (amusingly) more common for *big* loads. An offline (standby) UPS will use this signal to activate a relay that routes power from the inverter to the load (the inverter, hopefully, having been kept in phase with the mains). They are common for tiny loads (and people with limited resources) A line-interactive UPS is a bit of a combination; an autotransformer works to boost/buck under/over-voltage line conditions. The inverter takes over when the UPS has determined that the mains are malfunctioning beyond those limits. This tries to bridge the load/cost for modest sizes at modest costs. In each case, you don't need to see the mains "gone" in order to determine that it is "going away". You just notice that the input isn't what it should be -- if it was behaving according to the operating constraints placed on the UPS by its designer. UPSs often gripe when connected to a "synthetic" mains source (e.g., genset) because the genset often exhibits variations in frequency and voltage that go beyond what the UPS *expects*. So, it engages more often than *might* be necessary (depends on how tolerant your loads are of these variations) [Try powering a UPS from other UPSs of varying grades to see how it likes *their* outputs! :> ]
> The units in question are from Amazon: > https://www.amazon.com/Ampinvt-Inverter-Charger-Frequency-Batteries/dp/B098QL2VBZ/ref=sr_1_1?crid=1ID8F7MUJFYH8&keywords=ampinvt+800+W+inverter&qid=1683582424&sprefix=ampinvt+800w+inverte%2Caps%2C557&sr=8-1&ufe=app_do%3Aamzn1.fos.f5122f16-c3e8-4386-bf32-63e904010ad0 > > The docs are useless and tech support is worse. No point asking them. > Apart from those gripes, the units seem to work OK for the price. > > I don't need to build anything, but I am curious as to how it's done. > > Thanks for reading, any any hints. > > bob prohaska >
On Monday, May 8, 2023 at 5:57:48&#8239;PM UTC-4, bob prohaska wrote:
> After using a pair of inverter/charger circuits as UPS units for > some months I've become curious as to how the trigger decides > when to switch from line power to the battery and inverter. > > Supposedly they trigger on wrong voltage or frequency, but they > do it in less than a half-cycle, so it seems to be more than a > simple relay. A cursory web search found nothing but I don't > know the proper name for such an "AC comparator". > > The units in question are from Amazon: > https://www.amazon.com/Ampinvt-Inverter-Charger-Frequency-Batteries/dp/B098QL2VBZ/ref=sr_1_1?crid=1ID8F7MUJFYH8&keywords=ampinvt+800+W+inverter&qid=1683582424&sprefix=ampinvt+800w+inverte%2Caps%2C557&sr=8-1&ufe=app_do%3Aamzn1.fos.f5122f16-c3e8-4386-bf32-63e904010ad0 > > The docs are useless and tech support is worse. No point asking them. > Apart from those gripes, the units seem to work OK for the price. > > I don't need to build anything, but I am curious as to how it's done. > > Thanks for reading, any any hints. > > bob prohaska
That's not a UPS, it's battery charger/ generator combination. The AC output is isolated from its AC input. If you want to power AC loads with its AC output, you must do so manually or use what's usually a high priced transfer switch. The product will blow up if you disconnect the battery while its charging. It may also blow up if you connect a battery while its AC input is live. It's manufactured by Luckysolar. The product design was probably done by Haveaniceday LTD or maybe Goodluckwiththis Design Group. Hard to say.
boB <boB@k7iq.com> wrote:
>..... > all it has to do is wait for the AC > input to go away > ....
That's the core of my question. How is the decision made? Is there a dedicated power management IC for the purpose? away and turn off its AC input relay but keep inverting
> off the battery storage. > > > Lettuce know if you happen to take it apart. The inverter company > support or sales people probably won't know how it works. The manual > won't say either.
I did take a few photos of the insides, but to me they weren't very informative: http://nemesis.zefox.com/~bob/ampinvt/2nd_inverter/board_photos/ Rumor has it that most inexpensive inverters are clones or outright copies of commonplace designs. If anybody recognizes this one it would be helpful. Thanks for reading, bob prohaska
Don Y <blockedofcourse@foo.invalid> wrote:
> > > An offline (standby) UPS will use this signal to activate a relay that > routes power from the inverter to the load (the inverter, hopefully, > having been kept in phase with the mains). They are common for tiny > loads (and people with limited resources)
That's what I'm dealing with.
> In each case, you don't need to see the mains "gone" in order > to determine that it is "going away". You just notice that the > input isn't what it should be -- if it was behaving according to the > operating constraints placed on the UPS by its designer. >
But how is the expetation generated and tested, in a timely fashion? Thanks for writing, bob prohaska
On 5/9/2023 2:12 PM, bob prohaska wrote:
> Don Y <blockedofcourse@foo.invalid> wrote: >> >> An offline (standby) UPS will use this signal to activate a relay that >> routes power from the inverter to the load (the inverter, hopefully, >> having been kept in phase with the mains). They are common for tiny >> loads (and people with limited resources) > > That's what I'm dealing with.
They tend not to switch to "backup" as quickly.
>> In each case, you don't need to see the mains "gone" in order >> to determine that it is "going away". You just notice that the >> input isn't what it should be -- if it was behaving according to the >> operating constraints placed on the UPS by its designer. > > But how is the expetation generated and tested, in a timely fashion?
Likely purely in the time domain. An ADC watching the mains (through a divider of some sort) and its own internal timebase. It can sample the line voltage thousands of times per second (so scores per AC cycle?). [It has to do this in order to keep its own sine-wave generator *tracking* the mains so that the inverter will have the proper frequency and phasing if/when activated] Whether that sine-wave reference/generator is a physical device or a virtual device (e.g., keeping track of what the mains should be so that it can drive the inverter to that instantaneous output voltage), it can compare the reading from the mains to the expected value from the sine-wave generator. When some difference is detected, conclude that the mains has failed. If, for example, the mains just had a positive going zero-crossing ~4ms ago, you would expect the (scaled) mains voltage available at your ADC to be roughly the peak AC mains voltage (within the tolerance of the UPS). If, a millisecond later, it's *0* volts, then obviously something is wrong -- because a sine wave doesn't decay to 0 volts for another 4 ms (at 60Hz). I.e., at 4ms it was "nominal" but at 5ms it's clearly not as expected so switch to the inverter. If the mains voltage reappears, then you can switch BACK -- after imposing some hysteresis -- to the mains. Keep in mind that the UPS has to accommodate variations in frequency as well as voltage (and disturbances) BUT ONLY TO THE EXTENT ADVERTISED FOR THE UPS. [The same measurements also let a line-interactive UPS know when to boost or trim the mains WHILE they are available] If you want to use a UPS as an inverter, all you have to do is lie to it about the availability of mains power! :>
> Thanks for writing, > > bob prohaska >
bob prohaska wrote:
> boB wrote: >>..... >> all it has to do is wait for the AC >> input to go away >> .... > > That's the core of my question. How is the decision made? Is > there a dedicated power management IC for the purpose?
The AC-OK sensor circuit of an old UPS design is found on Sheet 1, in the upper right corner (D8 - C5): <https://electronics-components.ru/files/2015/732pschem_765.pdf> AC's apparently applied to a transformer, rectified, and compared against a zener diode reference. It's relatively simple circuit. Danke, -- Don, KB7RPU, https://www.qsl.net/kb7rpu There was a young lady named Bright Whose speed was far faster than light; She set out one day In a relative way And returned on the previous night.
Correction: Sheet 1, upper LEFT corner

bob prohaska wrote:
> boB wrote: >>..... >> all it has to do is wait for the AC >> input to go away >> .... > > That's the core of my question. How is the decision made? Is > there a dedicated power management IC for the purpose?
The AC-OK sensor circuit of an old UPS design is found on Sheet 1, in the upper LEFT corner (D8 - C5): <https://electronics-components.ru/files/2015/732pschem_765.pdf> AC's apparently applied to a transformer, rectified, and compared against a zener diode reference. It's relatively simple circuit. Danke, -- Don, KB7RPU, https://www.qsl.net/kb7rpu There was a young lady named Bright Whose speed was far faster than light; She set out one day In a relative way And returned on the previous night.
On Tue, 9 May 2023 11:09:03 -0700 (PDT), Fred Bloggs
<bloggs.fredbloggs.fred@gmail.com> wrote:

>On Monday, May 8, 2023 at 5:57:48?PM UTC-4, bob prohaska wrote: >> After using a pair of inverter/charger circuits as UPS units for >> some months I've become curious as to how the trigger decides >> when to switch from line power to the battery and inverter. >> >> Supposedly they trigger on wrong voltage or frequency, but they >> do it in less than a half-cycle, so it seems to be more than a >> simple relay. A cursory web search found nothing but I don't >> know the proper name for such an "AC comparator". >> >> The units in question are from Amazon: >> https://www.amazon.com/Ampinvt-Inverter-Charger-Frequency-Batteries/dp/B098QL2VBZ/ref=sr_1_1?crid=1ID8F7MUJFYH8&keywords=ampinvt+800+W+inverter&qid=1683582424&sprefix=ampinvt+800w+inverte%2Caps%2C557&sr=8-1&ufe=app_do%3Aamzn1.fos.f5122f16-c3e8-4386-bf32-63e904010ad0 >> >> The docs are useless and tech support is worse. No point asking them. >> Apart from those gripes, the units seem to work OK for the price. >> >> I don't need to build anything, but I am curious as to how it's done. >> >> Thanks for reading, any any hints. >> >> bob prohaska > > >That's not a UPS, it's battery charger/ generator combination. The AC output is isolated from its AC input. If you want to power AC loads with its AC output, you must do so manually or use what's usually a high priced transfer switch. >The product will blow up if you disconnect the battery while its charging. It may also blow up if you connect a battery while its AC input is live. >It's manufactured by Luckysolar. The product design was probably done by Haveaniceday LTD or maybe Goodluckwiththis Design Group. Hard to say.
An inverter/charger will work instead of a "UPS"... But might or might not have a lot of transfer time. The only question is, does this have a built in charger as well as an inverter ? Batteries not included of course as a real UPS would have. boB