NXT controlled Roomba

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

NXT controlled Roomba

Postby lukeyes » Fri Feb 04, 2011 7:25 pm

Hi everybody,

I have an idea for a project, and I think it is feasible, but I'm sure people on this forum would know more than I do.

I recently upgraded my Roomba's firmware so that it can use the SCI (Serial Command Interface). I am able to connect the Roomba to the PC via a USB ICreate cable.

Given that the NXT has a USB connection, my idea is to use an adapter to connect the NXT to the Roomba and send serial commands to the Roomba to control it.

Has anyone tried this? Does it sound feasible? Would I be able to use USBConnection and just send the data in a particular format?

Thanks for the help in advance.

Luke
lukeyes
New User
 
Posts: 4
Joined: Fri Feb 04, 2011 7:20 pm

Postby gloomyandy » Fri Feb 04, 2011 7:36 pm

Hi,
The problem is that a USB connection is not symmetric at a hardware level. One end is a master the other a slave. The USB interface on a PC is the master, the device in the NXT is a slave. I doubt if you will find any sort of USB adaptors that you can connect to the NXT that will then allow it to connect to your Roomba (other than using something equivalent to a PC)...

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4081
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby lukeyes » Fri Feb 04, 2011 7:53 pm

When you are talking about the hardware level, are you speaking of the physical connectors?

my idea was to get a USB A Male to USB B Female adapter.

Like the following

http://us.startech.com/product/GCUSBABF ... B-A-Female

Then, I can plug the ICreate cable into the female end of the adapter and create a physical connection from the NXT to the Roomba.

However, if there is some piece of hardware that is needed to let the NXT serve as a host, then I can see that not working. However, I'm sure that this could be built with a microcontroller as a pass through (although the issue at that point is why not just use this microcontroller to control the Roomba).
lukeyes
New User
 
Posts: 4
Joined: Fri Feb 04, 2011 7:20 pm

Postby gloomyandy » Fri Feb 04, 2011 8:08 pm

It is more than just the connector, that hardware on the NXT is not capable of being a USB host... Yes you possibly build an adaptor using a Micro-controller that can act as a a USB host (though there are not that many that can act in this role). This was what I was referring to when I said equivalent to a PC. But many of the controllers that have this level of USB support are actually more powerful than the NXT!

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4081
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby lukeyes » Fri Feb 04, 2011 9:03 pm

Ahh, I see, that makes sense.

Although I did a quick search for "Software USB Host" and found this.

http://courses.cit.cornell.edu/ee476/Fi ... index.html

It looks like some students were able to make a software usb host that runs on an Atmel Mega32.

Given that the NXT uses Atmel microprocessors, and that the coprocessor is an ATMega48, I'm hopeful that a software USB host could be built for the NXT.

Of course, that's me being hopeful, anyone know if this would be possible/feasible?

Thanks,
Luke
lukeyes
New User
 
Posts: 4
Joined: Fri Feb 04, 2011 7:20 pm

Postby gloomyandy » Fri Feb 04, 2011 10:05 pm

Well you might be able to make it work, but would it really be worth it? If you used anything other than the Arm chip in the nxt you would have to hack the hardware as it is the Arm that is connected to the USB hardware. Even then I'm not sure if the hardware can be used as a host (the host will normally supply power)... I guess you might be able to hack something together using one of the sensor ports, but I suspect you would have to modify the firmware to do it...


Good luck if you try!

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4081
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK


Return to NXJ Projects

Who is online

Users browsing this forum: No registered users and 1 guest

cron
more stuff