Some Arduino Xbee Usage Tips accumulated from experimentation

Some things I have learned about Xbee from hands on experimentation.This little bit of knowledge has be accumulated through practical experience and experimentation with the Xbee and has know basis other than my own meandering experience. Don't bother with the Tiny CLR btw

My timing chart

  1. Keep the packet size to less than 100 bytes in either direction
  2. Allow for 50% dead air on 20mS at 38,400 my TX packet is sent in 8mS so 12ms dead air, this value is sent in the TX packet header in a single byte
  3. Only send back a telemetry packet every other TX cycle minimum or you will crowd the airwaves, this causes drop oust and variable latency. I have chose (packcount %5) which is a good margin, and a packet size limit that keeps the transmission clear of the next TX update by 5mS minimum.
  4. Not really Xbee but have another CPU handle the telemetry packets not the TX micro. I am re-using my Netduino Plus as it has Ethernet and TCP/IP and a flash card socket just because i have one.
  5. Have your own checksum, the 802.15.4 will handle things in the air but you still have a wee bit of wire between you micro and the Xbee. Belt an braces is the best approach here.
  6. The Xbee should be treated as a simplex regardless device as I do it gives you better real-time behavior overall
  7. Learn about the Xbee config and configure sensibly, to many items to list here, however the 802.15.4 retry limit is set to 3 and the packetiztsion threshold to 3 also

Videos of this system in action


http://kiwitricopter.blogspot.co.nz/2012/11/building-arduino-receiver-yellow-boats.html
My transmitter code


http://kiwitricopter.blogspot.co.nz/2012/10/simple-arduino-rx.html
My receiver code

Yellow_Plane_RX.ino (12.8 KB)

Simple_TX.ino (5.56 KB)