-
Notifications
You must be signed in to change notification settings - Fork 90
Xbee
This page contains information about configuring Xbee Modules for use as a RTK GPS correction transmission link. In this mode, the base station broadcasts correction data unidirectional to all UAV/UGV simultaneously. In the case of point-to-point networks, acknowledgement mode and addressing is different.
For broadcast/point-to-point network, Xbee modules with the 802.15.4 firmware are easier to use. The alternative DigiMesh firmware is targeted at building mesh networks, were intermediate modules are able to forward messages to more remote receivers. In the case of RTK GPS broadcasting, simple broadcast or point to point networks are preferred. Mesh networks can be a problem, as the message latency may change depending on the route the message takes.
Also note the incompatibility between different Xbee versions (S1/S2A/S2B/S2C). See also https://www.sparkfun.com/pages/xbee_guide.
To configure xBee modules, use the X-CTU software as provided by Digi. (see https://www.digi.com/products/xbee-rf-solutions/xctu-software/xctu)
To connect them to the computer, either use the Digi demo board (Picture) or an FTDI cable (Important: 3.3V logic levels!).
All xBees that need to communicate with each other have to be on the same channel. A common problem is interference with other RF sources, especially the 2.4Ghz remote controllers can be a problem (frequency hopping!).
To make channel selection easier, the X-CTU software comes with a spectrum analyzer.
- Connect at least 1 Xbee to your computer, and start the spectrum analyzer inside the X-CTU software (button with the wrench and screwdriver on the top right).
- The spectrum analyzer shows the signal strength for all 12 available Xbee channels (and average/min/max)
- Turn on UAV remote controller and randomly move sticks. You will see various channels saturating (maximum not visible anymore). These channels are to avoid (e.g. 1 or 9). See next picture.
- Select the channel with the lowest maximum value (here, channel 11).
Note that the green maximum bar is not visible anymore for some channels - these have been used by the RC remote in the frequency hopping process.
Enable API mode with the 802.15.4 firmware in case of the following error:
Spectrum Analysis > Error sending package: for input string "34 36 50 3B 46 34 5F 47 51 3B 38 34"
To verify this selection:
- Connect at least 2 xbees to your computer (that are configured on the same channel and PAN id)
- In the same menu as before, select "Troughput"
- Run throughput measurement between these 2 xBees, and turn on RC remote while measurement is running.
If the selected channel is good, no significant change in throughput is visible when the RC is turned on/used:
If the selected channel has interference with the RC remote, the throughput may drop when the RC remote is turned on/switches channels (sometimes it takes a few seconds/some inputs until the behaviour shows up):
To configure the devices into a broadcast network, use the following settings:
-
Channel: Use the before determined best channel (e.g. 11). Convert to hex and add 0x0B to get proper value to configure. (for channel 11: 0x0B+0x0B = 0x16)
-
PAN ID: Personal Area Network Id. All xBees that belong to the same network share this - use a value that no one elses uses and that is easy to remember :-)
-
DL/DH: To broadcast to all xBee modules on the same PAN, set this to DH=0/DL=FFFF on the xBee module of the base station (and only on this one - and mark this one physically with tape....)
-
MM: Header Mode: In broadcast mode, no ACKs are necessary, so value 3 is a natural choice.
-
PL: Power level - use highest (4)
-
CA: CCA threshold - for carrier multiplexing, the xBees do not start transmitting if they sense that the channel is already being used (signal strength above xy dBm). As we want the xBee to transmit even with background rf noise present, we set this to the highest value possible (0x28 -dBm = -40dBm, which is still fairly conservative).
-
BD: Baudrate that the serial interface of the xBee uses. Depends on the use case - for Piksi RTK devices use 6 / 57600.
Credits to Michael Pantic, Autonomous Systems Lab (ASL), ETH Zurich, January 2017.