Wednesday, March 23, 2011

Using XBee Broadcast

OK, I have no life; I admit it.

I modified the sketch for the power monitor to transmit the power reading over my (brand new) XBee network. Now I can plug an XBee into my laptop and watch the power reading stream by every five seconds.  That was cool so I used a breakout board from SparkFun and added an XBee to the House Clock.  Now I have the time coming out every 10 seconds from it as well.  There were a couple of reasons for doing this:  First, I wanted to see what happens with collisions.  Second, how well do these things work over time?  They seem to handle collisions (where they both try to transmit at the same time) perfectly.  Never have a short or garbled frame from them.  The second item will have to wait a few days.

What was amazing is how easily it was to install the two devices.  I simply hooked up power, ground and transmit on one of them and found someplace to mount it.  It just worked fine, the very first time.  Not often one has this kind of thing happen.  Of course, I spent a couple of weeks figuring out how to use them.  The two deployed ones are running in AT (transparent) mode and just sending broadcasts so there is something on the network a lot of the time.  This is NOT the way one would work if there were battery operated end devices out there.  The battery devices would be on most of the time catching the broadcasts, but for now, this is a fine way to get more experience.

And yes, it is during peak period and I'm using a little over 700 watts.  This is a really good number, so far my demand number is running 1.4KW and my bill has stayed low.  Note that this is with my new swimming pool pump running water through my solar heater.  That used to take 2800 watts all by itself so I couldn't run it at all in the afternoon.  I'm so proud.


  1. Very cool stuff! Like HAL meets the tweet-a-watt. Keep it up!

  2. Dave, I'm uncertain how to connect a zigbee coordinator of a network to the outside world, e.g, the Internet. Can you point me to an example, tutorial, app note, or code snippet? Thanks very much.

    1. The problem is that it depends on what you want to do. Digi has gateways that can connect to the internet and interact with an XBee network that you can look at. I took the route of preprocessing everything so I could put up a web page and see things from there. There's about as many ways of doing this as there are people doing it.

      Drop me an email and tell me more.