After blinking an LED with an Arduino, it seems like building a wheeled robot is a popular project. It turns out making a self-navigating robot, that can deal with arbitrary household obstructions, is an interesting problem. Here’s the movie of our first attempt.

We used continuous-rotation servo motors to provide motion and steering. These are easy to control and you can drive them directly using the Arduino 5 volt power. We used and an Adafruit motorshield to control the motors. This isn’t strictly necessary for a servo, but it is convenient.

Arduino and Motorshield

Parts

  • Arduino Duemilanove
  • Adafruit motorshield
  • 2 x continuous rotation servos
  • Sharp GP2Y0A02YK0F IR distance sensor. The IR distance sensors sensors come in several versions, optimised to work over different distances. We used one designed for 200 – 1500mm range.  The GP2Y0A21YK0F which works over 100 – 800mm might be a better choice
  • Mini breadboard
  • Breadboard wires
  • 6-cell AA battery pack and NiMH batteries
  • Fischer Technik baseplate, 2 x pulleys and axle

Rubberbands hold the motors together and attach them to the baseplate. If the rubberbands are tight, there is enough friction to prevent slipping. Rubberbands also attach the  battery pack, Arduino and breadboard to the top of the robot. Bluetack holds the IR distance sensor on the front.

The two Fischer Technik pulleys and axle form a trailing castor.

The IR distance sensor triggers a random turn when the robot comes within about 350mm of an object.  The Arduino powers the sensor from the 5v line. The sensor outputs a voltage that decreases with distance: 2.7v at 100mm down 0.5v. The Arduino analog pins measure the voltage to sense obstructions.

Arduino program source code is on github – download here or visit the repository.

How did it turn out? The robot navigates well in areas with solid walls.  However the IR sensor has quite a narrow beam, so the robot will hit small obstructions on the floor or overhangs. Also the sensor does not reliably detect glass, reflective object or black objects. The robot requires human help from time to time.

About these ads