In this project, we use tracking(black/white) sensor to design a simple line follower Robot car.
A Line Follower Robot, as the name suggests, is an auto-driving vehicle which follows a black track line printed in white ground. Tracking sensors in the robot keeps checking if the current car location is out of the track. If yes, then car will make a negative movement to draw the robot car back to track.
Install the smart car basic frame work as per Lesson 21， If you have already completed installation in Lesson 23, just keep it as is.
Step 1:Install the left and right tracking sensor with M3*6 plasctic screws, M3*17 plastic pillars.Make sure that every the potentiometer head is between the gaps at the front side of car chassis so that you get the best sensitivity status:the signal indicate LED light will turn on when sensor is above white ground, and the signal LED will turn off when the sensor is above black track.
Step 2:Then connect the left and right tracking sensors to the D2 and D3 port of the Magic I/O shield with a 3-pin PNP cable as below:
After above installations are completed, connect the Arduino board to your computer using the USB cable. The green power LED (labelled PWR) should turn on.
You can download the code directly fr0m following link:
In lesson 20, we have learnt how to adjust the sensitivity and use the tracking sensor..
Adjust the sensitivity of tracking sensor modules. Turn on and hold the car and adjust the potentiometer on the tracking sensor with cross screwdriver until you get the best sensitivity status: the signal indicate LED light will turn on when sensor is above white ground, and the signal LED will turn off when the sensor is above black track.
Prepare a black track (the width of the black track is more than 30mm and less than 60mm) in white ground. Please note, the turning angle((bending curve) of track can’t be two sharp(larger than 90 degree). If the turning is too sharp, the car will move out of the track.
Turn on the car and put the middle of tracking sensor module facing over black track, and then the car will move along the black track.
DownLoad Url osoyoo.com