OpenWrt Forum Archive

Topic: ASUS WL-500gP Robotics Platform

The content of this topic has been archived on 16 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

This idea was spawned when my uncle became unable to physically accomplish a portion of his job.  Why not build a robot from the ground up?  So, with a little brainstorming (that lasted well over a year), the idea to use a wireless router as the "brains" of this project came about.  I had read about running optimized Linux distributions on these devices and started researching various devices and came across one that met all the requirements that I had in mind (ASUS WL-500g Premium):
     1) Affordable: not more than $90 on Newegg.
     2) Dual external USB2 ports: one for webcam, the other for external storage.
     3) Memory: can't have enough! With 32MB RAM and 8MB of flash, it is highly upgradeable.

Doing a little research, I came across a website (LINK) that interfaced a Linksys WRT54GS to a cheap RC car using an H-Bridge attached to an I2C port expander through the GPIO pins on the router.  Currently, I am looking at using solid state relays to drive the motors.  Running the whole show is a stripped down compile of OpenWRT from the SVN.  So far everything has gone smoothly, the only real issues I'm having are finding documentation on the GPIO pins on this router (along with how to interface with them through a kernel-mode driver, though I'm sure I should check out the source for MMC mods), and a reliable method of providing a stable 5v at 2.5A.

Also, if anyone has any constructive criticism on any of my ideas, please, feel free to send them my way.

Development blog
Photo blog

Edit: Added WRT54GS rc car mod link
Edit: Changed amperage to reflect AC adapter

(Last edited by bikedude880 on 11 Mar 2008, 17:41)

Take a look at Phidgets; they'll let you do pretty much anything your heart desires with a bit of your own custom coding. The basic Phidgets interface code should compile under openWRT without too much hassle, though I haven't gotten around to trying it myself yet so I don't know for certain. (I compiled it on my ARM-based Nokia N800 tablet without any problems at all so I don't think openWRT will be any more difficult than that!). There's a vast number of sensors, actuators, relays/etc all available to standard kits that connect to the USB port; full documenation and lots of examples are also available on how to use 'em under Linux (and everything else for that matter).
www.phidgets.com

Good luck on the project!

-Rob

Thanks for the link jolouis, I'll look into it.  Right now I'm held up with the whole "do I want wireless or a webcam" phase which can easily be remidied by an Atheros card.  Other than that, I've received the "prototype" base for the whole thing (of which I will be posting pictures of shortly) a few days ago and am thoroughly impressed with the quality of workmanship it shows.

Personally I've been thinking about controlling the whole thing with an h-bridge hooked up to a bit-bashing I2C bus on the GPIO pins, as I'm not too concerned about overall performance right now so much as total cost.  With regards to the power supply, the router (and possible USB hub) will have a dedicated 12v supply (regulated down to the 5v needed) and a seperate battery pack for the motors.

After that, all that is needed is a server-client program to run the show.  The client program will connect to the server via a UDP socket (gotta love streaming interfaces), poll a joystick device for direction, send the commands in hex form to the server program, where they will be sent to the correct I2C device.  A second server program (seperate from the control interface) will poll a USB webcam (360 degree "doughnut") and send it along to the client (where it will be flattened out) via a second UDP socket.  This video stream will be displayed in the client's window for navigation use.  If I really feel inspired I could have a second webcam to take small snapshots of the surrounding environment and store it on a USB flash drive (hello powered USB hub).

Other than all that, I'm looking forward to getting this project moving a bit faster now. smile

(Last edited by bikedude880 on 25 Mar 2008, 21:51)

Good luck on it! Certainly sounds much more challenging from a software point of view than anything else. If you've got an Atheros card on the way just install 2.6 with atheros support and get the webcam working/software going; worst case scenario after all is to add a USB wifi adapter if nothing else. You'll have to be careful with the power to; the Asus is pretty smart in that it monitors the input voltage and shuts down/refuses to power itself if the voltage is over 5.25 or under 4.75V, but if you're running of battery power (depending on the size of the thing you're building here) you'll want to make sure you get an efficient switching power regulator that will be able to drop the 12V to 5V AND handle the amperage required (the WL-500GP with wifi and no USB devices looks for about 1.6-1.7A @ 5V; connecting USB devices obviously adds more to that).

-Rob

The discussion might have continued from here.