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.

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

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

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

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

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

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

<p>Sir,</p><p>I am a student of class 12 and in our schools we have to make a simmilar project. i would be thankful to you if you could email me the circuit diagram of the project to soubhikbagchi3@gmail.com</p>
<p>can you please mail me the circuit digram.....ur explanation is really very helpful....mail me at salwan.himanshu4@gmail.com</p>
<p>hey is ur project working</p><p>Because i want to build the same one</p><p>I do not like risks</p><p>So pls tell truly that did ur project worked</p><p>or u r sending just fake instructions.</p>
<p>hi,i just read and am intrested to make my first robot using your instructions,could you please send me the circuit,to see if i can first simulate in ltspice.</p><p>kangogodiana@gmail.com</p>
<p>i am not having potentiometer what shld i do plz tell</p>
<p>i am not having potentiometer what shld i do plz tell</p>
<p>my please mail me the circuit diagram my email id is srivastava.prakhar444@gmail.com ..........plzzzzzzzzzzzzzzzzzzzzz</p>
<p>Can u send me in pdf </p><p>Venkatamadhu95@gmail.com</p>
<p>please mail me the circuit diagram my email id is akeerthan0206@gmail.com</p>
<p>Kindly, Will Yu Be Able to send the Circuit diagram to my email please..?</p><p>pavanbpatil91@gmail.com</p>
<p>Kindly, Will Yu Be Able to send the Circuit diagram to my email please..?</p><p>pavanbpatil91@gmail.com</p>
<p>Kindly, Will Yu Be Able to send the Circuit diagram to my email please..? It&quot;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...</p>
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
<p>your project is truly inspiring but i came across a hiccup. </p><p>what alternate transistor may be used as i am unable to purchase the one stated above.</p>
<p>its really a great explanation and really a simple 1 to understnd</p>
<p>hey!!! This is Chaitanya.</p><p>can you explain about the connections of photo cells in depth; because it is a bit confusing here.<br>and what kind of photo cells did u use?</p>
<p>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</p>
Hey! This Circuit diagram is not of what u have explained untill now... <br>Plz post me the correct Circuit Diagram of this project. coz am stuck in the middle due to this.. PLease....... <br>
Please send me the circuit diagram of this circuit. My EmailID is 18pawansharma72000@gmail.com
bro....its the best explanation i got . and the most beneficial...but plzz mail me ckt diagram at dmayur57@gmail.com
Hey, <br>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
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
Greeting, <br>Could you give more explanation about its sensors mechanism, please? <br>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? <br>thanks.
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?
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.
pls send me ckt dig. sanket.gumfekar007@gmail.com
pls send me ckt dig sanket.gumfekar007@gmail.com
send me ckt diagram ramanujam3991@gmail.com
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 <br>
hey i like the project kindly mail me the circuit diagram... my email id is Jayashree@scienceadda.in
well when i bought i just said cadmium sulficide photocells so dont know if that helps but yeah <br>
u use cadmium sulficide photocells <br>
plz send me the circuit diagram at <br>s.mabdullahahsan@gmail.com <br>thanks
please send the ckt diagram...sagar.latti@gmail.com
Check this easy line follower out. All schematics and code included: <br> <br>http://www.guruthumb.com/ <br>
plz upload the circuit diagram <br>and how many potentiometer do you use? is it one <br> <br>plz reply.
second leg of second potentiometer is connected?where.and plz send me circuit diagram on email id <br> <br>farazshahid51@yahoo.com <br> <br>plz i am making this earlier reply will be encouraging. <br>thanks <br>great work
hey can i get the circuit diagram for this line following robot...plz send it to my mail. &nbsp;&nbsp;
hi is it possible to send me the circuit diagram please, very nice design. i like it <br>cellfreak09@gmail.com
can you send circuit diagram to:kirubakaran1998@gmail.com
please send me the circuit diagram my email id is hemant.bhatia@yahoo.co.in <br>
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
Thank you for encouraging comment. I got this design from from a book soI will scan the circuit diagram and send it to you as soon as possible. I would be delighted to answer any questions you have regarding the robot as per my understanding.

About This Instructable




More by bhavyamadan:How To Make A Line Following Robot How to Make a styrofoam guitar 
Add instructable to: