Showing posts with label wireless. Show all posts
Showing posts with label wireless. Show all posts

Thursday, October 13, 2011

XBee Doorbell Lab

For Rob Faludi's Sensitive Buildings class, we were told to make a wireless doorbell using two XBee radios. Since my router and coordinator radios were already set up from the previous chat lab, I was expecting this assignment to be a plug-and-chug exercise (we were even given the code!) However, when the project didn't work I embarked on an epic troubleshooting journey. I tested everything from contact continuity, to swapping XBees, recalibrating them, an even doing the entire chat lab over again.

I had it narrowed down to an issue between the Router Xbee's serial communication with its attached Arduino. The indicator LED on pin six would light up when I pushed the coordinator's button, but the test LED for my "bell" coming from the digital pin on the Arduino refused to light up. I even ran a "hello world" sketch just to make sure the arduino was functioning properly with the LED. Oddly enough, once I pulled the indicator LED off pin six, the Arduino's LED started working! It was dumb luck that I discovered this, and as far as I know, my classmates did not have the same issue. I'm now wondering if this is a documented bug or not. I'm meeting Rob tomorrow and will update this post once we've taken a look at it.

UPDATE! Somehow the solder joint on the power pin of the XBee breakout board broke, but there was still a thin connection being made to the XBee. It was getting just enough current to either light the indicator LED, or send the serial communication to Arduino, but not both at the same time, which explains the strange problem I was getting. Once all the solder points were warmed up everything then worked like a charm.

Saturday, October 1, 2011

Chatting with XBee

After setting up one XBee as a coordinator and one as a router using a PC, we hooked the Xbees to two separate Macbook Pros and went through the process of setting AT commands so they'd be able to talk to each other.

Using CoolTerm to do this was a blast from the past, as many of these commands were familiar to me from my days as a teenager dialing up and running BBSes. It's funny how the same technology is used all these years later.

The instructions in the text were clear enough for the most part, but it was a bit unclear as to how to set the XBee ID. It seemed that we were being told to set the ID of both units to the coordinator's ID, but it turned out we had to set a different ID for each unit instead. This was clarified in the "Troubleshooting" section later on.

Another problem was that after opening up communication with the "+++" command on the terminal program, it was difficult to refer to the instructions and type in the necessary commands before the terminal program reset itself and you had to type in "+++" again. A longer delay time definitely would have helped because we had to make several attempts during the setup due to this problem.

In the end we got it all to work perfectly, and here's the screenshot to prove it!
XBees Talking to Each Other