How to make a line follower robot using Arduino and digital ir sensor

Views

 In the first post on this blog will be shown how to Make a Line Follower Robot:


A robot which follows a certain path controlled by a feedback mechanism is called a LFR Robot, that follows a black line on white surface or white line on black surface. A line follower robot is very popular now. It is getting popular day by day. Because, now a days in many places for example, school, college, university robot race competitions are held. There are a lot of tutorials on the Internet on line follower robot but all of that does not work or at the beginning many people did not understand how the work should be done step by step.

In this tutorial I will show that using 6 sensors how to make a line follower robot. Let's get started:

Parts List:


To create a line follower robot you will need a list of parts, that are given below:

(Click on the name to buy it)

1. Smart Robot Car Chassis Kit

2. Arduino Uno R3

3. L293D Dual H-Bridge Motor Control Driver

Or, you can also use,

L298N Motor Drive Controller Board DC Dual H-Bridge

4. Digital IR Sensor Array 6

Or, Use double

three channel tracing sensor module

Or, Use single 6 sensors

Single Channel Infrared Line Track Follower Sensor Module

5. Battery Packs Lithium Ion Battery

6. Ball Caster

7. Jumper Wires

8. Mini Breadboard (Optional)

9. Screws and nuts(Optional)

Circuit Diagram-1:


LFR Circuit Diagram 1

This circuit has been created using a software from the Internet so I've used the Parts of line follower some of which is not available on this circuit because the components was not available in the library. The purpose of this circuit is to give you an idea that which wire has been used in which port. Another circuit is given below it has been designed with the paint (Software) and that parts which I've used to build a line follower all are present in this circuit.

Circuit Diagram-2:


LFR Circuit Diagram 2

By using this Circuit-2 you can put the parts in the right place.

Working Methods:


In this tutorial it won't be shown how to put the parts on the Robot chassis. just it will be notified how to add the parts to complete the circuit, so set your own discretion of parts on the chassis (make your own set). Alternatively, to give some idea about how to set the parts some pictures are given below.

LFR Screesnshot 1

LFR Screesnshot 2

LFR Screesnshot 3

Here connecting parts with Arduino is more important than adding parts to chassis. The robot will be out of line if something is wrong. Therefore, carefully follow the instructions.

In order to better understand, the method of connection is divided into 4 steps:

Connection Procedure:


1. Arduino with the motor driver:


Connect Arduino's (2,3,4,5) num digital pin to the motor driver (IN1,IN2,IN3,IN4) num pin's with the jumper wire respectively. Connect Arduino's  5V pin to the Motor Driver  5V pin.

2. Arduino with IR Sensor's:


Connect IR Sensor's GND and VCC to the Motor Driver's GND and 5V. and connect the IR sensor's (SEN6, SEN5, SEN4, SEN3, SEN2, SEN1) pin's to the Arduino's (6,7,8,9,10,11) num digital pin's respectively.
SEN6, SEN5, SEN4, SEN3, SEN2, SEN1
 |             |            |           |           |           |
 6,           7,           8,           9,        10,       11

3. Motor Driver with Motor:


Connect the motors very carefully, such as the circuit diagram is given in Figure 1 or 2 . Motor A / Motor 1 --> ( Out 1, Out 2) and Motor B / Motor 2 -->(Out 3, Out 4). If an mistake occurs one motor will rotate clockwise and the other will rotate counterclockwise.

4. Battery Connection:


Connect the (VCC) positive side of the battery to the motor driver's VCC. and connect the (GND) negative side of the the battery to the arduino's GND.

Arduino Code:

Open this code with Arduino ide Software. Upload it to Arduino. You can also upgrade the code for better performance.

Get The Code


Ready to Race:


To enable/start the LFR Robot Click on the power switch and motor switch in the motor driver and if the driver does not contain a switch, add a switch while connecting the battery to the robot. Now, this will allows you to turn on/off the robot while you want.

Video Demo:



LINE FOLLOWER ROBOT USING ARDUINO AND DIGITAL 6... by satunes
If you got any problem to build this line follower robot please let me know i will try my best to help.


Oldest