Skip to content

noamy75/Final-Project-Arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Final Project - Line Follower Robot

A Line Follower Robot (LFR) is one of the most important concepts in robotics. In this project we developed a platform that enables controlling the robot in 2 operating modes: A manual mode for robot maneuvering using joystick, and an automatic mode where the LFR comes into picture. The platform is controlled by the user with HTML-based GUI, where the LFR performance can be evaluated by several criteria.

Line identification is done using an array of five light reflecting sensors that are located as shown below:

image

Each sensor returns a value in the range [0-1000] that represents the amount of black it sees. It is common practice to use a formula where the sensors values are linearly weighted.

image

In order to evaluate the line position more accurately, each sensor value can be proportionally weighted according to its real location.

image

In this project, both methods were implemented.

The LFR consists of a Raspberry Pi and a Zumo 32U4 robot, connected by USB. The RPi runs an HTML-based GUI (Python) and communicates with the Zumo, that runs an Arduino sketch.

image

image

The PID controller produces speedDifference using the formula: image

Three parameters were defined to evaluate the performance:
Average – average of line position samples.
SD – standard deviation of the samples.
Accuracy – percentage of samples within a predetermined range around the center.

These parameters were inserted to the performance formula:

image

The plots of the 3 performance evaluation parameters change in tune to the speed and the proportional gain.

image

After some system optimizations, such as transitioning from a linear method of sensors distribution to a proportional one and increasing the sampling rate, the shape of the performance plot has dramatically changed.

image

In order to achieve better results, the step response was optimized using a PID controller. The overshoot and the rise time were reduced to the minimal values possible.

image

Video - Auto mode control: Driving in auto mode, applying changes of speed and proportional gain (Kp) via sliders, examining effects on the line position plot and line sensors values bar chart.

LFR.-.auto.mode.control.-.Trim.2.mp4

Video - Sweeping over the line sensors: Presenting the dynamic line sensors barchart.

Sweeping.over.the.line.sensors.mp4

Lab Workspace

Workspace overview

About

Final Project - Line Follower Robot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published