Any new approaches to controlling an AVR-based bot?

Discussions regarding building a walking robot at home. Most of the robots participating at Robo-One competitions are custom fabricated.
12 postsPage 1 of 1
12 postsPage 1 of 1

Any new approaches to controlling an AVR-based bot?

Post by Joe » Wed Oct 26, 2011 3:08 pm

Post by Joe
Wed Oct 26, 2011 3:08 pm

I've asked this before, but since I've been out of it a while, I thought I'd bring it up again to see if there are any new developments.

I've observed that most Robo-One contestants control their bots with something resembling a PS3 controller (or, in some cases, an actual PS3 controller). This makes great sense to me because it has lots of control inputs, both analog and digital, which is pretty important for fine control of a bot.

But, as far as I've been able to tell, there is no way to pair a PS3 controller with an AVR-based microcontroller (e.g. the ATmega128). The problem is that the game controller is a HID slave device, so you need to pair it with something that can be a HID master. The Bluetooth devices you can easily add to an mcu are essentially wireless serial ports, and don't understand the HID protocol. Or so it was a year or two ago, at least. (But you can do it if you use a beefier mcu; I believe the Farrells use Gumstix, which works as a HID master just fine.)

So... what are the other home brewers here using to control their bots these days?

Thanks,
- Joe
I've asked this before, but since I've been out of it a while, I thought I'd bring it up again to see if there are any new developments.

I've observed that most Robo-One contestants control their bots with something resembling a PS3 controller (or, in some cases, an actual PS3 controller). This makes great sense to me because it has lots of control inputs, both analog and digital, which is pretty important for fine control of a bot.

But, as far as I've been able to tell, there is no way to pair a PS3 controller with an AVR-based microcontroller (e.g. the ATmega128). The problem is that the game controller is a HID slave device, so you need to pair it with something that can be a HID master. The Bluetooth devices you can easily add to an mcu are essentially wireless serial ports, and don't understand the HID protocol. Or so it was a year or two ago, at least. (But you can do it if you use a beefier mcu; I believe the Farrells use Gumstix, which works as a HID master just fine.)

So... what are the other home brewers here using to control their bots these days?

Thanks,
- Joe
Joe offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 204
Joined: Tue Sep 05, 2006 1:00 am

Post by mog123 » Wed Oct 26, 2011 6:53 pm

Post by mog123
Wed Oct 26, 2011 6:53 pm

You're wrong in thinking it's a PS3 controller. It's a PS2 controller! Just a wireless one. Japanese builders use hori controllers that v-stone adds to their servo controller. Some use logitech cordless action controllers. There is some information on the web regarding support for a ps2 controller on an avr, you just gotta search.
You're wrong in thinking it's a PS3 controller. It's a PS2 controller! Just a wireless one. Japanese builders use hori controllers that v-stone adds to their servo controller. Some use logitech cordless action controllers. There is some information on the web regarding support for a ps2 controller on an avr, you just gotta search.
mog123 offline
Savvy Roboteer
Savvy Roboteer
Posts: 50
Joined: Sat Jan 30, 2010 2:19 pm

Post by l3v3rz » Wed Oct 26, 2011 7:42 pm

Post by l3v3rz
Wed Oct 26, 2011 7:42 pm

Have you seen this on their korean site

http://robobuilder.net/product/product_ ... %F1&sname=

Might be what you're after (assuming you can buy it) - but not cheap - 206k WON = 180 USD

Alternative a DIY option

http://robobuilder.net/product/product_ ... %F1&sname=

A more reasonable 137k WON

Incidentally whats wrong with BT and may be a iPad or Android app with guesture control etc ... Does BT have the range ?
Have you seen this on their korean site

http://robobuilder.net/product/product_ ... %F1&sname=

Might be what you're after (assuming you can buy it) - but not cheap - 206k WON = 180 USD

Alternative a DIY option

http://robobuilder.net/product/product_ ... %F1&sname=

A more reasonable 137k WON

Incidentally whats wrong with BT and may be a iPad or Android app with guesture control etc ... Does BT have the range ?
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by Joe » Wed Oct 26, 2011 8:04 pm

Post by Joe
Wed Oct 26, 2011 8:04 pm

mog123 wrote:You're wrong in thinking it's a PS3 controller. It's a PS2 controller! Just a wireless one.


But hang on... my understanding was that wireless PS2 controllers don't handle interference very well. Though I guess they must support at least 2 channels, since you could be using two of them at once on your game console at home... But if it's only 2, how do they do things like the "robot rumble" where 10 bots at once are duking it out?

Japanese builders use hori controllers that v-stone adds to their servo controller. Some use logitech cordless action controllers.


I see the Logitech one is just a wireless PS2 controller... hori is the same?

Perhaps I need to give this option a closer look. I will admit that it should be easy enough to do, since the PS2 controller interface IIRC is basically just a parallel port [EDIT: no, it's actually a serial protocol based on SPI]. I had just always assumed that this approach wouldn't scale to more than a couple of bots.

Thanks,
- Joe
mog123 wrote:You're wrong in thinking it's a PS3 controller. It's a PS2 controller! Just a wireless one.


But hang on... my understanding was that wireless PS2 controllers don't handle interference very well. Though I guess they must support at least 2 channels, since you could be using two of them at once on your game console at home... But if it's only 2, how do they do things like the "robot rumble" where 10 bots at once are duking it out?

Japanese builders use hori controllers that v-stone adds to their servo controller. Some use logitech cordless action controllers.


I see the Logitech one is just a wireless PS2 controller... hori is the same?

Perhaps I need to give this option a closer look. I will admit that it should be easy enough to do, since the PS2 controller interface IIRC is basically just a parallel port [EDIT: no, it's actually a serial protocol based on SPI]. I had just always assumed that this approach wouldn't scale to more than a couple of bots.

Thanks,
- Joe
Last edited by Joe on Wed Oct 26, 2011 8:21 pm, edited 1 time in total.
Joe offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 204
Joined: Tue Sep 05, 2006 1:00 am

Post by Joe » Wed Oct 26, 2011 8:11 pm

Post by Joe
Wed Oct 26, 2011 8:11 pm

l3v3rz wrote:Alternative a DIY option

http://robobuilder.net/product/product_ ... %F1&sname=

A more reasonable 137k WON


Most of the text on that page appears to be images, which Google can't translate. But I think I get the idea... looks like something that attaches to a PS2 controller, and establishes a wireless connection.

Actually that's an interesting idea... if the off-the-shelf third-party PS2 wireless controllers don't scale well, then I could instead just buy a regular (wired) PS2 controller, hack the cable, and hook it into a Bluetooth module. I'd probably need a little AVR chip or something in between to pack up the data and send it across, which would mean some ugly boards sticking out the top of my controller... which seems to be pretty much what RoboBuilder has done. :) But it would work.

Incidentally whats wrong with BT and may be a iPad or Android app with guesture control etc ... Does BT have the range ?


Yes, BT is fine; I just don't think a mobile or iPad app is a very good controller. You can't feel the control inputs, so either you have very few of them (so big you can't miss), or you end up splitting your attention between the controller and the bot. I'd rather stay focused on the bot, manipulating the controller by feel alone.

Thanks for the ideas — I'll keep y'all posted as I go!
l3v3rz wrote:Alternative a DIY option

http://robobuilder.net/product/product_ ... %F1&sname=

A more reasonable 137k WON


Most of the text on that page appears to be images, which Google can't translate. But I think I get the idea... looks like something that attaches to a PS2 controller, and establishes a wireless connection.

Actually that's an interesting idea... if the off-the-shelf third-party PS2 wireless controllers don't scale well, then I could instead just buy a regular (wired) PS2 controller, hack the cable, and hook it into a Bluetooth module. I'd probably need a little AVR chip or something in between to pack up the data and send it across, which would mean some ugly boards sticking out the top of my controller... which seems to be pretty much what RoboBuilder has done. :) But it would work.

Incidentally whats wrong with BT and may be a iPad or Android app with guesture control etc ... Does BT have the range ?


Yes, BT is fine; I just don't think a mobile or iPad app is a very good controller. You can't feel the control inputs, so either you have very few of them (so big you can't miss), or you end up splitting your attention between the controller and the bot. I'd rather stay focused on the bot, manipulating the controller by feel alone.

Thanks for the ideas — I'll keep y'all posted as I go!
Joe offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 204
Joined: Tue Sep 05, 2006 1:00 am

Post by i-Bot » Wed Oct 26, 2011 8:37 pm

Post by i-Bot
Wed Oct 26, 2011 8:37 pm

It depends on whether you stick with the RBC controller, move to a different AVR, or shift to linux/XP.

On the RBC, I used the Logitech PS2 controller, which emulated the IR controller and plugged into the IR connector on the RBC. The Logitech receiver fits inside the head with a PIC to interface. About $30 including refurbished PS2 wireless controller and receiver.

I have run PS3 controllers via bluetooth on AVR, but it requires the AVR to have a USB host interface for the bluetooth.

Currently I run PS3 bluetooth to a small linux board and connect the wCk to the linux USB port through a small FTDI board. I can let you have the linux wCk library and the modified Darwin code if you want to go this route.

I got sort of distracted from Robobuilder by Bioloid. I hope you may rekindle my interest.
It depends on whether you stick with the RBC controller, move to a different AVR, or shift to linux/XP.

On the RBC, I used the Logitech PS2 controller, which emulated the IR controller and plugged into the IR connector on the RBC. The Logitech receiver fits inside the head with a PIC to interface. About $30 including refurbished PS2 wireless controller and receiver.

I have run PS3 controllers via bluetooth on AVR, but it requires the AVR to have a USB host interface for the bluetooth.

Currently I run PS3 bluetooth to a small linux board and connect the wCk to the linux USB port through a small FTDI board. I can let you have the linux wCk library and the modified Darwin code if you want to go this route.

I got sort of distracted from Robobuilder by Bioloid. I hope you may rekindle my interest.
i-Bot offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by limor » Wed Oct 26, 2011 10:06 pm

Post by limor
Wed Oct 26, 2011 10:06 pm

this subject pops up every now and then.
What about something like this?
Image
this subject pops up every now and then.
What about something like this?
Image
limor offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by l3v3rz » Wed Oct 26, 2011 10:34 pm

Post by l3v3rz
Wed Oct 26, 2011 10:34 pm

Yes, BT is fine; I just don't think a mobile or iPad app is a very good controller. You can't feel the control inputs, so either you have very few of them (so big you can't miss), or you end up splitting your attention between the controller and the bot. I'd rather stay focused on the bot, manipulating the controller by feel alone.



Did you realise you can get BT controllers to talk to android phones

http://www.dealextreme.com/p/msi-bgp100 ... uded-13760

Or even use a WII remote
http://pocketnow.com/tweaks-hacks/contr ... controller

If you have BT module and android phone this is a cheap option ...
Yes, BT is fine; I just don't think a mobile or iPad app is a very good controller. You can't feel the control inputs, so either you have very few of them (so big you can't miss), or you end up splitting your attention between the controller and the bot. I'd rather stay focused on the bot, manipulating the controller by feel alone.



Did you realise you can get BT controllers to talk to android phones

http://www.dealextreme.com/p/msi-bgp100 ... uded-13760

Or even use a WII remote
http://pocketnow.com/tweaks-hacks/contr ... controller

If you have BT module and android phone this is a cheap option ...
l3v3rz offline
Savvy Roboteer
Savvy Roboteer
Posts: 473
Joined: Fri Jul 18, 2008 2:34 pm

Post by Joe » Wed Oct 26, 2011 11:53 pm

Post by Joe
Wed Oct 26, 2011 11:53 pm

l3v3rz wrote:
Yes, BT is fine; I just don't think a mobile or iPad app is a very good controller. You can't feel the control inputs, so either you have very few of them (so big you can't miss), or you end up splitting your attention between the controller and the bot. I'd rather stay focused on the bot, manipulating the controller by feel alone.


Did you realise you can get BT controllers to talk to android phones


Yes, but as I said, I don't feel a mobile phone is a very good controller for actual competition. I want controls I can feel in my hands.
l3v3rz wrote:
Yes, BT is fine; I just don't think a mobile or iPad app is a very good controller. You can't feel the control inputs, so either you have very few of them (so big you can't miss), or you end up splitting your attention between the controller and the bot. I'd rather stay focused on the bot, manipulating the controller by feel alone.


Did you realise you can get BT controllers to talk to android phones


Yes, but as I said, I don't feel a mobile phone is a very good controller for actual competition. I want controls I can feel in my hands.
Joe offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 204
Joined: Tue Sep 05, 2006 1:00 am

Post by Joe » Wed Oct 26, 2011 11:55 pm

Post by Joe
Wed Oct 26, 2011 11:55 pm

limor wrote:this subject pops up every now and then.
What about something like this?


Would that be usable with an ATmega128? I don't have any experience with Zigbee. What's the difference between the Zig100 and Zig110, and which should I choose?
limor wrote:this subject pops up every now and then.
What about something like this?


Would that be usable with an ATmega128? I don't have any experience with Zigbee. What's the difference between the Zig100 and Zig110, and which should I choose?
Joe offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 204
Joined: Tue Sep 05, 2006 1:00 am

Post by Joe » Thu Oct 27, 2011 12:17 am

Post by Joe
Thu Oct 27, 2011 12:17 am

i-Bot wrote:It depends on whether you stick with the RBC controller, move to a different AVR, or shift to linux/XP.

On the RBC, I used the Logitech PS2 controller, which emulated the IR controller and plugged into the IR connector on the RBC. The Logitech receiver fits inside the head with a PIC to interface. About $30 including refurbished PS2 wireless controller and receiver.

I have run PS3 controllers via bluetooth on AVR, but it requires the AVR to have a USB host interface for the bluetooth.


Thanks for this advice. I want to stick with the RBC for now, though when the Raspberry Pi comes out, I may not be able to resist!

So I went ahead and ordered a wireless PS2 controller — not the Logitech one, which I couldn't find in stock anywhere, but something similar.

Can you elaborate on how you got a USB host interface on an AVR? Which AVR chip was that, and is this something you think the ATmega128 could handle? I ask because it'd still be nice to skip the extra receiver and just use a PS3 controller (plus the BT module the bot already has), if possible.

Best,
- Joe
i-Bot wrote:It depends on whether you stick with the RBC controller, move to a different AVR, or shift to linux/XP.

On the RBC, I used the Logitech PS2 controller, which emulated the IR controller and plugged into the IR connector on the RBC. The Logitech receiver fits inside the head with a PIC to interface. About $30 including refurbished PS2 wireless controller and receiver.

I have run PS3 controllers via bluetooth on AVR, but it requires the AVR to have a USB host interface for the bluetooth.


Thanks for this advice. I want to stick with the RBC for now, though when the Raspberry Pi comes out, I may not be able to resist!

So I went ahead and ordered a wireless PS2 controller — not the Logitech one, which I couldn't find in stock anywhere, but something similar.

Can you elaborate on how you got a USB host interface on an AVR? Which AVR chip was that, and is this something you think the ATmega128 could handle? I ask because it'd still be nice to skip the extra receiver and just use a PS3 controller (plus the BT module the bot already has), if possible.

Best,
- Joe
Joe offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 204
Joined: Tue Sep 05, 2006 1:00 am

Post by i-Bot » Thu Oct 27, 2011 2:26 pm

Post by i-Bot
Thu Oct 27, 2011 2:26 pm

This was the first version which works with standard Robobuilder firmware:
Image

The Logitech PS2 receiver and the PIC board are in the head:
Image

If you keep the RBC but use different firmware, then you have more flexibitity to connect the PS2 receiver direct. Here is my RBC with added IO connectors (here I2C and A2D for Gyros):
Image
Backbox is left off because I used larger LiPo.

I too await the Raspberry Pi, probably the lower spec one, because I need more USB ports, so use a small hub. Pic here shows the hub and the small FTDI board I use to connect the wCK to the USB.
Image

To use a PS3 bluetooth dongle you need an Atmega with USB host (AT90USB1286) or a board with an external USB host, like the Arduino USB Host or Arduino ADK board. If you go arduino, get one with multiple hardware serial ports (Mega).

The standard Robobuilder bluetooth module cannot talk to the PS3 controller, because it conforms to the serial port probile and not the Bluetooth HID required by the PS3 controller.
This was the first version which works with standard Robobuilder firmware:
Image

The Logitech PS2 receiver and the PIC board are in the head:
Image

If you keep the RBC but use different firmware, then you have more flexibitity to connect the PS2 receiver direct. Here is my RBC with added IO connectors (here I2C and A2D for Gyros):
Image
Backbox is left off because I used larger LiPo.

I too await the Raspberry Pi, probably the lower spec one, because I need more USB ports, so use a small hub. Pic here shows the hub and the small FTDI board I use to connect the wCK to the USB.
Image

To use a PS3 bluetooth dongle you need an Atmega with USB host (AT90USB1286) or a board with an external USB host, like the Arduino USB Host or Arduino ADK board. If you go arduino, get one with multiple hardware serial ports (Mega).

The standard Robobuilder bluetooth module cannot talk to the PS3 controller, because it conforms to the serial port probile and not the Bluetooth HID required by the PS3 controller.
i-Bot offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am


12 postsPage 1 of 1
12 postsPage 1 of 1