XBee Arduino Interfacing

Recently I’m getting a lot of queries regarding XBee, In this tutorial, I'm going to show you how to interface XBee with Arduino.

Nov 12, 2019

24132 views

6 respects

Components and supplies

1

Xbee Pro S1

1

Arduino UNO

Tools and machines

1

Premium Female/Male Extension Jumper Wires, 40 x 6" (150mm)

Apps and platforms

1

Arduino IDE

1

X-CTU

Project description

Code

XbeeArduino.ino

arduino

XbeeArduino.ino

arduino

Downloadable files

After Uploading The Code

1/ Open the Arduino's Serial Monitor. Make sure the baud rate is set to 9600. 2/ On your X-CTU click on console mode. 3/ Type something in the console view, it should show up on the Serial Monitor. 4/Now try typing something into the Arduino's Serial Monitor , then press send ,it should show up in the console view.

After Uploading The Code

The configuration of your XBee.

Channel = C PAN ID = 3332 DH = 0 DL = 0 MY = 0

The configuration of your XBee.

Proteus Circuit Diagram

Gnd Xbee - Gnd Arduino Vcc Xbee - 3.3V Arduino Tx - Rx pin D0 Arduino Rx - Tx pin D1 Arduino

Proteus Circuit Diagram

Add Your Xbee

Add Your Xbee

Assembling Hardware

Assembling Hardware

After Uploading The Code

1/ Open the Arduino's Serial Monitor. Make sure the baud rate is set to 9600. 2/ On your X-CTU click on console mode. 3/ Type something in the console view, it should show up on the Serial Monitor. 4/Now try typing something into the Arduino's Serial Monitor , then press send ,it should show up in the console view.

After Uploading The Code

Assembling Hardware

Assembling Hardware

Installing X-CTU

https://www.digi.com/resources/documentation/digidocs/90001526/tasks/t_download_and_install_xctu.htm

Installing X-CTU

The configuration of your XBee.

Channel = C PAN ID = 3332 DH = 0 DL = 0 MY = 0

The configuration of your XBee.

Proteus Circuit Diagram

Gnd Xbee - Gnd Arduino Vcc Xbee - 3.3V Arduino Tx - Rx pin D0 Arduino Rx - Tx pin D1 Arduino

Proteus Circuit Diagram

Add Your Xbee

Add Your Xbee

Documentation

Components Required

Components Required

Components Required

Components Required

Comments

Only logged in users can leave comments

Anonymous user

2 years ago

So why are you using softwareserial when you have the Xbee plugged into the the hardware serial? Demonstrating that you can echo text on a terminal isn't going to hold anyone's attention for long, though I agree it's a start. Do you think it's a good idea to start out with a long obsolete version of XBee (Series 1)? Series 1 and 2 have now been superceded by XBee 3. Series 3 will do everything that Series 1 and Series 2 could do with the addition of BLE and MicroPython, but a bit more complex to set up. Series 1 are still available, but at a price - recently over $60 on eBay. I picked up some Series 3 for under $15. I use Series 1 for line passing and for serial virtual wire. That also works on Series 3. In one setup, I have a Series 1 line passing to a Series 3

Fouad_Roboticist

2 years ago

Xbee's series 1 are simple to use, Doesn’t require any configuration to operate in peer to peer communication you can directly replace a wired serial connection with Xbee's series 1 , meanwhile xbee's series 2 & 3 are a little complex to use as these require some configuration even to work in peer to peer communication soo If you are just starting with XBee and your requirement just replace a serial wired connection it would be perfect to choose series 1 so yes it's a good idea to start out with a long obsolete version of xbee, otherwise it would be optimal to go with series 3 if you already got the skills.

Anonymous user

2 years ago

Series 1 is fine if you can get one. Series 3 in 802.15.4 firmware is no different to set up than Series 1, plus it's cheaper and has all the added advantages mentioned before. The only downside is the through-hole version isn't widely available, but the micro form just needs an adaptor (Digikey) and some 0.05" soldering skills.

Anonymous user

2 years ago

X~Bee Pro is a retired product.....according to your link.

Anonymous user

4 years ago

Your schematics diagram is wrong. The connections that should be done are RX to RX and TX to TX. Spent a few hours figuring out why it wasn't working.

JMcGraw

5 years ago

X~Bee Pro is a retired product.....according to your link.

Anonymous user

5 years ago

So why are you using softwareserial when you have the Xbee plugged into the the hardware serial? Demonstrating that you can echo text on a terminal isn't going to hold anyone's attention for long, though I agree it's a start. Do you think it's a good idea to start out with a long obsolete version of XBee (Series 1)? Series 1 and 2 have now been superceded by XBee 3. Series 3 will do everything that Series 1 and Series 2 could do with the addition of BLE and MicroPython, but a bit more complex to set up. Series 1 are still available, but at a price - recently over $60 on eBay. I picked up some Series 3 for under $15. I use Series 1 for line passing and for serial virtual wire. That also works on Series 3. In one setup, I have a Series 1 line passing to a Series 3

Fouad_Roboticist

2 years ago

Xbee's series 1 are simple to use, Doesn’t require any configuration to operate in peer to peer communication you can directly replace a wired serial connection with Xbee's series 1 , meanwhile xbee's series 2 & 3 are a little complex to use as these require some configuration even to work in peer to peer communication soo If you are just starting with XBee and your requirement just replace a serial wired connection it would be perfect to choose series 1 so yes it's a good idea to start out with a long obsolete version of xbee, otherwise it would be optimal to go with series 3 if you already got the skills.

Anonymous user

2 years ago

Series 1 is fine if you can get one. Series 3 in 802.15.4 firmware is no different to set up than Series 1, plus it's cheaper and has all the added advantages mentioned before. The only downside is the through-hole version isn't widely available, but the micro form just needs an adaptor (Digikey) and some 0.05" soldering skills.