Make A FAST Line Follower Robot Using PID
Make A FAST Line Follower Robot Using PID
by the Technowright
Making a line follower robot is a great way to get started with robotics and arduino. But I had assumed it was a simple
project and never tried to make one. But when a friend of mine challenged me to join a line follower robot competition, I
had to design the fastest robot in the competition. On the day of the competition, my robot refused follow any line and it
was infact actively avoiding the line. My friend had won that challenge with his bot hitting a speed of 0.7m/s. So, I
decided to nd out where I went wrong and make a faster line follower robot.
I had to nd out where I went wrong. So I started by making a simple Line follower with two IR Sensors and arduino. It
works on the simple principle of a bang-bang controller. If the left sensor is on black then it turns right. And if the right
sensor is on black then it turns left. I rst tested it out using AA battery pack. But it wasnt delivering enough power. I used
a 12V LiPo battery. Then it worked.
I then designed a custom chassis to reduce the weight and make a design that is e cient. I replaced the DC motors with
N20 DC motors. I used an IR Sensor array instead of the 2 IR sensors. This is will be used to implement the PID controller. I
replaced the arduino with an ESP32 becasue it had Bluetooth which was very helpful while tuning the robot.
I then designed a PCB to incorporate all the elcetronics on a compact board. I used JLCPCB to manufacture the PCBs.
Also I the motor drivers I was using were wasting too much power as heat. So, I replaced them with the TB6612FNG
Motor driver Chip which is more e cient. And I and I used the PCB Assembly services from JLCPCB to get the chip
presoldered onto the board. You can download the gerber le(zip le) from https://github.com/theTechnowright/PID-
Line-Follower-Robot and upload it to JLCPCB to get them manufactured.
I built a huge track all around my living room oor to test the it. The track had 3 important parts which really test the
ability of the Line follower:
1. The 90° turn
2. The "Meanders"
3. Intersections
The results are include in the video @ 8:12. The bot was able to go through all three of these with quite an ease. I then
tested the speed of the Line follower by marking two points 1m apart and measuring the time taken. The max speed was
around 1m/s. The 3D Printed cover was making it quite heavy, and it was able to go faster without it. It stilll needs more
improvements to increase the speed. This could be by replacing the motors for a higher rpm dc motor, tuning the
algorithm better and by trying out di erent wheel diameters.