Wireless









Hardware

BOM:

item quantity unit price (€) price (€)
Arduino uno board 1 20 20
XBee shield board for Arduino 1 17 17
XBee series 1 modules 3 23 69
XBee Lilypad board, or equivalent 1 14 14
USB XBee pad with it's USB cable 1 25 25
Push buttons 3 4 12
1kOhm resistors 3 .3
2.54 mm = 1/10" rows of bent connectors 2 5
Plastic boxes for each base 3 5 15
5-12V batteries, e.g. 2S LiPo 2 12 24
Switches 2 2 4
Wire and soldering material

The whole lot can be bought from any electronics online shop.
Note that there are several options for pushbuttons. Look for the ones which are mono-stable, with contact ON when pressed.


Settings

General

All XBee and Arduino modules should be set at the same data baud rate. The usual default 9600 bauds is allright, but you can safely increase it to 19200. I havn't tested higher rates.


The settings of the XBee modules are modified using the program X-CTU available for Windows. Download, install and launch the program, then:
  • In the "PC Settings" tab, select the serial serial port of the XBee driver
  • Click on the Test/Query button to check that the communication with the XBee is open
  • Move on to the "Modem configuration" tab, and click "Read". This will download all the settings from the XBee
  • Modify the settings, and click "Write" to upload the modifications.


It is recommended to use two custom hexadecimal addresses to identify uniquely the XBees part of the system. A first number will identify the two remote XBees at base A and B, in this case 0x5678. Another number, in this case 0x1234, will identify the base PC Xbee.

Base A Remote Arduino and XBee

At this base, an Arduino is required to keep the time, since we cannot afford the delay due to wireless and USB communications.
The idea is to have the Arduino detect the switch contacts, and send both the elapsed time and the pin status to the PC by way of the XBee module.

  1. Plug the Arduino to the PC using the USB cable. Do not mount yet the XBee shield, since it would hinder the communication with the PC.
  2. Launch the Arduino program on the PC. Select the corresponding serial port in the tools menu.
  3. Upload to the Arduino the program "wirelesssignal.ino" available in the sourceforge "Files" section
  4. Unplug the Arduino from the PC.
  5. Plug the XBee in the USB connector board.
  6. Launch X-CTU and set the following parameters :
    • MY = 0x5678
    • DL = 0x1234
    • In the Serial interfacing group, select the chosen data rate
    • That's all
  7. Remove the XBee module from the USB board, and plug it in the Arduino's XBee shield board.
  8. Connect the wires to the Arduino device, and assemble the XBee shield on top of the Arduino board

Base B Remote XBee

We do not need to keep a precise timing at this base, therefore an Arduino microcontroller isn't necessary. The only important thing is that the signal is transmitted fast to the PC to signal that Base B is passed. We use the XBee module to detect and transmit the state of the button, which in our case is connected to pin 4.

  1. Plug the XBee in the USB board, and connect the board to the PC.
  2. Set the following parameters:
    • MY = 0x5678
    • DL = 0x1234
    • In the Serial interfacing group, select the chosen data rate
    • In the I/O settings group, select D4=4 // this activates pin4 input
    • In the same group, select IC=16 //This enables automatic detection of changes to the state of the digital pins. 16 decimal =00010000 binary, and pin 4 is the 5th digital input.
    • That's all
  3. Remove the XBee module from the USB board, and plug it in the XBee's Lilypad board. The Lilypad board is large and handy for the soldering operations, however, because of its size, it does not fit easily in hand-held boxes. It may be a good idea to consider other smaller boards.

Base PC XBee

The PC XBee receives the messages from the two other XBees at base A and base B, and transmits them by the serial port to the PC and the f3fTime application.

  1. Plug the XBee in the USB board, and connect the board to the PC.
  2. Set the following parameters:
    • MY = 0x1234
    • DL = 0x5678
    • in the I/O Line Passing group, select T2 = 0x64 = 100 ms

f3fTime (and X-CTU) settings

In the serial port settings, select the corresponding baud rates and timeout = 100 ms.





Communications testing





Updated February 2013