Community
Line-following robot car, product render
RoboticsArduinoEducationCompetition
AI summary

A fast two-wheel robot that follows a black line using five infrared sensors and a PID controller. A classic school and college competition build, designed to be tuned and raced.

Board
Arduino Nano
Difficulty
Intermediate
Build time
~4 hours
Parts cost
~₹4,470

Line-following robot car

Made by Blueprint Hardware
CategoryPartsCost
Electrical7₹3,256
Microcontroller1₹1,936
Arduino Nano1₹1,936
Power1₹220
2 × 18650 battery holder with switch (2S 18650 holder with toggle switch)1₹220
Actuator3₹774
Dual motor driver (TB6612FNG module)1₹246
Left N20 gear motor (N20 6V 600 RPM)1₹264
Right N20 gear motor (N20 6V 600 RPM)1₹264
Sensor2₹326
5-channel infrared line sensor (TCRT5000 5-channel array)1₹308
Start button (Tactile switch 12 × 12 mm)1₹18
Mechanical9₹1,214
3D printed3₹290
Chassis plate with bumper1₹220
N20 motor brackets2₹70
Hardware6₹924
34 mm rubber wheels2₹141
Steel ball caster, 12 mm1₹62
M3 screws, nuts and standoffs1₹106
Protected 18650 cells2₹616
Total16₹4,470

How it works

Line followers teach sensing, motor control and feedback in one build, and they're the first event at most robotics competitions.

Five infrared reflectance sensors under the front bumper see the line. The Arduino Nano turns their readings into a position from −2 to +2 and runs a PID loop that speeds one wheel up and slows the other to stay centred. A TB6612FNG driver powers the two N20 gear motors from two 18650 cells; it runs far cooler than the old L298N.

Press the start button, place the car on the line and it runs. Tune KP and KD at the top of the sketch for your track.

Electronics₹3,256
Mechanical₹1,214
Total₹4,470

Discussion

No comments yet. Ask a question, share your build, or suggest an improvement.

    Sign in to join the discussion.