I'd like to set up a wireless controller for humanoid robot competitions. I expect to do the programming myself, so I'm really not asking what works out of the box; I'm asking what frequencies and protocols are most widely accepted, and what controller hardware works with those.

I'd like a PS3-style controller (you know, two 2-axis analog sticks and a slew of buttons), rather than something like a TV remote or RC vehicle controller. I could maybe just use a PS2 wireless controller, which I've heard is pretty easy to interface with, but I don't know that those would be allowed in competitions.

Are there PS-style controllers that already speak Zigbee or Bluetooth? Are those good protocols to use? Or would you suggest something else? Any recommendations will be appreciated.

Thanks,
- Joe

DresnerRobotics

10-25-2008, 09:12 AM

The PS3 controller is bluetooth.

I'd say bluetooth or zigbee are going to be your best bet.

JoeStrout

10-25-2008, 09:52 AM

The PS3 controller is bluetooth.

I'd say bluetooth or zigbee are going to be your best bet.

That's interesting — I didn't know that about the PS3 controller. However, I haven't been able to find any information on interfacing with it, except this unanswered question (http://www.embeddedrelated.com/groups/rabbit-semi/show/37557.php). Perhaps my google-fu is not strong today. Anybody have a clue?

Thanks,
- Joe

srobot

10-25-2008, 10:49 AM

FYI:

Our Playstation interface for the Bioloid bus is through home-prototyping and is currently in the first small-quantity production-style-prototyping phase.

We're hoping to have demo units out to the resellers in the next month or two.

I think both PS2 and PS3 are fine for competitions(?). What is the difference between PS2 and PS3 anyway?

The StuartL/Random Matt board looks much better then the Boomerang. The total cost may be higher, but the control is much greater. This is not a plug and play solution and will need you to program it until BCP programs are uploaded by users.

DresnerRobotics

10-25-2008, 11:00 AM

Only issue I see with StuartL's solution is that it uses the standard 2.4ghz of the wireless PS2 controller, so it's not as protected against interference as something like bluetooth or zigbee.

icecreamslick

10-29-2008, 08:09 AM

I believe that Bluetooth is in the 2.4ghz range. The RC transmitter that I use with all of my vehicles (not robots) is bound to the receiver and does not suffer any interference from other sources. I kind of figured that the PS2 controller would be the same way. :confused: The wireless controller that I have for my PS2 only works with its receiver.

Adrenalynn

10-29-2008, 10:46 AM

>> does not suffer any interference from other sources

Your confidence in the hardware is touching - but misplaced (I've always wanted to say that, thanks! :)). It may be a digital state (there/not-there) rather than the analog "sorta-there" - but ANY radio hardware, no matter how hardened, can be jammed by something else.

icecreamslick

10-29-2008, 11:51 AM

I see what you're saying. I'm sure if there was an evil robot warrior bent on affecting my ability to battle, he could probably jam my transmission. :veryhappy: Interference from some stray signal seems very unlikely though. The system I'm referring to is the Futaba FASST, which is marketed as an interference free 2.4GHz system, but it has a special ID code that will not allow it to accept other signals.

As for the other 2.4ghz controllers, I figured that they would have no chance of interference, but I guess I need to research more before I open my mouth with a blanket statement. :wink:

StuartL

11-07-2008, 06:19 AM

Our experience of wireless controllers in the 2.4GHz range (which encompasses the large majority of modern telemetry, including the new generation of RC model units) is that they all play reasonably well together and the inherent frequency hopping/channel allocation they're ALL supposed to comply with is very good.

What seems to make the difference is the antenna design. The antenna on the Robotis Zigbee units isn't great and only works reliably when there's nothing in the way. Strangely you can get a surprisingly high range from this unit but it's sensitive to obstructions and interference even when it's very close to the transceiver it's talking to.

On the other hand the PS2 controllers we've played with seem to be (to all intents and purposes) immune to interference. We have yet to try them en masse but with two of them running and a bunch of other 2.4GHz units kicking around (wireless LAN, Bluetooth, zigbee) the PS2 seemed to be the second most reliable of the lot. The only one that was more reliable was Bluetooth but Bluetooth has a real data rate problem and only works with dedicated solutions, such as the built in solution in PS3/Xbox controllers, and the renegotiation overhead kills you if you do lose the signal.

The dedicated RC solutions (i.e. the Spectrum and Futaba solutions) are, of course, very good. However they usually have a channel limitation (only up to 7 channels or so), are unidirectional (no feedback) and don't have the variety of buttons useful for Robotics.

Bullit

11-07-2008, 06:07 PM

We used PS2 controllers for a while. The ones we used were Logitech, very nice and ergonomic.
We have since come to learn that they only support 7 controllers or frequencies at a time. We heard this from our friends from Japan before finding supporting documentation ourselves. We found the Logitech PS2 wireless controllers to be largely immune to most noise and their range is good. We did however experience problems with them at RoboGames 2007. The kind of interferece you get is not like the old RC days. Someone will not take over the control of your bot but you will loose connection and you may not easily be able to reconnect if all the frequencies are taken.

JoeStrout

11-08-2008, 08:23 AM

Thanks guys, that's really useful info! It sounds like PS2 controllers might be ideal for small events, where you can guarantee that there aren't going to be more than 7 controllers on at a time. (I've seen some events prohibit wireless use in the test area during competitions, so if you need to test your bot while you wait, you have to also have a wired solution.) But at a bigger event, Bluetooth might be preferable.

On the other hand, even at RoboGames, the PS2 controllers might be fine — the big combat vehicles are unlikely to be using them.

Best,
- Joe

Adrenalynn

11-08-2008, 10:53 AM

I'm still trying to envision a time when the words "bluetooth" and "preferable" might be used in the same sentence.

Oh! oh! I got it: "It would be preferable if someone were to go back in time and blow-up any documentation relating to the construction, use, or protocol for bluetooth". ;)

Actually - I think bluetooth is fantastic. For phone earbuds...

JoeStrout

06-19-2009, 08:12 PM

Sorry to dredge up this old topic, but I noticed at RoboGames last week that most of the humanoid robot builders were controlling their bots with PS3 controllers in Bluetooth mode. These controllers have lots of handy inputs (including 6DOF motion sensing), and the builders I asked all said that they worked very reliably, automatically reconnecting if the connection was ever dropped.

I asked the Farrells a little more about how it works; they're running a full Linux stack, and probably (my guess here) follow a procedure like this (http://www.pabr.org/sixlinux/sixlinux.en.html).

But my bot uses a simple ATmega128 controller, and I'm still not sure how to make it work. I understand from the Bluetooth overview (http://www.bluetooth.com/Bluetooth/Technology/Works/Overview_of_Operation.htm) that it's a master/slave technology; one master and all its slaves form a "piconet," with the master responsible for the timing and frequency-hopping of the whole network. From what I've gathered, PS3 controllers only work in slave mode, so I need to find a BT module that can be put into master mode.

I've been googling all afternoon, and I've been surprised to find no good information on how to do this. Is there anyone here who's enough of a BT expert to figure this out? I'll gladly buy you a PS3 controller if it would help! :)

Thanks,
—*Joe

Adrenalynn

06-19-2009, 08:18 PM

And Tybs' multi-thousand dollar humanoid took a header off a table from BT interference - but the XBee stuff kept tickin' right along. My arm controller running the 2mW XBee was still humin' along when the 75Mhz R/C controller ran out of range...

Implementing a BT stack on a 168 is going to be a challenge. I just don't think you have the codespace to make it happen, unless you find a module that has the stack already in it, like the WizNet/et-al Ethernet interfaces for the Arduino

JoeStrout

06-19-2009, 09:59 PM

And Tybs' multi-thousand dollar humanoid took a header off a table from BT interference - but the XBee stuff kept tickin' right along. My arm controller running the 2mW XBee was still humin' along when the 75Mhz R/C controller ran out of range...

I've gathered that you prefer XBee. :) But PS3 controllers don't speak XBee, so that's a non-starter for my purposes (which, I'll confess, range to more than just controlling my humanoid bot, though that is certainly one goal).

Implementing a BT stack on a 168 is going to be a challenge. I just don't think you have the codespace to make it happen, unless you find a module that has the stack already in it, like the WizNet/et-al Ethernet interfaces for the ArduinoThat's exactly what I'm hoping to find. It's still not clear to me whether I need a special "master" BT device, or whether some (most?) BT devices can simply be switched into master mode (perhaps via some AT command).

Adrenalynn

06-19-2009, 10:14 PM

Naw, it's going to have to be a bus master. And my google kungfu shows thousands whining and none succeeding. And that's with an arduino, not a generic 168...

Bullit

06-19-2009, 10:19 PM

I'm very pleased with Bluetooth especially v2.0. I'm not sure what happened to Tyb's bot but I've worked many hours in many locations for long periods of time with robots on Bluetooth and I've never seen corrupt data for any reason. That being said Tyb's has had all sorts of problems that I've never seen :(

What I've experienced with Bluetooth in really noisy environments is that the connection gets slow or gets dropped. That's it. Bluetooth v2.0 works best because it hops frequencies actively durring the connection where v1.0 only searches for the best channel on connection so Bluetooth v2.0 is much less likely to dropout due to interference.

This year at RoboGames I had radio interference only once and it was when my Bluetooth connection dropped from my laptop to my robot when the guys with the blimp switched it on two tables from us. They had some Chineese 2.4ghz radio. Several others with ps2 controllers lost connection at the same time.
With my ps3 controllers I had no issues.

If you use Bluetooth you want to be sure to get class 1 devices and v2.0. Adrenalynn is correct that it would be difficult to use HID protocols in an ATMega. Many of the bots use SPP which is convienient for cell phone control of pc control or a custom controller but none of the OTS controllers support SPP.

Joe - you have the right link there. I've learned a great deal friom Pascal Stang. He's kept his site up to date too as new information has become available.

StuartL

06-20-2009, 02:46 AM

Our PS2 controller for Bioloid is now in production. Obviously this doesn't help you if you're not using the Bioloid platform. Trossen were originally looking to resell this but I never did get around to negotiating sample pricing...

ScuD

06-20-2009, 03:47 AM

Bullit, I haven't found any master bluetooth modules, at least not with built-in bluetooth stack. Have you found any that you're using? I'd be very interested to know!

And before I get flamed by Lynn, it's not for me, it's a project someone at the university asked about :p

Sure, you can find serial to bluetooth slaves all over. BlueSmirf. I don't think that's what either of them were looking for, right? They wanted mastering HIDs?

I think Bullit is using the Gumstix - a "real" computer. It's easy to accomplish when you have a SAM7, SAM9, OMAP, etc.

robologist

06-20-2009, 04:41 PM

True, the PS3 has been mentioned several times as well as the HID difficulties for embedded devices. Without going into making an HID interface, it might be easier to make your own joystick device that is operationally similar but only sends serial data. With something like that, the sparkfun devices might be useful.

Yes, I even wrote to SparkFun tech support, but they were not helpful. Their answer boiled down to "beats us, maybe you should ask on our forums."

JoeStrout

06-22-2009, 12:15 PM

I think Bullit is using the Gumstix - a "real" computer. It's easy to accomplish when you have a SAM7, SAM9, OMAP, etc.

Bullit — is that the case? I know that the Farrells are using Gumstix too. Now I wish I'd paid more attention at RoboGames; it could be that some of the other builders that I thought were using PS3, were actually using PS2 controllers (which does appear to be a lot easier, though you lose the sixaxis inputs).

lnxfergy

06-22-2009, 12:29 PM

Bullit — is that the case? I know that the Farrells are using Gumstix too. Now I wish I'd paid more attention at RoboGames; it could be that some of the other builders that I thought were using PS3, were actually using PS2 controllers (which does appear to be a lot easier, though you lose the sixaxis inputs).

Bullit == farells....

-Fergs

Adrenalynn

06-22-2009, 12:29 PM

/Bites Tongue and let's "Bullit" take it.

[Edit: Never Mind. Fergy Spilled it.]

DresnerRobotics

06-22-2009, 12:35 PM

The PS2 controllers aren't bluetooth though, they're just vanilla 2.4ghz. That said, I was running around with my Phoenix using a 2.4ghz wireless PS2 controller and didn't run into an ounce of interference... which is really weird.

I'm using the same setup as Bullit (Farrell Robotics), and the connection between my robot and PS3 controller was rock solid. The only issue I ran into was when the robot was connected to my laptop via usb bluetooth dongle. I'm using one of the weaker series bluetooth modules, and somehow when I sent it a 'home position' command from the console, it went half way there and then all the servos went torque off (which luckily saved me, since no gears broke). I was also getting a lot of latency/lag on my console, or having the console connection drop out... all the while having zero issues when the PS3 controller was connected to my robot directly.

So all and all, the PS3 connection was amazingly rock solid. Never had an ounce of interference with that. It was the weak bluetooth dongle that had issues. That, and my wifi video was very laggy at times.

JoeStrout

06-22-2009, 06:10 PM

Bullit == farells....

Well then, don't I feel silly. :)

JoeStrout

06-22-2009, 06:14 PM

I'm using the same setup as Bullit (Farrell Robotics), and the connection between my robot and PS3 controller was rock solid.

And to be clear, the setup you're talking about is a Gumstix, running Linux, and using something like this procedure (http://www.pabr.org/sixlinux/sixlinux.en.html) to communicate with the PS3 controller. Is that right?

I guess I could go that route, but I was hoping for something smaller and cheaper that I could use as a dumb driver for a variety of projects (e.g. speaking to the Pololu serial motor driver, for example). Whatever the Linux stack is doing must not be magic — there's got to be a way to program a smaller MCU to do the same, especially if the only thing it needs to do is convert between BT and UART...

DresnerRobotics

06-22-2009, 06:26 PM

And to be clear, the setup you're talking about is a Gumstix, running Linux, and using something like this procedure (http://www.pabr.org/sixlinux/sixlinux.en.html) to communicate with the PS3 controller. Is that right?

I guess I could go that route, but I was hoping for something smaller and cheaper that I could use as a dumb driver for a variety of projects (e.g. speaking to the Pololu serial motor driver, for example). Whatever the Linux stack is doing must not be magic — there's got to be a way to program a smaller MCU to do the same, especially if the only thing it needs to do is convert between BT and UART...

Yes exactly. That said- its not a simple control solution, you might very well have a much easier time avoiding the Gumstix.

JoeStrout

06-22-2009, 06:43 PM

I've found this gadget (http://tinyurl.com/neundj) that appears to handle most of the work of being a BT controller (aka master).

Additionally, a UART interface is available that can be used as the Bluetooth host controller interface.It's not a complete module; one would still need an antenna and a few other components, but it sounds like it handles all the really tricky parts. Looks like it only supports Bluetooth 1.1, but then again, this is just the first thing I found once I started pursuing this angle. There are probably similar gadgets that support BT 2.0.

At any rate, I'll keep y'all posted on my progress (such as it is).

Adrenalynn

06-22-2009, 07:51 PM

ROFL! That's an ARM7 microcontroller. The thing that's most amusing is here: http://forums.trossenrobotics.com/showpost.php?p=31597&postcount=21 I wrote "It's easy if you have a SAM7[...]"

JoeStrout

06-22-2009, 09:43 PM

I really don't care what the controller is, if I can buy it at a reasonable price and plunk it into my project where a UART would normally go.

But it may turn out to be even easier than I had supposed. "phishguy" on the SparkFun forum claims (in this post (http://forum.sparkfun.com/viewtopic.php?p=75549#75549)) that BlueSMIRF, and most any other BT module, can simply be configured as a master. He's talking in the context of linking two such modules together, but I don't see why it wouldn't work just as well to link a PS3 controller to one of these modules.

As a supporting data point, the Parani-ESD module I use in my RoboBuilder can, according to its manual, act in either master or slave mode. It's a little unclear exactly how the pairing in master mode should be done, but surely they wouldn't have bothered to put that in if it weren't possible. ;)

As another supporting point, the Roving Networks modules (such as BlueSMIRF) says in its command manual (http://www.sparkfun.com/datasheets/Wireless/Bluetooth/rn-bluetooth-um.pdf) that its modules have three different Master Modes (differing in how the connection is established and broken).

So, I'm cautiously optimistic — it's beginning to look like all I have to do is configure my favorite BT module in master mode, and pair it with the PS3 controller. Then it will appear to my MCU as a serial port, same as before. (Then I'll need to dig up or reverse-engineer what data the PS3 controllers send, but that part doesn't worry me so much.)

Adrenalynn

06-23-2009, 12:07 AM

I wasn't aware that BlueSMIRF had an HID-master implementation. I was thinkin' it was just a raw serial stack. Would you shoot me over the linkage for the HID reference for it?

Bullit

06-23-2009, 05:35 AM

I hate to burst the bubble but the ps3 controller only pairs wired to USB. It only communicates with HID protocol. You'll need a processor capable of handling the HID stack and the USB interface to use it. Good news is that there are many such as Gumstix, the RoboBoard etc....

iBot

06-23-2009, 07:39 AM

As Bullit describes, the initial pairing of the PS3 controller is done as a HID device over wired USB. After that it uses Bluetooth HID. Pairing can be done on a seperate device from the bluetooth. The Wiimote also uses Bluetooth HID, though the pairing is done on bluetooth too.

Devices such as BlueSmirf are specifically designed for serial interface using an AT command set and do not support Bluetooth HID. Master or slave is not relavent here. I don't know of any existing device which converts PS3 bluetooth HID to commands directly usable by simple robot controllers.

There are devices which offer an HCI level interface and you can whatever you like on top. The most common of these is the USB dongle, though serial HCI devices are also available. If you use these devices then you have to implement HCI, L2CAP, and HID protocols in your software. Also the USB or serial protocols as approporiate. Of course Linux and Windows do this for you.

I have no doubt an AtMega168 can do this based on my own work, but would not be able to do much else.

My progress to date on this is that I have programmed a small ARM7 device with a MAX3421 USB interface to talk Bluetooth HID (inc HCI and L2CAP) to a Wiimote. USB is greatly simplified by knowing all about the bluetooth dongle in advance. Similarly the Bluetooth for both the Wiimote and the dongle is well know, so much of the pairing can be simplified and the Service Discovery Protocol is not required. Most of the complexity in both USB and Bluetooth is the support of many different devices. The trick is knowing what to discard from thousands of pages of specification.

I have stopped using the MAX3421 because it is going obsolete. I did look at the HCI serial devices though they are more expensive than the USB dongles. Also for a serial interface to the robot, you need a micro with two serial ports ( not AtMega 168 !). I have just prototyped up an AVR32 with onboard USB host, which is a low cost device and can support the USB dongle direct. I will use this likely with FreeRTOS and the lwbt stack. This will allow using both HID and serial at the same time.

This will also work for the PS3 controller. Let me know if you are interested to collaborate.