Friday, 16 March 2012

Belkin BU30x000 UPS

I have had a Belkin BU304000 UPS under my desk for a while and I have finally pressed it in to service. It is now running my Broadband router, NAS and a Western Digital 1TB MyBook.

UPS Turns off after 5 minutes on low load

Unfortunately the UPS has a "feature" where if it is "Not Loaded" it will switch off after five minutes. This is documented in here:
The UPS switches off after a few minutes on battery
The Superior Series and Active Battery Backup series UPS will switch
off after about 5 minutes on battery when the load is very low, below
approximately 50 Watt.  The UPS is therefore unsuitable to power just
one or two low power devices like modems or routers.
This is done to prevent the UPS from completely discharging its battery
when there is no computer connected with software to tell the UPS when
to shut down.  This behavior cannot be changed; the UPS is designed to
power a computer.
My NAS is a Cisco / Linksys NSLU2 ("Slug") which has been hacked to run UnSlung: (V2.3R63-uNSLUng-6.8-beta). To my mind this *is* as computer. What's more it is monitoring the UPS. Yes it is low powered but if it is talking to the UPS why doesn't the UPS stay up?

The Answer - Not so Green

Further research revealed that the Belkin UPS seems to be a badged version of the Direct UPS Vista Pro 400, 600, 800 model. In the Download page there is a document: Remove Green Function VP800 which identifies this shutdown after 5 minutes on low load as "The Green Function". Furthermore, if you don't want this function then you need to remove Resistor R15A.



So I removed the R15A 1KOhm resister and it now stays up beyond the 5 minutes.


!!!DO NOT ATTEMPT THIS UNLESS YOU KNOW WHAT YOU ARE DOING!!!
!!!THERE ARE HIGH VOLTAGES IN THE UPS EVEN THOUGH IT IS OFF!!!
also it will invalidate your warranty

References:


Belkin UPS: http://www.belkin.com/uk/activebattery/
Direct UPS documentation: http://www.directups.com/download.html
Cisco Linksys NSLU2: http://homesupport.cisco.com/en-us/wireless/lbc/nslu2
UnSlung: http://www.nslu2-linux.org/wiki/Main/HomePage
Network UPS Tools: http://www.networkupstools.org/

UPS NUT Configuration:

Plugging the UPS in to SLUG and running lsusb shows that it presents itself as a USB to Serial device:

-bash-3.2# cat /proc/bus/usb/devices
T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0665 ProdID=5161 Rev= 0.02
S:  Manufacturer=Cypress Semiconductor
S:  Product=USB to Serial
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbdevfs
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
So, I installed NUT (2.4.1-1):
-bash-3.2# ipkg install nut
And configured the ups to search for that device:
-bash-3.2# cat /opt/etc/ups.conf
[belkin]
        driver = blazer_usb
        port = auto
        vendorid = 0665
        productid = 5161
        #explore # required for later NUT versions
        #pollinterval = 10
        desc = "Belking UPS"
Now running blazer_usb shows that it can talk to the device:

/opt/bin/blazer_usb -DDDDD -u root -a belkin
So, configured upsd.conf:
-bash-3.2# cat /opt/etc/upsd.conf
LISTEN 127.0.0.1 3493
hosts.conf:
-bash-3.2# cat /opt/etc/hosts.conf
MONITOR belkin "Local Belkin UPS"
and an empty (for now) /opt/etc/upsd.users
Created a start up script /opt/etc/init.d/S90ups to start:
/opt/sbin/upsd -u root
/opt/bin/blazer_usb -u root -a belkin
Now we can inspect the UPS via:
-bash-3.2# upsc belkin
battery.voltage: 13.60
battery.voltage.nominal: 12.0
beeper.status: enabled
driver.name: blazer_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.productid: 5161
driver.parameter.vendorid: 0665
driver.version: 2.4.1
driver.version.internal: 0.03
input.current.nominal: 1.0
input.frequency: 50.1
input.frequency.nominal: 50
input.voltage: 232.3
input.voltage.fault: 232.3
input.voltage.nominal: 230
output.voltage: 232.3
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 2
ups.productid: 5161
ups.status: OL
ups.temperature: 25.0
ups.type: offline / line interactive
ups.vendorid: 0665
Notes:
  • The /opt/etc/upsd.{conf,users} files must not be world readable
  • Yet to set up any monitoring to do shutdown - need to solve 5 minute shutdown first
  • I have also set it up be accessible from the web server on the NAS by linking "ups" in the html root to "/opt/share/nut/html" and copying "/opt/etc/upsstats-single.html" and "/opt/etc/upsstats.html" from the samples. Also linking /opt/cgi-bin/ups* to the cgi-bin:
-bash-3.2# ls -l /home/httpd/html/cgi-bin/nut
total 0
lrwxrwxrwx 1 root root 25 Mar 13 14:27 upsimage.cgi -> /opt/cgi-bin/upsimage.cgi
lrwxrwxrwx 1 root root 23 Mar 13 14:27 upsset.cgi -> /opt/cgi-bin/upsset.cgi
lrwxrwxrwx 1 root root 25 Mar 13 14:27 upsstats.cgi -> /opt/cgi-bin/upsstats.cgi