Line Follower Using Arduino | Easy DIY Project
by sairushan in Circuits > Arduino
1527 Views, 0 Favorites, 0 Comments
Line Follower Using Arduino | Easy DIY Project
![Screenshot 2019-06-29 at 8.58.58 AM.png](/proxy/?url=https://content.instructables.com/FUT/XI74/JXEYEJ2V/FUTXI74JXEYEJ2V.png&filename=Screenshot 2019-06-29 at 8.58.58 AM.png)
![Line Follower Using Arduino With Code | Easy DIY Project](/proxy/?url=https://content.instructables.com/FNE/PX89/JXEYEJLV/FNEPX89JXEYEJLV.jpg&filename=Line Follower Using Arduino With Code | Easy DIY Project)
![Circuit diagram.png](/proxy/?url=https://content.instructables.com/F85/8Y6R/JXEYFL2A/F858Y6RJXEYFL2A.png&filename=Circuit diagram.png)
In this tutorial, We will be making a line follower using Arduino
Parts Needed:
Chasis: BO Motors and Wheels: https://amzn.to/2Yjh9I7 L298n motor Driver: https://amzn.to/2IWNMWF IR sensor: https://amzn.to/2FFtFu3 Arduino Uno: https://amzn.to/2FyTrjF Jumpers: Mini BreadBoard:
Building the Chassis
![Screenshot 2019-06-29 at 8.59.08 AM.png](/proxy/?url=https://content.instructables.com/FUI/N095/JXEYEJ3Q/FUIN095JXEYEJ3Q.png&filename=Screenshot 2019-06-29 at 8.59.08 AM.png)
Connect the wires to the motors. Then attach the motors to the chassis using Zip ties. Attach the wheels to it.
Now the body is complete.
Build the Motor Circuit:
![Screenshot 2019-06-29 at 8.59.36 AM.png](/proxy/?url=https://content.instructables.com/FMW/AUGB/JXEYEJ5D/FMWAUGBJXEYEJ5D.png&filename=Screenshot 2019-06-29 at 8.59.36 AM.png)
Here we are using an L298N motor driver module which is a dual H-Bridge driver. It can Drive 2 motors bi-directionally or 4 motors uni-directionally.
Connect the motors to the driver.
Connect the power source to the power pins of the driver.
Connect the IR Sensors:
![Screenshot 2019-06-29 at 9.00.25 AM.png](/proxy/?url=https://content.instructables.com/FFG/P6IE/JXEYEJ8P/FFGP6IEJXEYEJ8P.png&filename=Screenshot 2019-06-29 at 9.00.25 AM.png)
Here we are using IR sensors to detect the line.
The IR sensor module has an emitter and a receiver. The IR light is absorbed by black surfaces and reflected by white surfaces. This helps us to follow the black line.
Connect 3 jumpers to the IR sensors.
One for data and the rest two for power.
Arduino Connection:
![Screenshot 2019-06-29 at 9.00.33 AM.png](/proxy/?url=https://content.instructables.com/FP9/KFOT/JXEYEJAA/FP9KFOTJXEYEJAA.png&filename=Screenshot 2019-06-29 at 9.00.33 AM.png)
Connect the input pis of the motor driver to the digital pins of the Arduino. Assign them using the code. Do the same for the IR sensors.
The Build Is Complete(CODE):
![Screenshot 2019-06-29 at 9.02.13 AM.png](/proxy/?url=https://content.instructables.com/FJJ/60EO/JXEYEJBF/FJJ60EOJXEYEJBF.png&filename=Screenshot 2019-06-29 at 9.02.13 AM.png)
Link to the code: https://github.com/sairushan/Line-follower
Upload the code and enjoy!!
Check My Video for Test Runs:
![Line Follower Using Arduino With Code | Easy DIY Project](/proxy/?url=https://content.instructables.com/F1Z/HO4J/JXEYFL7Z/F1ZHO4JJXEYFL7Z.jpg&filename=Line Follower Using Arduino With Code | Easy DIY Project)