Getting Started with XBee Series 1

XBee Series 1 (XBee 802.15.4)

Series 1 are the easiest XBees to work with, they don't need to be configured, but they can benefit from it. We highly recommend the Series 1 for anyone just starting out with XBees because of their ease of use. For point to point communication, these modules work as well as the Series 2 but without all the work. A Series 1 module won't say "Series 1" on it, but it also won't say "Series 2." If it doesn't say then your module is a Series 1. Series 1 and Series 2/2.5/ZB hardware are NOT compatible. Don't try to mix and match, don't even think about it, it won't work, not even close. Nope, stop thinking about it...! 

Now once you've gotten your XBees we need to get them up and running. Here are 2 tests to get your XBees up and running and doing something useful. Once you've got them up and running you can add a few sensors and have fun with home automation, build a remote for your new robot, add to you favorite PJs or check your dog's food dish.

The quick and easy test

This test shows you that the XBee modules are talking to each other, but it is not that useful.

What you will need:

What to do
Step 1: Turn on both computers
Step 2: Plug 1 XBee Explorer into each computer (or both in the same if you are only using one computer)
Step 3: Install FTDI drivers, and find the correct COM port for each device
Step 4: Plug XBees into XBee Explorers
Step 5: Open a terminal window and connect to the COM port associated with the XBee Explorer connected to that computer. (or 2 terminal windows each connected to a different COM port if you are using 1 computer)
Step 6: Send text, commands etc. on one terminal window
Step 7: Watch the text, command etc. show up on the other terminal window

Once you've gotten this up and running you can see the XBees sending singals to each other.  But there are better ways for computers to talk to each other, so what else are XBees good for, well lets try another example.

The still quick and easy but more useful test

This test connects your computer to your Arduino and allows you to send commands from your computer to your Arduino. This test assumes you've done the quick and easy test and have the FTDI drivers installed, as well as the Arduino software and drivers.

What you will need:

Note: The Wireless Shield Kit comes with 2 XBee Series 1 modules, 1 XBee Explorer, 1 XBee shield and a set of headers

What to do
Step 1: Assemble XBee shield with headers and put on Arduino (as with all shields headers must be soldered on to ensure a good connection)
Step 2: Upload the XBee example code onto the Arduino - code is under File->Examples->Communication->PhysicalPixal (optional: remove Arduino and connect to external power source).
Step 3: Plug 1 XBee into the XBee shield, and the other into the XBee Explorer
Step 4: Plug the XBee Explorer into the computer
Step 5: Open a terminal window and connect to the COM port associated with the XBee Explorer
Step 6: Type 'H' and 'L' in the terminal window
Step 7: Watch the Arduino turn a light on and off

Note:  You can not program the Arduino with the XBee connected to the RX/TX line, so if you keep getting an error while uploading code, check to make sure your XBee is disconnected.

Some notes on configuration

With an XBee explorer and the X-CTU software you can change the configuration on your XBees. You can do everything from putting the XBee to sleep for a while (to save battery life), to using the XBees input and output pins. Once you learn how all the configuration stuff works you will realize that these are pretty powerful little blue chips. Here are a couple of the more popular configurations settings available on the XBees.

Pan ID - When you get your XBee they all have the same Pan ID, basically they are all part of the same network. This is usually fine, but what about when you are trying to automate your home, and your neighbor is running a remote controlled car. Every time his car goes forward the temperature in your house goes up, that's probably not a good idea. Change your XBees to a different Pan ID and they won't be talking to your neighbors XBees at all.

Baud rate (Serial Interfacing->BD-Interface Data Rate) - The default baud rate is set for 9600, but sometime you need something different. If that's the case you can change the baud rate.

Some Resources

X-CTU Software - This software is required for the Series 2 modules to change the firmware, and helps you configure the modules. You can also configure the modules using AT commands, but for those who want a graphical user interface this is the way to go.  The software is only available for Windows.

Building Wireless Sensor Networks - This book focuses entirely on the Series 2/2.5/ZB modules and the only time it mentions the Series 1 modules is to say it doesn't talk about them.  But most of the configuration settings are the same for both modules and reading the book will give you a better understanding of the differences between the two, the advantages of the Series 2,  and a better understanding of how XBees work in general.

XBee Introduction - Info on what's what in the complicated world of XBee.

Datasheet - Well its a sheet with data.

Comments 3 comments

  • What to do step 2. There is no Xbee sketch in File>examples>communication in Arduino 1.0.1 that I can see.

    • Its not an XBee sketch. Its called Physical Pixel, but it should be in Arduino 1.0.1.

      • why is there a large section of that code commented out? Is it supposed to be like that? When the code runs, will it create the box as (I believe) it is intended too? I really don’t understand why that code is there if it’s commented out… can you help?