Tweet-A-Watts: Wireless logging of point of consumption electricity data

he Tweet-A-Watt DIY wireless power monitoring project is the brainchild of the generous Limor Fried (Lady Ada), of Adafruit Industries and ladyada.net. The mail-order electronics kit provides everything you need to modify a Kill-A-Watt power monitor to wirelessly record its data to a local computer via XBee RF modules. The project is called “Tweet-A-Watt” because it comes with open-source code to tweet the data to a Twitter account, but once you’ve got the unit working you can do whatever you’d like with the data.

In order to drive my energy use feedback prototypes for my research with live data, I bought the parts to build a pair of Tweet-A-Watts. So far I’ve built one of them. The instructions from ladyada.net are top-notch, and the kit provides everything you need. With a few tools and some good music, I was contentedly soldering away for hours.

Here are some photos and notes about the process. These are not instructions, just some notes on some of the minor issues I ran into and how I resolved them.

XBee Receiver

XBee Receiver Parts

XBee Receiver

XBee Receiver

XBee Receiver

XBee Receiver

The XBee Receiver build

  • You have to use Windows to configure the XBee modems. It was hard to find a reliable download of the necessary software, X-CTU. Finally found it here: http://www.digi.com/support/productdetl.jsp?pid=3352&osvid=57&s=316&tp=5&tp2=0.
  • After getting X-CTU installed, I ran the software update which downloaded a variety of firmware upgrades (XBee, ZigBee).
  • At first Windows didn’t recognize the USB-Serial cable connection, but to my surprise running the Found New Hardware Wizard actually worked and it installed it correctly. Maybe Windows can do some things right.
  • The first XBee module wouldn’t communicate, resulting in the message “Unable to open COM port.” So I swapped it out for the other one in the kit, and it worked. Of course, when I replaced the first one it worked as well, so I think this was just a ‘reset’ issue rather than any problem with the hardware.
  • I think in my case it was unnecessary to upgrade the firmware as suggested (http://www.ladyada.net/make/tweetawatt/config.html), as the XBees were already running 10E6, but I did it anyway in case there were any accompanying changes to be made.
  • I happened to have some letter labels around, so I labeled the two modems, which are configured differently for reception and transmission, with R and T.

XBee Transmitter

XBee Transmitter Parts + Kill-A-Watt

XBee Transmitter

XBee Transmitter

XBee Transmitter

The XBee Transmitter build

  • Lacking a handy heat supply to shrink the heatshrink tubing, I used my soldering iron, which worked great.
  • I didn’t leave quite enough length on the 220uF capacitor leads, so the XBee module fits a little tight on top of it.
  • LED holeTo drill the hole in the Kill-A-Watt, the Lady Ada instructions suggest a 3/8″ bit. I wanted a more precise fit for the LED. I initially tried 3/16″, which was slightly too small, then stepped up to 1/4″. I think 7/32″ would actually be about perfect, as there’s play in the 1/4″ hole.
  • I would also suggest drilling closer to the back of the plastic, as the Transmitter sits quite close to the back and I had to bend the LED leads to get it to poke out the top.
  • The numbers of the pins on the LM2902N chip are not labeled. With the notch pointing downwards, it is numbered from the lower right 1 to the top right 7 to the top left 8 to the bottom left 14. Notes on my Flickr picture of the chip have them labeled: http://www.flickr.com/photos/johnnyrodgers/4619837742/in/set-72157624089103652/
  • I got halfway through configuring the transmitter using the X-CTU terminal, but it stopped replying OK to the commands. Then I couldn’t get a connection using Test/Query. It turns out this was because after writing the sleep mode command, the XBee of course began sleeping and waking at 2s intervals, rendering it unavailable for communication. Resetting it and configuring the parameters in the Modem Configuration window ended up being simpler.

Completed XBee Receiver and Transmitter

The completed XBee Receiver and Transmitter

Disassembled Kill-A-Watt

Kill-A-Watt + Transmitter

Kill-A-Watt + Transmitter

Connecting the Transmitter and Kill-A-Watt

Software

  • After completing the hardware, I was at first unable to connect to the XBee receiver in X-CTU (“Unable to open COM port”). The green LED was lit, but the red LED was off, indicating it was not communicating with the transmitter either. Then I realized I had replaced the XBee modem backwards! Unplugging the FTDI cable, reorienting the modem and reconnecting it of course solved the problem.
  • The wattcher.py script was showing a 14W draw before calibration, 0-2W afterward.
  • In order to connect to Google PowerMeter, I had to download the latest Tweet-A-Watt software from GitHub, as the PowerMeter code was only added to the project on May 15th!
  • I couldn’t sign up for Google PowerMeter using http://www.google.com/powermeter/about/get-powermeter.html, as that page asks you to choose either a utility or endorsed device. However, Lady Ada provides this link:
    https://www.google.com/powermeter/device/activate?mfg=Adafruit&model=Tweet_a_Watt&did=AF000002&cvars=0&dvars=1, which worked.
  • Google PowerMeter: Tweet-A-Watt So far I’ve been unable to get a good match betwen the Watt draw showing on the Kill-A-Watt LCD and the data from the transmitter. It’s consistently out by 2 to 15W. I’ve tried re-calibrating, but am getting wildly varying ampdata values, between 470 and 522. Not sure what I should set my calibration to for sensor #1 in wattcher.py. Also not sure if you’re supposed to calibrate all the sensors, or just that one…? This is one place where the instructions aren’t super clear.
  • It turns out you can’t embed the Google PowerMeter gadget into other web pages, only ‘share’ it by email. I assume this is for privacy reasons, but my feeling is that it’s my data and I should be able to post it where I’d like.

Receiver + laptop

Receiver up and running on my Mac

Great project! I really enjoyed the DIY process and playing with the electronics. Thanks to Lady Ada for the effort. Now to continue prototyping the ambient feedback displays that this unit will drive!

Full Flickr set of the project available at: http://www.flickr.com/photos/johnnyrodgers/sets/72157624089103652/.

Tweet-A-Watt