Make Your Own UPS

March 19, 2010
Before uninterruptible power supplies (UPS) were made as a single unit, people had to make one with batteries, an inverter, and a charger. There are still advantages to doing this, like expandability and knowing how it will react to a situation. If you consider yourself an electronic hobbyist, you may find this is a fairly simple project.

Choosing Your UPS Type

The table below shows the basic differences between two major types of UPSs. The parts listed would be used for a UPS lasting about 15 minutes putting out 400W. If you can find them less expensive or want a different brand, go for it! If you want more power or a longer time, use a bigger battery, inverter, or charger accordingly.
Standby/Line interactive Online
What it does maintains battery charge; it switches to the inverter powered by the battery during an outage a charger powers the battery and inverter; it stops charging during an outage while the battery continues to power the inverter
Cost less more (the charger)
Complexity more (the relay switch) less
Power usage less (small float charger) more (charger and inverter; heat loss due to conversion inefficiencies)
Noise less (fan on inverter during outage) more (fans on the charger and inverter)
Parts list

Putting it Together

Regardless of what UPS you’re building, you will inevitably wire the battery, the output of the charger, and the input of the inverter in parallel. That means all the black negative wires go together and all the red positive wires go together. You’ll need large wire to handle the current. Only the small float charger will use smaller wire.

Setting up the Online UPS

Once you’ve wired everything in parallel, you’re done! Just plug in the charger into an outlet and plug in your equipment into the inverter outlet. If the battery is charged, unplug the charger and make sure it works.

Building the Switch Box for the Standby UPS

The Schematic

UPS Switch Box Schematic  
If you’re not an electronic hobbyist, don’t let the diagram scare you too much, just follow it. The relay I suggested should have it’s own diagram on the top cover. The packaging of most relays indicate what pin number on the schematic corresponds to the pin number on the relay itself. Just match up their schematic with the schematic above. It should be very similar.

See “How it Works” below for an explanation of what “NC” and “NO” means.

For you electronic hobbyists, you know most relays use 12VDC. If you can’t find a relay that has a 125VAC coil like the one I listed, use a small 12V transformer and rectify the output to DC (or use an unused cell phone charger). Don’t use a capacitor! This would cause a delay in the relay switching time.

Putting it in the Box

Place everything in the box however you like, or at least in a way that isn’t obviously hazardous. If you have cords going out of drilled holes, make sure you smooth the edges of those holes. Tie knots into the cords inside the box so they can’t be pulled out. I used IEC connectors myself, check out my box (in the lower right hand corner).

Connections to the relay should be soldered. Also make sure those connections can’t sort against the box if it’s metal. If it is loose in the box, cover it with electrical tape.

If you’re real cheap, you could just run cords (plugs and an extension cord end) directly to and from the relay and tape it up. … Not that I would recommend that. I like things to look neat.

Setting up the Standby UPS

  1. Make sure you’ve already wired the battery, charger, and inverter in parallel.
  2. Plug in your switch box line input into a wall outlet or power strip. The relay should click.
  3. Plug in your switch box inverter input into the inverter.
  4. Plug in your equipment into the power output of your switch box.
  5. Test it by unplugging your switch box from the wall, or switch off the power strip.

How it Works

The switch box works by using a relay to switch AC line power to inverter power when the line is off (outage). When line power is on, the relay is on. The relay closes it’s contacts that are normally open (NO), causing the line power to pass through to the socket and the equipment plugged into it.

When the relay is off (loses it’s power from the line), the normally closed (NC) contacts are closed, and now power from the inverter powers your equipment.

Since this isn’t a “real” UPS, it doesn’t synchronize it’s output frequency with that of the line. If you plan to use it with a computer and monitor, which usually rectify their input to DC anyway, it shouldn’t really matter too much. I’ve never had any problems.

Using a Store-bought UPS

You might be able to buy a good UPS, but my experience is limited in this area. I’ve only had a 400VA APC UPS. It worked great for a while and it always seemed to test the battery when you turned it on. But it would always switch to the battery and back to the line when I turned my printer on.

A year or so later, the APC UPS decided to just turn my computer off when I turned my printer on, failing to do its job. It wasn’t the battery because I continue to use the same battery for my own standby UPS. At some point, it just turned my computer off at random. The “cure” was now worse than the “disease” and intolerable. (UPDATE: It turned out to be the cheap relay. Read my article When electronics think they’re smarter than you for details.)

This doesn’t mean you can’t buy a good UPS, I just don’t know where. I didn’t get another one because I already had a good battery (which is a large part of the price). All in all, it seemed like the APC UPS was trying to protect itself more than the equipment that was plugged into it–too many stupid “smart” circuits.