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).