Jun 28, 2011

Arduino Roomba Wishield

Last week we experimented with the iRobot Create Open Interface platform as part of our collaboration with Golan Levin and his GML to Roomba project (see other GML related projects), at the CMU STUDIO for Creative Inquiry, Pittsburgh, with the following people involved:
Golan Levin: GML parsing; project management.
David Sanz Kirbis: Arduino development and wireless protocols.
Paul Miller: Processing software and robot control.
Evan Roth and Matthew Gray: Instigation.

We had to deal with a Wishield 1.0 board for Arduino, and the library provided by AsyncLabs. In the library's examples, there is a UDP protocol sketch to communicate to the Wishield through the wireless network, but we found a lack of documentation about it. The example comes with a .c file that handles the access to the incoming and outgoing data packets, but there was no access from the arduino sketch itself.
After a couple of modifications of the the library's WiFi class, we added some properties to be able to receive and send data from the Arduino .pde sketch.
The arduino was connected to the robot via the DB-25 cargo bay port. This port delivers TTL serial RX/TX, regulated 5v to power the arduino, and direct access to the battery 14.4v unregulated power for higher voltage devices.
We made a simple test program to let the arduino parse the incoming wifi data commands and send to the robot the ones destined to it. In addition the arduino would detect a specific command to handle the on and off switching of a 14v bulb attached to one of the available digital pins (not used by the Wishield).
For the switching we first put a transistor directly to the arduino's digital pin, but it couldn't handle the drained current, so the board poweref off to protect itself. To solve this we put a resistor that kept the current below the maximum of the pin, but enough to trigger the transistor.

Here is a fritzing schematic of the connections and parts used (the drawing doesn't show the Wishield connected to the arduino):
  • 1 NPN transistor TIP3055
  • 1 resistor 160 ohm
  • 1 bulb rated 14.4v 200mA

To controll the path of the robot for the lightpainting, Paul Miller made a Processing sketch that reads the GML data parsed by Golan Levin's code and sends the proper commands via UDP to move the robot.

Here is a link to the ligthpainting video and further explanation by Golan. 

No comments:

Post a Comment