Skip to content

Adding Wireless Telemetry to Carbot With XBee’s

April 26, 2015

15-04-26 xbeeWhen I last tried the Carbot it could struggle around the arena but didn’t track the wall very well. I needed to see what its sensors saw to figure out if the issue was sensors or logic so i wanted some telemetry.

The original carbot used XBees as a serial bridge so that’s what I’m trying. These are set up at 19,200 baud with one hooked up to the olduino and one to the PC through a serial cable. On the Olduino it’s actually hooked to the output of the AVR’s uart; The olduino just does “out(x,7)” which loads the spi subsystem and drives the avr to clock it in and send it out on its uart.

The uart had been running at 57,600 which is too fast for the XBees so i changed the code in run1802() to switch the serial speed down to 19,200 when it puts the 1802 into “run” mode. Then I had to do something to slow down the olduino so it wouldn’t overrun the avr’s buffer. The simplest thing was just an extra level of call/return which adds enough instructions to get us in the range. When I tried it it worked pretty much right away firing in the existing telemetry from the carbot. The XBees are not the new hotness but they’re very simple to hook up and reliable to use.
I’ll charge up the batteries and try it on the floor.

  cout<<"\nrun1802.5("<<timeoutinterval<<") at 19,200 BPS\n";
#define putc(x) outd(7,x)
void outd(unsigned int port,unsigned char what){

Update: Looking at the data sheet, i may be able to run these at 57600 baud which would obviate the code changes and i could probably the program the olduino wirelessly which i used to do with the original carbot.


From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: