Line Follower is a completely autonomous robot, designed to follow a white line on black surface or black line on white surface.
Problem Statement : The problem statement is to design a Line Following Robot to navigate on a predefined track by choosing the shortest path (for every destination, 2 paths are available, one along the circumference and one through the chords). This Robot should also identify the small white block placed at every node.
Technical Specification:
Achievements:
Top view Bottom view
The Concept:
Firstly the hardware, as I could not make a new HW, I have just modified my Micromouse(2007) to work as a line follower. Major modification was only with sensors.
This is the sensor board used for making a Line Follower.
This Robot has Four IR sensors. All the sensors are analog sensors.Voltage measured across the sensor is proportional the intensity of IR rays reflected from the surface of the obstacle. This voltage is used to identify the color of the reflected surface or just to detect the presence of any obstacle.
In this picture we can see three sensors. Two sensors are used to identify the line and guides the robot to move along the line. The third one is used to detect the presence of chord.
The distance between the sensors should be equal to the width of the line, that the robot should follow ( in this case it is 2 cm).
This would be the ideal position of the sensors, when Robot is exactly on the Line. At this position, voltage measured from both the sensors would be approximately same. So, the Robot keeps moving forward.
Mathematically,
Error = LeftSensor (O/P voltage) - RightSensor (O/P Voltage)
in the ideal case Error would be zero.
Imagine the line is curved towards left. While the robot keeps moving forward, it eventually ends up with a situation like this, where the left sensor will receive more intensity of reflected IR rays as compared to the right sensor. Here robot is little deviated towards right from the ideal position. To follow the line, Robot should always try to come back to ideal position. So, a corrective measure, robot should move little towards left, to get back to the ideal position.
Mathematically, in this case Error would be positive.
There are two ways, by which the robot can come back to ideal position (Robot should move towards left).
How much speed change should be applied ?
Here, lets introduce proportional controller and a new variable DeltaSpeed.
DeltaSpeed = Error * Kp
For, negative error (when robot is deviated towards left)
DeltaSpeed = Error * (-Kp) , where Kp is the proportional constant.
Now, this DeltaSpeed calculated is the amount of the speed that should be either reduced or increased on the respective motor, so that the robot will return back to the ideal position.
But again, Error may overshoot (+ve) and undershoot (-ve), resulting oscillations in the Robot motion. TO reduce this oscillations we can introduce a derivative controller.
Now,
DeltaSpeed = (Error * Kp) + ((Error - PastError) * Kd)
where, PastError, is the Error value in previous calculation.
By using trail and error method, value of Kp and Kd can be fine tuned, so that the robot will follow the fine and oscillations in its motion are reduced. For Line Follower, if the Kp is fine tuned, Kd (derivative part) may not be required.
For more information on implementation of PID controller, refer the document in downloads section.