Version 17 (Kwabena Agyeman, 06/17/2013 12:29 pm) → Version 18/21 (Kwabena Agyeman, 06/17/2013 12:30 pm)

h1. Mobot - Article By: Cosku Acay, Edwin Cho, Kenneth Li, Nishant Pol

h3. *Project Description*

In Carnegie Mellon’s Mobot competition, robots must pass through a series of 14 gates positioned over a 255-foot curved white line on an outdoor sidewalk. The course includes two steep ramps and a decision point area where the robot must select the correct route to pass through 14 gates in serial order. Since the line is outdoors and under Pittsburgh’s weather, the robot must function in a variety of conditions. This year it was rainy and windy on competition day. More information can be found at

!/attachments/888/1_small.jpg!:/attachments/887/1_large.jpg !/attachments/890/2_small.jpg!:/attachments/889/2_large.jpg

h3. *Solution with the CMUcam4*

We chose to approach the line-following task using the CMUcam4 because it required minimal hardware and had an interface well suited for tracking a line.


The CMUcam4 captures an image of the line at 30 frames per second and feeds the color tracking image to the Arduino Mega via one of the three Serial lines. The Arduino Mega then processes this image (please see Software Description below) and delivers motor speed and turn commands to the PID controller via another Serial line. The PID controller in turn provides the Arduino Mega with encoder counts for both right and left wheels, which allows us to keep track of our position and heading relative to gate 0.

The PID controller (MD-25) is made by Robot-Electronics in the UK. It drives two geared DC brush motors with motor shaft magnetic encoders. The LCD screen is for debugging purposes. We had two power rails, 12V for motors and 5V for logic, sharing the same ground and both sourced from a single 12V rechargeable battery.

We initially planned to make a prototype from a wood base to get us into the programming phase quickly, then work on a faster, more reliable base such as an RC car. However, we found that the prototype was very reliable and easy to work with, so we kept it for the final design. Waterproofing for the body consisted of a layer of cellophane wrap under a layer of packaging tape. Rain however leaked through the packaging tape but fortunately not through the cellophane wrap. The camera was covered by a square of plastic from a Ziploc bag since we found that the “filter” improved the camera’s ability to ignore small patches of the line that, to the camera, looked like the background concrete.