21
Name of the Project: Design and Development of line follower robot Introduction: A Robot is any machine which is completely automatic, i.e. it starts on its own, decides its own way of work and stops on its own. Line follower is an autonomous robot which follows either black line in white are or white line in black area. Robot must be able to detect particular line and keep following it. For special situations, such as cross over where robot can have more than one path which can be followed, predefined path must be followed by the robot. There are various application of line follower robot in practical way. The most practical sector in which line follower robots is extensively used for reducing the human efforts. Some common applications are included as follows: Automated equipment carriers in industries replacing traditional conveyer belts. Automatic cars running on roads with embedded magnets. Homes for domestic purposes like floor cleaning Public places like shopping malls, museums etc. to provide path guidance. Line follower robot can be used in Line follower robots are used widely for its low cost, smaller size, easy interfacing and simple to build. A line follower robot is not as same as a humanoid robot. A humanoid robot is self-maintenance (like recharging itself); autonomous learning (learn or gain new capabilities without outside assistance, adjust strategies based on the surroundings and adapt to new situations), avoiding harmful situations to people, property, and itself, safe interacting with human beings and the environment but line follower robot has not these properties. Generally, a humanoid robot is more complex than a line follower robot. The main features of a line follower robot are-interface to Arduino, Processing 360-degree proximity sensing Ambient line following less power consumption Instantaneous 360-degree sensor information smaller size & lower costs than for equivalent alternative technologies Simple Interfacing.

faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

Name of the Project: Design and Development of line follower robot

Introduction: A Robot is any machine which is completely automatic, i.e. it starts on its own, decides its own way of work and stops on its own. Line follower is an autonomous robot which follows either black line in white are or white line in black area. Robot must be able to detect particular line and keep following it. For special situations, such as cross over where robot can have more than one path which can be followed, predefined path must be followed by the robot. There are various application of line follower robot in practical way. The most practical sector in which line follower robots is extensively used for reducing the human efforts. Some common applications are included as follows:

Automated equipment carriers in industries replacing traditional conveyer belts.

Automatic cars running on roads with embedded magnets. Homes for domestic purposes like floor cleaning Public places like shopping malls, museums etc. to provide path

guidance.Line follower robot can be used in Line follower robots are used widely for its low cost, smaller size, easy interfacing and simple to build. A line follower robot is not as same as a humanoid robot. A humanoid robot is self-maintenance (like recharging itself); autonomous learning (learn or gain new capabilities without outside assistance, adjust strategies based on the surroundings and adapt to new situations), avoiding harmful situations to people, property, and itself, safe interacting with human beings and the environment but line follower robot has not these properties. Generally, a humanoid robot is more complex than a line follower robot. The main features of a line follower robot are-interface to Arduino, Processing 360-degree proximity sensing Ambient line following less power consumption Instantaneous 360-degree sensor information smaller size & lower costs than for equivalent alternative technologies Simple Interfacing.In the future, a line following robot could be used to lay groundwork for a small structure, repaint objects such as baseball diamonds, lay a trail of something down, or even plow the ground for farmers.

List of Equipment:

TCRT-5000 sensor array (1 pcs) 12 volt 3cell li-Poly battery (1 pcs). 12v plastic gear motor (2 pcs) Plastic Wood Plastic wheel (2 pcs) Hc-sr04 (Electromagnetic Proximity Sensor) Arduino Uno Project board L298N motor Driver module Jumper wire

Page 2: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

Details of each Component:

TCRT-5000 sensor array (1 pcs)

Function:The main function of the TCRT-5000 sensor to identify difference between black and white color and measure distance. In this project the sensor array will help the LFR robot follow proper line through measurement difference.

Rating:

Principle:Tcrt-5000 is a package of IR emitter and a IR photo transistor. The IR emitter which emits infrared lights and reflected light being sensed by a photo transistor. The resistance level of the photo transistor depends on how much light fall on it extremely depends on the color of reflector surface. White color surface reflects most of the IR lights fall on it, thus the resistance level of the photo transistor changed to less and the voltage drop will be less. Thus a less analogue reading will be found. For black vice-versa.

Control method:A 5v power supply is provided to each sensor and the IR photo transistor generates an output voltage. the output which is an analog signal converted into digital via Arduino build in analog to digital converter. This is how each of the output of the sensor is being converted.

Cost:Average value for each TCT-5000 is 15 taka. The total coast for the array with six package and PCB is approximately 150 taka.

Alternative:H21b1 photo Darlington switch array.

Shop address: S & Sons Electronics, Talaimari, Motihar, Rajshahi

12 volt 3cell li-Poly battery (1 pcs)

Function:It stores vast amount of electrical energy and supplies to the system.

Page 3: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

Rating:

Type: lithium Polymer.

Cell no : 6

Output voltage: dc-12volt

Rechargeable : Yes

Principle:It’s a rechargeable Li-poly battery that can store electrical charges with in its 6 cell. These batteries have more effectiveness and capacity more than traditional batteries, that’s why they are being used in projects where long time power supply is necessary.

Control method:

That battery comes with standard +5v and +9v power supply mode and a ground connection. Via the power is distributed in necessary devices.

Cost:Its cost varies from shop to shop. The approximate price is 1200 taka.

Possible alternatives:

Traditional 9v battery and 6 cell li-poly battery.

Shop address:Techsopbd.com

12v plastic gear motor (2 pcs)

Function: It has two function, first to convert electrical energy then for torque regulation via built in gears. That means speed is decreased from the original from the motor itself.

Rating:

Type: plastic gear motor.

Page 4: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

Principle:A gear motor comes with a separate dc motor and gears in a integrated package. The motor which converts electrical energy into mechanical rotation and gears which helps to decrease base speed. The decrement of speed allows us to increase torque as they have inverse relationship.

Control method:The rotational speed of motor is being control by a motor driver and Arduino is used to pass fast PWM signals.

Cost:Approximately 90 takas.

Possible alternatives:Metal gear motors (robust and costly version)

Shop address:Techshop BD.

Plastic Wood

Functions:It being used to construct the body of the robot.

Principle:It’s a light weight wood sheet is for architectural as well as robotics dummy work for its low cost and availability. It is not too much robust but enough for this project.

Control method:

Cost:Approximately 100-120 taka.

Shop address:Local hardware shops, New-market, Rajshahi.

Plastic wheel (2 pcs)

Function:Wheels are used to allow the LFR body move freely.

Rating:

Dimension: 65mm diameter plastic wheel.

Page 5: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

Principle:They are connected with gear motors and driven by them. They also provide a required level of friction between them and surfaces to avoid slipping effect.

Control method:As they are being controlled by motors so there is no extra control of them.

Cost:Approximately 80 takas.

Possible alternatives:There are a numerous sizes and values of wheel is available.

Shop address:Techshop BD.

ARDUINO UNO

Arduino is an open-source platform used for building electronics projects. Arduino consists of both a physical programmable circuit board (often referred to as a microcontroller) and a piece of software, or IDE (Integrated Development Environment) that runs on your computer, used to write and upload computer code to the physical board.The Arduino platform has become quite popular with people just starting out with electronics, and for good reason. Unlike most previous programmable circuit boards, the Arduino does not need a separate piece of hardware (called a programmer) in order to load new code onto the board – you can simply use a USB cable. Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn to program. Finally, Arduino provides a standard form factor that breaks out the functions of the micro-controller into a more accessible package.

How ARDUINO UNO works: The PCB design of the Arduino UNO uses SMD (Surface Mount Device) components. I entered the SMD world years ago when I dug into Arduino PCB design while I was a part of a team redesigning a DIY clone for Arduino UNO. Integrated circuits use standardized packages, and there are families for packages.

Page 6: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

After your code is compiled using Arduino IDE, it should be uploaded to the main microcontroller of the Arduino UNO using a USB connection. Because the main microcontroller doesn’t have a USB transceiver, you need a bridge to convert signals between the serial interface (UART interface) of the microcontroller and the host USB signals. The bridge in the latest revision is the ATmega16U2, which has a USB transceiver and also a serial interface (UART interface). To power your Arduino board, you can use the USB as a power source. Another option is to use a DC jack. You may ask, “if I connect both a DC adapter and the USB, which will be the power source?” The answer will be discussed in the “Power Part” section from this article.

To reset your board, you should use a push button in the board. Another source of reset should be every time you open the serial monitor from Arduino IDE.

Rating and features:

Microcontroller: ATmega328

Operating Voltage: 5V

Input Voltage (recommended): 7-12V

Input Voltage (limits): 6-20V

Digital I/O Pins: 14 (of which 6 provide PWM output)

Analog Input Pins: 6

DC Current per I/O Pin: 40 mA

DC Current for 3.3V Pin: 50 mA

Flash Memory: 32 KB of which 0.5 KB used by bootloader

SRAM: 2 KB (ATmega328)

EEPROM: 1 KB (ATmega328)

Clock Speed: 16 MHz

Page 7: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

Cost of arduinouno: Original BDT.3100

Alternatives: Microcontroller, any other arduino. raspberry pi etc.

Shop: Techshop bd.

Jumper Wire

Function:A jumper wire is a conducting wire used to transfer electrical signals between two points in a circuit. The wires can either be used to modify circuits or to diagnose problems within a circuit.

Rating: 2-5 amp.

Cost: BDT. 2 Per wire

Shop: SS electronics, Talaimari.

Motor Driver Module-L298N

Functions: The L298N is an integrated monolithic circuit in a 15- lead Multiwatt and PowerSO20 packages. It is a high voltage, high current dual full-bridge driver de-signed to accept standard TTL logic level sand drive inductive loads such as relays, solenoids, DC and stepping motors. Two enable inputs are provided to enable or disable the device independently of the in-put signals. The emitters of the lower transistors of each bridge are connected together rand the corresponding external terminal can be used for the connection of an external sensing resistor. An additional Supply input is provided so that the logic works at a lower voltage.

Page 8: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

Rating:

1) High operating voltage, which can be up to 40 volts;

2) Large output current, the instantaneous peak current can be up to 3A;

3) With 25W rated power;

4) Two built in H-bridge, high voltage, large current, full bridge driver, which can be used to drive DC motors, stepper motors, relay coils and other inductive loads.

5) Using standard logic level signal to control.

6) Able to drive a two-phase stepper motor or four-phase stepper motor, and two-phase DC motors.

7) Adopt a high-capacity filter capacitor and a freewheeling diode that protects devices in the circuit from being damaged by the reverse current of an inductive load, enhancing reliability

8) The module can utilize the built-in stabilivolt tube 78M05 to obtain 5v from the power supply. But to protect the chip of the 78M05 from damage, when the drive voltage is greater than 12v, an external 5v logic supply should be used.

9) Drive voltage: 5-35V; logic voltage: 5V

10) PCB size: 4.2 x 4.2 cm

Price: BDT.290

Shop address:Techshop.bd

Alternatives: Building motor driver circuit using 555 timer

Project board

Function:

An electronics breadboard (as opposed to the type on which sandwiches are made) is actually referring to a solderless breadboard. These are great units for making temporary

Page 9: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

circuits and prototyping, and they require absolutely no soldering. Prototyping is the process of testing out an idea by creating a preliminary model from which other forms are developed or copied, and it is one of the most common uses for breadboards. If you aren’t sure how a circuit will react under a given set of parameters, it’s best to build a prototype and test it out. For those new to electronics and circuits, breadboards are often the best place to start. That is the real beauty of breadboards–they can house both the simplest circuit as well as very complex circuits. As you’ll see later in this tutorial, if your circuit outgrows its current breadboard, others can be be attached to accommodate circuits of all sizes and complexities.Anothercommon use of breadboards is testing out new parts, such as Integrated circuits (ICs). When you are trying to figure out how a part works and constantly rewiring things, you don’t want to have to solder your connections each time.

Rating: A lot of microprocessors and IC’s on development boards run at 3.3 or 5 Volts but have voltage regulators that can handle anywhere from 6V to 12V.

Price: BDT. 150

Shop address: TechshopBD

Alternatives: Veroboard, printed circuit board.

HC-SR04 ultrasonic ranging sensor

Function: This economical sensor provides 2cm to 400cm of non-contact measurement functionality with a ranging accuracy that can reach up to 3mm. Each HC-SR04 module includes an ultrasonic transmitter, a receiver and a control circuit.

Rating:

Operating Voltage: 5V DC

Operating Current: 15mA

Measure Angle: 15° and Ranging Distance: 2cm - 4m

Page 10: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

Price: BDT 150

Alternatives: Parallax ping, ir distance sensor etc.

A

Shop address: Techshopbd.

Block Diagram of the Connection:

Fig. Block diagram of connection for making Line follower robot

Page 11: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

Circuit Diagram:

Fig: Circuit diagram of Line follower robot

Page 12: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

Arduino coding:

int a, b, c, d, e, f, g, h; //Declaration of interger variable for sensors and control

int s1, s2, s3, s4, s5, s6, s7, s8;

int x;inti;int k, l;

inttopR=140; //Declaration of right motor speed

inttopL=125; //Declaration of LEft motor speed

intkp=12; // Declaration of proportional value for the p controller

constint trigpin1=7; //declaration the trig pin connection of sonar sensor to arduino

constint echopin1=6; //declaration the echopin connection of sonar sensor to arduino

int duration1,Inches1,cm1; // Declaration of integer variable for sonar sensor

void setup(){

pinMode(A0, INPUT); // Declaring arduino A0-A5 pins as INPUT

pinMode(A1, INPUT);

pinMode(A2, INPUT);

pinMode(A3, INPUT);

pinMode(A4, INPUT);

pinMode(A5, INPUT);

pinMode(echopin1,INPUT); // Declaring echopin of sonar sensor as Input

pinMode(trigpin1,OUTPUT); // Declaring trigpin of sonar sensor as OUTPUT

pinMode(8, OUTPUT); // Declaring pin 8-11 of arduino as output

pinMode(9, OUTPUT);

pinMode(10, OUTPUT);

pinMode(11, OUTPUT);

Serial.begin(9600); //Intiating Serial communication}

void loop(){

sensorLogic(); // calling function for ir sensor reading

x=s1+s2+s3+s4+s5+s6+s7+s8; // addding the values for ir sensor

Page 13: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

sonar(); // calling function for sonar sensor

if(cm1>0 && cm1<=10) // if object is greater than 0 cm and less than 10 cm from robot{

obj();}

else if(a<500 && b<500 && c<500 && d<500 && e<500 && f<500) // if robot is on the ending position the robot will stay

{ analogWrite(9, 0);

digitalWrite(8, 0);

analogWrite(10, 0);

digitalWrite(11, 0); }

else if( (cm1>10) && (b<500 || c<500 || d<500 || e<500)) // if the robot is greater than 10 cm distance from object and on the track the line follower fuction is called

{lineFollow(); }

else {

l=millis(); //calling the millis function for arduino internal clock

if(l-k>400) { bi=0; }

if (i==1) // left turn

{ while(c>500) { c=analogRead(A3);{

analogWrite(9, 115);

digitalWrite(8, 0);

analogWrite(10, 110);

digitalWrite(11, 0);

} }}

if (i==-1) //right turn

{ while(d>500)

{//Serial.println(x);

d=digitalRead(A2); { digitalWrite(10, 0); analogWrite(11, 110); digitalWrite(9, 0);

analogWrite(8, 128);}} }

if(i==0) // on confusing position

Page 14: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

{digitalWrite(10, 0);analogWrite(8, 0); analogWrite(9, 95); analogWrite(11, 80); }}}

void lineFollow() // function for line follower control

{ if (x<0) // soft right turn

{ x=x*-1;

digitalWrite(10, 0);digitalWrite(8, 0); analogWrite(9, topR-x*kp); analogWrite(11, topL); }

else if (x>0) //soft left turn{

digitalWrite(10, 0);digitalWrite(8, 0);analogWrite(11, topL-x*kp);analogWrite(9, topR); }

else if(x==0) //forward move

{ analogWrite(9, topR);

analogWrite(11, topL);

digitalWrite(8, 0);

digitalWrite(10, 0);}}

void sensorLogic() //function for ir sensor reading

{a=analogRead(A4); // assigning sensor value

if(a<500)

{ s1=6; // assigning value for a particular sensor for p controller

i=1; //for this condition i=1

k=millis(); }

else if(a>500)

{ s1=0; }

delay(1); //taking a delay of 1 milisecond after taking the reading from 1 sensor

b=analogRead(A6);

if(b<500; { s2=3; }

else if(b>500) { s2=0;

delay(1);

c=analogRead(A3);

Page 15: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

if(c<500)

{ s3=1; }

else if(c>500){s3=0; }

delay(1);

d=analogRead(A2);

if(d<500) { s4=-1; }

else if(d>500) { s4=0;} delay(1);

e=analogRead(A0);

if(e<500) { s5=-3; }

else if(e>500){s5=0; }

delay(1);

f=analogRead(A1);

if(f<500) {s6=-6; i=-1; k=millis(); }

else if(f>500) {s6=0; }

delay(1);}

void sonar() //function for sonar sensor reading{

digitalWrite(trigpin1,LOW);

delayMicroseconds(2);

digitalWrite(trigpin1,HIGH);

delayMicroseconds(10);

digitalWrite(trigpin1, LOW);

duration1 = pulseIn(echopin1,HIGH);

//Inches1 = microsecondsToInches (duration1);

cm1 = microsecondsToCentimeters (duration1);

delay(20);

Serial.print(cm1); //printing the distance of object in serial monitor

Serial.println("cm");}

Page 16: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

void obj() //function for object avoider{

{ analogWrite(8, 0); analogWrite(10, 0); digitalWrite(9, 0); digitalWrite(11, 0); }

delay(100);

{ analogWrite(8, topR);analogWrite(10, topL);digitalWrite(9, 0);digitalWrite(11, 0); }

delay(80);

f=analogRead(A1);

while(f>500){

f=analogRead(A1);{

analogWrite(9, topR); analogWrite(10, topL); digitalWrite(8, 0); digitalWrite(11, 0); } }

f=analogRead(A1);

while(f<500) {f=analogRead(A1);

{ analogWrite(9, topR);analogWrite(10, topL);digitalWrite(8, 0);digitalWrite(11, 0); } }

d=analogRead(A3);

while(d>500

{

d=analogRead(A3);

{

analogWrite(9, topR-50);

analogWrite(11, topL+45);

digitalWrite(8, 0);

digitalWrite(10, 0); } }

long microsecondsToCentimeters(long microseconds){return microseconds/29/2;

}

Precaution of the design:

Connection should be given properly Double check if there is any short circuit Check the connection is the right position Balancing the two-motor speed

Page 17: faltermizu.files.wordpress.com  · Web viewName of the Project: Design and Development of line follower robot. Introduction: A Robot is any machine which is completely automatic,

Image of the robot: