RoboHeart Part 5

For the rest of the project, I had to get some help.

The Yellowjacket Arduino didn’t work. Well, it kind of worked. But not on my home Wi-Fi network. I expect it has to do with the security type on my network.

So, on to Plan B.

Finished Robot

A few months ago, NewEgg had a deal on the Asus WL-520gU wireless router, which has some nice benefits:

  • It has a USB port, which the Arduino can use for communicating with the network and for power
  • It supports DD-WRT, a lightweight Linux for routers
  • It is cheap
  • Other people have already figured out how to use it the way we want

Figuring out how to get this working was a little beyond me, so I looked to a couple of useful blog posts – MightyOhm’s internet radio project and Todbot’s Wi-Fi For Arduino write-up, which has good step-by-step instructions.

Getting DD-WRT installed is the first – and potentially most difficult step. There are plenty of pages on the wiki to help get the software installed. Unfortunately, they don’t all agree, and version difference sometimes interfere with the process. But it is possible and once you figure out the right steps, it goes pretty well.

I have a second router to convert, and I’ll post the steps for my particular case.

Once DD-WRT is installed, you have to configure the router for your needs. I needed to set it up in client bridge mode. This makes the router log in to the main wireless access point as a client. This is a great way to add Wi-Fi capability to devices with an Ethernet port but no built-in wireless.

My wireless network uses an odd IP subnet (part of my security scheme) and I reserve a chunk of IP addresses for static addresses. I gave one of these to my Asus router.

At this point, I can plug the robot’s USB plug into the USB port of the router, and it will start the heartbeat pattern on the BlinkM. It’s kind of a big, expensive wall wart DC converter. But with a little hacking, we can make it cooler.

To get the router to communicate with the Arduino properly, we need to install USB serial drivers. This part gets tricky, because Arduino has changed the way they implement their USB port. They used to use a FTDI chip to manage the USB port, but have changed to a special-purpose AVR chip which is much more flexible. But you have to install the right driver based on which type of Arduino you’re using.

After getting the Arduino drivers installed, the real functionality still needs to be implemented. Because I haven’t figured out how to make the Arduino check a Twitter feed, I used the serial to network proxy solution detailed in Todbot’s blog. Basically, it allows the Arduino to use the Wi-Fi connection for it’s usual serial communication routines.

The upshot of all this is that I can use telnet from any computer on my Wi-Fi network (or the internet, if I chose to set up my firewall to allow it) to the robot and type commands. I used a modified version of the BlinkMTester sketch that launches the first stored sequence on the BlinkM. It also allows me to type commands to start and stop sequences, or change the color.

I was a bit nervous about how the missus would take me modifying her art piece. But I needn’t have worried. She loved the robot and it’s new functionality. It’s like she got a new art piece and instead of spending hundreds or thousands of dollars on a Jim Bauer sculpture, and instead, it took about $80 worth of parts:

  • Arduino ($30)
  • BlinkM ($25)
  • USB cable ($10)
  • Asus router ($15) (on sale, after mail-in rebate)

Post a Comment

Your email is never shared. Required fields are marked *