DIY Arduino Line Following Robot

by Giannis Vasilakis in Circuits > Arduino

2229 Views, 16 Favorites, 0 Comments

DIY Arduino Line Following Robot

F32GLETJ5K611NJ.LARGE.jpg
FU19U42J5K611KD.LARGE.jpg
FKO6IUBJ5K611KI.LARGE.jpg
FY5K9R8J5K611MV.LARGE.jpg

Well, if you are a beginner, here you will find the easiest way to build your own black line following robot!We will use a mini rover robot chassis with four small dc motors to build it easier.

For one more time in DIY we choose to use the famous Arduino UNO board. Project updates and more Arduino projects can be found here: http://www.ardumotive.com/mike-roboten.html

Our small robot will start to follow the black line when we press ones the button in front of it. If we press it again it will stop. The sensor board that we are using has 5 ir sensors. We will use only 3 of them, the center one for tracking the black line and the left/right of it to make the corrections to the robot's route. Our robot will stop when all sensors detect a black line. Watch the "Robot in Action" video below..

License:Attribution-NonCommercial-ShareAlike (Read More)

What You Will Need - Hardware

FNI49FMJ5K611JQ.LARGE.jpg

Assembly the Mini Round Robot Chassis Kit

FTU4ONWJ5K611J1.LARGE.jpg
FZQ3TQUJ5K611IE.LARGE.jpg
F42IW6BJ5K611HN.LARGE.jpg
F74IS36J5K611FX.LARGE.jpg
FYRAAJUJ5K611DL.LARGE.jpg
FGANI69J5K611B8.LARGE.jpg

Follow the images below !

A picture is worth a thousand words!

The Circuit

F5KB7AGJ5K613KO.LARGE.jpg

The connections are pretty easy, take your time and follow the "colors".

About "Line Follower Detector 5-Channels" pcb

  • Connect the 5V pin to Arduino 5V pin,
  • GND to Arduino GND
  • Sensor "2" to Arduino A1 pin
  • Sensor "3" to Arduino A2 pin
  • Sensor "4" to Arduino A3 pin
  • Button SW to Arduino A5 pin

Power - Battery holder

Connect the battery holder cables with a dc jack to the Arduino uno (or to Vin and gnd pin). If you want you can add an ON/OFF SW on the red cable of your battery holder pack.

The Code

FEDFHWOJ5K6141P.LARGE.jpg

Make it alive by program it with the following code!We will use the front button to start our program (or to stop it if you press it twice) If your robot doesn't move forward, go to lines 26 and 27 and change the PWM values until your robot moves straight.

Download the code from here and open it with Arduino IDE.

​Well Done!

FV4YNZUJ5K6148G.LARGE.jpg

Well...that's it! You make a very special and easy DIY for summer 2019 !
Make a black line track and test your new robot! The black line must have width: 30mm.

Or you can download and print our sketch (open it with Corel Draw)

I hope you liked this, let me know in the comments!

Post me some photos of your Arduino robot!