PAGE 11 | 1DAY ROBOTICS #2: SENSORS © 2 0 12- 2022 M I C H A E L E T T E R S H A N K
https://www.robotscience.co.za
1DAY OF ROBOTICS #2: PART 3 THE BASICS OF FOLLOWING A LINE
We already learnt how to get the PRIMO ROBOT to react to light hitting a simple photo transistor sensor, now it’s time to
see if we can use this simple technology to solve a challenge to make the PRIMO ROBOT navigate a maze autonomously.
In modern factories automation delivers consistent quality day in and day out, because the machines are able to operate
largely without human intervention. To create an autonomous system of your own, you can program the PRIMO ROBOT to
follow a line through the maze. The maze consists of a flat white [or black] surface with a black [white if the maze surface is
black] line on it made using a cheap roll of electrical insulation tape from the local hardware store.
While the basic line following system in this workshop will work well indoors, note that it will not work reliably outdoors in
bright sunlight where high light levels will overwhelm the sensors. Enclosing the sensors can improve reliability.
VIEW FROM OVERHEAD THE ROBOT SHOWING THE POSITION OF THE LINE SENSOR
HOW DOES LINE FOLLOWING WORK?
The robot drives forwards along a line until one of the sensors “sees” that the robot has moved to one side, then the robot
turns slightly and drives the other way until the other sensor ends up over the black line. In the above drawing the line
sensor is over the black line, which means the two middle sensors return a low reading, the other sensors are over white so
they return high readings.
In the drawings below we can see the values the robot sensors return when the robot is exactly overhead the line. The
white dots represent a photo-transistor that is returning a value that is above the threshold [in other words HIGH] and the
black dots represent a photo-transistor that is returning a value that is below the threshold [in other words LOW].
When the robot moves a little towards the left or right as it follows the line, the readings coming from the sensors change:
The readings coming from the sensors modify the direction of travel of the robot to keep it on the line through the maze.