Gilad and I continued working on RoofLink, a network of XBee radios for datalogging voltage readings from ITP’s solar panel. The problem we ran into last semester was keeping a steady supply of power to the XBee circuit on the 8th floor. For reference, here’s the original diagram again. But now, with the firmware upgrade to the radios, no PIC chips are necessary, and we’re powering the 12th floor circuit directly off the solar panel’s leads. This way, when the sun goes down, the circuit is turned “off” and the 8th floor XBee can get a good night’s sleep. Perfect, since there’s no data to log then anyway.
XBees consume 3.3V and 10mA (with no LEDs) in their “awake” operational state. With LED indicators for power, sending and receiving, they use 60mA.
MaxStream has a great app for configuring and testing the XBees, X-CTU, which you can download here (Windows only). This made adjusting the settings so much easier than when we were using Terminal/Screen and typing in AT Commands. That was much more tedious, and you’d only have a short window of time to enter new commands after the +++. Here’s a nice screenshot courtesy of Faludi. Also gives you details on commands and settings.
Tom guided us on using X-CTU’s handy features, and how to eliminate the PICs. Here are most of the settings:
Under ‘Modem Configuration’, select Always Update Firmware and Version 10A2.
#0 (12th Floor)
MY 0
DL 1
IR 17 (Sample rate)
IU 1
IT 5
#1 (8th Floor)
MY 1
DL 2
SM 4 (Cyclic sleep mode)
SP 214 (Cyclic sleep period)
ST 30 (Time before sleep)
GT 40 (Guard time)
DP 3E8
IU 1
IT 1
#2 (4th Floor)
MY 2
Will note other settings soon…
During testing, we used a DC Bench Power Supply to act as the solar panel. Got a Processing reading of 446 when feeding circuit 10V, but we’ll test other values to get the most accurate translation for datalogging.
Notes on Sleepy Time:
We tried a few approaches in sleeping the 8th Floor XBee. With Sleep Mode 5? (gotta double check this), we couldn’t wake the sucker up - had to manually reset the radio and exit out of that mode. Then we also tried this example from MaxStream, requiring a Coordinator/Remote relationship, but this wasn’t successful for us either. Eventually, it appeared to be a balance of timing between #0’s IR and #1’s SP and ST settings, with #1 set to Cyclic Sleep Mode. If #0 sent samples too fast, #1 would never have a chance to sleep; but on the other hand, if too slow, #1 wouldn’t catch any packets and keep returning to sleep. With current settings, readings come through every 15-16 seconds.
Amperage Measurements:
XBee #0
regular 6.0 mA
no LEDs 10mA
XBee #1
Cyclic sleep 24.5mA
Cyclic sleep, no LEDs 0.17 mA, with 2.16mA “burst” during sending of data
XPort Notes:
For the XPort on the 4th Floor circuit, updated Connect Mode from D4 to C4 (need to note why here). This was done just by telneting into the XPort’s IP address via Terminal and using port 9999. No need to do any of that hardware setup like when you initially configured these - takes you direct into Setup.
TO DO:
- Review incoming values and adjust code
- Update PHP script for datalogging, add Cron Job
- Measure 9V battery life (new battery placed around 1:30am 1/31/07)
#0 - 12th Floor Circuit. Using Sparkfun FT232 for configuration

Setup with DC Bench Power Supply, and testing packet sending with Processing app from Tom Igoe

#0 - 12th Floor Circuit, with “resistor tree” enclosed in shrinkwrap tubing (just to have less exposed components)

#1 - 8th Floor Circuit. When sleeping, the green LEDs blip periodically. Yellow LED indicates both sleep and receiving of data.

Screenshot of data parsing using Tom’s PHP socky script, with some javascript data viz from David Nolen. Clearly, we’ve still got some tweaking of our readings to take care of. To be continued…