Project showcase
Line Follower Robot

Line Follower Robot © Apache-2.0

A line follower build.

  • 6,973 views
  • 0 comments
  • 13 respects

Components and supplies

IR SENSOR MODULE
×1
A000066 iso both
Arduino UNO & Genuino UNO
×1
Texas instruments l293dne image
Texas Instruments Dual H-Bridge motor drivers L293D
×1
Geared Motors x 2
×1
Robot Chassis
×1
Black Tape
×1

Necessary tools and machines

Connecting Wires
Power supply

About this project

A Line Follower Robot, as the name suggests, is an automated guided vehicle, which follow a visual line embedded on the floor or ceiling. Usually, the visual line is the path in which the line follower robot goes and it will be a black line on a white surface but the other way (white line on a black surface) is also possible. Certain advanced Line Follower Robots use invisible magnetic field as their paths.

Code

Untitled fileArduino
/*
Amrendra Sahni (Gargi Memorial Institute Of Technology)
Guide: Bipasha Chakrabarti Banik (Assistant Prof. at Gargi Memorial Institute Of Technology)
*/

#define LS 2 // left sensor
#define RS 3 // right sensor
#define LM1 5 // left motor M1a
#define LM2 4 // left motor M2a
#define RM1 7 // right motor M2a
#define RM2 6 // right motor M2b
void setup()
{
pinMode(LS, INPUT);
pinMode(RS, INPUT);
pinMode(LM1, OUTPUT);
pinMode(LM2, OUTPUT);
pinMode(RM1, OUTPUT);
pinMode(RM2, OUTPUT);
}
void loop()
{
if(digitalRead(LS) && digitalRead(RS)) // Move Forward on line
{
digitalWrite(LM1, HIGH);
digitalWrite(LM2, LOW);
digitalWrite(RM1, HIGH);
digitalWrite(RM2, LOW);
}
if(digitalRead(LS) && !(digitalRead(RS))) // turn left by rotationg left motors in forward and right ones in backward direction
{
digitalWrite(LM1, HIGH);
digitalWrite(LM2, LOW);
digitalWrite(RM1, LOW);
digitalWrite(RM2, HIGH);
}
if(!(digitalRead(LS)) && digitalRead(RS)) // Turn right by rotating right motors in forward and left ones in backward direction
{
digitalWrite(LM1, LOW);
digitalWrite(LM2, HIGH);
digitalWrite(RM1, HIGH);
digitalWrite(RM2, LOW);
}

if(!(digitalRead(LS)) && !(digitalRead(RS))) // Finish line, stop both the motors
{
digitalWrite(LM1, LOW);
digitalWrite(LM2, LOW);
digitalWrite(RM1, LOW);
digitalWrite(RM2, LOW);
}
}

Schematics

Circuit
Arduino line follower robot circuit mzjtjhmfry iedvta85ea

Comments

Author

Amrendra0110
Amrendra0110
  • 2 projects
  • 3 followers

Additional contributors

  • Bipasha Chakrabarti Banik

Published on

April 3, 2018

Members who respect this project

Img20180326141421 qoq2if7lic1511688087658 9ayltl93s4Default

and 10 others

See similar projects
you might like

Similar projects you might like

Line Follower Robot

Project tutorial by Shubham Shinganapure

  • 7,748 views
  • 3 comments
  • 19 respects

PID Control Line Follower Robot

Project tutorial by Team KittenBot

  • 28,215 views
  • 5 comments
  • 36 respects

Elliot the Line Follower Robot

Project showcase by SMM2

  • 11,416 views
  • 5 comments
  • 26 respects

Amazing 6WD Off-Road Robot | Arduino RC Robot

Project tutorial by Jithin Sanal

  • 9,980 views
  • 0 comments
  • 54 respects

Simple Line Follower Robot

Project tutorial by Harsh Dethe

  • 4,211 views
  • 0 comments
  • 10 respects

Line Follower Robot Using Arduino & 1Sheeld

Project tutorial by Ashraf Nabil

  • 3,520 views
  • 0 comments
  • 7 respects
Add projectSign up / Login