Line follower is an autonomous robot, that tracks the black line. Robot works thanks to the line sensor (qtr8 from pololu). The sensors detects difference between colors. This projects consists of automatics, micrcontroller programming and 3d printing.
Stable and fast line follower is a great robot that helps us understand the role of the contorl theory in modern autonomous vehicles. The same algorithm can be implemented in camera based line follower or cars that drive between the lines. Knowledge gained by completing this project will help to create more advanced driving systems in the future.
Note:
An example of this robot in use can be found in theassetsfolder asvideo.mp4(/assets/video.mp4).
The calibration process should take about two seconds — follow the same procedure as shown in the video.
This project implements PD regulator in velocity form, it is widely used in mobile robots. We have implemented the discrete form of the PD reulator's equation.
-
P - the propotional term, it produces a correction propotional to how big error is. This term pushes robot toward the line and acts as the main steering force. Strongly reacts to bigger errors, sometimes the result is overshooting.
-
D - the derivative term, it tells how quickly the error is changing. It reacts to the speed of movement away from or toward the line. Tuning this parameter helps us to reduce oscillation and smooths turns. Overally slows down the robot to avoid overshooting.
The general equation form:
The discrete equation form:
-
$u(t)$ - current velocity, in other words duty cycle of the motors. -
$K_P$ - propotional term, tells how strong react to turns. -
$K_D$ - derivative term, reduces overshooting. -
$e(t)$ - error at the time t, the difference between robot and line positions.
- Download Arduino IDE and install QTRSensors library.
- Clone github repository to your computer:
https://github.com/SKN-SEP/LineBot.git
- Connect your arduino to computer and upload the program.
In order to build this robot, you need all the parts listed in the table below. The corresponding STL models are in the models folder. The skills required to assemble this robot include 3D printing, soldering, and cable management.
This project is licensed under the MIT License. See the LICENSE file for details.












