How to Make a Line Follower Robot

Line following is a popular project for robot hobbyists, and a classic with the four wheel robots you can buy online or at hobby shops. These robots have a microprocessor on a single chip, called a "Stamp," that can be programmed to control the robot's behavior. The robot has a variety of sensors, and a breadboard, so the parts can be easily connected to augment the robot's circuitry.

Things You'll Need

  • Programmable robot
  • Two light sources
  • Two optical sensors
Show More

Instructions

    • 1

      Connect two light sources and sensors to the bottom of the robot. Each light source should shine down and reflect up to the sensor. Optical sensors should be far enough apart so the line the robot follows will fit their light patterns. Set the line between the sensors so the robot advances, unless the sensors detect a line. When a sensor detects the line -- because the reflected light level has changed -- it will cause the robot to turn.

    • 2

      Program the robot for line following behavior. There should be a main loop of instructions that runs continuously. The loop will consist of three commands: 1) If the line is detected by the right sensory assembly, turn left; 2) If the line is detected by the left sensory assembly, turn right; and 3) move forward. The first two commands are used as needed, while the third command is executed every time around the loop. The robot moves forward until it needs to turn, then it turns and advances forward.

    • 3

      Test the program and sensory assemblies thoroughly. Every variable should operate in the middle of its effective range. For example, these robots usually turn by stopping one wheel briefly. To turn right, stop the right wheel a few milliseconds and the left wheel will turn the robot to the right. Find the shortest feasible time and the longest feasible time and set it in the middle. Do this with every variable to get the best results.

Learnify Hub © www.0685.com All Rights Reserved