Skip to main content

line following Robot..

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:-

  1. Motors
  2. Wheels
  3. Motor driver
  4. Arduino
  5. IR Sensor 
  6. Jumper Wires
  7. PC
  8. Simple chasis of Robot
Project Objectives:-
  1. 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




Popular posts from this blog

SMPS of computer

                                            fig:- working principle of SMPS       fig :- SMPS of computer From the above figure, we came to know that the function of SMPS in computer which is to convert  the high 220V-AC to 0-12V DC.SMPS contain several color of wires which carry the different voltage to the different parts of the computer.The following table shows the different color cables and its carrying voltage.      

warm clothes distribution program

‘ Small step can make a big difference ’ Rural Women Development Centre from morang,Nepal distributed the warm clothes to the needy people. They manage it possible by collecting fund from working staffs and management committe. Here is the video link of the distribution program. https://youtu.be/AxaHbivcQUM

Multiple mcp23017 interfacing with Arduino

MCP23017 is the I/O port extender that runs on 12C. It is 16-bit I/O expender.in this tutorial we are going to interface the single and multiple  mcp23017 with arduino.  fig:- mcp32017 module IT has 16 I/O ports from PA0 to PA7 and PB0 to PB7. first of all we are going to interface the single mcp23017 with Arduino. For this  connect the circuit as shown on figure. Download the library for mcp23017  from  sketch-- include library -- manage libraries.