2013-08-06

PandaBoard

Starting

   I bought this board over a year ago. After playing with it a little it went on my shelf along with the BeagleBoard. Now it seems I've found an usage for this. As a first task it will monitor UPS, possibly carrying more duties over time. From the past I recall the simplest installation for Linux was Ubuntu distribution. So I went to Ubuntu downloads page and picked 12.04 preinstalled desktop image for Texas OMAP4 processors. More details about which version to pick and how to flash it to the SD card (including BeagleBoard) can be found here. Also a great resource on OMAP architecture is omapmedia.org.

Hardware

   My PandaBoard is connected to the monitor through HDMI output using HDMI-DVI cable. The network is accessed over build-in WiFi card.

First Problems

   At the past I had no issues booting PandaBoard with Ubuntu. So naturally I expected it will be better this time. Apparently my DVI monitor doesn't work with the PandaBoard right now. I'm not sure if this is the matter of the HDMI-DVI cable I'm using right now (I used another cable in the past) or something other. The only way to bring the Ubuntu up is to disconnect the HDMI connector from the PandaBoard before it boots, which makes it configured with 1024x720 (or so) resolution. Then connect the cable once the system is fully up. The resolution is not the best but at least I can reach the system, setup WiFi and install sshd.

Bookshelf

  1. Installing Ubuntu 12.04 on Pandaboard with TI ppa.

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...