SIMPLE LINE FOLLOWER ROBOT(single Sensor)

40,107

93

14

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

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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)

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.

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

Recommendations

• Internet of Things Class

22,786 Enrolled

14 Discussions

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.

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

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

How to connect battery and how to get move speed?

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.

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

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?

Can i use 3 channel line tracker sensor?

i want circuit diagram for this single sensor line follower

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

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?

3 replies

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.

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

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.