This will be the first start to our autonoums bots , this is the most famous competetion held in most of the colleges , n i have seen people asking at lot of places asking for this now i will try to make this post a one stop to make a line follower , if u have understood the previous 4 things ,
firstly the motor driver , then op amp , sensors, which i have told in my last posts n the the most important part either using logic gates r else using micro controllers tats programming it .
I will be tellng u both the ways of doing it tats using logic gates and also using muc(i will be gvng only the logic part ).
This is how it basically luks like
I will xplain making of a line follower using one sensor till an array of sensor(ie 7 sensors).
White colour reflects light and black colour absorbs .
So when the sensor is on the white line the output will be high and when on black it will be low.
WE ASSUME WE ARE FOLLOWING A BLACK LINE ON WHITE BACK GROUND.
LFR USING A SINGLE SENSOR
Lets assume tat sensor is placed on center ie the sensor correctly places above the line , then there is no way tat it can follow a line bcoz it cant diff btw curves tilted towards left n right.
so wat we do is place the bot in such a way tat when the sensor cums to the right side of the line .
1)when the sensor is not on the main line move fwd.
2)when the line is turning towards left the sensor detects the line so now take a left turn
3)when the line is turning towards rite u r sensor cant detect the line and it keeps moving forward as it satisfies condition number 1
RESULT:We cant use this thing.
LFR USING TWO SENSORS:
We place our sensor on either side of the line .
When the line is straight and the two sensors are on either side of the line, move forward
when there is a right bend in the line the right sensor detects it ,now as ur bot shuld take turn, the rite motor shld stop and the left motor shuld move.
when there is a left bend in the line the left sensor detects it ,now as ur bot shuld take left turn, the left motor shld stop and the rite motor shuld move.
The pic shows the left curves and the right curves, the blue ones are u r sensors, the left pic shows the left sensor about to detect the line and the rite pic shows the right sensor about to detect the line.For the ckt directly connect the output of sensors to the the inputs of l293d n tat s it but use 30 rpm motors for it hope u got it .
But the problem with this is it will always move in zig zag manner so wastage of time.
I will give the ckt diagram of this after i explain about Logic gates .
And remember this is only with two sensors , i will explain till we can use 7 sensors so keep checking.