Arduino - Line Follower Robot

36,196

83

13

About: Arduino, Raspberry Pi, esp8266, Tutorials, Projects

Arduino Project Tutorial Line Follower Robot - For beginners

In this tutorial, you will make line follower robot.

Step 1: Video Tutorial

This tutorial involves building a line follower robot with an QTR-8RC Reflectance Sensor Array.

Step 2: Hardware Required

  • Arduino Board
  • Motor Shield (Adafruit)
  • QTR-8RC Reflectance Sensor Array (Pololu)
  • DC Motor x2
  • Wheel x2
  • Bovine Wheel
  • Chassis plate
  • Battery 9V
  • Battery Buckle
  • Wires
  • Button
  • Glue Gun
  • Electrical Tape

Step 3: Create of the Chassis

  1. The DC motors attach to the chassis
  2. The Arduino attach to the chassis
  3. The Motor Shield attach to the Arduino.
  4. The Bovine Wheel attach to the chassis
  5. Wheels attach to the DC Motors

Step 4: About the Motor Shield

  • The motor controllers on this shield are designed to run from 4.5V to 25V.
  • There are two places you can get your motor 'high voltage supply' from. One is the DC jack on the Arduino board and the other is the 2-terminal block on the shield that is labeled EXT_PWR.
  • To connect a motor, simply solder two wires to the terminals and then connect them to either the M1, M2, M3, or M4.

Step 5: DC Motors and the QTR-8RC Sensor Connections

  1. DC Motors connect to the Motor Shield
  2. Left Motor connect to M1 - Right Motor connect to M2
  3. The QTR-8RC Reflectance Sensor Connections

  • The Sensor VCC connect to the Arduino +5V
  • The Sensor GND connect to the Arduino Ground
  • The Sensor pin 2 connect to the Arduino Analog 0
  • The Sensor pin 3 connect to the Arduino Analog 1
  • The Sensor pin 4 connect to the Arduino Analog 2
  • The Sensor pin 5 connect to the Arduino Analog 3
  • The Sensor pin 6 connect to the Arduino Analog 4
  • The QTR-8RC Reflectance Sensor attach to the chassis

Step 6: Battery and on / Off Button Connection

  • The (+) from the battery is connect to a leg of the button
  • Connect a cable to the other legs of the button. This cable is for Motor Shield (+)
  • If you would like to have 2 seperate DC power supplies for the Arduino and motors. Plug in the supply for the Arduino into the DC jack, and connect the motor supply to the PWR_EXT block. Make sure the jumper is removed from the motor shield.

Step 7: Copy the Code and Install the Arduino Libraries

  • Uncompress the ZIP file onto your desktop
  • Place the AFMotor folder into your arduinosketchfolder/libraries folder
  • Rename the uncompressed folder AFMotor
  • Install the QTRSensors library
  • Download the library
  • Rename the folder “qtr-sensors-arduino-xxxx” to “QTRSensors”

  • Drag the “QTRSensors” folder into the “libraries” directory inside your Arduino sketchbook directory

  • After installing the library, restart the Arduino IDE
  • Now you can see the libraries you have installed
  • When you verify, you will not see any errors

Step 8: If It Helps, Please Subscribe

First of all, I would like to thank you for reading this guide ! I hope it helps you.

If you want to support me, you can subscribe my channel and watch my videos.

Visit My Youtube Channel - Mert Arduino Tutorial & Projects

Share

    Recommendations

    • First Time Author

      First Time Author
    • Big and Small Contest

      Big and Small Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018

    13 Discussions

    0
    None
    rahul rakku

    Question 2 months ago on Step 7

    Gret job sir could you plz explain the copying of the arduino code.i am confused in that step

    0
    None
    karangopal01

    Question 10 months ago on Introduction

    I have bought new motor driver . Now a am confused which terminals of motor driver should be connected to arduino.
    The terminal name given in the motor driver i have brought is confusing.
    Please help me out.

    IMG_20180210_210322.jpg
    0
    None
    JuanpeP

    1 year ago

    hello friend, which change I need to do for work at white line?

    0
    None
    trip22

    1 year ago

    can you help me

    0
    None
    JuanpeP

    1 year ago

    Hello dear, sorry I have one question, can I do this instructable with H bridge L298N?

    0
    None
    awsomearies

    1 year ago

    i am new to arduino can you please tell which kind of sensor you are using

    0
    None
    Arush Bansal

    1 year ago

    I've made a line follower with your program. Can you suggest some method to detect discontinuities in the track ignore them and move ahead (i.e breaks in the track).

    0
    None
    manas arora

    1 year ago

    it's great but i m not able to get the code from my blog page the code is coming of robotic hand so pls tell how to do

    1 reply
    0
    None
    MertArduinomanas arora

    Reply 1 year ago

    http://mertarduinotutorial.blogspot.com.tr/2016/12/arduino-project-tutorial-12-line.html

    0
    None
    SyamsaH

    1 year ago

    Hi sir, great job. but could you advice us if we use TCRT sensor instead Polulu one? (sorry for my bad English)

    0
    None
    ChristyI

    1 year ago

    Really nice job on the video and the whole instructable - well done sir

    1 reply