Changing Batteries on an APC UPS
A while back, a colleague gave me an old IBM-branded APC uninterruptible power supply. It’s a nice addition to the home server setup, as it both cleans the incoming power (not a great issue in our area), lets connected equipment stay on longer in case of a power outage, but perhaps more important, tells connected computers that the batteries are running empty and to turn off cleanly rather than having power cut abruptly.
As all things, accumulators in a UPS have a finite lifetime, and a while back mine required replacement. I bought a couple of off-brand but identical spec batteries on Amazon, to keep costs down, and plugged them into my UPS which promptly decided that it had no idea that these were fresh batteries.
Reading up a bit, I understood that I had to recalibrate the UPS, and this is the procedure I followed:
- First I charged the UPS completely, with no critical load attached.
- After that, I connected an old 300W halogen work light to the UPS, to achieve a stable but significant load on it. At this point all LEDs on the the battery charge indicator were blinking, which is a warning that according to the current calibration, UPS shutdown is imminent.
- I disconnected inbound power and let the work light draw power until the UPS turned off by itself. That took about 20 minutes.
- I disconnected the work light and reconnected power to the UPS, and let it recharge. Once done, I re-connected the work light temporarily, to confirm that the battery charge indicator no longer flashed when the UPS was under load.
- I reconnected my server and the Fibre converter for the Internet connection to my house back to the UPS, and turned everything on.
Current status:
$ sudo apcaccess
APC : <redacted>
DATE : 2024-06-30 13:33:11 +0200
HOSTNAME : <redacted>
VERSION : 3.14.14 (31 May 2016) debian
UPSNAME : <redacted>
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2024-06-30 01:41:09 +0200
MODEL : IBM UPS1500THV
STATUS : ONLINE
LINEV : 231.8 Volts
LOADPCT : 9.7 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 103.0 Minutes
MBATTCHG : 10 Percent
MINTIMEL : 5 Minutes
MAXTIME : 0 Seconds
OUTPUTV : 231.8 Volts
SENSE : Medium
DWAKE : -1 Seconds
DSHUTD : 180 Seconds
LOTRANS : 208.0 Volts
HITRANS : 253.0 Volts
RETPCT : 0.0 Percent
ITEMP : 28.3 C
ALARMDEL : No alarm
BATTV : 27.5 Volts
LINEFREQ : 50.0 Hz
LASTXFER : No transfers since turnon
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI : 14 days
STATFLAG : 0x05000008
MANDATE : 2007-09-13
SERIALNO : <redacted>
BATTDATE : 2024-06-12
NOMOUTV : 230 Volts
NOMBATTV : 24.0 Volts
FIRMWARE : <redacted>
END APC : 2024-06-30 13:33:23 +0200
So in case of a power failure, I have about an hour and a half of theoretical server power. Once the battery status reaches a critical point, the server will shut down in a controlled manner, leaving the rest of the battery to feed the minuscule needs of the fibre converter for another period of time.
For reference, my current /etc/apcupsd/apcupsd.conf
looks like this:
UPSCABLE usb
UPSTYPE usb
LOCKFILE /var/lock
SCRIPTDIR /etc/apcupsd
PWRFAILDIR /etc/apcupsd
NOLOGINDIR /etc
ONBATTERYDELAY 6
BATTERYLEVEL 10
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 127.0.0.1
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0