How AC and DC Conversion Works
Wall power sloshes back and forth; batteries only hold one-way DC. Inside an online (double-conversion) UPS, four diodes straighten AC into DC and four switches shake it back into AC.
Step 01 of 09
1 · AC goes in, AC comes out
This box, an online (double-conversion) UPS, sits between a wall socket and a computer, and the lamp beside it is running off its output. Power arrives as AC and leaves as AC. In between, inside the box, all of it is turned into DC and back again. The detour exists because the battery inside can only store DC.
Step 02 of 09
2 · AC: electrons that go nowhere
Here is a magnified, cut-open length of mains wire. The copper atoms stay put. The free electrons swing one way and then the other, 50 times a second, in step with the voltage on the screen. Each one travels only about a micrometre before it turns back. Energy flows down the wire, but the electrons just shuffle in place.
Step 03 of 09
3 · DC: the same electrons, one way
Connect the same wire to a battery and the swinging stops. The electrons drift steadily in one direction instead, and they are slow: at 10 amps they creep about a fifth of a millimetre per second, under a metre an hour. The flat line on the screen is what DC means: a push that never changes direction.
Step 04 of 09
4 · Inside: two conversions in a row
With the cover off, the board reads left to right. Four diodes turn the wall's AC into DC. Two big capacitors, with the battery beside them, hold that DC steady in the middle. Four switches turn it back into AC, and a coil and capacitor smooth it on the way out to the lamp. Each screen shows the voltage at one stage.
Step 05 of 09
5 · Four one-way valves
A diode lets current through in only one direction, and four of them make a bridge. On each half of the wave one diagonal pair conducts, D1 with D4 and then D2 with D3. So current on the + rail always flows the same way, even while it reverses in the wires from the wall. With the capacitors lifted out, the screen shows the result: every hump flipped positive, 100 of them a second.
Step 06 of 09
6 · Filling in the gaps
Those humps are DC, but lumpy. Put the reservoir capacitors back and they charge in a quick gulp near the top of each hump, then feed the inverter while the wave dips. The bus now sits almost flat, around 320 volts, with a small ripple. The battery charger connects to these same two rails, so a power cut changes nothing downstream.
Step 07 of 09
7 · Four switches make it alternate
Now DC has to become AC again. Four transistors form an H around the output. Close Q1 and Q4 and current crosses the output one way; open them and close Q3 and Q2, and it crosses the other way. Swap the pairs 50 times a second and you have AC, but only a crude square wave.
Step 08 of 09
8 · Thousands of pulses make a sine
For a smooth wave, the controller switches thousands of times a second and varies the width of each pulse: wide near the top of the wave, narrow near zero. The coil resists sudden changes in current and the film capacitor resists sudden changes in voltage, so together they average the pulses into the clean sine on the last screen.
Step 09 of 09
9 · Straighten it, store it, shake it back
Watch the front panel when the wall power cuts out. The LINE light goes dark and BATTERY comes on. In an online UPS like this one, the lamp never flickers, because the inverter was already running on DC. Now that DC just comes from the battery. Wall power sloshes back and forth, a battery stores it one way, and four diodes and four switches translate between the two.