Saturday, June 25, 2011

The Beginning

We spend increasing amounts of time away from our house, and I always worry about whether it is freezing in the house, pipes are leaking, power has failed, which can produce ugly consequences for food stored in refrigerators and freezers and whether the door has been opened, or left open indicating intrusions.

Here's a picture of the house in the winter of 2010, indicating one source of worry:



This blog is about my efforts to create a wireless monitoring and control system to answer questions about the basic state of our home. Not only that, but  that can be endlessly customized by adding sensors, remotely controlled switches and remotely accessed software to perform open-ended functions at home. I plan to update the blog as the design progresses. My hope is that others can benefit from my experiences in building their own systems.

The system needs to be reliable and inexpensive to operate on a monthly basis. In particular it could not require an internet connection at the home being monitored, since we live in a rural area that has only wireless internet connectivity, which is relatively expensive if used just for the home monitor. The availability of inexpensive GSM modems and text messaging (Short Message Service, or SMS) plans suggested their use for this purpose. GSM modems can be purchased for as little as $30 and AT&T cell phone plans can be had for as little as $30 every 4 months, with text messages costing about a penny ($0.01) per message if no voice time is used.

My first attempt at a monitoring system was to use a telit 865 GSM modem with an internal temperature sensor and multiple digital inputs and outputs. I connected one of the digital I/Os to a house power monitor to indicate whether there had been a power failure. The Telit modem allowed for running 'AT' commands issued in text messages, and with no programming I could interrogate the temperature of the chip (which was close to room temperature due to the low power dissipated on the chip) and the house power digital input bit. I rigged up a 6V lantern battery through some diodes and voltage matching circuitry to supply modem power when house power fails. I will not go into detail on this, my first blog entry, on this system since I currently no longer use the Telit modem.

The Telit approach was less flexible than I anticipated, in programming convenience (it uses embedded Python which I did not get going well enough to do what I wanted), I/O capabilities, database functionality and numerous other things I thought I might want to do with it. My current system is based on a USB GSM modem, which cost about $30 used, an old Asus netbook I bought several years ago (the first netbook on the market), a SIM card which I initialized as an AT&T Go-Phone account, an Arduino microcomputer board with 6 analog and 12 digital I/O lines and some custom circuitry to measure temperatures and digital bits. I program the system using Tcl/Tk, which allows me to run programs on a wide variety of computers, freeing me from needing to use any particular computer or operating system and allowing me to update inexpensively using newer cheaper laptops.

In development I use Dropbox to share source files between the Asus and my main development computer, an old IBM T42 laptop. I edit on the IBM, and run the programs immediately on the Asus computer.

The system uses wired sensors at present, but I plan to switch to using wireless devices based on the work of Jean-Claude Wippler at Jee Laboratories in the future. See http://jeelabs.org/

I'm out of time for now, but plan to continue ASAP.

No comments:

Post a Comment