Wireless Lab
Intro to the XBee Breakout Board
Since the XBee radio does not fit directly into our standard breadboards, we used a “breakout board” to connect the XBee to our system. Our soldering expertise came to play in this final lab as we had many tiny pins and sockets to carefully connect.
Connecting to Arduino
We connect the XBee (with breakout board) to the center of the breadboad, connecting:
- pin 1 (VCC) of the XBee to 3.3 volt power (red)
- pin 10 (GND) of the XBee to ground (black)
- pin 2 (DOUT) of the XBee to digital pin 0 (RX) on your Arduino (yellow)
- pin 3 (DIN) of your XBee to digital pin 1 (TX) on your Arduino (blue)
We also connected a 1µF capacitor to decouple the power supply and eliminate certain types of noise, because “The Arduino usually has enough decoupling on its own, however it’s a good habit and won’t do any harm.”
Making a Doorbell with a Button and a Buzzer
My board has a momentary switch between power and Arduino digital input 2:

My partner attached a red power lead of a buzzer to digital pin 5 of her Arduino board, with a black ground lead from the buzzer to ground.

Using the XBeeConfigTerminal program to Configure the XBEES:
We connected each XBee with a USB Serial adapter board and loaded the XBeeConfigTerminal program and used the following steps to configure the radios:
- We chose the appropriate serial port, (the one with “usbserial” in its name)
- Then we select a PAN ID between 0×0 and 0xFFFF to define your personal area network. WE CHOSE 0xBEEF.
- The network identifier: Enter ATID followed by the PAN ID you selected into the Tx: field. In our case, we enter ATID BEEF and press the Send button.
- Node identifier: Enter ATMY followed by the “my” address. For the first radio this is zero so we enter ATMY o and then press Send.
- Destination node identifier: ATDL 1 sets the destination.
- ATWR saves the whole thing.
- For the second XBEE, we repeat all of these steps, except swap the ATMY and ATDL settings.
Programming the Arduino
Finally we load the two programs that run the doorbell system. One goes with the button and the other goes with the output buzzer or bell. Code provided by the great Rob Faludi here. (NOTE: When uploading programs to the Arduino boards, disconnect the wiring from digital pin 0 (RX) first, then reconnect the wiring after loading.)
The second step is to add an LED to provide two-way feedback that the bell unit has received the doorbell button press and has rung.
Trials and Tribulations
After setting up our boards, configuring the XBees, and loading the code, our bell would not work. We knew the switch was wired properly but our radios were NOT making a connection. We tried everything, wired and rewired and reconfigured to make sure we did it right, and nothing. THEN, we figured it HAS to be a problem with the XBees were were using! It turned out that when we soldered the female sockets to the breakout board, they were so close and some of the solder connected the pins together. That rendered our boards useless. After 2 hours of trial and error and a bit of de-soldering, all was fine and running properly. FOR ALL OF YOU KIDS TRYING THIS AT HOME, DON’T BE A SLOPPY SOLDERER! You were warned :)