Line Follower Robot – without using Microcontroller

Line Follower Robot – without using Microcontroller

After a long time I am presenting my new project Line Follower Robot without using Microcontroller.
It is a simple circuit with a LM358 op-amp and is able to operate from 9v to 12V. The LM358 contains two op amps which are wired as comparators. Thus when the voltage at the non-inverting terminal (+) is higher than inverting terminal (-) its output will be high and when the voltage at the inverting terminal (-) is higher than non-inverting terminal (+) the output will be low. Outputs of the op-amp comparators are given to transistors which are wired as switch to drive the motors. Diodes D3 and D4 are provided to cancel the negative voltages produced due to the back emf of the motor.

Line Follower Robot Circuit - without using Microcontroller

Line Follower Robot Circuit – without using Microcontroller

When a sensor is on white color, LED light will be reflected to the corresponding LDR. As a result, resistances of LDR decreases and the voltage at non-inverting terminal (+) of the op-amp will increase. Thus op-amp output goes high and turns on the transistor, which rotates the motor. When a sensor is on black color, LED light will not be reflected to LDR, thus the output of the op-amp will be low and the motor will be off.

Thus when the both sensor are on white color, it will run both motors forward and when any of them on black color it will stop the corresponding motor. Thus the robot turns in corresponding direction since one motor is running.

The sensitivity of the LDR can be adjusted by using the 10K pot. For more accuracy, cover the sensor-LED pairs in a black wrapper through sides in such a way that only the reflected light falls on the LDR. The Line Follower can trace path drawn with black ink on a white chart and the width of the black track should be a litte less than the width between sensors.

Line Follower Robot - Construction

Line Follower Robot – Construction

Note : Use Geared DC Motor

Share this post

Comments (85)

  • Sudhanshu

    great yaar……….

    February 22, 2013 at 7:24 am
  • Shiv Thakur

    nice yaar

    February 22, 2013 at 10:02 pm
  • prinil das

    very easy circuit

    May 3, 2013 at 4:03 pm
  • Ligo George

    Your motor might require more current, than BC547 transistor can safely handle…
    Replace BC547 transistors with BC107..

    July 2, 2013 at 7:38 pm
  • shree

    i have connected darlington pair at the o/p of both opamp and to which i have connected relay and motor but when both o/p is high my one relay goes off so the motor. please suggest the solution..
    thank you.

    September 17, 2013 at 4:07 pm
  • Ligo George

    I think you might have some problem with one relay or darlington pair… check it by turning on separately..

    September 18, 2013 at 10:07 am
  • shree

    Thanks, i have checked my relay module separately it work perfect. but when it connected to the op amp then shows problem.
    any other solution???
    can u tell me which is perfect transistor combination for darlington pair which gives me more than 200ma current rather than bc574.

    September 21, 2013 at 3:29 pm
  • Ligo George

    What about the output of opamps… does it correct?

    September 22, 2013 at 10:52 am
  • shree

    it shows output on led but fluctuate in relay motor combination.

    i think there is the problem of current. but i cant figure out what exactly going on there.. what about transistor ???

    September 23, 2013 at 11:21 am
  • Ligo George

    reduce the base resistor of transistors..

    September 25, 2013 at 7:27 am
  • Daff

    hi, what should I do if I want to make the robot to follow a white line on a black surface

    November 28, 2013 at 3:01 am
  • Ligo George

    Just interchange the + and – pins of opamp comparator.

    November 28, 2013 at 4:29 pm
  • Ahmed_yassin

    how can I do this robot with PIC16f877a ,,,, shall i connect the LDR to the analog pins ,,or as pull up resistor ,,please help me with the code by micro c pro
    Also I want to make a robot with ultrasonic sensor I found the interface with microcontroller what should I do to make this robot ,, thank you sir

    December 8, 2013 at 3:51 pm
  • Darpan Patel

    say me about motors,,what is difference between simple DC motor and geared DC motor? what effect it will make if i use simple DC motor? Also describe, which LED,LDR pair will be better for sensor? It will be great if you will show me circuit analysis (i mean how values of resistance and current detail)

    February 1, 2014 at 11:23 pm
  • kishore

    I have a small can we select the components for our projects..I mean where to to select those resistors and specific transistors and all the others…

    June 25, 2014 at 10:25 pm
  • Ligo George

    Geared DC motor has gears attached to simple DC motor to increase torque..
    Select the color of LED depending on the surface color .. or use white led..

    June 26, 2014 at 10:29 am
  • Ligo George

    Use IR sensor pair.. you can use comparators with presets to adjust sensitivity of each sensor..
    Output of each comparator (digital o/p) can be connected to pic..

    June 26, 2014 at 10:31 am
  • Ligo George

    It is a difficult question to answer..
    Choose resistors depending on the required resistance value and power rating..
    choose transistors using max voltage, current and current gain required. .
    Each components has its own way..

    June 26, 2014 at 10:32 am
  • asad

    sir can you please tell me what current and voltage, motors required to run ?

    July 8, 2014 at 10:42 pm
  • asad

    sir motors are running both in light and dark. please guide me

    July 11, 2014 at 12:52 am
  • Pratim

    Sir, i have a problem, my left motor is working perfectly fine but right side motor is working both in light and dark. I have checked the circuit many times there is no fault in the circuit.. please help me..

    July 12, 2014 at 4:56 pm
  • Ligo George

    You can use two 12V 40RPM geared dc motors..

    July 13, 2014 at 7:44 pm
  • Ligo George

    Try adjusting sensitivity using presets..

    July 13, 2014 at 7:45 pm
  • Ligo George

    Try adjusting the sensitivity using preset..

    July 13, 2014 at 7:55 pm
  • Pratim

    Thank you for your reply, I’m still stuck with the same problem, I have triple checked the circuit and tried changing the IC and the BC547, the pot doesn’t have any effect(I’ve tried changing the pot also). The motor which is controlled by 5,6,7 pin of the ic, works like charm.. but the motor controlled by the pin 1,2,3 doesn.t work at all… please help!!

    July 14, 2014 at 1:35 pm
  • Ligo George

    It should work.. try replacing the LDR..

    July 14, 2014 at 10:23 pm
  • asad

    sir .. will this circuit work, if i use only half of the circuit that is .. if i want to run only one motor using ldr.. will this circuit work ?

    July 20, 2014 at 1:37 am
  • Ligo George

    Yes it will but… it can’t be used as a Line tracer..

    July 23, 2014 at 9:43 am
  • asad

    sir i have checked my circuit , several times .. but still it is not working. help me !

    July 24, 2014 at 12:07 am
  • Madhura

    do we need only one LM358N IC know?

    October 9, 2014 at 11:51 pm
  • Ligo George

    Yes, only one IC is required…

    October 10, 2014 at 10:29 am
  • Madhura

    you are saying,we can use BC107 transistor for the BC547 transistor know?

    October 17, 2014 at 8:31 am
  • Ligo George

    Are you using 12V dc motor with 9V supply.
    That 9v battery might not be able to drive DC Motors, you should use a good battery having more Ah capacity.

    October 17, 2014 at 3:08 pm
  • Ligo George

    Yes you can use BC107..

    October 17, 2014 at 3:08 pm
  • Madhura

    yes,i used dvd rom motors.and 9v battery.

    October 17, 2014 at 4:54 pm
  • Ligo George

    Your motors should not have enough torque.. You should use geared dc motors.

    October 18, 2014 at 7:45 am
  • Madhura

    If i use this motor,it will work know.

    October 18, 2014 at 4:21 pm
  • Madhura

    what kind of mAh power should i used to run this motors with 9V?

    October 18, 2014 at 5:21 pm
  • Ligo George

    Yes, it should work… limited by the total weight..

    October 18, 2014 at 8:59 pm
  • Ligo George

    It will depend on how much time your robot should work…
    mAh => milliampere per hour…
    eg : if the battery is 1.2Ah, 12V >> it can give 1.2A current with 12V for 1 hour…
    if you are drawing 600mA it will work for 2 hours..

    October 18, 2014 at 9:02 pm
  • Madhura

    if i use 12V with 1800mah,will it work? no any harm to the circuit?

    October 23, 2014 at 5:13 pm
  • sakthi nandhan

    i am new to this i want simple circuit diagram to do line follower robot or video how to do line follower by stepby step

    October 23, 2014 at 8:54 pm
  • ssss

    the above diagram is the simplest circuit diagram you’ll find

    October 23, 2014 at 9:08 pm
  • Ligo George

    Yes, it should work..

    October 24, 2014 at 7:32 pm
  • Ligo George

    Sorry, we haven’t any video of above project..

    October 24, 2014 at 7:32 pm
  • Madhura

    I completed this line follower.thank you Ligo George.It`s working perfectly.

    October 26, 2014 at 9:48 pm
  • Ligo George

    Thanks for the feedback .. 🙂

    October 27, 2014 at 6:29 pm
  • bony

    how much lm358n should we use

    December 8, 2014 at 1:35 pm
  • Ligo George

    Only 1

    December 8, 2014 at 4:33 pm
  • sahil

    sir what is RV1 & RV2

    February 9, 2015 at 1:38 pm
  • Ligo George

    It is a potentiometer for adjusting the sensitivity ..

    February 9, 2015 at 8:29 pm
  • sahil

    thank you sir can u send me image of potentiometer which is used in…

    February 9, 2015 at 8:46 pm
  • sahil

    sir can u send me pic of potentiometer which is used in it ?

    February 10, 2015 at 1:33 pm
  • sahil

    send me the pic of the potentiometer used in the robo

    February 11, 2015 at 5:39 pm
  • Ligo George

    You can use a preset..

    February 17, 2015 at 8:05 am
  • Syahmi

    Where do the 2nd leg of op amp connect to? There is an arrowhead there, whats that suppose to mean?

    March 15, 2015 at 10:07 pm
  • onkar

    Sir have you used 1 or two ics

    March 15, 2015 at 11:34 pm
  • onkar

    Its connected to the middle terminal of the potentiometer

    March 16, 2015 at 1:22 am
  • Ligo George

    1 IC ..

    March 17, 2015 at 5:17 pm
  • coolboy

    i am new here !! will you tell me which part is used as a sensor in ckt diagram

    May 8, 2015 at 10:18 pm
  • coolboy

    I am new here, please tell me which part is used as sensor in this ccircuit ??

    May 8, 2015 at 10:22 pm
  • Ligo George

    It is LDR (Light Dependent Resistor).

    May 22, 2015 at 12:08 pm
  • Saad Memon

    sir this is 5V motor do we need to connect Voltage regulator 7805 in place of motor in this circuit and then to this motor ??

    May 26, 2015 at 5:46 pm
  • Ramdan Suryadi

    I’ve made a robot path but robots do not follow the black line, how you can help

    May 29, 2015 at 6:58 pm
  • Ligo George

    You should use 9 ~12V motor for above project.

    June 6, 2015 at 3:47 pm
  • Ligo George

    Try debugging each sections manually by providing light..
    If it is working, try adjusting the sensitivity of LDR

    June 6, 2015 at 3:51 pm

    CAN U PLZ SHARE MORE PHOTOGRAPHS OF THIS PROJECT…. i mean how to assemble all things… i din’t understand properly.. plz help

    July 9, 2015 at 11:15 pm

    sir, one motor is working both on black and white path… i hv checked all connections. they r right.. and also try to change the sensitivity but the motor is working both on black and white path. plz hlp and rply… @lijoppans:disqus

    July 13, 2015 at 2:08 am
  • Ligo George

    Sorry, we don’t have any more photographs. Please check other comments. Some peoples posted the photographs of completed project.

    July 18, 2015 at 11:17 am
  • Ligo George

    Just check the both motors individually by providing light to each LDR one by one.

    July 18, 2015 at 11:21 am
  • jatin

    Sir i have given 12v , both the transistors got blown and with 9 v its not working properly and the circuit is okk.
    What should i do

    September 19, 2015 at 2:29 pm
  • Ligo George

    Don’t you connected motor in series with transistor ?

    If you motor requires more current, replace the transistors with one having higher current rating.

    October 3, 2015 at 3:31 pm
  • Omshree Mohanty

    Sir can u send me the image of the potentiometer and the IC to be used in this……….

    June 6, 2016 at 6:27 pm
  • Ligo George

    You can use a preset. For IC image just search on google.

    August 27, 2016 at 12:08 pm
  • Kevin Marrero

    Which transistor would you use for a 3-6V DC hobby toy motor? I think a 2N2222 would work but I would like your opinion.

    November 24, 2016 at 10:08 am
  • Ligo George

    Choose depending on the power requirement. What is the current required for that motor ?

    November 27, 2016 at 2:45 pm
  • K

    I don’t know because the kit I bought didn’t gave specs for the motors. It is working but it is too fast. I tried putting resistors to slow it down but it is still too fast (with 2N2222A)

    November 29, 2016 at 3:38 am
  • K

    What motor specs did you use?

    November 29, 2016 at 3:42 am
  • Ligo George

    It is not good to control the speed using resistors. You can try using BC107, it will support more current.

    November 30, 2016 at 10:38 am
  • omkar raut

    What will happen if i use bc548 instead of bc547. Plz reply fast. I dont have bc 547. And its difficult to find bc 547.

    November 30, 2016 at 6:27 pm
  • Ligo George

    Yes, you can us BC548

    December 1, 2016 at 10:42 am
  • Purbasssh

    Hello sir is this project related to parallel port car driving and if it is how will I be able to make the car move because I can’t start running behind it to make it stop if I connnect it with the battery directly neither I’m allowed to use Adriano plz reply fast

    December 4, 2016 at 12:31 am
  • Ligo George

    Nope, it is not related to parallel port or computer. It is a simple line follower robot.

    December 4, 2016 at 1:13 pm
  • anil joshi

    sir motors are rotating but ldr doesnt work and transistors are also get heated so whats the problem pls tell me sir??

    February 28, 2017 at 9:56 pm
  • Haidee Carpio Sarmiento

    can i use a dc motor?

    April 2, 2017 at 2:58 pm

Leave a Reply

Your email address will not be published. Required fields are marked *