karl101
Posts: 68
Joined: Wed Jan 11, 2012 10:09 am

UART and an Xbee?

Sun Jun 10, 2012 6:41 pm

Hello,
I am wanting to use the Xbee Wireless Serial board (RS485) and a Pi to connect with my LEGO NXT robots using NXTbee interfaces http://www.active-robots.com/nxtbee.html.

For my paid-for-but-not-arrived-pi I have purchased an XBee 5V/3.3V Adapter Board http://www.active-robots.com/xbee-5v-3- ... board.html This should connect to the UART port on the Pi, however is has been a while since I last made up a lead for this kind of this thing. Can anyone say if if I were to make a cable with these connections are correct?:

Code: Select all

Pi Header           Xbee interface
P1-01 3v3               VCC 3v3
P1-06 Gnd               Gnd
P1-08 UART0_TXD         DIN 
P1-09 UART0_RXD         DOUT
Thanks
Karl

User avatar
jecxjo
Posts: 158
Joined: Sat May 19, 2012 5:22 pm
Location: Minneapolis, MN (USA)

Re: UART and an Xbee?

Sun Jun 10, 2012 6:50 pm

I have a dozen or so Xbee radios at my desk at work. I don't have any of those breakout boards but that would be a fun project to work on. I'll double check what models I have as I was testing different ones for a few projects.
xmpp: [email protected]
Blog: http://jecxjo.motd.org/code

karl101
Posts: 68
Joined: Wed Jan 11, 2012 10:09 am

Re: UART and an Xbee?

Sat Jun 16, 2012 1:04 pm

Hello,
I can confirm that the xBee's 5v/3.3v adapter will work with the UART on the Pi. The cable connections are:

Code: Select all

Pi Header           Xbee interface
P1-01 3v3               VCC 3v3
P1-06 Gnd               Gnd
P1-08 UART0_TXD         DIN
P1-09 UART0_RXD         DOUT
Using Debian, you have to remove the references to the serial port as detailed here: http://www.irrational.net/2012/04/19/us ... rial-port/

the user has to be member of the dialout group. the default pi user is a member, but if not use:

Code: Select all

$ usermod -a -G dialout <username>
Test the board with minicom, the default settings for the Xbee are: 9600 baud, 8bit, no parity, 1 stop bit.

Code: Select all

$ minicom -o -b 9600 -D /dev/ttyAMA0
and set local echo on, CTRL-A E, and set linefeed on, CTRL-A A. At the very minimum you should see the red LED light as you type, or of you have another xBee setup to work on another computer, text appearing.

Now, to break out the Python and start coding....

Karl.

HansH
Posts: 212
Joined: Mon Sep 05, 2011 7:49 am

Re: UART and an Xbee?

Sat Jun 16, 2012 6:38 pm

look at the breakout board 'slice of Pi' ... it has a xBee connector on it.
not expensive and quick delivery...

see : http://shop.ciseco.co.uk/slice-of-pi/

Return to “Interfacing (DSI, CSI, I2C, etc.)”