Line Following Robot:- LFR (line Following Robot ) is a special type of Robot that follow the Specific path.It is also called as the line tracking Robot.
large LFR is used in industry and in military purpose.
Here in this project we are going to design simple line following Robot using Arduino and IR (infared)sensor.
Component Required:-
large LFR is used in industry and in military purpose.
Here in this project we are going to design simple line following Robot using Arduino and IR (infared)sensor.
Component Required:-
- Motors
- Wheels
- Motor driver
- Arduino
- IR Sensor
- Jumper Wires
- PC
- Simple chasis of Robot
Project Objectives:-
- To design a simple Machine that follow the line Track.
Here we use IR Sensor to detect the track.
As we all know that the black color absorbs all the wavelength of the light and the white color reflect all the wavelength of the light. So, we code the program in arduino ide following the same principle.
Circuit diagram
Fig:- Circuit Diagram of LFR
Arrange the Circuit as shown in Figure.Here Sensor output are connected at 10 & 11 pin of the Arduino And the Output of Motor Driver are connected to the 6,7,,8 and 9 Pin of Arduino.
Code :-
int lmin1=6;int lmin2=7;int rmin1=8;int rmin2=9;int ls=10;int rs=11;void setup() {pinMode(lmin1,OUTPUT);pinMode(lmin2,OUTPUT);pinMode(rmin1,OUTPUT);pinMode(rmin2,OUTPUT);pinMode(ls,INPUT);pinMode(rs,INPUT);}void loop() {int lsvalue=digitalRead(ls);int rsvalue=digitalRead(rs);if(lsvalue==LOW && rsvalue==LOW){digitalWrite(lmin1,HIGH);digitalWrite(lmin2,LOW);digitalWrite(rmin1,HIGH);digitalWrite(rmin2,LOW);}else if(lsvalue==HIGH && rsvalue==LOW){digitalWrite(lmin1,LOW);digitalWrite(lmin2,HIGH);digitalWrite(rmin1,HIGH);digitalWrite(rmin2,LOW);}else if(lsvalue==LOW && rsvalue==HIGH){digitalWrite(lmin1,HIGH);digitalWrite(lmin2,LOW);digitalWrite(rmin1,LOW);digitalWrite(rmin2,HIGH);}else{digitalWrite(lmin1,HIGH);digitalWrite(lmin2,LOW);digitalWrite(rmin1,HIGH);digitalWrite(rmin2,LOW);}}
Image:- Robot Demonstration at Cosmos Mini Expo