Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

5K9 Line Follower Using DC Motor

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

BASIC ELECTRICAL AND

ELECTRONICS ENGINEERING
MICRO PROJECT
A Micro Project on

DESIGNING A LINE FOLLOWER USING A DC MOTOR


Submitted to CMR institute of Technology in partial fulfillment of the requirement
for the award of the laboratory of

BASIC ELECTRICAL AND ELECTRONICS ENGINEERING


Of
I-B.TECH. I-SEMESTER
In Freshman Engineering Department

Submitted by

B. Rahul - 23R01A05K8
B. Taraka Ramachandra - 23R01A05K9
Shaik Sohail - 23R01A05Q7
Tharak Patel - 23R01A05R1

Under the guidance of

P. RAJASHEKHAR
(Associate Professor, CSE Department)
CMR INSTITUTE OF TECHNOLOGY

(UGC AUITONOMOUS)
(Approved by AICTE, Affiliated to JNTU, Kukatpally, Hyderabad)
Kandlakoya, Medchal Road, Hyderabad
CMR INSTITUTE OF TECHNOLOGY
(UGC AUTONOMOUS)
(Approved by AICTE, Affiliated to JNTU, Kukatpally, Hyderabad)
(Kandlakoya, Medchal Road, Hyderabad)

FRESHMAN ENGINEERING DEPARTMENT

CERTIFICATE

This is to certify that a Micro project entitled with: “Designing a Line Follower using DC Motor” is being

Submitted by

B. Rahul - 23R01A05K8
B. Taraka Ramachandra - 23R01A05K9
Shaik Sohail - 23R01A05Q7
T. Tharak Patel - 23R01A05R1

In partial fulfillment of the requirement for award of the ‘Basic Electrical and Electronics Engineering’

of I-B.Tech I-Semester in Freshman Engineering towards a record of a bonafide work carried out under

our guidance and supervision.

Signature of Faculty Signature of HOD

Dr. P. Rajashekhar Mr. Radha Krishna


(Associate Professor)
ACKNOLEDGEMENT

We are extremely grateful to Dr. M. Janga Reddy, Director, Dr. B. Satyanarayana, Principal and Mr.

Radha Krishna, Head of Department, Freshman Engineering Department, CMR Institute of

Technology for their inspiration and valuable guidance during entire duration.

We are extremely thankful to our in-charge of Basic Electrical and Electronics Engineering, Dr. P.

Rajashekhar, Freshman Engineering Department, CMR Institute of Technology for his constant guidance,

encouragement and moral support throughout the project.

We express our thanks to all staff members and friends for all the help and coordination extended in

bringing out this Project successfully in time.

Finally, we are very much thankful to our parents and relatives who guided directly or indirectly for

successful completion of the project.


INDEX

Sl.No. Content Page No.


1. Working of Line 1
Follower Robot
2. Components 2
Required
3. About 3
Components
4. Applications of 7
Line Follower
Robot
5. Advantages of 8
Line Follower
Robot
6. Connection 9
Diagram
7. Software and 10
Programming
Code
8. Conclusion 13
9. Result 14
LINE FOLLOWER ROBOT

In industries, giant line follower robots are used for assisting the automated production process. They are

also used in military applications, human assistance purposes, delivery services, etc.

WORKING OF LINE FOLLOWER ROBOT

The concept of the line follower robot is related to light. Here, we use the behaviour of light on the black

and white surface. The white colour reflects all the light that falls on it, whereas the black colour absorbs the

light.

In this line follower robot, we use IR transmitters and receivers (photodiodes). They are used to send and

receive the lights. When IR rays fall on a white surface, it is reflected towards IR receiver, generating some

voltage changes.

When IR rays fall on a black surface, it is absorbed by the black surface, and no rays are reflected; thus, the

IR receiver doesn’t receive any rays.

In this project, when the IR sensor senses a white surface, an Arduino gets 1 ( HIGH ) as input, and when it

senses a black line, an Arduino gets 0 ( LOW ) as input. Based on these inputs, an Arduino Uno provides the

proper output to control the bot.


Components Required

Arduino Uno

IR sensor

L293D motor driver

BO motor

Wheels

Lithium-ion battery

Jumper cables

Robot Chassis
About Components

ARDUINO UNO

Arduino Uno is an 8-bit ATmega328P microcontroller. To support the microcontroller, it uses the

components such as crystal oscillator, serial communication, voltage regulator, etc. It has 14 digital I/O pins

( 6 pins can be used as PWM pins). It has six separate analog input pins, a USB connection, a Power barrel

jack, an ICSP header, and a reset button.

This board is programmable with the Arduino IDE (Integrated Development Environment) platform via a

type B USB cable

Fig. 1 Arduino Uno

INFRARED SENSOR

An infrared sensor emits the light to detect some surroundings. In the infrared spectrum, all the objects

Radiate some form of thermal radiation that is invisible to our eyes, but an IR sensor can detect these

radiations.

Here, IR LED is an emitter, and the IR photodiode is a detector. An IR LED emits the IR light, and the
photodiode is sensitive to this IR light. When IR light falls on the photodiode, the output voltages and the

resistances will change in proportion to the magnitude of the received IR light.

The Infrared detection system uses the five essential elements: an infrared source, a transmission medium, optical

component, infrared detectors, and signal processing. An infrared transmission can be done through the vacuum,

atmosphere, and optical fibres.

Fig. 2 Infrared Sensor

L298N MOTOR DRIVER

L298N is one of the easiest and chipset way to control DC motors. It is the two-channel motor driver that

can control the speed and spinning direction of DC motors.

This L298N Motor Driver is a high-power motor driver module. It is used for driving DC and Stepper

Motors. This motor driver consists of an L298N motor driver IC and a 78M05 5V voltage regulator,

resistors, capacitor, power LED, 5V jumper in an integrated circuit.


Fig. 3 L298N Motor Drive

When the jumper is placed, it enables the 78M05 Voltage regulator. When the power supply is less than or

equal to 12V, the voltage regulator will power on the internal circuitry. When the power supply is more than

12v, then the jumper should not place and should give a separate 5v to power the internal circuitry.

Here, ENA & ENB pins are speed control pins for Motor A, and Motor B. IN1& IN2 and IN3 & IN4 are

direction control pins for Motor A and Motor B.

BO MOTORS

BO Motor is known as Battery Operated motor. These motors are commonly used in hobby-grade projects where

the user requires a small DC motor as a simple actuator.

BO series linear motor provides good torque and rpm at lower operating voltages. The BO motors are available in

single Shaft, Dual Shaft, and DC Plastic Gear BO. These motors consume low current. In this project, we have

used four single shaft BO motors. Fig. 4 BO MOTOR

Fig. 4 BO Motors
LITHIUM-ION BATTERY

A lithium-ion battery is a rechargeable battery. It is commonly used in portable devices such as mobiles,

laptops, electronics, and electric vehicles. Also, they are growing in popularity for military

and aerospace applications.

Fig. 5 Lithium Ion Battery

CHASSIS

Another place where you should not compromise is with your robot’s chassis. You can use cardboard,
wood, plastic anything that you are good with line following robot. But, just make sure the chassis is
sturdy and should not wiggle when the robot is trying to run. I have designed my own chassis with
cardboard.

Fig. 6 Chassis
APPLICATIONS OF ARDUINO LINE FOLLOWER ROBOT

Line following robots are in use for automation processes in industries, military applications, etc.

They are very useful as they can work without any supervision i.e. they work as automatic guided vehicles.

With additional features like obstacle avoidance and other security measures, line follower robots can be

used in driverless cars.


ADVANTAGES OF ARDUINO LINE FOLLOWING ROBOT

Building an Arduino line following robot offers numerous advantages. Firstly, it provides a hands-on

learning experience in robotics and programming and problem-solving skills. Secondly, it introduces the

concept of sensor-based navigation, allowing the robot to autonomously follow lines with high

precision. The versatility of Arduino allows for customization and expansion, enabling the robot to

perform additional tasks beyond line following, such as obstacle avoidance or object detection.
CONNECTION DIAGRAM

Here, we have used four BO motors. Motors 1 & 2 are connected to the first channel of L298N, whereas
motors 3 & 4 are connected to the second channel of the motor driver.

IN1, IN2, IN3, and IN4 pins are connected to pin 9, 6, 5, 3 of Arduino Uno. Here, we have used the jumper
between +5V and enables pins (EN1 &EN2). You can remove it and make the external connection, as
shown in the below image.

Fig. 7 Connection Diagram


SOFTWARE AND PROGRAMMING CODE

int mot1=9;
int mot2=6;
int mot3=5;
int mot4=3;

int left=13;
int right=12;

int Left=0;
int Right=0;

void LEFT (void);


void RIGHT (void);
void STOP (void);
void setup()
{

pinMode(mot1,OUTPUT);
pinMode(mot2,OUTPUT);
pinMode(mot3,OUTPUT);
pinMode(mot4,OUTPUT);

pinMode(left,INPUT);
pinMode(right,INPUT);
digitalWrite(left,HIGH);
digitalWrite(right,HIGH);

}
void loop()
{
analogWrite(mot1,255);
analogWrite(mot2,0);
analogWrite(mot3,255);
analogWrite(mot4,0);

while(1)
{
Left=digitalRead(left);
Right=digitalRead(right);
if((Left==0 && Right==1)==1)
LEFT();
else if((Right==0 && Left==1)==1)
RIGHT();

}
}
void LEFT (void)
{
analogWrite(mot3,0);
analogWrite(mot4,30);

while(Left==0)
{
Left=digitalRead(left);
Right=digitalRead(right);
if(Right==0)

{
int lprev=Left;
int rprev=Right;
STOP();
while(((lprev==Left)&&(rprev==Right))==1)
{
Left=digitalRead(left);
Right=digitalRead(right);

}
}
analogWrite(mot1,255);
analogWrite(mot2,0);
}
analogWrite(mot3,255);
analogWrite(mot4,0);
}
void RIGHT (void)
{
analogWrite(mot1,0);
analogWrite(mot2,30);

while(Right==0)
{
Left=digitalRead(left);
Right=digitalRead(right);
if(Left==0)
{
int lprev=Left;
int rprev=Right;
STOP();
while(((lprev==Left)&&(rprev==Right))==1)
{
Left=digitalRead(left);
Right=digitalRead(right);

}
}
analogWrite(mot3,255);
analogWrite(mot4,0);

}
analogWrite(mot1,255);
analogWrite(mot2,0);
}
void STOP (void)
{
analogWrite(mot1,0);
analogWrite(mot2,0);
analogWrite(mot3,0);
analogWrite(mot4,0);

}
CONCLUSION

In conclusion, the Arduino line following robot offers an exciting opportunity to the world of robotics.
With its versatile capabilities and simple programming, it provides an excellent platform for learning and
experimentation. By mastering the art of line following, you can develop valuable skills in sensor
integration, motor control, and algorithm design. Whether you’re a hobbyist or an engineer, building an
Arduino line following robot opens doors to endless possibilities and sparks creativity in the field of
robotics.
RESULT:

You might also like