2013-07-31

Power Outage

   Where I live the power grid is very stable it is rare to have a power outage. But for the summer most of our family move to a countryside house. And here is a different situation - when it is stable, it lasts for a week or longer. However we might have a couple of short power outages daily when we have a bad day. This is not an issue for typical house appliances like a dishwasher, refrigerator or a laptop (this has its own battery pack). But it is more painful for Internet modem - when it resets I'm loosing VPN and all connections I've established. Given the fact I work from home, that's can be very annoying and it makes my work difficult. Power outage is also particularly painful for our NAS which we take with us to this temporary location. When it looses power, it needs to fsck all disks it has and sometimes it doesn't work. Recently I spend over 3hrs reinstalling Logitech Squeezebox Server at NAS for it didn't start after one of reboots. It was actually more than I could stand so I picked from my dusty cellar an old UPS: APC Smart UPS 700. It was without battery - but it uses two popular 7Ah gel batteries and I found a replacement easily and it was relatively cheap. Once I inserted new batter UPS works like a charm.

   To my surprise I found an information this UPS produce full sine wave when on-battery. That's a nice feature!

   Right now it powers my internet access modem and the NAS only. The next challenge is to connect it with the internal network to propagate an information (SNMP) about power failure. It would give the NAS a chance to shut down gracefully before UPS is out of energy.

  APC Smart UPS 700 can communicate with the outside world in a proprietary protocol through its DB-9 RS232 (2400 baud) connection. However you cannot use a typical DB9 RS232 cable to connect to it. An adapter is required for this because the usual 2-3 pins have been mapped to 2-1 pins. Here is a wiring diagram:
      After I prepared the cable I had to connect it somehow to the UPS. My choice for a temporary monitoring hardware was PandaBoard which has been lying on my shelf much over a year. I installed Ubuntu 12.04 on PandaBoard and setup apcupsd as a monitoring hardware. Installing Ubuntu at PandaBoard and optimizing it is a long story worth of a separate article.

External links on the subject

I've already found some interesting pages on this subject, here is the list:

  1. APC UPS Daemon - this is a software I recall from the late past and used it with APC already.
  2. Configure APC with Smart UPS
  3. Network UPS Tools.
To be continued...

No comments:

Post a Comment