Every house needs a monitoring system. There is so much equipment that deserves to be monitored, logged and reviewed. Data acquisition devices have typically been expensive or dedicated to the Microsoft Windows environment. This page describes the installation of a low cost and versatile USB data acquisition device for monitoring a home standby generator that works with Linux and Microsoft.
DLP Design creates a multitude of USB data acquisition products. The DLP-IO8 is a USB based, eight port Input/Output (I/O) device. Its ports can function as digital inputs, digital outputs, voltage inputs or temperature inputs. The device is easy to use and is very inexpensive at $29.95. The DLP Design web site offers vendors for purchase. It looked like a good buy so a project was started to build a home standby generator monitoring system based on this I/O device and a Linksys NSLU2 unslung network attached storage computer.
NSLU2
The NSLU2 Linux pages provide a wealth of information about adapting the Linksys NSLU2 to a tiny inexpensive Linux system. One NSLU2 USB port can be used for a thumb drive file system and the other port can be used for the DLP-IO8 USB I/O device. The NSLU2 can be purchased for as little as $75 on frequent Internet sales. These pages will only briefly touch on the configuration of the NSLU2 and focus mainly on the DLP-IO8.
PERL, ntp, openssh, serial io, ftdi serial drivers and the coreutils ipkgs were installed using the NSLU2 Linux references. This provides a great platform for a standalone small, quiet, low power monitoring system with eight I/O points.
DLP-IO8
The DLP-IO8 is addressed with single ascii character commands. The command addresses one of the eight ports and the DLP-IO8 returns the port value. Some trouble with incomplete lines was encountered when reading temperatures so the following PERL snippet was used to read the line until the carriage return was received. The device terminates each line with a newline then a carriage return. Many more experienced programmers may know a more elegant method to read the port. One goal of this project was to use all PERL and minimize the use of PERL modules. The memory in the NSLU2 is only 32MB and its best not to use the swap space to minimize wear on the thumb drive.
# send the DLP ascii command syswrite(DLPPORT, "$Command", 1); # read until the end of the line until (($char =~ /\r/) or ($CharCount > 15)) { sysread(DLPPORT, $char, 1); $line = $line . $char; $CharCount++; }
The DLP-IO8 presents a high impedance when used as a digital input and some noise induced false high inputs were observed early in the prototyping. Pull-up resistors were added to overcome the false inputs. The normal input condition pulls the input low with alarms letting the pull-up resistor pull the input high. Since the port can also be a digital output, a series current limiting resistor was also added to avoid damaging the DLP-IO8 in the event a digital out command was accidentally sent to the device. The configuration was prototyped on a breadboard and tested with an input simulator made up of several low cost automotive toggle switches Walmart.
A Radio Shack project box was modified to accommodate four Category 5e RJ-45 jacks. The DLP-IO8 and resistors were moved to a perf board and installed in the project box. The completed system is compact and was connected to the generator contacts and indicators via the RJ-45 jacks.
Generator Interface
The monitoring system was built to monitor the following status on a Briggs and Stratton 10KW home standby generator.
- Utility power status
- Panel power
- Generator power
- Generator trouble alarm 1
- Generator trouble alarm 2
- LED status indicator
Relays were added to provide low voltage contact closures for the Utility and Generator power. Installation of 240VAC relays must be done by a qualified electrician. Dangerous voltages exist in a generator. The relays could have been added in the automatic transfer switch but access to the generator was easier. The generator control board includes two trouble alarm relay contacts. An optical isolator was built to monitor the LED status without interfering with the generator system grounds. An optoisolator such as a 4N25 could be used but they were not available at the local Radio Shack. An IR emitter, photo transistor was used to construct a home made opto isolator. The IR emitter was wired in series with the status LED. It was important to monitor the LED because it indicates if the generator system is enabled. An alternative to a relay on the panel power was developed because there was no accessible place in the ATS or power panel for a relay. Instead a old Motorola cellular phone charger was used. The charger was wired into an NPN transistor and then to a DLP-IO8 input. The charger was plugged into a receptacle powered by the generator panel but not on a UPS.
Completed Project
The completed project was installed on a shelf. The shelf was mounted under a desk near the household computer system. The system is powered from the household computer UPS so it can ride out the brief outage between loss of power and start of the generator.
Typically two alarms are received each week. The generator does a weekly self test generating a Running and a Stopped alarm. The alarms send an email to a notification list. The alarms are also logged. In the event of an actual power failure several alarms will be generated and mailed.
Project Parts List
- Linksys NSLU2
- DLP Design DLP-IO8
- 2.2K ohm pull-up and limiting resistors (Radio Shack 271-1325)
- IR / phototransistor pair (Radio Shack 276-142)
- Surplus Motorola cellular phone charger
- 240VAC SPDT cube relays (B&B Electronics 781XAXML-240A)
- Cube relay sockets (B&B Electronics 70-781D-1)
- Project box, perf board.
No comments:
Post a Comment