UPS build

My server has an existing backup power system which is in excellent condition. I recently dicovered though that this unit can only support my server and network equipment for about an hour, and the power cuts in my area tend to last for a bit longer than that. So, my solution: build a new UPS.

Luckily for me, I was able to pick up a couple of old HP 4RU UPSes for about $100 a piece. These were sold 'as is'. The control circuitry turned out to be busted, which actually came as a bit of a relief after discovering that each unit required two 15A feeds - far more than my house has provisions for, and far more than I'm willing to pay for in electricity bills. Inside each of these units, however, were twenty 5Ah batteries, all of which I discovered were only about a year old, and still in very good condition.

Out of interest, I checked out the repair cost for the units I had, both of which required a new control module. HP, as well as many of their resellers, wanted around $1200 a piece for these modules - way out of my price range. New units would have set me back $4000 each - even further out of my price range. So, that puts my hack budget limit pretty high.

Given my lack of experience with power control systems, I decided on a highly modular design which would use mostly off the shelf components. The only part I needed to build myself was the switching stage, and the main controller. Now, the switching stage was basically just a bunch of relays connected to some common collector drivers, which then ran to the microcontroller. Since I didn't want to have a huge learning curve on such a pricey build, I opted for an Arduino controller to run the show. This kept things easy, and with some effective coding and a large capacitor on the output, the time overheads introduced by the Arduino routines didn't have an effect on the performance.

So, first things first, I had to remove the batteries and empty out the cases. Getting the batteries and control module out was easy enough:
UPS case (before)

After a bit of work with a hammer, chisel, vice grips, screwdriver and socket set, the rest of the unnecessary metalwork and electronics was removed:
UPS case (after)
The metal tabs seen sticking up here were also hammered flat. Now I just had to rinse and repeat for the other case.

To minimise wiring between the two cases, I elected one case as a battery only case (with the exception of the fans). The batteries were connected in groups of five, through breakers (harvested from the original UPS) and out the back of the unit via mains rated cables:
Inside the battery only unit

After some dodgey case hacks, I also fitted two fans at the front of the case:
Front of the completed battery only unit
Overview of the battery only unit

Next up was preperation of the control unit modules. The power supply I had chosen was rated to deliver 10.9v at 80A. Since I got this unit for free, and didn't really have any other use for it, I decided to pop it open and crank up the voltage:
Power supply output voltage tuning
Since I didn't really need the 80A rating, I removed some of the PSU output modules and used the saved space to house the microcontroller board, driver board and voltage monitor board. The design and integration of the microcontroller, driver and voltage monitor boards in to the cavity in the power supply was relatively easy, and with additional insulation, didn't pose any risk to the operation of the PSU or itself.

To switch in and out banks, and to select the output source (mains/battery), relays were used. Back EMF from the relays was taken in to account on the driver boards. The possibility of the source relay having it's terminals welded was accepted as a risk for the sake of keeping a simple design. The batteries were arranged in to groups of five, with two groups per battery 'bank' (charge/backup supply group).

Here's a picture of the horror wiring, with my inability to locally source multiple high current wire colours at a reasonable price making wire tracing a bit of a pain:
Wiring horror show

Here's a rear view of the units installed:
Installed rear view
Each breaker has two sets of terminals, and thus was used as a breaker for two battery groups (matched up with the 'banks' mentioned earlier). The largest wire (the white spiral wrapped monstrosity) connects the banks and fans from the lower unit to the control unit. As for the wires:

The output capacitor was mounted externally because it could not fit inside the case. The charger, on the other hand, was mounted externally to allow monitoring of the charge status:
Battery charger
Also, I didn't paticuarly want to void the charger warranty, as it didn't come cheap. That and it was the second charger used. The first charger was originally mounted internally, with it's status monitored directly. This charger, however, failed during the burn-in testing. Thanks to it's cut leads, its warranty was also void. This prompted a slight modification to the charge monitor method, with a set charge timer being used instead of a circuit to actively monitor the charger.

So, now it's all installed, complete with LCD:
UPS installed

Overall, the build was a big hack job, but it does work, and it's unlikely to spontaneously combust, despite the wiring mess and simple design. Final burn-in testing was successful, with the system properly and quickly detecting and responding to loss of mains power, cycling through banks to charge and monitoring output level. The button at the front allows me to manually advance to the next bank to charge (if on mains), so that the charging process can be sped up if the banks are only partially depleted.

Rough hack expenditure is around the $600 mark, including the dead battery charger. All parts were sourced retail though, so this price could have been reduced significantly. Still, this was an order of magnitude cheaper than a commercial unit of equivelant capacity, and a lot more fun.

Now, for actual functionality compared to a commercial unit. There's no buck-boost converter, as that violates the 'simple design' objective of the system. There's currently no monitoring other than the front mounted LCD, although USB or ethernet support could easily be added if the output pins are used more efficiently, as there are well established libraries in the Arduino environment for such features. Hopefully I'll get around to adding some external monitoring in the future.

Hopefully once I learn more about power control systems, I can build a more professional and feature rich design. For now though, this will do, and the modular design using various off-the shelf units allows for easy service in the event of system failure.

Follow up (April 2014)

It's been a few years, and after issues with power loss detection, I have now replaced this unit. The current unit is an old APC Smart-UPS 1000XL with a 9619 network management module fitted. This unit features an external battery pack connector, which I have connected to some extra batteries.

This particular model is discontinued, but something similar is likely available on eBay.