Słomkowski's technical musings

Playing with software, hardware and touching the sky with a paraglider.

Long-lasting UPS setup with APC Smart-UPS and car batteries


I connected a server-grade UPS with four car batteries to create a cheap solution for non-stop operation of a server rack cabinet for over 12 hours in the event of a power outage.

Recently, I was tasked with devising a system to ensure continuous operation of servers contained in a certain rack cabinet for at least 12 hours during a power outage. It also needed to be done cheaply, so buying new server-grade equipment was not an option. Naturally, a UPS came to mind, accompanied by large external batteries.

I started by measuring the power consumption of the whole cabinet - it turned out that it averaged at about 300 W, which is not much, but the theoretical peak power (sum of max. power ratings of all disks, motherboards, CPUs, etc.) was almost ~1200 W. Therefore, the UPS should be able to handle this high load too, however rare.

So I needed a rack-mountable UPS with at least 1200 W of peak power, with an external battery connector. Because of Linux support (namely, the apcupsd daemon), I decided to limit the search to the APC brand. I purchased the APC SMART SUA2200XLI from one of the local companies that deals in used server equipment.

The UPS

APC SMART SUA2200XLI is a rack-mountable (5U) line-interactive UPS capable of delivering almost 2 kW of AC power. It is nominally energized by four 12 V 17 Ah RBC55 VLRA batteries connected in series and optionally through an external battery connector (Anderson SB120, blue - 48 V). Internal batteries are not required; all power may come through the external connector. These sources seem to be simply connected in parallel internally, as the UPS doesn’t distinguish between external and internal power. Diagnostics and control are provided through USB, serial, and optional networking card. Warning! The DE-9 serial connector uses a proprietary pinout. Using a standard serial cable will cause the UPS to shut down!

Since this model has reached its end of life state, I’m providing datasheets in case they get removed from Schneider’s website:

Choosing batteries

A UPS should ideally be paired with deep cycle VRLA lead-acid batteries. However, to keep the cost down, I decided to use ordinary car batteries. They are widely available and much cheaper. In this application, routine discharge of the batteries is not expected to happen frequently since long power outages are rare. Even during a recent major line service outage in the area, the outage lasted less than six hours. This means the batteries are not expected to lose much capacity during their lifetime since they won’t be deeply discharged frequently.

Taking a load of 300 W, operating for 12 hours with 80% efficiency, the theoretical battery capacity needed is 300 W * 12 h / 48 V / 80% = 93.75 Ah. Therefore, I decided to use 100 Ah batteries. When searching for quality car batteries, I found pessimistic findings, as only a handful of manufacturers use the casting process to make battery plates. The majority of them use punching net technology, which yields substandard results. At the time of writing this article, the Ukrainian manufacturer Megatex uses casting, so I bought four AMEGA Premium M5 100 Ah batteries.

Warning! Car batteries are more likely to emit hydrogen gas than AGM/VRLA batteries when overcharged. It is essential to keep the batteries in a ventilated area. The rack cabinet in this project is kept within a large corridor with natural ventilation.

Consideration of the usage of a UPS without an external battery connector

Apart from using a UPS with an external battery connector, it should also be possible to simply connect a larger battery to the internal power clamps inside the UPS. My concern with this idea was that such a setup might be incapable of providing enough charging current to the large battery, resulting in an extended charging time from a fully depleted state. In extreme cases, an increase in self-discharge caused by cell degradation would prevent the large battery from ever being fully charged. UPS units with external battery connectors should theoretically provide a higher charge current, which should vary with the number of battery packs connected to it. However, I haven’t confirmed whether increasing the number of battery packs actually increases the charging current in the aforementioned UPS.

Construction

The batteries weigh almost 100 kg, so a strong base plate is a must. I cut 20 mm water-resistant plywood to closely match the interior of the cabinet. It is laid at the bottom of the cabinet, held by four caster assemblies in the corners. To make the base even stronger, I bolted a strip of plywood at the bottom. The batteries are secured in place by several small pieces of plywood.

The batteries are connected in series using 16 mm² wires and snap-on battery clamps. At the other end, an Anderson SB120 connector is crimped. To facilitate diagnostics, there’s also a front panel with measuring instruments and emergency shut-off switch. The front panel is a 2U blank rack panel with drilled holes for the instruments. The wiring is shown in the schematic:

Electrical wiring of the battery harness for the UPS.
Electrical wiring of the battery harness for the UPS.
↑ click to enlarge ↑

Four batteries are connected in series. Each one has a nifty Chinese voltmeter/battery monitor LY6W attached. Their current draw is normally ~5 mA, but the backlight shuts down if the voltage goes below ~10.6 V, allowing the meters to be connected at all times. You can configure it by pressing the button on the back, as described in the manual: TH01/LY6N/LY6W battery tester.

Additionally, there is a 100 A battery cutoff switch and a bidirectional 52 mm ammeter, both of which are intended for use in agricultural machines. The ammeter has a range of -60 A to 60 A. Unfortunately, it lacks numerical markings on the scale.

To err on the side of caution, I installed two fuses rated for 100 A, each in MIDIVAL package, which is commonly used in cars and electric vehicles. The fuse shown in the photo is rated for 32 V, but the other fuse on the front panel is rated for 58 V. It is crucial to use a fuse rated for 48 V or higher because a low voltage fuse may not necessarily interrupt the circuit! A sustained DC arc might prevent it from happening and potentially cause a fire!

Software and configuration

The UPS communicates with one of the Linux boxes inside the cabinet through the serial port. The apcupsd daemon is responsible for monitoring its state. I have set up appropriate e-mail notifications and shutdown hooks. Due to the unusual setup, it is recommended to set the number of external battery packs to match the total battery capacity, considering the following facts:

Since 100 Ah is equivalent to 2-3 external battery packs, I have set the value to 3. This can be done through a serial connection as described by Schneider or by using the apctest command, as shown in this terminal session:

# apctest

You are using a SMART cable type, so I'm entering SMART test mode
Hello, this is the apcupsd Cable Test program.
This part of apctest is for testing Smart UPSes.
Please select the function you want to perform.

1) Query the UPS for all known values
2) Perform a Battery Runtime Calibration
3) Abort Battery Calibration
4) Monitor Battery Calibration progress
5) Program EEPROM
6) Enter TTY mode communicating with UPS
Q) Quit

Select function number: 6

Enter an ESC character (or ctl-[) to exit.

>000
+OK
+NO
|>001
+OK
>002
>002
|^[
1) Query the UPS for all known values
2) Perform a Battery Runtime Calibration
3) Abort Battery Calibration
4) Monitor Battery Calibration progress
5) Program EEPROM
6) Enter TTY mode communicating with UPS
Q) Quit

I haven’t confirmed whether increasing the number of battery packs increases the charging current, though.