SIMPLE LINE FOLLOWER ROBOT(single Sensor)


43,715

93

14

Introduction: SIMPLE LINE FOLLOWER ROBOT(single Sensor)

Hello guys in this tutorial lets see how to make an simple line follower robot with single infra-red sensor.

Step 1: INTRODUCTION:

Usually for beginners in Robotics this is your first robot to play with Since this robot has some basic functions and basic programming learning this is like learning the A,B,C,D.... of Robotics.

A line follower is an autonomous Robot which is able to follow a line (black or white) and alter its path based on the shape of the line.

Step 2: COMPONENTS NEEDED:

  • Arduino UNO
  • one IR-sensor module
  • L293D motor driver
  • metal chassis
  • 2x BO motors
  • 1x caster wheel
  • 2x wheels
  • 2x 9v battery
  • 2x dc battery connectors
  • connecting wires

The chassis is the body of this Robot, Arduino is the brain of this robot and two dc motors produce motion.

Step 3: HOW IT WORKS?!

This is a simplest bot with a single sensor so its working principle is also as simple as follows..

  1. when the IR sensor sees the black line one wheel of the bot rotates and the bot turns away from the line.
  2. when the IR sensors sees the white background the other wheel rotates and the bot turns slightly towards the line.

The above two steps occurs one after other in a repeat mode very fastly in a very short time which gives us the movement of the bot in the path following the black line.

It just follows the Z pattern turning towards the line and turning away from the line.

Step 4: LETS MAKE THE ROBOT:

Fix the wheels on the metal chassis and mount the DC BO motors on the back wheels and fix a caster wheel in the front.

connect the L293D motor driver with the arduino and dc motors.

CONNECTIONS:

3,6(l293d) to left motor(output)

11,14(l293d) to right motor(output)

2,7,10,15(l293d) to pins 10,11,5,6 of Arduino(inputs)

Step 5: Connect Your Arduino to Your IR Sensor:

  1. connect out pin of IR to pin 2 of Arduino
  2. connect vcc of IR to 5v of Arduino
  3. connect gnd of IR to gnd pin of Arduino.

Step 6: PROGRAMMING:

Interface your arduino with arduino IDE software and upload the below program.

To get the program:click here

Step 7: READY TO RACE:

connect the power supply to your Arduino and motor driver....

YOUR BOT IS READY .......

check out my previous post Obstacle Avoiding Robot:click here

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    14 Discussions

    0
    Ddoyd Brown
    Ddoyd Brown

    3 years ago

    Hi dear,

    Could you help me out with my robot?

    I am using 4 sensors along with L298N and some other components. But i am having trouble writing a simple code for my robot.

    0
    Pratyush Jagdish Birole
    Pratyush Jagdish Birole

    Reply 2 years ago

    I the tutorial the programming and connections are only about 1 ir sensors. so the program will not work out for 4 ir sensor. you try it with 1 no probs it will move efficiently.

    by - programmer

    0
    SaikiranS1
    SaikiranS1

    2 years ago

    While giving connections,when i put vcc pin in arduino board,my arduino is not vetting on.why?...and when i remove that vcc pin,its working

    0
    SanjeebK1
    SanjeebK1

    Tip 2 years ago on Step 4

    How to connect battery and how to get move speed?

    1518518791741834033247.jpg
    0
    Karthik_Innovator
    Karthik_Innovator

    4 years ago

    Guys I would like to give one hint by using separate 9v power supply to your Arduino and to your L293D motor driver you can actually increase the speed of your robot.

    0
    NahidA4
    NahidA4

    Reply 3 years ago

    I tried using two 9v batteries but my left motor just keeps on spinning, even when there is no black line. Could you help?

    0
    Ddoyd Brown
    Ddoyd Brown

    3 years ago

    Hi Karthik,

    i have also use two 9 volt batteries. But i am having trouble writing my code for my 4 sensors line following robot. Would you mind helping me out?

    0
    iamnajerah
    iamnajerah

    3 years ago

    Can i use 3 channel line tracker sensor?

    0
    GovaP
    GovaP

    3 years ago

    i want circuit diagram for this single sensor line follower

    0
    RishikeshC
    RishikeshC

    3 years ago

    I hope you don't mind me saying this....but won't 2 IR sensors work better? Like both the sensors should be on the white part.....if the left sensor detects black meaning the bot has gone off course the left motor stops and the bot turns left until the sensor detects white again
    ....and the same thing with the right motor........i think that would make the bot's movement smoother

    Just my opinion though

    0
    Z_Suleman1998
    Z_Suleman1998

    4 years ago

    i don not have a l293d circuit board but have the individual IC chips. do i still require the 9V battery? Also i understand that the first battery powers the arduino via the power socket. but where is the second used?

    0
    Karthik_Innovator
    Karthik_Innovator

    Reply 4 years ago

    L293d IC is enough to run the motors. I have used L293d ready to use module to make it even more simpler and easy by avoiding breadboard connections.

    0
    tomas032
    tomas032

    Reply 4 years ago

    Hello...I used in conjunction Arduino Uno and Arduino Shield motor driver like on picture... how to connect these two Arduino to work as your robot. For sensor I use Arduino IR.Regards

    0
    Karthik_Innovator
    Karthik_Innovator

    Reply 4 years ago

    I have used the first battery to power the arduino and second one to power the l293d motor driver module. But it is not neccessary to use two batteries you can power your l293d IC using 5v vcc pin in the arduino.