You are on page 1of 18

Things Needed for Arduino Line Follower Robot Car

Amazon.com Links
IR Sensor: https://amzn.to/2TjUr1j
Arduino UNO R3: https://amzn.to/34ejTf9
L298N Motor Driver: https://amzn.to/3oc750H
TT Gear Motor: https://amzn.to/2TcV9NV
Jumper Wire: https://amzn.to/2Hk1oNF
18650 Battery: https://amzn.to/3m7Irwy
2S, 18650 Battery Holder: https://amzn.to/2TehpXS
65MM Wheels for TT Motors: https://amzn.to/3dRy2C7
Soldering Iron: https://amzn.to/37qwcqE
Glue Gun: https://amzn.to/2HnnUoV

Amazon.in Links
IR Sensor: https://amzn.to/2TaSsfZ
Arduino UNO: https://amzn.to/31sEgU4
L298N Motor Driver: https://amzn.to/37qwcqE
TT Gear Motor: https://amzn.to/2FLFeTF
Jumper Wire: https://amzn.to/2HqWHBb
18650 Battery: https://amzn.to/34hsldt
2S, 18650 Battery Holder: https://amzn.to/2TdA1XY
65MM Wheels for TT Motors: https://amzn.to/31rrghv
Soldering Iron: https://amzn.to/2HldvtF
Glue Gun: https://amzn.to/3mcr51m

Popular Categories:
1. Circuits
2. Arduino Projects
3. DIY Projects

Schematics for Arduino Line Follower Robot Car:


Arduino Line Follower Robot with IR Sensor, Arduino Uno and L298N Motor Driver
Steps for making the Car:

Step 1:
First, we will need a wood piece as the car chassis. Here I am using 13CM x 10CM Plywood as the car chassis. These dimensions are ideal for making a TT Motor Car. You can also use an Acrylic sheet
or Premade chassis also.

Step 2:
Now attach the motors on the 4 corners of the Plywood with a Glue gun or any other glue. Make sure when you are attaching the motors then the motor alignment should be correct. Otherwise, the car will
not go straight.
Step 3:
Now connect the TT Gear Motors as shown below. We will connect the motors in criss cross pattern. This is because we have to make the car in such a way that two side motor rotates in same direction in
order to go Forward Backward and other known directions.
Step 4:
After Connecting motors, the connection should look like this. Here I provided both side pictures for you to understand clearly what is going on.
Step 5:
Here we are using L298N Motor Driver. I used double-sided tape for connecting the L298N Motor driver on the Plywood. You can also use Nut and bolts for this.
Step 6:
Now connect the motor wires with the L298N Motor Driver. And then Tighten the motor driver wires. and avoid any type of loose connection.
After connections all wires will look like this.

Note: After uploading the code if the car is not going in the right direction or if it is rotating in the wrong direction then just change the motor wires. And it will just work just fine.
Step 7:
For the Battery, I am using 2, 18650 batteries. This is great for making this type of car. For connecting the batteries I am using a 2s 18650 Battery holder. I also added a switch for turning on/ off the car.
The battery wires will be connected with the motor driver input wires. You can also clearly see where to connect the battery wires.
Step 8:
In this project, I am using Arduino Uno as a Microcontroller. You can also use any other microcontroller as your wish. But in that case, the wiring schematics will be different.
Next, you have to remove the Jumper shorted connectors from the motor driver for the next step of connection.
Step 9:
In the picture I have mentioned the necessary connections for the motor driver.

Arduino Uno L298N Motor Driver


Pin 10 ENA
Pin 9 IN1
Pin 8 IN2
Pin 7 IN3
Pin 6 IN4
Pin 5 ENB

Step 10:
Connect the IR Sensors as I showed in the photo. Then connect the necessary wires with the Arduino UNO. Just Follow the Wiring Diagram in the schematics.

Now Upload the code to Arduino. Now we have to do the calibration for running the car.
Step 11:
Connect the batteries to the car and turn on the switch.
Step 12: (Sensor Calibration) *** IMPORTANT***
Before calibrating you must connect the wheels to the car. You don’t need to open the serial monitor for calibration. It is just manual calibration. Here I used the digitalRead function to differentiate
between Light and Dark. So, the IR Sensor will just give High/ Low as the Output.
Place the car on some High surface. Here I used a Top cover of Spray Paint to place the car on it for calibration. Here I am using the White surface couple with a T-shaped line for calibration. (Those who
are thinking about what I used for the T Shape. Here is the answer, This is simple Black Electrical tape )
Place the car As I Showed in the picture. Now You are ready to calibrate. First Rotate the 2 Potentiometers (Left & Right side sensors both) full Counter-clockwise.

Now Rotate the Potentiometers one by one slowly clockwise till the LED of the IR Sensor Turns on.
Next, slowly move the car to the Left and Right in such a way that the car Left and the Right sensor will be on the black line. and then the car wheels rotate in a different direction.
More specifically, If you put the Left Sensor on the black line the car will try to move in the right direction. Similarly, If the right sensor is in dark then The car moves in the Left direction.
This is because to place the car all-time on the Blackline. One main corn of this configuration is that you can’t go too fast in this configuration. As a beginner project, this is great.
So, the calibration process is bit easier in this case. Now you can turn on the car and place on the where you want to follow and the car will follow the line.

You might also like