Configuring and using XBEE wireless modules using atmega

XBEE wireless modules

Xbees are some of the most powerful wireless modules you can find and they’re also very easy to configure and use. The only thing is they cost about Rs.1000 to Rs.2500 depending on the range and other parameters. If you’re like me and only bought the modules without the breakout boards or forgot to buy it, then you have to make the modules breadboard friendly to use it. I’ve made a PCB which converts the 2.0mm spacing of the pins of xbee to the normal DIP spacing of 2.54mm.

XBEE wireless modules

You can download the schematic and board files of eagle here. If you don’t have eagle you can download the layout in pdf format here.
You need to make two PCB’s, one for each module. If you don’t know how to make PCB’s check out my tutorial which shows you how to easily make PCB’s at home.
PCB’s after etching and drilling.
Now take a berg strip and break it into 4 parts with 10 pins each and push the pins to one side as shown.
To do this just put the strips on the PCB and push them against the ground and they’ll go inside.
Now put the 2.0mm strips and solder everything. Remember that since this is a single sided PCB, you have to solder the berg strip from the bottom. This will seem a little awkward but it saves you the need for a double sided PCB.
So now that we’ve made a breadboard friendly module, it’s time to configure them. Xbees come configured out of the box if you just want to use it as a UART serial link, they’re configured at 9600bps and their PAN(Personal Area Network) ID is set to 3332. Devices with same PAN ID can “see” each other i.e. they’re in the same network. But xbees can be used for so much more, e.g. you can directly use the built in ADC to sample values and send it directly without any microcontroller. There are also 8 digital I/O pins which you can configure as air wires.
Before you begin to do connect anything, please note that the VCC on xbee is not 5V tolerant, so if you’ve given 5V to the VCC, you might’ve already fried it. Most users say that the input lines are also not 5V tolerant but it seems to work fine for me. Components required:

  1. Xbee wireless modules
  2. USB to serial converter(if you don’t have a serial port)
  3. IC 7404(Inverter)
  4. 5V regulator (7805)
  5. 3.3V regulator(LD33V or LM3940), alternately you can use a LM317T to get 3.3V which is what I did.
Software required.
  1. X-CTU by digi

If you don’t have a serial port, then you’ll have to buy a USB to serial converter. It might say on the box of the converter that it is “fully RS-232 compatible”, but I’ve found that most converters are TTL compatible(RS-232 has signals going up to 25V, whereas TTL is 0 and 5V). This is a good thing, since you don’t have to use a level shifter such as MAX-232. If your converter is not TTL compatible, just substitute the 7404 with the MAX-232 along with the necessary components.

Make the circuit shown in the schematic on a breadboard and if you’re using an LM317, set it to around 3.1V by varying the 10K pot.

XBEE wireless modules Schematic

Leave a Comment

Your email address will not be published. Required fields are marked *