PDA

View Full Version : Communication Standard- Zigbee



DresnerRobotics
09-23-2008, 11:17 PM
I think that Zigbee should be our recommended standard for wireless control. I've been doing some research and playing around with a pair at the office, and the more I learn about it the more it just seems like the best solution for Mech Wars control. I'll be doing some further testing and figuring out how to specify addresses and 'pair' units together, and once I get everything settled I'll be writing up a comprehensive tutorial on the subject.

I'm not saying that we force anyone to choose how they want to control their Mech, I'm just proposing that we look into making this the standard and recommended solution.

Zigbee is:

Cheap. You're looking at around $50 to start with a pair of Xbees. If you're lazy and don't want to build an interface for them, they can be picked up for about $20 a pop (or cheaper, if you don't care about silk screening)

Supposedly immune from interference from Wifi and Bluetooth. Spread spectrum and individually addressable, up to a theoretical 65,000 unique addresses.

Range is fantastic, there are 60mW units you can pick up for more money that spec 1 mile range.

Up to 250kb bandwidth, more than enough for remote control.

Easy to interface to, they use TTL and can easily be interfaced to create essentially a wireless com port.


Thoughts, questions, comments?

lnxfergy
09-23-2008, 11:30 PM
I've been using Xbee modules for about 6 months. I love them. Cheap, reliable, and easy to interface. I've used both the whip antenna version and the rp-sma style without any issues. I've been running 115200 for the baud rate.

I've had the robot running in the basement while my laptop collects data on the third floor - without any issues. The address-ability is great too. I use one module attached to a sparkfun USB-serial breakout which is attached to my computer, and then I can connect to any of my robots by changing the destination address.

-Fergs

Adrenalynn
09-24-2008, 12:11 AM
I need to get some linkage over to Alex, thanks for reminding me!

Yeah, they're great radios. I've been playing a ton with 'em here, doing wireless RFID.

4mem8
09-24-2008, 12:38 AM
Hey Tyberius, these units sound so cool, I will wait till you have done further experiments before I decide to get a set.Do Trossen sell them? In fact I might get two sets, One for Mechs and 1 for J5 for future use and experiments.

DresnerRobotics
09-24-2008, 08:58 PM
I've been using Xbee modules for about 6 months. I love them. Cheap, reliable, and easy to interface. I've used both the whip antenna version and the rp-sma style without any issues. I've been running 115200 for the baud rate.

I've had the robot running in the basement while my laptop collects data on the third floor - without any issues. The address-ability is great too. I use one module attached to a sparkfun USB-serial breakout which is attached to my computer, and then I can connect to any of my robots by changing the destination address.

-Fergs

Good to hear! We're going to be expanding our offerings of the XBee line in the near future, and with those will come some tutorials that I hope will demystify the technology.

4mem8
09-25-2008, 12:32 AM
Great to hear Tyberius, I will be in on that one.

MSpurk
09-26-2008, 09:17 PM
We're going to be expanding our offerings of the XBee line in the near future, and with those will come some tutorials that I hope will demystify the technology.

Oh thank goodness. I know diddly-squat about wireless internet protocals, and other fancy doo-dads with weird acronyms. Anything you can to shine light on the darkness of this black magic would be great. I know your Mech is Bioloid based, but if you can expand your tutorials to microcontrollers and serial servo controllers, that would be the shizzle.

Thanks,
-Matt-

Adrenalynn
09-26-2008, 09:42 PM
I can try to chime in a bit on the topics you're looking for too, Matt. I don't do Bioloid (today)... I'm an SSC-32 and microcontroller throwback. ;)

4mem8
09-26-2008, 11:52 PM
Great news, I will be all ears Adrenalynn.

RKM83
11-02-2008, 04:44 PM
Hey Adrenalynn-

Have you had any joy with connecting a XBee ZB and/or extended-range XBee-PRO ZB with SSC-32?

DresnerRobotics
11-02-2008, 05:20 PM
Hey Adrenalynn-

Have you had any joy with connecting a XBee ZB and/or extended-range XBee-PRO ZB with SSC-32?


I have, my schematic is on my office PC though, I'll share it tomorrow.

RKM83
11-23-2008, 03:58 PM
Hey Tyb-

Have you had any joy in getting the schematic on the XBee?

Adrenalynn
11-23-2008, 07:38 PM
I don't think you'll get a schematic on the XBee without forking over the money for a scanning electron microscope, or some good corporate espionage...

There is an open-source knock-off of the Zigbee/802.15 stack: http://www.open-zb.net/

And you could probably combine a transceiver like the uz2400 from Microchip or the cc2420 from Chipcon and an appropriate microcontroller running the stack and get pretty close hardware-wise. Probably not more than a few hundred dollars to knock off $19 worth of hardware, give or take. ;)

gdubb2
11-23-2008, 08:51 PM
RMK83..

Don't know if this will be of any help, but If you can connect to the SSC-32 with bluetooth, it should work just replacing the BT module with the XBee. I had my RN-1 controller connected with a Bluesmirf. All I did was hook up the XBee the same way on the bot, set up the interface to the computer. (XBee explorer from Sparkfun) and away it went. I have the XBee pro's and used the Kronos interface on the bot.

Good Luck
Gary

Adrenalynn
11-23-2008, 11:32 PM
If you want to hook an XBee up to a SSC32, all you have to do is put 3.3v and 5v power on the XBee as appropriate, and then use a level lifter to go from the 3.3v TTL to the 5v TTL on the TTL serial.

LinuxGuy
11-23-2008, 11:56 PM
I'm an SSC-32 and microcontroller throwback. ;)
Hey, we aren't throwbacks! :p Microcontrollers are fun to tinker with! :) Just wait until I get my Ham license.. ;)

8-Dale

Adrenalynn
11-23-2008, 11:58 PM
As long as you don't want them to do anything terribly intense. Are you trying to reopen this one? I thought we already beat it to death. ;)

WB, btw, where you been hiding?

LinuxGuy
11-24-2008, 12:05 AM
WB, btw, where you been hiding?
Ummm, hiding? Me hide?

All my mail stuff is broken and I have no idea how to get it working again. I was completely offline for a few weeks due to changing ISPs (I now have FIOS Internet and TV service), because my former ISP lied to me. I'm just starting to gradually reconnect..

8-Dale

ahab
11-26-2008, 02:16 AM
I have two XBee PRO USB adapters (http://www.digi.com/products/wirelessdropinnetworking/xbeeadapters.jsp).

This is all it takes to get them set up to do TCP/IP in linux:
slattach /dev/ttyUSB0
ifconfig sl0 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255and 10.0.0.2 or whatever you want to use for your IP on the other end. Nice and convenient, don't have to worry about the WiFi configuration.

Adrenalynn
11-26-2008, 04:11 AM
Sure, you can SLIP or PPP over any serial interface. Not quite the speed of WiFi though... ;) Good pointer for those not familiar with SLIP/PPP/etal!

ahab
11-26-2008, 12:35 PM
These only go at 5 KB/sec. Not completely happy with that, but works well enough for my needs.

I should test out the range more.... I got to 400 ft without LOS, and the antennas were actually pointing away from each other.

Next ones will be longer range or areocomm (http://www.aerocomm.com/mainindex.htm)

Adrenalynn
11-26-2008, 12:49 PM
Zigbee Pro stuff can do better than a megabit, atleast a megabit sustained, and can pull astronomical ranges. Sure, they're pricey, but really not as pricey as the small WiFi stuff.

I'd love to see you do a SLIP/Zigbee tutorial for those not in-the-know. Until you wrote that, I'd never really considered doing a 'bot controlled from a web server encapsulated with SLIP or PPPoS, I'd always just opened a com port for raw serial data.

jes1510
12-01-2008, 11:19 AM
I'm to the point where I need to select the electronics for my mech. I am definitely going to use an Xbee module for comms but I'm not sure which one since I have never used them before. Therefore I have a few questions.

How much range will be needed for the competition?
How much real life range will the 1mW Xbee units give indoors?
What about the 2mW units?
Which series of Xbee modules are the ones carried by trossen?

gdubb2
12-01-2008, 12:08 PM
Hey jes1510,

Something else to think about is the power usage of the XBee modules. According to the Digi manual, the standard XBee transmits at 0 dBm with a transmit current of 45 mA. The XBee Pro has selectable output between 10 and 18 dBm with transmit current between 140 and 215 mA.

I have some XBee Pros, but find myself dialing the output down to save on battery life. As for range, I don't know, doing a range check with the XBee explorer from Sparkfun it's hard to tell.

In watching how my lashup works, the module on the laptop is transmitting continually, and the one on the bot is receiving all the time. I don't know how to avoid this with my controller, as the HiTec board is really slow and I am trying for real time control. But the receive current for the modules is much lower than the transmit current.

I am using RoboRealm mostly, but can use BioBlue if needed.

Good Luck
Gary

lnxfergy
12-01-2008, 12:37 PM
I've been using the original Xbee units (not the pro version), for some time now. I find that they can get their signal from the basement to the 2nd floor of my house without any packet loss. Not sure about the total line of sight range, but that's about 25 feet through multiple floors.

-Fergs

Adrenalynn
12-01-2008, 12:44 PM
I use the 2mW, non-pro, v2 units. I reliably get a couple blocks with no real packet loss (<1&#37;) using the chip antenna on the 'bot and a small directional (4dBi) antenna. They're really easy to work with.

DresnerRobotics
12-01-2008, 12:51 PM
We carry the standard 1mw versions, and also a couple of the 60mw long range pro versions.

Can be found here: http://www.trossenrobotics.com/store/c/3099-Xbee-Zigbee.aspx

jes1510
12-01-2008, 03:16 PM
We carry the standard 1mw versions, and also a couple of the 60mw long range pro versions.

Can be found here: http://www.trossenrobotics.com/store/c/3099-Xbee-Zigbee.aspx


I suppose I should have phrased that question better. Are those the 2.5 series modules?

jes1510
12-02-2008, 04:30 PM
I ended up buying the 2mW modules. One with an RPSMA connector and the other with a wire antenna. Thanks for the help guys!

jes1510
12-09-2008, 10:38 PM
I received the modules today and I have to say they get a hearty thumbs up from me. The documentation seemed a bit convoluted but I eventually got them talking. I have a WiFi network and placed one module right next to the router while I sent heavy traffic over the WiFi and it didn't drop a single packet. They were a bit pricey but well worth it!

lnxfergy
12-09-2008, 10:48 PM
I received the modules today and I have to say they get a hearty thumbs up from me. The documentation seemed a bit convoluted but I eventually got them talking. I have a WiFi network and placed one module right next to the router while I sent heavy traffic over the WiFi and it didn't drop a single packet. They were a bit pricey but well worth it!

A bit pricey? Compared to what? I'm serious, a bluetooth module starts at like $50-60, and will give you nothing but headaches. Those $5 RF transmitters are about as reliable as a coke can hooked to a 12 gauge wire. $20 is a steal for what the XBEE units do.

-Fergs

jes1510
12-09-2008, 11:01 PM
A bit pricey? Compared to what? I'm serious, a bluetooth module starts at like $50-60, and will give you nothing but headaches. Those $5 RF transmitters are about as reliable as a coke can hooked to a 12 gauge wire. $20 is a steal for what the XBEE units do.

-Fergs

Agreed 100%. I have a bluesmirf that works great for portability between machines but Xbee is blowing it away in price to performance categories. Plus it looks like you can configure them to do just about anything. Hell there is an option that changes the on/off time of the associate LED.

DresnerRobotics
12-10-2008, 07:38 PM
I have been stretching myself thin with my project time, with most of my time being consumed with my upcoming RX-64 based Mech....

I was waiting for some video to finish ripping tonight though, and decided to keep working on my Xbee based Bioloid controller. I've been working on this as a wireless drop-in replacement for the CM-5 controller using an Xbee and an Atmega128 (using one of Jon Hyland's projects as the basis).

This essentially works like a wireless connection to the Dynamixel bus, so you can program in any language that can talk to a serial port and fire commands over the Xbee link to your Dynamixels. PC side I'm just using a USB Explorer from Sparkfun and another Xbee.

I'm getting some weird Dynamixel errors bouncing back, so I need to further troubleshoot this as soon as I get the time, might very well just be data fragments from the wireless connection. But, it is working.

Here's the prototype, obviously the Atmega128 is a bit overkill. Could be fit onto any AVR with 2 UARTs.

http://www.trossenrobotics.com/images/XbeeBioloid.jpg

sthmck
12-10-2008, 07:54 PM
Looks good. You are probably right about the errors. I was doing some work with xbee a while back and it was dropping data like crazy, may have been just mine though. Good luck getting it finished.

jes1510
12-10-2008, 08:12 PM
I now have control of my Robosapien using this route:

Laptop > XBee Explorer ---------------- Xbee > Arduino > Robosapien

Adrenalynn
12-10-2008, 09:15 PM
What did you use for 3.3v to 5v TTL interface on the Arduino to XBee interface, Jes?

I'm playing with Sparkfun's little logic level convertor - seems to work very well for just a few dollars.

jes1510
12-10-2008, 09:19 PM
I spent a little more and bought this board:
http://www.nkcelectronics.com/freeduino-arduino-xbee-shield-v20-k20.html

It has all of the interface stuff built in as well as RSSI LED's. It also has headers that bring all of the Arduino pins to the top with the exception of the Power pins. They are blocked by the board.

Edit: If time allows I may do my own board that eliminates the Arduino and shield. Right now they have to live in a "backpack" style configuration on the Robosapien that I'm not real pleased with. I figured I would go this route and try to nail down the programming and then I can modify it if I have time.

Adrenalynn
12-10-2008, 10:40 PM
Very cute!

I'm using these: http://www.sparkfun.com/commerce/product_info.php?products_id=8745 to match my signal levels, 'cause I'm too lazy to whack something together. They're TINY too.

jes1510
12-10-2008, 11:03 PM
Cool. They look like they would be well worth the two bucks!

Adrenalynn
12-10-2008, 11:08 PM
I think so. Just the parts alone in onsie-twosie will get near there. Hard to build a board for $2

jes1510
12-10-2008, 11:26 PM
Also I am seeing the occasional missed packet. I'm pretty sure it's due to motor noise so I think I can eliminate and shield some of it but it definitely brings to light that any wireless design needs to be tolerant of lost data.

Dementedwombat
01-14-2009, 10:27 PM
Zigbee sounds like the way to go for wireless communication. Sadly, that is one of the many areas where my knowledge is lacking. I was going to order the Bioloid Zigbee pack with my starter kit. I figure that since they're made by the same company they should be directly compatible with the Bioloid controller. I was wondering if that was a good choice.

I have two questions at this point:

1. Presuming that I'll be recoding the Boiloid controller in C eventually (because everyone seems to be), would the "plug and play" aspect of a Bioloid Zigbee controller be worthless? Designing a new communication protocol by myself sounds a little daunting for a newbie.

2. Is there a basic tutorial on Zigbee anywhere? I think the Bioloid manual covers it a little.

I apologize for the unnecessary randomness in the above post. My brian is currently fried beyond any capability of reasonable thought.

DresnerRobotics
01-14-2009, 10:41 PM
Few things-

The Bioloid handheld controller is purely digital, and thus limited when it comes to things like aiming. A better solution might be to just use the Zigbee modules and a Zig2Serial, and use something like a joystick or gamepad attached to the control PC. The CM-5, stock without firmware/code modification, can accept direct serial commands over the zigbee with a bit of glue software written to trick it into thinking your Zig2Serial/Zigbee is another CM-5, and from there you could write a control program to feed the CM-5 commands. The other option would be to reprogram the CM-5's Atmega entirely, in which you'd have more flexibility (think walking gaits stored onboard) but I'm not sure how the Zigbee would fit into things.

I know thats a lot to chew, but just trying to give you an overall view of things. I think most things will start to make more sense the more you delve into coding things. I'd again recommend starting out with an Arduino to learn the basics of coding C and an Atmega chip (which is what the CM-5 is).

As far as a tutorial.. thats on my list of things to write up for the site, but I've been loaded down with a ton of other things. I can demystify a few things for you though so it doesn't sound quite so scary.

The Zigbee (or Xbee, which is a modular unit based on Zigbee tech) is an 802.15.4 wireless communication device. The Xbee modules, for our purposes, function much like a wireless link for a serial port. The connections are 3.3v in, TX, RX, and ground. You send TTL serial data in one side, and it pops out the other and vice versa. Thats really all you need to know to get started, they work almost like plug and play. By default they broadcast to all units in range, but you can also dial them in to individual addresses.

Dementedwombat
01-14-2009, 10:56 PM
Don't worry about overloading me with information. I work best when my mental bandwidth is maxed out :). The conceptual side of things isn't that bad. I understand what I need to do, just not how to do it. I'm sure that will make much more sense once the kit shows up and I start tearing into it. But for now it's off to bed before my brain completely liquefies and I end up with grey matter on my keyboard.

marchanna33
06-16-2010, 06:18 AM
I am interfacing between Zigbee and AVR ATMEG8.
Someone told me to set the baud rate of the microcontrollers four times that of the Zigbee.
Is that right ?!

Please I need a reply asap because I am working on my graduation project and its deadline is less than week.

Many thanks,
Marc

lnxfergy
06-16-2010, 10:47 AM
I am interfacing between Zigbee and AVR ATMEG8.
Someone told me to set the baud rate of the microcontrollers four times that of the Zigbee.
Is that right ?!

Please I need a reply asap because I am working on my graduation project and its deadline is less than week.

Many thanks,
Marc

Typically the baud rate of all devices should all be the same.

-Fergs

DresnerRobotics
06-16-2010, 10:54 AM
Here's a crash course in Google 101, a topic that every college student or breathing human being should know.

http://tinyurl.com/29bfm4l (find a zigbee module to use)

http://tinyurl.com/28kuqff (find a tutorial about said zigbee module)

Teh internet is awesome!