You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation for the line follower bot with Qtr Sensor
Hardware
Componets Required
QTR sensor
Arduino Uno
Motor Driver
Li-ion Battery
Motors
Jumper wires
Chassis and wheels
Circuit Overview
The arduino uno board is to be connected to the motor driver and qtr sensor.
Motor Driver is connected to the motors to control the path taken by the bot based on the controlling speeds sent to the motors by arduino uno using readings from Qtr Sensor.
Software
Libraries Used
QTRSensors.h
Setting up libraries
Open the Arduino IDE.
In the Arduino IDE, open the Sketch menu, select Include Library, then Manage Libraries....
Search for QTRSensors in the search bar1.
Click the QTRSensors entry in the list1.
Click the Install button to install the library
PID Controller Algorithm
The QTR sensor array can provide values ranging from 0 to 7000, with 3500 representing the line being directly under the center of the robot. The sensor provides information on how far the robot has strayed from the line.
The PID controller algorithm uses this information to calculate an error value as the difference between the robot’s current position and its desired position on the line. The controller then applies a correction to the robot’s movement based on this error value, using the proportional, integral, and derivative terms.
The proportional term is based on the current error value and determines how much the robot should turn to correct its position.
The integral term takes into account past errors and helps to reduce steady-state error.
The derivative term predicts future errors based on the rate of change of the error value and helps to reduce overshooting.
By adjusting the gains of these three terms, the PID controller is tuned to provide smooth and accurate movement of the line follower robot along the line
About
A line follower bot is a type of autonomous robot designed to track and follow a specific path, typically a black line on a contrasting surface, using sensors such as infrared or color sensors.