Arduino + XBee (RC car project)

Hi everyone.

I’m actually working on a project. I’d like to make a RC car using a Arduino board and 2 XBee modules. I decided to send data throw my computer thanks to PROCESSING and I found some components wich could do it :

Interface between the XBee module and my computer :

http://www.lextronic.fr/P4117-platine-d … -xbee.html

http://www.lextronic.fr/P2901-platine-d … -xbee.html

Could you tell me what are the differences between these two boards please?

Concerning the XBee module itself, I still don’t know which of the Serie 1 or the serie 2 could be the best for my project.

Finaly, i will use a XBee Shield attached to my arduino UNO board. ( http://fr.rs-online.com/web/search/sear … rm=6961670 )

If you have any questions concerning my project, please ask.

Thank you for helping me :slight_smile:

The little info I can understand, the web site is in French which I do not read, is the the board in the second link has two rows of 0.1 inch pads for headers that allow easy connections to the pins on the XBee. If you only need to pass serial communication through the XBees then you do not need that feature.

Both boards have USB to interface with a PC (or MAC).

Series 1 XBees are the easiest to use and should work for your project.

Thank you for your answer waltr :slight_smile:

I found the first board on sparkfun :

http://www.sparkfun.com/products/8687

I couldn’t find the second one but I translated the page with google ^^:

http://translate.google.fr/translate?u= … =&ie=UTF-8

As you can see the second one with the additional row of pins is cheaper than the first board (the red one). So I think I’ll buy that board :slight_smile: . If I make any mistakes please tell me. :wink:

Thank you :slight_smile:

Ok, the second on also has the Associate LED and a place to install a Reset switch. Both of which could be useful. It is slightly larger than the SparkFun board but that should not be a problem.

The Driver (install on PC) brings the board up as a COM port so any Terminal program and Digi’s X-CTU will ‘talk’ to the board.

Hi Waltr.

I have received my XBee modules and everything works fine. :wink:

I just have one question : Can XBee modules work in full duplex? Or they work only in half duplex? If they work only in half duplex, is there any way to make a time multiplexing thanks to Arduino?

thanks :slight_smile:

The RF link is half-duplex but that is transparent to the data flow on the UART pins. The UART, DIN & DOUT, are full-duplex.

This is the main reason why the RF bit rate is so much higher than a practical bit rate on the serial UART interface.

Great it all working for you.

I was asking it because a little problem persists. I badly expressed myself. My mistake ^^

When I send data only in one way (Half duplex), there’s no probleme but when I send data in both directions, I may lost some orders typed on my keyboard, sent to Arduino through XBee. For exemple when I press a key, a LED should light on my arduino board and return something to my PC. But sometimes it dosn’t work as if the channel was blocked. That’s why I thought that the half duplex is badly supported by XBee and wanted to make a time multiplexing.

Thanks :slight_smile:

There are parameters in the XBee on when the data that it receives by DIN gets sent on the RF link. But that does not really sound like your problem.

In the XBee there are two independent FIFO buffers for the UART data so the UART interface is full-duplex. These buffers are not very large, how many bytes of data is the Arduino sending? At what baud rate.

The problem could very well be a coding issue in the Arduino. Does it work if directly wired (with level translator) to your PC? You can do this by removing the two XBees and connecting the XBee interface board sockets DIN → DOUT, DOUT-> DIN and Gnd->Gdn. This eliminates any issue with the XBees.

If the problem is still there then it is not an XBee problem so look at the Arduino code.

Hi Waltr.

I attached the Arduino code and the processing code. They are quit short ^^.

As you can see the baud rate is 19200. When I directly wire the Arduino board to the computer trough USB, it works very well. It works very well too when I use XBee in Half duplex (no feedback to the PC). It means that in these cases, if I press Left and Right key very fast, the response time is exellent. But when I send a feedback (duty cycle in my exemple) and if I press Left and Right key very fast, it’s a mess, sometimes the LED just doesn’t light up.

Many thanks for spending your time to help me :slight_smile: