Line Follower Robot with OpAmps

This is an old project that I found on my computer and decided to share with you guys. It’s that famous line following robot, made the simplest way possible, using only basic components such as LM358 OpAmp, LDR, Resistors and Transistors.

The LM358 comes with two Operational Amplifiers and I used it as comparator to make the robot stay on the right path.


I attached two bright red LEDs and two LDRs in the front of the car to detect if the robot is going in the right direction or not. When the car is going straight, the light from both LEDs will reflect on the white surface, therefore the LDR’s resistance will be the same and both motors will rotate at the same speed. When one of the LEDs goes over the black line, one motor will stop while the opposite will keep going, fixing the robot’s position. The picture below demonstrates this idea:

LDR Sensor.

The PCB was developed using EagleCad, you can download the files HERE. The simulation using Proteus ISIS.

Circuit Schematics.

The chassis and the battery were bought from Hobby King. Below are pictures of the assembled car and PCB.



And finally, the video:

There are many ways to improve this project, for example using a microcontroller or adding a few more OpAmps for a smoother control using PID.

For a better explanation about this project, you can check the written project here (it’s in portuguese).

3 comments on “Line Follower Robot with OpAmps

  1. hamza abbasi April 6, 2016 3:40 pm

    i want to make it in my final project kindly mail me all its PCB components information and components required

    • dansku April 11, 2016 4:19 am

      you have everything in the post.

  2. Thabang October 28, 2016 6:30 am

    how do we calculate the values of the components that we have used

Leave a Reply to hamza abbasi Cancel Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.