loading

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

<p>Hi Karthik, </p><p>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?</p>
<p>Hi dear, </p><p>Could you help me out with my robot?</p><p>I am using 4 sensors along with L298N and some other components. But i am having trouble writing a simple code for my robot. </p>
Can i use 3 channel line tracker sensor?
<p>i want circuit diagram for this single sensor line follower</p>
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<br>....and the same thing with the right motor........i think that would make the bot's movement smoother <br><br>Just my opinion though
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?
<p style="margin-left: 20.0px;">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.</p>
<p>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</p>
<p>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.</p>
<p>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.</p>

About This Instructable

18,473views

87favorites

License:

More by Karthik_Innovator:SIMPLE LINE FOLLOWER ROBOT(single Sensor) Obstacle Avoiding Robot Using Arduino Getting Started with an Arduino (Step by Step Guide on How to install Arduino IDE software) 
Add instructable to: