How do you feel about this article? Help us to provide better content for you.
Thank you! Your feedback has been received.
There was a problem submitting your feedback, please try again later.
What do you think of this article?
Following a line is one of the most used techniques in Robotics to help Robots get an orientation indoors. You will see factory Robots following lines to carry objects from one place to another without human intervention. There are different ways to do this and in this video, the IR-array sensor at the bottom of the motor board is used to get the Robot to follow a line.
The Arduino Robot starter kit comes with five infrared sensors at the bottom of the motor board. This is to enable it to measure the reflection of infrared light to detect the different qualities of the material underneath. For example, by analysing the reflected infrared light, it is possible to distinguish whether the colour of the surface is light or dark.
In this example, a racing track is created by drawing a black line over a white surface. The different sensors read data that will be used to feed a PD algorithm. PD stands for Predictive-Derivative and it is used to make a decision on how centred the Robot is on top of the line. Ideally, for the Robot to follow a line, the central IR sensor needs to be in place, so therefore the algorithm needs to be “clever” enough to drive the motors towards it.
PD techniques gather signal data from the five sensors to make an expert decision on where to move next. You will see how, after loading the “Line Following” example, Xun and David play with the parameters of the PD algorithm to adjust the Robot's behaviour so it’s at its best.
The line-following algorithm is designed to detect dark lines on clean-white surfaces. The PD method runs on the Robot's bottom board, and requires very little interaction from the user.The next example is called “Rescue”. In this case the IR-array is used in a more creative way. Upon detection of a black line covering all the IR sensors at once, the motors will stop. In a modified version of the previous track, we will see how the Robot will find an obstacle and will push it out of the track, to the come back and continue moving forward.
The next fifth video in the series will show reveal how to use images and sound on the Arduino Robot. Make sure to subscribe to the next video tutorial by the Arduino team here.
More Arduino stuff