Picture of How To Make A Line Following Robot
Hello Instructables,

This my first time making a robot . In this instructable i will show you how to make a line following robot. Note that this a instructable for beginners who just want to make a robot for the fun of learning it. It will not be good for people who want their robot to be really fast and follow a line in less then a minute . This robot moves at a medium speed.
Remove these adsRemove these ads by Signing Up

Step 1: Materials

Picture of Materials

For this robot you will need:
prototype board x1
-2907 transistor x2
-leds x8 (3 red,3 yellow,2 orange)
-LM339 x1
-1k resistor x2
-150 ohms resistor x 4
-Photocells x4
- 20k potentiometer x2
- DPDT switch Center off x1
- Motors x 2 (any kind of motors you would like)
- Wheels x 2 (wheels that fit your motor)
- A sandwich container, box, etc..(something strong enough to hold your circuit in)
- 9 volt battery
- 9 volt battery connecter
- Wires

- Side cutter
- Long Nose Plier
-  Soldering Ion
-  Solder
- Wire stripper

Step 2: Building The Indicator Lights

Picture of Building The Indicator Lights
In this step we will be building the indicator lights these lights tell us which photoresistors are getting more light.First place the Ic in the middle of the board so that none of the pins are connected to each other.
1. Connect Pin 2 of LM339 to 1k resistor. 
2. Connect the other end of the resistor to the base of the 2907 transistor.
3. Now connect the collector of the transistor to one end of a 150 ohms resistor and emitter to 9V.
4.  Connect the other end of the resistor to the positive end of the yellow led.  The negative end of the yellow LED then connects to the positive of the next yellow LED. Like wise connect the third yello LED so that the three yellow LEDs are connected in series and the third LED's negative is connected to ground.
5. Now connect Pin 1 of the LM339 to 1K resistor and repeat the steps 2-4 thereafter using Red LEDs instead of yellow.
6. It would be convenient to make a separate rail for the positive 9V and for the ground so that you can connect your 9V battery connector to those lines when you are finally ready to connect the battery.

Step 3: Looking at the pins

Picture of Looking at the pins

In this step we will look at all the pins and connect them to where they have to go. First connect pin 3 to positive (9V). Then connect pin 12 to ground. Now connect pin 4 to pin 7 and connect pin 5 to 6.

Step 4: Adding the sensors

Picture of Adding the sensors

1. Connect a 20k potentiometer between pin 6 and pin 7.
2. Then connect the one end of a 150 ohms resistor to the middle of the potentiometer and the other end to positive(9V).
3. Now connect 2 photocells from pin 7 to ground in series. And connect two other photocells from pin 6 to ground in series.
4. You must remember to connect the photocells so that the photocells are facing downwards to be able to sense the line.

Step 5: Making the headlights

Picture of Making the headlights
To make the headlights, 
1. Connect a 150 ohms resistor to the middle of the 20Kohm potentiometer and connect the other end of the resistor to positive (9V).
2. Now connect the one leg of the 20K potentiometer to the positive of the white/Orange and the negative of the LED to the positive of another white/Orange LED, and then connecting the negative of the second LED to ground.

Step 6: Adding the Switch

Picture of Adding the Switch

Now for the adding the switch.
1. First, connect one of the middle leg of the DPDT switch to one terminal of the first motor and connect the other terminal of the motor to ground.
2. Connect the other middle leg of the DPDT switch to one terminal of the second motor and connect the other terminal of this motor to ground.
3. Now, remember the two 2907 transistors that we connected to the two 150 ohms resistors in the second slide. Connect one of the remaining legs of the DPDT switch to one of the collectors and the corresponding leg of the DPDT swich to the collector of the second transistor. Make sure you use the corresponding leg.

Now give yourself a pat on the back because your line following circuit is done.

Step 7: Soldering it all up

Finally, solder everything into place and make sure that none of the components are shorting each other. At this time, connect your battery connector to the positive and the negative rail of your board.

Step 8: Body Building

Now onto the final step body building.

For my robot, I used a cardboard box. You may use something different if you like.

1. I made holes on the sides of the box to place my motors. I also made holes at the bottom of the box for my sensors (the sensors should not touch the ground, as in ground and not the negative) and the headlights ( because I connected them upside down).
2. For my convenience, I also made a hole on the side for the 20 K potentiometer to be able to adjust the brightness of the headlight.
3. If you would like, you could screw your board inside the bottom of the body (I did not because i just liked it as it was).

Step 9: Checking Connections

Now, before you add the battery, look over everything see for loose connections or something that doesn't seem right.

Step 10: Launching the Line Follower

Finally connect your battery and make your line and see you robot follow it. (Tip) you should make your line fairly thick with black tape.

If you have any comments or questions I will be happy to answer them



Step 11: Circuit diagram

1-40 of 43Next »
MohammedW29 days ago
MadhuB23 months ago

Can u send me in pdf


keerthan02064 months ago

please mail me the circuit diagram my email id is akeerthan0206@gmail.com

PavansingP6 months ago

Kindly, Will Yu Be Able to send the Circuit diagram to my email please..?


PavansingP6 months ago

Kindly, Will Yu Be Able to send the Circuit diagram to my email please..?


sarangk.ikku6 months ago

Kindly, Will Yu Be Able to send the Circuit diagram to my email please..? It"ll be a boon to me.. Am starving to get the ckt diagram of Line Follower.. my email is 'sarangikku@rushpost.com'... pleez send my friend...

AbbasA8 months ago
In the diagram u use lm 393 and in the explanation u r written lm 339 please send me the diagram of ic 339 my e-mail id is abbasarshad1@hotmail.com plzzzzz quick send me the circuit diagram
karan.jeet.50510 months ago

your project is truly inspiring but i came across a hiccup.

what alternate transistor may be used as i am unable to purchase the one stated above.

its really a great explanation and really a simple 1 to understnd

mangavelli11 months ago

hey!!! This is Chaitanya.

can you explain about the connections of photo cells in depth; because it is a bit confusing here.
and what kind of photo cells did u use?

sarany1 year ago

can you pls send the circuit diag to saranyaakrishnan.95@gmail.com ..or with due respect why have not posted it right in this document ?..and can you tell me how the speed control of the motor is achieved ? ..is it necessary to use a potenetiometer ? pls do reply ..the procedure is being real easy to follow

Hey! This Circuit diagram is not of what u have explained untill now...
Plz post me the correct Circuit Diagram of this project. coz am stuck in the middle due to this.. PLease.......
Please send me the circuit diagram of this circuit. My EmailID is 18pawansharma72000@gmail.com
Mayur D1 year ago
bro....its the best explanation i got . and the most beneficial...but plzz mail me ckt diagram at dmayur57@gmail.com
botgames2 years ago
Would it be possible to email me a better copy of the schematics? I really want to make a line following robot. Your instructable looks doable. I have all the components so I'm ready to go. Thank you...tafsemail@gmail.com
anand2103942 years ago
bro....its the best explanation i got thtoughout and the most beneficial...butplzz plzz upload its ckt diagram..or mail me at anandag210394@gmail.com
Could you give more explanation about its sensors mechanism, please?
I mean how much the distance should be between the sensor and the ground and if it move away from the line what will happen?
chan4302 years ago
hi... its an awesome project... can i ask for the schematic diagram? i have all the components already... :) chan430_93@yahoo.com
can u please send me the pdf to email id- sanirudh101@gmail.com
also, where you solder, is it possible to use rubber cement? If you aren't comfortable with soldering. or, maybe electrical tape? I ask because i've made a hot air balloon and for the circuitry we used electrical tape and well. as you guessed, rubber cement.
Also, is there a specific TYPE of 1k resistor?
What is the WATT of the L.E.D's?
vizmotion2 years ago
Thank you for creating this article. I am working with my son to build this robot. I see the diagram is step 11. I almost missed it. Once again thanks.
gumfekar0072 years ago
pls send me ckt dig. sanket.gumfekar007@gmail.com
gumfekar0072 years ago
pls send me ckt dig sanket.gumfekar007@gmail.com
rcritic2 years ago
send me ckt diagram ramanujam3991@gmail.com
rcritic2 years ago
Send me the circuit diagram too ramanujam3991@gmail.com
can you plz send the circuit diagram in my mail id -ag.abhigyan@gmail.com
Plz send me the circuit Diagram in my Mail Id:-ag.abhigyan@gmail.com
hey i like the project kindly mail me the circuit diagram... my email id is Jayashree@scienceadda.in
plz send me the circuit diagram at
sagar.latti2 years ago
please send the ckt diagram...sagar.latti@gmail.com
guruthumb2 years ago
Check this easy line follower out. All schematics and code included:

plz upload the circuit diagram
and how many potentiometer do you use? is it one

plz reply.
second leg of second potentiometer is connected?where.and plz send me circuit diagram on email id


plz i am making this earlier reply will be encouraging.
great work
hey can i get the circuit diagram for this line following robot...plz send it to my mail.   
kaktus1012 years ago
hi is it possible to send me the circuit diagram please, very nice design. i like it
kirubasneha3 years ago
can you send circuit diagram to:kirubakaran1998@gmail.com
please send me the circuit diagram my email id is hemant.bhatia@yahoo.co.in
eopemipo3 years ago
This is very wonderful and encouraging, please i would like you to send the circuit diagram to my email roenih@yahoo.com and i need ur follow up to assist me in trying this project.Thanks
1-40 of 43Next »