Tweet a Watt

This week I completed my Tweet a Watt. What is a tweet a watt you ask? Lady Ada of Ada Fruit Industries made a cool DIY kit to hack a Kill-A-Watt device. A Kill-A-Watt is something you buy from Home Depot that plugs into an electrical outlet in your wall. On the front of it is a screen and another plug. The LCD screen tells you how much power the front plug is drawing. It is a neat passive device to monitor electricity. The only problem is the data goes straight to the screen and isn’t stored anywhere.

The Tweet A Watt kits has you hack into the Kill A Watt and install a Xbee transmitter. Next you make a USB Xbee Receiver to get the signal from the Kill A Watt via your computer. The last step is to send a twitter message about the power consumption from your Kill A Watt, thus the Tweet a Watt.

This week I finished making the hardware part of the tweet a watt kit. The new Kill a watts use surface mount ICs which make them a little harder to solder. Initially I was a little worried when I opened up the device. The surface mount ICs are on the screen side making accessing them even more difficult. I was able to solder them up correctly on the first try though so it wasn’t really a big roadblock.

I did my final tests to make sure the two pieces of hardware were talking to one another. Everything seemed good. It feels so good when a soldering project works the first time around. With the hardware working, I was off to the software. I wanted to get to the tweeting as soon as possible so I used Python 2.5 like Lady Ada suggested. Some of the files she links to are a little older now.

To get my Python 2.5 environment working in Windows I used.

  1. python-2.5.msi – referenced at: http://www.python.org/getit/releases/2.5/
  2. pyserial-2.5.win32.exe from http://sourceforge.net/projects/pyserial/files/pyserial/2.5/
  3. pywin32-216.win32-py2.5.exe from http://sourceforge.net/projects/pywin32/files/pywin32/Build216/
  4. I used Lady Ada’s Simple JSON (mine was 2.2.1) file she referenced
  5. I used her most recent watcher scripts as well

I installed the above software and found the COM port (mine was COM3) and the program barfed on line 56

ser.open()

I read up on windows and COM ports and basically windows opens the connection for you. I commented out this line

#ser.open()

and everything seemed to work. I ran watcher.py -d to calibrate my sensor. The watcher script is running and collecting data into the csv file. My tweets have not gone through but that is the next thing to fix.

I really have enjoyed this project so far and there is more to do!

Leave a Reply

Your email address will not be published. Required fields are marked *