Hi. This Instructable will guide you through the process of wirelessly  programming your Arduino using two XBees. I just finished designing a wireless EEG system with the XBee modules, so I've become quite fluent in their programming and have just now been able to accomplish this. It still amazes me how difficult it has been to try to wirelessly program the Arduino. On top of that no one has been able to do this with the series 2 XBees (that I know of... and I've looked hard). However I do not see why this method cannot be extended past the series 1 or 2 and used for the 900MHz series as well. You just need to make sure that the XBee is capable of acting as a transparent serial link. 

    Being able to wirlessly program your Arduino can come in immensly handy. This means you can set up your Arduino in a remote location that is hard to access and still be able to program it. For example, if you want to measure climate data in a harsh enviroment. This would require you to seal your device, and make it combursome to program. However, with this rig not only can you still program the Arduino inside from over 90m away, but also recieve data from your sensor wirelessly too.

Its my first Instructable so any feedback would be much appreciated!

In order for you to accomplish this you will need to:

    1) Have two XBees. They can be any series I believe, but they have to be a pair of the same series
    2) Have an appropriate method of connecting one XBee to your computer, and another to a circuit.
    3) Build a small circuit that incorporates a Arduino. Can be a standard board such as the UNO or solely the microcontroller with     accompanying crystal and capacitors. 
    4) Have an another Arduino bootloaded with the Duemilanove bootloader. This will be the Arduino that is programmed wirelessly.

For example, I used:

    1) Two series 2 modules.

    2) A USB explorer for connecting to my laptop, and a explorer regulated for connecting to my circuit.

    3) A ATMEGA328p-pu microcontroller that was soldered onto a shield.

    4) A Arduino UNO board, but I re-burned the chip to have the Duemilanove bootloader instead.

Step 1: Programming the XBees

    Here we are going to program our XBees to the right communication settings for the project. I was using series 2 modules so as far as I know these steps work for series 2, but should be able to be adapted for any module. The end goal here is to setup a wirless transparent serial link operating at 57,600 buad.

1) Connect the XBee that is going to connect to your destination Arduino that is going to be wirelessly programmed, to your USB explorer and open up the XCTU program to program the XBee.

2) Program your XBee according to the "reciever" settings file I uploaded. Just load the file and click write. If you cannot access the file, then just program it as a Router in AT mode, and change the serial interface baud rate to 57,600. Remember to change your destination address accordingly. You want your detination address to be all zeros, indicating that you are transmitting to the cordinator.

3) Now connect your XBee that is going to stay connected to your computer to your USB explorer and open up XCTU again. This program can be found on the sparkfun link to the XBees I attached on the previous step.

4) Program your XBee according to the "transmitter" settings file I uploaded. Just load the file and click write. If you cannot access the file, then just program it as a Coordinator in AT mode, and change the serial interface baud rate to 57,600. Remember to change your destination address accordingly. You want your destination adddress to be the address of your reciever.

Now pop back your "reciever" XBee into your explorer regulated and wait for the next step to plug it into the circuit.
<p>Does it support in arduino Uno bootloader?</p>
I have xb24-z7-004 xbee its not detecting on xctu can help me
<p>I have a Xbee S1 and a Xbee s2. How can I establish a wireless communication between a PC and an Arduino with these bees?</p>
<p>does anyone know how to send a value in terms of floating point from one arduino to another arduino using xbee series 2...i want to complete this project within this month... please anyone help me..if u know the code please send it to krishnansadasivam96@gmail.com</p>
<p>the float which you want to send multiply with 10,100 or 1000 based on your requirement now it in integer form transmit via xbee after receiving at receiver in your programming divide it with same number 10,100 or 1000 </p><p>ex : float a=98.67</p><p>int b = a*100</p><p>now b=9867</p><p>xbee.print(b)</p><p>at receiver int a= xbee.read()-'0'</p><p>float b= a/100</p><p>now b= 98.67 </p><p>but you should have idea on transmit and receive program</p>
<p>hey could you help me</p><p>I have to send 3 sensor values (temp,humidity,Ldr) via xbee series 2 and receive them at other arduino-xbee</p>
Can i transmit and receive voice signal by xbee module ...!?
<p>what is the wiring and layout of the shield, what program that made <a href="https://www.instructables.com/files/orig/FP2/4Y1R/HAQ3217E/FP24Y1RHAQ3217E.sch" rel="nofollow">https://www.instructables.com/files/orig/FP2/4Y1R/HAQ3217E/FP24Y1RHAQ3217E.sch</a> i can't find the program that made it.</p><p>thanks</p><p>keith </p>
<p>hye bro .. this project need one or two xbee wireless ?</p>
<p>Great project. Thank you for sharing.</p>
<p>let me know your EEG project with XBEE??</p><p>can you share link for your project above</p>
hi there .. <br>i'm new to RF , could anybody help me with Xtenda 900 40 miles range , how to hook it to Arduino Uno <br> i couldn't find any tutorial or video <br>
A wonderful guide to start working with Arduino Uno. As you can see I add a link in my article &nbsp;where is an<a href="http://www.intorobotics.com/arduino-uno-setup-and-programming-tutorials/" rel="nofollow"> impressive collection of guides and tutorials to start working with Uno</a>.
I've been trying to figure this out for a while. If it still doesn't work. I may have to try your method. I've been reading about people using the RST or DTR lines on the FTDI chip to reset the Arduino. for example http://letsmakerobots.com/node/23869 and http://www.ladyada.net/make/xbee/arduino.html. I've tried relentlessly, with different combinations of high to low transitions from my xbee, but I still can't quite seem to get the timing right. Do you think you could check out these articles and maybe scope the DTR and RST pins on the Xbee Explorer to help me figure this out? I think it could be easier than using another chip, but I can't seem to get it to work. I also think they are using various sized capacitors to get the timing, but I can't be sure if that actually changes anything.

About This Instructable




More by Hitm_n:Arduino Wireless Programming with XBee Series 1 or 2 
Add instructable to: