About This Project

Learn how to create a line follower robot that will follow a line.

Project Info

  • Programming Platform: Arduino IDE
  • Difficulty: Intermediate
  • Estimated Time: 2 Hrs
  • Category: Arduino

Introduction

Line follower robot as the name indicates is an autonomous robot that follows a particular direction or path (either a white line on a black surface or a black line on a lighter surface).  The line follower robot actually follows a feedback mechanism.

Applications of Line Follower Robot

In the present day scenario, robots are taking over many different fields. Line follower robots find their application in many places like shopping malls, homes, transportation of goods, and more.

Components Required

IMAGE COMPONENT QUANTITY

bo-motor

BO motors

2

wheels

Wheels

2

ir-sensor

IR Sensor

1

l293d-motor-driver

Motor Driver (L293D)

1

jumper-wire

Jumper Wires

As Per Requirement

3-wheel-drive

2 Wheel Drive

1

battery

Battery

4

arduino

Arduino

1

Building Guide

Step 1: Assembly

  • For the assembly of 2 Wheel drive bot, start by unwrapping the package.

line-follower-robot
aurdino

  • Here you will find 2 wheels, 2 BO motors, 1 chassis, Battery Box, connectors, Caster wheel, and nut & bolts.
  • Now, solder the connecting wires to the connecting heads of the BO motors.

arduino-motor-connection
replace-aurdino-with-motor

  • Repeat the same process for the rest of the motors.

connect-two-motor-with-each-other

  • Now, connect the BO motor to the base plate or the chassis with the help of connectors and tighten them using the screw and bolts.

bo-motor
connect-bo-motor-with-plate

  • Now, repeat the same steps for the other BO motors.

connect-castor-wheel

  • Now, connect the castor wheel.

connect-battery-box-to-the-chassis

  • Connect the battery box to the chassis.

connect-switch

  • Connect the switch to turn ON/OFF the bot.

connect-switch-to-turn-of-bot

  • Make the connection of the switch by using the red wire.

red-wire

  • Connect the motor driver L293D with the motor wires.

dc-jack-arduino

  • Use the DC jack to power the Arduino and connect it with the battery pins.

dc-jack

  • Now, assemble the wheels.

now-assemble-the-wheels

  • Interfacing Arduino with IR sensor.

interfacing-arduino-with-IR-sensor
long-range-remote-controller

Step 2: Calibrating IR sensor

  • For calibrating the IR sensor place a piece of black tape or black chart paper below the robot at a distance which will be equal to the distance between the IR Sensor and the ground.
  • Use a screwdriver to change the potentiometer value.
  • Rotate the potentiometer until the output LED in the IR sensor lights up.
  • When you remove the black tape or chart paper it will again turn off.
  • Repeat the same process for another IR Sensor.

Step 3: Logic

  • When both sensors are ON/OFF, the robot moves in the forward direction.
  • If only the sensor on the right is ON, the robot should turn right.
  • Similarly, if only the sensor on the left is ON, the robot should turn left.

Step 4: Circuitry of the Robot

  • Powering the components
  • Powering the IR sensors
  • VCC to 5V
  • GND / to GND
  • Output to Digital pin 2
  • Powering the motor driver
  • 12V to Vin pin
  • GND to GND
  • Left Motor to 3, 4
  • Right Motor to 5, 6
  • Right Motor to 5, 6

Step 5: Code

The following code will help you to make the Line Follower Robot:

Code

DESCRIPTION

DOWNLOAD CODE

Line Follower Robot Code 


Download Code

With this, we have come to the end of the project of making a Line Follower Robot, and it’s working. Hope you enjoyed reading it!