mobile robot with gas sensor

100
PSZ 19:16 (Pind. 1/07) DECLARATION OF THESIS / UNDERGRADUATE PROJECT PAPER AND COPYRIGHT Author’s full name : MOHAMAD IRWAN BIN IBRAHIM ______ Date of birth : 1 st JULY 1988______________________ Title : SNIFFING ROBOT___________________________________ ___________ _____________________________________ Academic Session : 2010/2011 I declare that this thesis is classified as : I acknowledged that Universiti Teknologi Malaysia reserves the right as follows: 1. The thesis is the property of Universiti Teknologi Malaysia. 2. The Library of Universiti Teknologi Malaysia has the right to make copies for the purpose of research only. 3. The Library has the right to make copies of the thesis for academic exchange. Certified by: Irwan SIGNATURE SIGNATURE OF SUPERVISOR MOHAMAD IRWAN BIN IBRAHIM DR LEOW PEI LING (880701-08-6037) NAME OF SUPERVISOR Date: 9 th MAY 2011 Date: 9 th MAY 2011 NOTES : * If the thesis is CONFIDENTAL or RESTRICTED, please attach with the letter from the organization with period and reasons for confidentiality or restriction. UNIVERSITI TEKNOLOGI MALAYSIA CONFIDENTIAL (Contains confidential information under the Official Secret Act 1972)* RESTRICTED (Contains restricted information as specified by the organization where research was done)* OPEN ACCESS I agree that my thesis to be published as online open access (full text)

Upload: taqen-zamli

Post on 10-Oct-2014

565 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Mobile Robot With Gas Sensor

PSZ 19:16 (Pind. 1/07)

DECLARATION OF THESIS / UNDERGRADUATE PROJECT PAPER AND COPYRIGHT

Author’s full name : MOHAMAD IRWAN BIN IBRAHIM ______

Date of birth : 1st

JULY 1988______________________

Title : SNIFFING ROBOT___________________________________

___________

_____________________________________

Academic Session : 2010/2011

I declare that this thesis is classified as :

I acknowledged that Universiti Teknologi Malaysia reserves the right as follows:

1. The thesis is the property of Universiti Teknologi Malaysia.

2. The Library of Universiti Teknologi Malaysia has the right to make copies for the purpose

of research only.

3. The Library has the right to make copies of the thesis for academic exchange.

Certified by:

Irwan

SIGNATURE SIGNATURE OF SUPERVISOR

MOHAMAD IRWAN BIN IBRAHIM DR LEOW PEI LING

(880701-08-6037) NAME OF SUPERVISOR

Date: 9th

MAY 2011 Date: 9th MAY 2011

NOTES : * If the thesis is CONFIDENTAL or RESTRICTED, please attach with the letter from

the organization with period and reasons for confidentiality or restriction.

UNIVERSITI TEKNOLOGI MALAYSIA

CONFIDENTIAL (Contains confidential information under the Official Secret

Act 1972)*

RESTRICTED (Contains restricted information as specified by the

organization where research was done)*

OPEN ACCESS I agree that my thesis to be published as online open access

(full text)

Page 2: Mobile Robot With Gas Sensor

“I hereby declare that I have read this thesis and in

my opinion, this thesis is sufficient in term of scope and quality for the award of the

degree of Bachelor of Engineering (Electrical – Control & Instrumentation)”

Signature : ....................................................

Supervisor’s Name : DR LEOW PEI LING

Date : 9th MAY 2011

Page 3: Mobile Robot With Gas Sensor

SNIFFING ROBOT

MOHAMAD IRWAN BIN IBRAHIM

A thesis submitted in fulfillment of the requirement for the award of the degree of

Bachelor of Engineering (Electrical-Control & Instrumentation)

FACULTY OF ELECTRICAL ENGINEERING

UNIVERSITI TEKNOLOGI MALAYSIA

MAY 2011

Page 4: Mobile Robot With Gas Sensor

ii

I declare that this thesis entitle “Sniffing Robot” is the result of my own research except

as cited in references. The thesis has not been accepted for any degree and is not

concurrently submitted in candidature of any other degree.

Signature : ____Irwan.____________

Name of Candidate : MOHAMAD IRWAN BIN IBRAHIM

Date : 9th

MAY 2011

Page 5: Mobile Robot With Gas Sensor

iii

To my beloved family and friends...

Page 6: Mobile Robot With Gas Sensor

iv

ACKNOWELDGEMENT

All praise to the Almighty Allah, the Most Gracious, Most Merciful and Most

Benevolent for giving me an opportunity to study for higher education and giving me

patience, strength and healthy in completing this final year project report.

Firstly, I would like to show my special appreciation to my supervisor, Dr Leow

Pei Ling. Thanks to her for spending her valuable time to give advising, funding,

guidance and encouragement along these two semesters. Her also help me when I facing

problem in doing thesis. I really appreciate it.

To my family for their love, care and support me all the time for me to carry on

with this project.

I would also like to thanks all my friends, who always give me morale support

and encouragement in completing this thesis. Thanks to all of you.

Page 7: Mobile Robot With Gas Sensor

v

ABSTRACT

Mobile robot is a robot that is able to move around its environment. The

awareness of quality control for ideal environment will lessen the risks of increasing

environment threats to public health. In this project, a two-wheeled mobile robot is

constructed and incorporates with gas sensor to form a complete motion controller to

detect the relative position of gas source and navigate towards the source. Two gas

sensing will be mounted on top of the mobile robot. After that, the program will be

developing by using C language to compute the direction of travel mobile robot and

provide the instructions to the motors to move at desired gas presented. Basically, the

mobile robot has to follow the specific path or trail. Once the desired of gas is detected,

then it will generate appropriate siren signal by itself to give alarm to the others about

the present of the gas in that particular area. Then, the robot will stop immediately. This

robot may have trouble detecting if any airflow that may be present may also hinder the

robot source detection abilities. This robot is very useful which is can replace human to

carry out job in dangerous environment or conditions and ability to work in longer hour

in a consistence pace.

Page 8: Mobile Robot With Gas Sensor

vi

ABSTRAK

Robot bergerak ialah robot yang berupaya bergerak di dalam kawasan

persekitaranya. Kesedaran terhadap kawalan kualiti udara untuk persekitaran ideal dapat

membantu mengurangkan risiko dan ancaman persekitaran terhadap kesihatan orang

awam. Dalam projek ini, sebuah robot bergerak beroda dua telah dihasilkan dan

menggabungkan dengan pengesan gas untuk membentuk satu sistem kawalan

pergerakan robot bergerak yang lengkap untuk mengesan kedudukan relatif sumber gas

dan arah sumber gas tersebut. Dua pengesan gas diletakkan di atas robot. Setelah itu,

pembinaan pengaturcaraan berdasarkan bahasa C untuk menghitung arah perjalanan

robot dan memberi arahan kepada motor untuk bergerak ke arah sumber gas berdasarkan

pada pengesan gas yang telah diletakkan. Secara keseluruhan, robot bergerak ini boleh

mengikut satu laluan yang spesifik. Apabila gas yang dikehendaki telah dikesan, robot

ini akan menjana isyarat bunyi untuk memberi amaran kepada orang lain tentang

kehadiran gas tersebut. Kemudian robot ini akan terus bergerak dan berhenti apabila

sampai ditempat sumber gas tersebut. Robot ini juga menghadapi masalah untuk

mengesan sumber gas sekiranya terdapat angin yang berada di kawasan sumber gas.

Robot ini sangat berguna dimana robot ini dapat menggantikan manusia daripada

kawasan kerja yang membahaya dan juga robot mempunyai tenaga yang banyak dan

konsisten dalam melakukan kerja yang diberi.

Page 9: Mobile Robot With Gas Sensor

vii

TABLE OF CONTENTS

CHAPTER TITLE PAGE

SUPERVISOR’S ENDORSEMENT

TITLE i

DECLARATION ii

ACKNOWLEDGMENT iv

ABSTRACT v

ABSTRAK vi

TABLE OF CONTENTS vii

LIST OF TABLES xi

LIST OF FIGURES xii

LIST OF SYMBOLS/ABBREVIATIONS xvi

LIST OF APPENDICES xvii

1 INTRODUCTION 1

1.1 Introduction 1

1.2 Problem Statement 3

1.3 Objective 3

1.4 Scope of Work 4

1.5 Thesis Outline 5

Page 10: Mobile Robot With Gas Sensor

viii

2 LITERATURE REVIEW 6

2.1 Introduction 6

2.2 E-Nose 6

2.3 Robot 7

2.3.1 Mobile Robot 8

2.4 Sensors 10

2.5 Problem Statements 12

2.5.1 Enforcement Unit 12

2.5.2 Healthy and Safety 13

2.5.2.1 Sewage Area 13

2.6 Sniffing Robot 14

2.7 Conclusion 17

3 METHODOLOGY 18

3.1 Introduction 18

3.2 Mechanical Design 19

3.2.1 Mechanical Design Diagram 21

3.3 Servo Motor C36R 22

3.4 Servo Wheel 24

3.5 Main Electronic Component 25

3.5.1 Electrical Design 25

3.5.2 Microcontroller PIC16F877A 26

3.5.3 Voltage Regulator 29

3.5.4 Gas Sensor 31

3.5.4.1 TGS 2600 31

Page 11: Mobile Robot With Gas Sensor

ix

3.5.5 Motor Driver L298N 34

3.6 Conclusion 36

4 CIRCUIT DESIGN 38

4.1 Overview 38

4.2 Main Controller Circuit 39

4.3 Gas Sensor Circuit 41

5 SOFTWARE DEVELOPTMENT 43

5.1 Introduction 43

5.2 Software Implementation 43

5.3 PICkit 2 Development Programmer/Debugger 45

5.4 Programming 46

5.5 Project Activities 46

5.6 Control Algorithm for the Robot 48

6 EXPERIMENTS 49

6.1 Introduction 49

6.2 Experiment - Gas Sensor Characterization 49

6.2.1 Result of Gas Sensor Characterization 51

7 RESULT AND DISCUSSION 58

7.1 Introduction 58

7.2 Sensitivity Comparison Using Different RL 59

7.3 Ethanol Gas Detection 60

Page 12: Mobile Robot With Gas Sensor

x

7.4 Discussion 62

8 CONCLUSION AND RECOMMEDATION 63

8.1 Introduction 63

8.2 Conclusion 63

8.3 Recommendation 64

REFERENCES 66

APPENDICES APPENDIX A 67

Page 13: Mobile Robot With Gas Sensor

xi

LIST OF TABLES

TABLES NO. TITLE PAGE

3.1 The Specification of RC Servo Motor 24

3.2 The Specification of Microcontroller PIC16F877A 28

6.1 Sensor response versus distance between sample

and sensor 51

6.2 Sensor response versus distance between sample

and sensor 53

6.3 Sensor response versus distance between sample

and sensor 54

6.4 Sensor response versus distance between sample

and sensor 56

Page 14: Mobile Robot With Gas Sensor

xii

LIST OF FIGURES

FIGURES NO. TITLE PAGE

2.1 Mobile robot in various environments 9

2.2 Sewage odor 14

2.3 Technician Ken Flucas extends the arm robot named Fido at

Gem City Manufacturing in Dayton, Ohio. The robots are

being used in Iraq and Afghanistan for everything from searching

caves, checking buildings for insurgents and detecting and

defusing roadside bombs. 15

2.4 E-Nose 16

2.5 Robotic dogs 17

3.1 Idea of design Sniffing Robot 19

3.2 R/C Snooper Robot 20

3.3 Ratler (Robotic All-Terrain Lunar Exploration Rover) 20

3.4 The schematic diagram for mobile robot base (sources:

www.cytron.com.my) 21

3.5 Mobile Robot base set consist of servo motor C36R and

servo wheel 22

Page 15: Mobile Robot With Gas Sensor

xiii

3.6 Servo motor C36R 23

3.7 Servo wheel is mounting with C36R servo motor 25

3.8 Servo wheel connect with C36R servo motor 25

3.9 The Circuit Attach 26

3.10 PIC16F887A 27

3.11 Pin configuration PIC16F877A 28

3.12 Designed Microcontroller Circuit 29

3.13 Voltage Regulator 30

3.14 Designed Voltage Regulator 30

3.15 Gas Sensor Circuit 31

3.16 Designed circuit can convert the change in conductivity 32

3.17 Sensitivity Characteristic 33

3.18 Humidity Dependency 34

3.19 Gas sensor TGS 2600 34

3.20 Motor Driver L298 35

3.21 Side View 36

3.22 Side View 36

3.23 Plan View 36

3.24 Back View 36

3.25 Incorporate gas sensor in mobile robot 37

3.26 Front View 37

Page 16: Mobile Robot With Gas Sensor

xiv

3.27 Plan View 37

4.1 Main Controller Circuit 39

4.2 Overall circuit drawing 40

4.3 Real View of the PCB 40

4.4 Schematic diagram for gas sensor unit 41

4.5 Connection gas sensor at proto board 42

4.6 Connection gas sensor at donut board 42

5.1 Developing project with PIC microcontroller 44

5.2 PICkit 2 programmer-Complier 45

5.3 General Flow chart of the project 47

5.4 General Control Algorithm 48

6.1 Distance between sample and sensor 50

6.2 (a) Sample-Ethanol (b) Sensor allocation on the robot 50

6.3 Gas sensor characterization using RL=40 kΩ

(Refer to circuit Figure 4.4) 52

6.4 Gas sensor characterization using RL=4.7 kΩ

(Refer to circuit Figure 4.4) 53

6.5 Gas sensor characterization using RL=1 kΩ

(Refer to circuit Figure 4.4) 55

6.6 Gas sensor characterization using RL=560 Ω

(Refer to circuit Figure 4.4) 56

Page 17: Mobile Robot With Gas Sensor

xv

7.1 Comparison of RL for gas sensor circuit 59

7.2 The capture movie Frame 61

Page 18: Mobile Robot With Gas Sensor

xvi

LIST OF SYMBOLS/ABREVIATIONS

V Voltage

cm Centimeter

k Kilo

Ω Ohm

RL Load Resistor

Page 19: Mobile Robot With Gas Sensor

xvii

LIST OF APPENDICES

APPENDIX TITLE PAGE

A Source Code for Sniffing Robot 67

Page 20: Mobile Robot With Gas Sensor

CHAPTER 1

INTRODUCTION

1.1 Introduction

Electronic nose was first introduced in the early 1980s as an assessed apparatus.

Electronic noses are used as the apparatus to detect and identify odors and flavors. Many

researches have been conducted to develop electronic nose related technologies. These

electronic noses can be utilized in the field of food control to monitoring the quality of

foods which is the primary importance due to a general rising of the level of

contamination, and this control will be of primary importance to ensure a better quality

of life. Formerly, these electronic noses were made use of sensors based on different

principles that have been developed for the classification and recognition of a large

variety of foods, such as coffees, meats, fishes, cheese, spirits and wines [1].

In food analysis the “measurement” on a certain food has always to result in a

definition according to those qualitative categories which are proper of the human sense.

On the other hand many important tests in food analysis can be performed only by

panels of well trained people. This result in a number of problems mainly related to the

translation of human sensation into an objective numerical output of the measure which

Page 21: Mobile Robot With Gas Sensor

2

can provide unique information. Other problems are represented by the low

reproducibility and on the vagueness of calibration of such a “human based instrument”.

Electronic nose is seen as a technological step towards the automatization of this

kind of analysis application. For this scope it is necessary to study in detail the

relationships existing electronic nose data and human panel results. This study is also

important to establish the effective utility of electronic nose in food analysis and to start

a possible entrance on the market of this new analytical tool.

Nowadays, machine and robots are often utilized in many fields to ease the work

load of human. Every day new robot with human-like abilities is being designed by

incorporating sensors to the machine. Intelligent robots can be described as a mechanical

and electronic creature which can function autonomously. It is an entity with its own

motivation and decision making process. It can sense, act and even reason the robot

didn’t just the same thing over and over again like automation.

A robot is a machine desired to execute one or more tasks repeatedly with speed,

accurately, and precision. Intelligent robots can replace human in many areas such as

tedious, repetitive, dangerous and hazardous works. Robots have the ability to work in

longer hours in a consistence pace and also robots can replace human to carry out job in

dangerous environment and condition. From the Robot Institute of America, the

definition of robot can be described as follows:

“A robot is a reprogrammable multifunctional manipulator designed to move

materials, parts, tools, or specialized device through variable programmed

motion for the performance of variety of tasks”. [by Mohd Nizam Bin Saad]

Page 22: Mobile Robot With Gas Sensor

3

In this case, a fully functional robot has the ability to gain information about the

environment, can work for an extended period without human intervention, move either

all or parts or itself throughout its operating environment without human assistance and

also can avoid situations that are harmful to people, property, or itself. A robot also may

learn or gain new capabilities when adjusting strategies for accomplishing its task or

adapting to changing surroundings.

1.2 Problem Statements

The movement of the robot is governed by the gas sensors. Gas sensors will

detect the gas source and then decide the direction of movement of the robot. During the

movement, if the robot’s sensor is trigged (desired gas is sensed), it will generate light of

LED and also generate appropriate siren. Then, the robot will stop immediately. So this

project is attempted to build the robot by only using two gas sensor and servomotors that

actuate the two wheels mobile robot. And this two wheels mobile robot can move freely

without any guided or remote controller.

1.3 Objective

The main objective of this project is to show that how smart the sniffing robot

ability to sense and to determine the maximum gas concentration in certain area.

Page 23: Mobile Robot With Gas Sensor

4

It is hoped that by accomplishing this project, the following objectives will be

achieved:

i. To design and develop a mobile robot (two wheels mobile robots that

have high stability and move entire tire at the same time with same

speed).

ii. To incorporate gas sensor (electronic nose) in the mobile robot.

iii. To design the algorithm within the mobile robot to navigate by

following the odor detected.

1.4 Scope of Work

There are three scopes actually exist for this project to ensure that this project is heading

in the right direction to achieve its intended objectives which are:

1. Construct two wheels robot structure.

2. Electrical controlled unit for robot mobile system.

3. Software and programming for gas sensors control within mobile robot.

The structure of the mobile robot is based on the car such as two wheels car. The

design and structure of the car is very important for the robot stabilization and can move

smoothly.

Page 24: Mobile Robot With Gas Sensor

5

Gas sensor would be used in this project as a detection mechanism. So in this

project, the mobile robot was design to sense and detected the desired gas in specific

area. During the movement of mobile robot, if the robot’s sensor is trigged (desired gas

is sensed), it will generate light of LED and also generate appropriate siren. Then, the

robot will stop immediately.

1.5 Thesis Outline

This thesis illustrates the construction of sniffing robot. In the first chapter,

general introduction of this project will explain. The problem statement, objectives and

scope of works are also included in this chapter. Second chapter will discuss about the

literature review. It includes problem statement, definition of robot and sensor and some

previous study on this topic that related to the project. Third chapter will explain the

methodology. It includes electrical design, programming and control algorithm design to

complete the project. Fourth chapter will focus on robot design consist of main

electronic design and fifth chapter will focus on software development and

programming. Sixth chapter will discuss about characteristic of gas sensor and mobile

robot. Seventh chapter includes the result and discussion and in the last chapter will

summaries the conclusion of this project and recommendation.

Page 25: Mobile Robot With Gas Sensor

CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

This chapter will discuss in detail about the definition of robot, problem

statement and case studies about this project. The discussion on the mobile robot and

sensors are also including in this chapter.

2.2 E-Nose

E-Nose is an instrument that has been as a simplified “electronic” model of the

human olfactory system. Since 1994, electronic or E-Nose by Gardner and Bartlett was

defined that such system try not to identify specific chemicals within a complex odor. E-

Nose also performed for identification, comparison, quantification and other

applications. For the applications of commercial E-Nose are broad and continuously

Page 26: Mobile Robot With Gas Sensor

7

expanding to various areas such as environmental monitoring, medical instrumentation

and food industries. E-Nose itself is of great importance to many species (i.e. human,

animal and etc) and is used for navigation, food sourcing and sexual reproduction [6].

Electronic noses also defined as consist of an array of non-selective gas sensors

with a pattern recognition engine which is the sensors and pattern recognition methods

are depend on the specific application. Electronic noses process design are usually

involves time-consuming measurements in a non-standard trial and error process [10].

2.3 Robot

A robot is machine or a device that operates automatically or by remote control.

Another common characteristic is a machine that looks like a human being and performs

various complex acts as walking or talking like of a human being. There are many

variations define of robot. It depend which point of view the term robot is viewed.

British Robot Association (BRA) defines robot as:

“A programmable device with minimum of four degree of freedom, designed to

both manipulate and transfer parts, tools or specialized manufacturing

implements through variable programmed motion for the performance of specific

manufacturing task.” [Ai Salameh, 2000]

Every day, new robots with human like abilities are being designed such as

ASIMO. ASIMO resembles a child in size and is the most human-like robot HONDA

has made so far. The robot has 7 DOF (Degrees of freedom) in each arm two joints of 3

Page 27: Mobile Robot With Gas Sensor

8

DOF, shoulder and wrist giving “Six degrees of freedom” and 1 DOF at the elbow and 6

DOF in each leg. Three DOF at the crotch, 2 DOF at the ankle, 1 DOF at the knee and 3

DOF in the neck joint and the hands have 2 DOF, 1 DOF in each thumb and 1 in each

finger. This gives a total of 34 DOF in all joints to produce ASIMO which is like human.

It is hard to find a perfect definition for robot; everyone has their own definitions

which are to satisfy everyone. Everyone has their own definitions which are to satisfy

everyone. Researcher, Andy Cho from AMHS Robotics mentioned this, a robot is a

specialized machine that is capable of being remotely controlled or operated

autonomously. It can be programmed and equipped with various accessories in order to

accomplish its intended task. Robots are often designed to perform a chore more

efficiently than a human can, or to do something a human is incapable of.

Robots are used in order to replace human from working in dangerous or

hazardous environment to protect them from injuries or hurt. Robot obeys orders that are

given by human beings, except where such orders would conflict and a robot must

protect its own existence as long as such protection does not any conflict.

2.3.1 Mobile Robot

Mobile robots have the capability to move around their environment which is can

be classified into two situations. First situation, in which the environment they travel as

example is land or home robots. They are most commonly wheeled but also included in

legged robots with two or more legs as example humanoid or resembling animals or

insect. Second situation is the device they use to move like legged robot they are mainly

like human legs (android) or animal like leg [3].

Page 28: Mobile Robot With Gas Sensor

9

Because of the ability robot to work in longer hours in a consistence pace and

also robots can replace human to carry out the job in dangerous environment or

conditions make mobile robots are widely used nowadays. They are found in many

sector as example in industry, military, enforcement military and security environments.

There are many type of mobile robot navigation.

i. Manual remote or tele-op

ii. Guarded tele-op

iii. Line-following robot

iv. Autonomously randomized robot

v. Autonomously guided robot

vi. Sliding autonomy

Figure 2.1: Mobile robot in various environments.

Modern robots are usually used in tightly controlled environments such as on assembly

lines because they have difficulty reacting responding into unexpected interference.

Because of this most humans’ beings rarely encounter robots. However domestic robots

are necessitated to increasingly developed countries.

Page 29: Mobile Robot With Gas Sensor

10

2.4 Sensors

Sensor is an element that measures a physical quantity and converts it into a

signal which can be read by an observer or by an instrument. For example is thermal

sensor which is converting temperature to an electrical output signal where can be read

by an electric instrument. A sensor can be divided in two operation principles to convert

a physical parameter which is a direct or indirect electrical output. Direct sensor exposed

about the electrochemical sensor convert chemical reaction on the electrode surface to

electrical signals (current) while indirect such as potentiometer, resistance of the circuit

change and caused change in the electrical signal.

Gas detectors interact with a gas to initiate the measure of its concentration. The

gas detector furnish end product to a gas instrument to display the measurements

common gases measured by gas sensors include aerosols, ammonia, bromine, arsine,

carbon monoxide, chlorine, carbon dioxide, chlorine dioxide, dust, diborane, fluorine,

halocarbons or refrigerants, germane, hydrogen chloride, hydrogen, hydrogen fluoride,

hydrogen cyanide, hydrogen sulfide, hydrogen selenide, mercury vapor, nitric oxide,

oxygen, ozone, silane, sulfur dioxide, water vapor and nitrogen dioxide.

Important measurement specifications to consider when looking for gas sensors

include the response time, the distance, and the flow rate. The response time is the

amount of time required from the initial contact with the gas to the sensors processing of

the signal. Distance is the maximum distance from the leak or gas source that the sensor

can detect gases. The flow rate is the necessary flow rate of air or gas across the gas

sensor to produce a signal.

Page 30: Mobile Robot With Gas Sensor

11

Gas sensors can output a measurement of the gases detected a number of ways.

These include percent LEL, percent volume, trace, leakage, consumption, destiny and

signature or spectra. The lower explosive limit (LEL) or lower flammable limit (LFL) of

a combustible gas is defined as the smallest amount of the gas that will support a self-

propagating flame when mixed with air (or oxygen) and ignited. In gas-detection

systems, the amount of gas present is specified in terms of % LEL: 0% LEL being a

combustible gas-free atmosphere and 100% LEL being an atmosphere in which the gas

is at its lower flammable limit.

The relationship between % LEL and % by volume differs from gas to gas. Also

called volume percent or percent by volume, percent volume is typically only used for

mixtures of liquids. Percent by volume is simply the volume of the solute divided by the

sum of the volumes of the other components multiplied by 100%. Trace gas sensors

given in units of concentration: ppm. Leakage is given as a flow rate like ml/min.

Consumption may also be called respiration and the unit of consumption is ml/L/hr.

Density measurements are given in units of density: mg/m^3. A signature or spectra

measurement is a spectral signature of the gases present; the output is often a

chromatogram.

Common outputs from gas sensors include analog voltage, pulse signals, analog

currents and switch or relays. Operating parameters to consider for gas sensors include

operating temperature and operating humidity.

Page 31: Mobile Robot With Gas Sensor

12

2.5 Problem Statements

2.5.1 Enforcement Unit

Since the very early, police departments and some enforcement officers train

dogs to help ease the job and relief their life. In the police department, this unit knows as

K9 unit [9]. Dogs are now divided into two groups, interior guard dogs and dogs for

tactical use. The interior guard dogs include the police dog and sentry dog which goes

on patrol with sentries. If anything strange happens, dogs will be alert by barking or

growling. The police dog have to train in helping officer to detect drugs or any

prohibited items from smuggled into a century at custom. They also even use dogs to

smell at crime scene for detection.

This omnipotent olfactory ability is also a big plus in law enforcement, because

one of the biggest challenges is to determine whether or not a crime has, in fact taken

places. Not only can dogs help police find fleeing criminals and missing persons, they

can also identify if flammable chemicals are present at a burnt-down building and

therefore determine whether it might have been arson. Then can find drugs in suitcase,

vehicles and airplanes or detect the presence of firearms or explosives. Without the

dog’s nose, investigators would have to expend impossible amounts of time and effort

searching those areas to get the same results.

During the terrorist’s era, to help tracing terrorist’s hiding places by using dogs.

This is done by the dog’s ability to smell and trace the odor left by the terrorist. Besides

that, dogs are also being used to trace location of bombs that are being installed in places

such as airplane, administrative buildings or world trade center.

Page 32: Mobile Robot With Gas Sensor

13

Every dog has to undergo extensive training. It takes time and lots of effort to

train the dogs. For example, the general patrol dogs (German Shepherds) have to

complete a thirteen week course with handler at a training school. This training involves

basic skills, obedience and agility exercises. If this course is successfully completed, the

dog are fully trained, both dog and handler still have to attend regular training days and

local refresher courses, continually learning new skills and improving those learnt on the

initial course. Explosive and drugs search dogs have similar basic courses but shorter in

length although they also continue with the training once they have attended the initial

course.

During the tracing operations, dogs are exposed to dangers of being killed. For

example, dogs will be killed during inspection by exploding or inhaling poisonous gases.

The risk face by the police dogs can be reduced. We can just reduce it simply by

replacing the police dogs with Sniffing Robot in some operation which involves

dangerous situation.

2.5.2 Healthy and Safety

2.5.2.1 Sewage area

In Europe, significant number of rural areas that quality of living suffers due to

odor nuisances from the sewer system. The identification of problem areas as well as the

optimization and preservation of evidence of countermeasures is a specific goal of the

current development.

Page 33: Mobile Robot With Gas Sensor

14

Figure 2.2: Sewage odor

The research is carried out by Dr. Gerhad Horner from Munich Germany and Dr. Peter

Boeker from Institute of Agricultural Engineering University of Bonn, Germany. The

objective of this project is to determine the level of the unpleasant gases of smell from

the sewage area. However, this project still need human to determine the level of the

unpleasant gases. Compare to my project, using mobile robot can give more accurate

data than human because olfactory human system is always different. Therefore, using

sniffing robot can solved this sewage area without any error.

2.6 Sniffing Robot

Nowadays, there are many examples of sniffing robot that has been used. As

example, the military in Ohio will begin using an explosive-sniffing version that will

allow better detect roadside bombs which account for more than 70 percent of U.S.

casualties in Iraq. With an integrated explosive detector Fido is the first robot.

Burlington, Mass-based iRobot Corp. is filling the military’s first order of 100 in this

southwest Ohio city and the robot will ship over the next few months. The bomb-

sniffing detector is component part of the robot, where its readings displayed on the

Page 34: Mobile Robot With Gas Sensor

15

controller along with camera images. Otherwise, a soldier would have to approach the

suspect object with a detector or to near the suspect object with a sensing element a

soldier would have or try to attach it to a robot. The new robot has 7-foot manipulator

arm, so it can apply the detector to scan the inside and undercarriage of vehicles for

bombs [4].

Figure 2.3: Technician Ken Flucas extends the arm of a robot named Fido at GEM City

Manufacturing in Dayton, Ohio. The robots are being used in Iraq and Afghanistan for

everything from searching caves, checking buildings for insurgents and detecting and

defusing roadside bombs.

The E-Nose is the other examples of sniffing robot. The E-Nose featured on the

NASA’s web land site reports that the devices is so sensitive that it can smell an

electrical fire before it breaks out. The E-Nose is based on the structure of human

olfactory system. The device applies on polymer films to detect and react to molecules

which are more like the tiny, hair-like receptors on the ends of our olfactory nerves.

Therefore, these reactions are then interpreted by the machine [5].

Page 35: Mobile Robot With Gas Sensor

16

Figure 2.4: E-Nose

Robotic dogs the once-popular kid’s toys that can walk, sit, stay and bark, are

being retrofitted with new chips that allow the canines to sense volatile compounds in

traces as little as 100 parts per million in a project call the Feral Dog Project (FDP).

The brainchild of Natalie Jeremijenko, a San Diego State University professor,

the project began as a way not only to sniff out pollutants safely, but also to raise

awareness of the environmental hazards that these pollutants pose. The project has taken

off, with retrofitting labs cropping up around the country in Idaho, New York and

Florida.

But the sensors used in the Feral Dog Project have a long way to go before they

catch up to the E-Nose. While the robotic dogs' sensors can pick up compounds in 100

parts per million, E-Nose sensors are capable of detecting as little as one part -- that's

just one molecule -- per million [5].

Page 36: Mobile Robot With Gas Sensor

17

Figure 2.5: Robotic Dogs

2.7 Conclusion

From this literature review chapter discussed, it shows some of the related

researches project and also provides the information which is really helps me in develop

Sniffing Robot.

Page 37: Mobile Robot With Gas Sensor

CHAPTER 3

METHODOLOGY

3.1 Introduction

This chapter discusses the design process of Sniffing Robot. Generally, the

design processes are divided into three phases which are the mechanical design,

electrical design and programming. Each phase is explained in details according to the

method and material selection.

Page 38: Mobile Robot With Gas Sensor

19

Figure 3.1: Idea of design Sniffing Robot

3.2 Mechanical Design

The mechanical design of the robot is important to physically support to the

robot. Inaccurate mechanical design properties of the robot can cause high possibilities

of the robot movement to fail.

At this project wheeled robot is chosen because wheeled robot commonly more

popular. Example, R/C Snooper Robot, this robot is one type of wireless consist six

wheels. And also the Ratler (Robotic All-Terrain Lunar Exploration Rover) belongs to

Robotic Institute of Carnegie Mellon University. This robot consist four wheels and the

body is made from composite material to provide good strength.

MECHANICAL DESIGN ELECTRICAL

DESIGN

PROGRAMMING

DESIGN

Page 39: Mobile Robot With Gas Sensor

20

Figure 3.2: R/C Snooper Robot

Figure 3.3: Ratler (Robotic All-Terrain Lunar Exploration Rover)

This wheeled robot also of the simple design structure. It is also easy to be assembled

and the most important thing is, the material which is wheel is easy to found in the

market. Besides that, the robot is able to handle various loads unless the loads exceed the

maximum torque.

Page 40: Mobile Robot With Gas Sensor

21

3.2.1 Mechanical Design Diagram

Figure 3.4: The schematic diagram for mobile robot base (sources:

www.cytron.com.my)

As shown in Figure 3.4, base of Sniffing Robot is implemented one layer

structure only consisting of servo motor C36R servo wheel and castor. The circuitries

will arrange above of base mobile robot as shown in Figure 3.5.

Page 41: Mobile Robot With Gas Sensor

22

Figure 3.5: Mobile robot base set consist of servo motor C36R and servo wheel

3.3 Servo Motor C36R

A servo motor is an automatic device and a small device that very important and

useful in robotics. Servo motor or servomechanism also uses as error-sensing feedback

to correct the performance of a mechanism. Servo motors are small and lightly has built

into control circuitry.

Before using it, it is important to know the specification and understand about

servo motor. Actually, there are many types of servo motor and each type servo motor

has a different specification as shown in Table 3.1. The rotation of this motor is based on

the angle positioning and also it depends on the PWM signal that fed to the servo motors

control signal input. For this project, the C36R servo motor was chosen because of its

specification is appropriate. Below is the brief description features servo motor C36R.

Page 42: Mobile Robot With Gas Sensor

23

Features:

• Control position through Pulse Code Modulation

• Pulse with range: 0.5ms – 2.5ms

• Come with servo horn and screw accessories

Thus, servo motor C36R is suitable to use as mobility for a mobile robot as

shown in Figure 3.6.

Figure 3.6: Servo motor C36R

Page 43: Mobile Robot With Gas Sensor

24

Table 3.1: The specification of RC servo motor

3.4 Servo Wheel

As shown in Figure 3.7, servo wheel is perfect mount to C36R. It does also can

be mounting to SPG30 DC geared motor with coupling. The size of servo wheel is

80mm diameter. From Figure 3.8 shows that the connection between servos motor with

servo wheel.

Page 44: Mobile Robot With Gas Sensor

25

Figure 3.7: Servo wheel is mounting to C36R servo motor

Figure 3.8: Servo wheel connect with C36R servo motor

3.5 Main Electronic Component

3.5.1 Electrical Design

For the robot to able activate and move the electronic part is important and must

be install into the robot. For Sniffing Robot there are several circuits that need to be

installed. First circuit is the main circuit consist voltage regulator circuit to provide the

voltage to turn on and also to provide a stable voltage. Second circuit is the gas sensor

and finally motor driver circuit for robot movement.

Page 45: Mobile Robot With Gas Sensor

Figure 3.9 show that the circuit to attach in

attached to the main board because the main board will supply with regulated voltage

which is suitable to apply to all circuit without burn it at high current. The main board

consists of microcontroller PIC16F877A an

attached on the microcontroller.

3.5.2 Microcontroller (PIC16F877A)

Microcontroller plays a very important role

movement. There are many various types of microcontroller such

manufactured by Microchip Technology Incorporation, Motorola and etc. The

advantages microcontroller is easy to buy, inexpensive, RAM and ROM and peripheral

on chip, very little external support hardware and low cost development tools.

Microcontroller also can be considered as having the same function as of human’s brain

such as in my project the microcontroller is used as the brain of the Sniffing Robot to

control the movement where all data and information would be processed.

MAIN

BOARD

Figure 3.9: The Circuit Attach

Figure 3.9 show that the circuit to attach in the Sniffing Robot. All circuit will be

attached to the main board because the main board will supply with regulated voltage

which is suitable to apply to all circuit without burn it at high current. The main board

consists of microcontroller PIC16F877A and voltage regulator. All circuit will be

attached on the microcontroller.

Microcontroller (PIC16F877A)

Microcontroller plays a very important role in embedded systems and controlling

There are many various types of microcontroller such as Microchip where

crochip Technology Incorporation, Motorola and etc. The

advantages microcontroller is easy to buy, inexpensive, RAM and ROM and peripheral

on chip, very little external support hardware and low cost development tools.

can be considered as having the same function as of human’s brain

such as in my project the microcontroller is used as the brain of the Sniffing Robot to

control the movement where all data and information would be processed.

POWER

SUPPLY

GAS

SENSOR

26

the Sniffing Robot. All circuit will be

attached to the main board because the main board will supply with regulated voltage

which is suitable to apply to all circuit without burn it at high current. The main board

d voltage regulator. All circuit will be

in embedded systems and controlling

as Microchip where

crochip Technology Incorporation, Motorola and etc. The

advantages microcontroller is easy to buy, inexpensive, RAM and ROM and peripheral

on chip, very little external support hardware and low cost development tools.

can be considered as having the same function as of human’s brain

such as in my project the microcontroller is used as the brain of the Sniffing Robot to

control the movement where all data and information would be processed.

MOTOR

DRIVER

Page 46: Mobile Robot With Gas Sensor

27

Microcontrollers have its specifications depending on the model and the type of the

device. Some of the specifications are the memory size, peripheral for input and output

numbering, clock cycle and etc.

The PIC16F877A microcontroller as shown in Figure 3.10 used in this project

because of its low power, high performance Reduce Instruction Set Computer (RISC)

with only 35 single word instructions to learn and provide 10 bit, up to 8 channels

Analog-to- Digital Converter (A/D) module. The device is manufacturing using

Microchip’s high-density non-volatile memory technology. By combining an enhanced

16-bit CPU with high speed FLASH/EEPROM technology on a monolithic chip, the

Microchip PIC16F877A is a powerful computer that provides a highly flexible and cost

effective solution to many embedded control applications.

Figure 3.10: PIC16F877A

Page 47: Mobile Robot With Gas Sensor

28

Figure 3.11: Pin Configuration PIC16F877A

Table 3.2: The Specification of Microcontroller PIC16877A

Page 48: Mobile Robot With Gas Sensor

29

The pin connection for the microcontroller is shown in Figure 3.12 using MPLAB

software.

Figure 3.12: Designed Microcontroller Circuit

3.5.3 Voltage Regulator

A voltage regulator as shown in Figure 3.13 is an electrical regulator designed to

maintain a constant voltage level. The voltage regulator needed to keep voltages within

the prescribed range that can be tolerated by the electrical equipment using that voltage.

Page 49: Mobile Robot With Gas Sensor

30

Figure 3.13: Voltage Regulator

Voltage regulator is needed to give supply board which is all components attach to main

board will be output of 5 V. And also to produce a stable 5 V output a voltage regulator

needed to provide a stable 5 V voltage to microcontroller.

The schematic diagram for the voltage regulator circuit is shown in Figure 3.14.

Figure 3.14: Designed Voltage Regulator

Page 50: Mobile Robot With Gas Sensor

31

3.5.4 Gas Sensor

Gas sensor needs 5V to operate it resistances act as potential meter and changes

gas concentration. The connection of each pin is determined as Figure 3.15.

Figure 3.15: Gas Sensor Circuit

Figure 3.15 show that the circuit of the gas sensor to install in the Sniffing Robot.

For this project, one gas sensors are to be used in the Sniffing Robot which are TGS

2600.

3.5.4.1 TGS 2600

The sensing element is comprised of a metal oxide semiconductor layer formed

on an alumina substrate of a sensing chip together with an integrated heater. In the

presence of a detectable gas, the sensor's conductivity increases depending on the gas

Page 51: Mobile Robot With Gas Sensor

32

concentration in the air. A simple electrical circuit can convert the change in

conductivity to an output signal which corresponds to the gas concentration.

The application of TGS 2600 to detect of air contaminants such as air cleaners,

ventilation control and air quality monitors.

The schematic diagram for design circuit can convert the change in conductivity is

shown in Figure 3.16.

Figure 3.16: Designed circuit can convert the change in conductivity

The TGS 2600 has high sensitivity to low concentrations of gaseous air contaminants

such as hydrogen and carbon monoxide which exist in cigarette smoke. The sensor can

detect hydrogen at a level of several ppms. Figaro also offers a microprocessor

(FIC93619A) which contains special software for handling the sensor's signal for

appliance control applications.

The figure below represents typical sensitivity characteristics; all data having been

gathered at standard test conditions (see reverse side of this sheet). The Y-axis is

indicated as sensor resistance ratio (Rs/Ro) which is defined as follows:

Page 52: Mobile Robot With Gas Sensor

33

Rs = Sensor resistance in displayed gases at various concentrations

Ro = Sensor resistance in fresh air

Figure 3.17: Sensitivity Characteristic

The figure below represents typical temperature and humidity dependency

characteristics. Again, the Y-axis is indicated as sensor resistance ratio (Rs/Ro), defined

as follows:

Rs = Sensor resistance in fresh air at various temperatures/humidity’s

Ro = Sensor resistance in fresh air at 20°C and 65% R.H

Page 53: Mobile Robot With Gas Sensor

34

Figure 3.18: Humidity Dependency

Figure 3.19: Gas Sensor TGS 2600

3.5.5 Motor Driver (L298N)

This project needs motor driver to control the movement of motor, L298 do the

job. As shown in Figure 3.20 the L298 is strong and useful dual motor driver IC.

Actually, the motor operates in a high current and high voltage and L298 is suitable to

be its motor where it can be function in high current. L298 also can drive inductive loads

Page 54: Mobile Robot With Gas Sensor

35

such as relays, solenoid, and stepping motor. The most importing is L298 easy to

mounting and setup on the circuitry board.

Below are the characteristics of L298:

• 6 to 26V operation

• 4A total drive current

• Accessible 5V regulated voltage

• EMF protection diodes

• Small 40mm square footprint

• Motor direction indicator LED

Figure 3.20: Motor driver L298

Page 55: Mobile Robot With Gas Sensor

36

3.6 Conclusion

As a conclusion for this chapter, the mobile robot mechanical and electronic

structures manage to combine together and form Sniffing Robot successfully. To see the

result, below is the figure showing of the complete robot of Sniffing Robot. Figure 3.21,

3.22, 3.23 and 3.24 shows that the robot without incorporate with gas sensor.

Figure 3.21: Side View Figure 3.22: Side View

Figure 3.23: Plan View Figure 3.24: Back View

Page 56: Mobile Robot With Gas Sensor

37

Figure 3.25: Incorporate gas sensor in mobile robot

Figure 3.26: Front View Figure 3.27: Plan View

Figure 3.25, 3.26 and 3.27 shows that the mobile robot incorporates with gas

sensor. The gas sensor was mounted in front of the mobile robot to make easy to detect

relative position of gas source and navigate towards the source.

Gas Sensor (TGS 2600)

Page 57: Mobile Robot With Gas Sensor

CHAPTER 4

CIRCUIT DESIGN

4.1 Overview

In this chapter, the circuits that had been used for this project are shown. The

circuit design consists of microcontroller circuit and gas sensor circuit.

Page 58: Mobile Robot With Gas Sensor

39

4.2 Main Controller Circuit

Figure 4.1: Main Controller Circuit

Figure 4.1 is the microcontroller circuit. The Microcontroller Unit (MCU) main

circuit consists of crystal, reset switch, and 5V supply from voltage regulator. Crystal is

connected to the OSC pins to establish oscillation. Figure 4.1 show the PIC

microcontroller circuit. Pins 32 and 31 are connected to 5V and ground. And also pins

11 and 12 are connected to 5V and ground.

The configuration of crystal and reset switch is shown in the Figure 4.1. A 20

MHz crystal is choose as the oscillator to ensure the execution time of each instruction is

fast enough. By referring PIC16F877A datasheet, it is necessary to connect 15-33pico

Page 59: Mobile Robot With Gas Sensor

40

Farad ceramic capacitors to increase the stability of the oscillator. Figure 4.2 shows the

overall circuit and Figure 4.3 shows the real view for this circuit.

Figure 4.2: Overall Circuit Drawing

Figure 4.3: Real View of the PCB

Page 60: Mobile Robot With Gas Sensor

41

4.3 Gas Sensor Circuit

Figure 4.4: Schematic diagram for gas sensor unit

As shown in Figure 4.4, the gas sensor consists of one variable load resistor and

to determine the gas levels by using measuring the voltage across a load resistor which is

put between the negative pin of the sensing element and ground. This gas sensor is using

wheatstone bridge to detect gases. Two of the four pins of the sensor are connected to a

heater and the other two are connected to the sensing element. Figure 4.5 show the

connection of gas sensor at proto board and also at donut board.

Load Resistor (variable)

Voltage output

Page 61: Mobile Robot With Gas Sensor

42

Figure 4.5: Connection gas sensor at proto board

Figure 4.6: Connection gas sensor at donut board

Two gas sensor modules were installed on the mobile robot as the inputs for the

robot movement. The movement and intelligence of the mobile robot were depends on

the programming installed in the mobile robot microcontroller. The next chapter

describes the programming of the microcontroller for the mobile robot and the control of

the sensor modules in the robot.

Gas Sensor (TGS 2600)

This pin connect as input

sensor

This pin connect to

PIC16F877A (RB0)

Buzzer

Page 62: Mobile Robot With Gas Sensor

CHAPTER 5

SOFTWARE DEVELOPMENT

5.1 Introduction

The program is very important part to determine the control of robot movement.

The programs are written in MPLAB IDE for PIC compile, using C-language and then

build to produce the HEX File. After the programmed was tested, the HEX File was

loaded to the PIC16F877A using PICKIT2 for the real time testing.

5.2 Software Implementation

In order to archive the programming task for PIC16F877A, three type of

software are used such as MPLAB v8.30, Hitech C Pro and development programmer

PICkit2. The programming is using C language to compile. The MPLAB v8.30 can

Page 63: Mobile Robot With Gas Sensor

44

generate HEX file. When this software generated the HEX file, the HEX file is burned

into microcontroller by PICkit 2 development programmer. Overall progresses in

software are shown in Figure 5.1.

Figure 5.1: Developing project with PIC microcontroller

Page 64: Mobile Robot With Gas Sensor

45

5.3 PICkit 2 Development Programmer/Debugger

Figure 5.2: PICkit 2 programmer-Complier

The PICkit 2 software shows in Figure 5.2 is use to load the HEX File that has been

generate by compiling the source code into the PIC16F877A microcontroller. Tool that

used to load the HEX file from PICkit 2 to PIC16F877A microcontroller is a USB ICSP

PIC programmer.

Page 65: Mobile Robot With Gas Sensor

46

5.4 Programming

Programming based on the flow chart of the project and algorithm of the robot.

Programming is an important role to get the desired behavior and desired movement.

Such as Sniffing Robot sensing something odor, the sensor will be trigged and generate

light of led and also generate appropriate siren. After that, Sniffing Robot will move

through that gas sensor. This means that the desired gas has been successfully sensed.

5.5 Project Activities

Figure 5.3 show the general flow chart of the project. Initially, as usual every

project starts with basic concept and ideas. After review a lot of journal and large

amount of references, this project follows the sequences of concept. And also to avoids

from the pitfall of others.

After that, the structures of mobile robot were developing. The important is the

structures of mobile robot must be stable and identical in order to make movement.

Then, the sensors and motor driving circuit are built on a bread board to test of

functionality.

After that, control algorithm comes to play an important role to get the desired

movement when detect gas and demonstrate of behavior movement. Then, programming

part need to be modified until the desired output have achieved.

Page 66: Mobile Robot With Gas Sensor

47

Figure 5.3: General Flow Chart of the Project

CONCEPTS AND IDEAS

LITERATURE STUDY

STRUCTURE OF MOBILE ROBOT

SENSORS AND MOTOR

DRIVING CIRCUIT

DESIGN CONTROL ALGORITHM

NO VERIFY ROBOT SYSTEM

THROUGH EXPERIMENT

DESIRED OUTPUT?

YES

FINAL PRODUCT

Page 67: Mobile Robot With Gas Sensor

48

5.6 Control Algorithm for the Robot

Figure 5.4 show the control algorithm for the robot. Firstly, the robot activates

and the robot starts to move in specific are. During the movement of robot, if the robot’s

sensor is trigged (desired gas is sensed), it will generate light of LED and also generate

appropriate siren. Then the robot move to the location of the gas is sensed.

Figure 5.4: General Control Algorithm

START

MOVEMENT

GAS SENSOR READING

NO

DESIRED GAS

DETECTED?

YES

GENERATE SIREN

MOVEMENT

END

Page 68: Mobile Robot With Gas Sensor

CHAPTER 6

EXPERIMENTS

6.1 Introduction

In this chapter, it will focus on testing of characteristic of gas sensor and also the

movement of the mobile robot and to analyze the incorporate between gas sensor and

mobile robot as Sniffing Robot.

6.2 Experiment - Gas Sensor Characterization

As shown in Figure 6.1, I have made experiment on gas sensor characterization

to measure the distance between sample and sensor with different load resistor. The

result show, when the gas sensor detects the desired gas source it will make LED light

Page 69: Mobile Robot With Gas Sensor

50

up and buzzer will produce sound. For the experiment, the sample that I have chosen is

ethanol which is exists in alcohol as shown in Figure 6.2.

Figure 6.1: Distance between sample and sensor

(a) (b)

Figure 6.2: (a) Sample-ethanol (b) Sensor allocation on the robot

Gas Sensor (TGS 2600)

d

Sample-Ethanol

Where:

d=distance (cm)

Page 70: Mobile Robot With Gas Sensor

51

6.2.1 Result of Gas Sensor Characterization

As refer to the schematic in Figure 4.4, the RL is changed from 40 kΩ to 4.7 kΩ,

1 kΩ and 560 Ω. Below, shows the result of the result of gas sensor characterization

based on the RL changed.

1. Using RL=40 kΩ

Table 6.1: Sensor response versus distance between sample and sensor

Distance (cm) Output Voltage (V) Voltage Reference (V)

0 1.1 0.81

10 1 0.81

20 0.95 0.81

30 0.92 0.81

40 0.9 0.81

50 0.9 0.81

60 0.9 0.81

70 0.9 0.81

80 0.9 0.81

90 0.9 0.81

100 0.9 0.81

Page 71: Mobile Robot With Gas Sensor

52

Figure 6.3: Gas sensor characterization using RL=40 kΩ (Refer to circuit Figure 4.4)

Figure 6.3 shows the gas sensor characterization response versus distance

between sample and sensor using RL=40 kΩ according to their distance ranging form 0

cm to 100 cm. For distance 0 cm, the value of output voltage is 1.1 V which is the value

produce sirens and led will be light up to indicator that the sensitivity of gas response is

high.

For the distance 40 cm until 100 cm the value of output voltage is 0.90 V which

is remain constant. The sensitivity of gas sensor using RL=40 kΩ is 0.568 which is lower

and not suitable to using RL=40 kΩ.

Therefore, it can be shown that using RL=40 kΩ is not suitable to put into gas

sensor circuit and integrate to mobile robot.

0

0.2

0.4

0.6

0.8

1

1.2

0 20 40 60 80 100 120

Ou

tpu

t V

olt

ag

e (

V)

Distance (cm) between sample and sensor

Output Voltage (V)

Voltage Reference (V)

Page 72: Mobile Robot With Gas Sensor

53

2. Using RL=4.7 kΩ

Table 6.2: Sensor response versus distance between sample and sensor

Distance (cm) Output Voltage (V) Voltage Reference (V)

0 1.3 0.54

10 0.88 0.54

20 0.78 0.54

30 0.74 0.54

40 0.68 0.54

50 0.65 0.54

60 0.61 0.54

70 0.58 0.54

80 0.57 0.54

90 0.56 0.54

100 0.55 0.54

Figure 6.4: Gas sensor characterization using RL=4.7 kΩ (Refer to circuit Figure 4.4)

0

0.2

0.4

0.6

0.8

1

1.2

1.4

0 20 40 60 80 100 120

Ou

tpu

t V

olt

ag

e (

V)

Distance (cm) between sample and sensor

Output Voltage (V)

Voltage Reference (V)

Page 73: Mobile Robot With Gas Sensor

54

As shown in Figure 6.4, the value of output voltage for distance 0 cm is 1.3 V

which is higher 0.2 V compares to the using RL=40 kΩ. In the mean time, buzzer

produces sounds and led will be light up to indicate that gas sensor is high sensitivity.

Next, at distance 10 cm until 100 cm the output voltage decreased from 1.3 V to

0.88 V and 0.88 V until 0.55 V. It shows that, when gas sensors locate at long distance,

it difficult to sensed the gas sensor. Therefore, gas sensor can’t detect relative gas source

in long distance range.

3. Using RL=1 kΩ

Table 6.3: Sensor response versus distance between sample and sensor

Distance (cm) Output Voltage (V) Voltage Reference (V)

0 1.1 0.2

10 0.64 0.2

20 0.58 0.2

30 0.54 0.2

40 0.5 0.2

50 0.45 0.2

60 0.42 0.2

70 0.37 0.2

80 0.32 0.2

90 0.29 0.2

100 0.27 0.2

Page 74: Mobile Robot With Gas Sensor

55

Figure 6.5: Gas sensor characterization using RL=1 kΩ (Refer to circuit Figure 4.4)

Figure 6.5 shows that the gas sensor response characterization versus distance

between sample and sensor using RL=1 kΩ. The distance between sample and sensor

using RL=1 kΩ shows the sensitivity is 0.763 higher than using RL=40 kΩ and RL=4.7

kΩ. The value of output voltage decreased from 1.1 V to 0.27 V.

Therefore, using RL=1 kΩ also not suitable to put into gas sensor circuit because

of low sensitivity to detect gas source.

0

0.2

0.4

0.6

0.8

1

1.2

0 20 40 60 80 100 120

Ou

tpu

t V

olt

ag

e (

V)

Distance (cm) between sample and sensor

Output Voltage (V)

Voltage Reference (V)

Page 75: Mobile Robot With Gas Sensor

56

4. Using RL=560 Ω

Table 6.4: Sensor response versus distance between sample and sensor

Distance (cm) Output Voltage (V) Voltage Reference (V)

0 0.8 0.14

10 0.65 0.14

20 0.56 0.14

30 0.5 0.14

40 0.45 0.14

50 0.4 0.14

60 0.37 0.14

70 0.28 0.14

80 0.25 0.14

90 0.2 0.14

100 0.17 0.14

Figure 6.6: Gas sensor characterization using RL=560 Ω (Refer to circuit Figure 4.4)

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0 20 40 60 80 100 120

Ou

tpu

t V

olt

ag

e (

V)

Distance (cm) between sample and sensor

Output Voltage (V)

Voltage Reference (V)

Page 76: Mobile Robot With Gas Sensor

57

From Figure 6.6, it was shown that the characterization using RL=560 Ω is better

compare to RL=40 kΩ, RL=4.7 kΩ and RL=1 kΩ because of lowest RL gives the best

sensitivity which is 0.963.

Therefore, it is suitable to be chosen for the gas sensor circuit.

Page 77: Mobile Robot With Gas Sensor

CHAPTER 7

RESULT AND DISCUSSION

7.1 Introduction

In this chapter, it will discuss in details about the result and analysis of the

experiments conducted. Firstly, the analysis of the characterization gas sensor using

different RL. Next, the movement of the mobile robot to detect the relative position of

gas source and it will generate appropriate siren signal.

Page 78: Mobile Robot With Gas Sensor

59

7.2 Sensitivity Comparison Using Different RL

Figure 7.1: Comparison of RL for gas sensor circuit

Figure 7.1 shows that the lowest RL given the best sensitivity and show the

normalized reading to compare the 4 chosen RL, 40 kΩ, 4.7 kΩ, 1kΩ and 560 Ω. Then

RL=560 Ω give normalize reading 0.988 which is the highest among other. Therefore,

for the better circuit I have choose RL=560 Ω.

0

0.1

0.2

0.3

0.4

0.5

0.6

0 20 40 60 80 100 120

No

rma

lize

d R

ea

din

g

Distance (cm) between sample and sensor

N560

N1K

N4.7K

N40K

Page 79: Mobile Robot With Gas Sensor

60

7.3 Ethanol Gas Detection

The main objective to conduct the experiment to know the feasibility of the

integrate gas sensor to the mobile robot. The gas sensor was purchase from Cytron

Technologies at Taman Universiti, Skudai and this product form Figaro Company

located in Osaka, Japan. The module of gas sensor used is TGS2600 (air contaminants

gaseous). Air contaminants gaseous give huge impact to the level of human health and

directly affected human through the mixture of gaseous that human breath in. It is used

to detect the present of Ethanol gases.

As shown in the captured video frames in Figure 7.2, the robot is navigated

towards the gas source. In Frame 1, 2 and 3 shows the robot is heading forward to gas

source. Then, it is exposed to the Ethanol gas in Frame 5 and Frame 6. Once the desired

of gas is detected, it will generate appropriate siren signal by itself to give alarm to the

other about the present of the gas in that area. Finally, the robot will stop immediately as

shown in Frame 7.

For clearer and understanding on how the robot reacts with Ethanol gases, I will

attach the video clips name Experiment.avi. It is located in the CD behind this thesis.

Page 80: Mobile Robot With Gas Sensor

61

Frame 1 Frame 2 Frame 3

Frame 4 Frame 5 Frame 6

Frame 7

Figure 7.2: The Capture Movie Frame

00:00:23:16 00:00:24:08 00:00:25:07

00:00:26:10 00:00:27:10 00:00:28:12

00:00:30:03

Page 81: Mobile Robot With Gas Sensor

62

7.4 Discussion

From the gas sensor characterization using different load resistor RL, it can

conclude that using lowest load resistor gives the best sensitivity as shown in Figure 7.1.

The best value of load resistor to using in gas sensor circuit is RL=560 Ω.

Based on the Figure 7.2, it was shown that the robot successful detect the desired

gas present. Before this, I have conduct two experiments which is the robot not available

detect the gas source because of environment airflow make the robot difficult to sense.

Sometimes gas sensor TGS2600 not working properly because its operation take time to

sense gas.

Another problem encountered during developed this Sniffing Robot is 9 V

battery can’t support of circuit board. Sometimes the powers supply can use in short

time only.

Page 82: Mobile Robot With Gas Sensor

CHAPTER 8

CONCLUSION AND RECOMMEDATION

8.1 Introduction

This chapter presented the conclusion of this project and some recommendations

for future upgrade to improve the accuracy of detect gas sensor and stability movement

to navigate the gas source.

8.2 Conclusion

As a conclusion, a two wheel mobile robot has been developed. Then, the robot

is implemented by using PIC16F877A microcontroller as its brain to control the motor

driver and the sensors. Next, two gas sensors have been integrated to the mobile robot

for gas sensing and the last, algorithm for the gas sensors have been programmed to be

Page 83: Mobile Robot With Gas Sensor

64

input for controlling the movement of the mobile robot. Finally, the most importantly, it

is able to detect the relative position of gas source and navigate towards the source.

Through the experiment of characterization carried out and proved that using

load resistor RL=560 Ω give the highest sensitivity among other RL. Therefore, using

RL=560 Ω the gas sensor easily or able to detect the present of desired gas in particular

range area.

Through the process of FYP 1 I do a lot of research on the electronic nose,

suitable gas sensors and also the system progress to know how incorporate gas sensor

(electronic nose) in the mobile robot works. In FYP 2, many skills have been gained

especially implementation of gas sensor and circuit development. Beside that, learning,

gain knowledge and study about a material, microcontroller and other equipment must

be continuously to improve knowledge. The successful of this project show that the gas

sensors can be integrated to the mobile robot for gas sensing. Therefore, the objective of

this project has been successful met and achieved.

8.3 Recommendation

Although all the objectives of this project successful, there still many ways and

section in this robot can be upgrade and enhanced. For an instance, the IR sensors can be

attached to the robot to performed object avoidance when sensing gas source. And also,

attach a smart vision camera to become much better navigate the desired gas presented

and know the path of gas source.

Page 84: Mobile Robot With Gas Sensor

65

Different type of gas sensor can be installed or installed more gas sensor from

two gas sensor into four gas sensor on the robot so that it can detect several type of gases

at once and also it can detect gases in any particular range area.

The robot also can be enhanced into dual modes which are in manual control

mode and an autonomous control mode. From this, it can be done by integrate a

Bluetooth module on it and the control panel will be fabricated. Beside that, an

ultrasonic sensor can be added to it so that it can make exactly distance reading between

the robot and the obstacles or avoidance.

Finally, added the GPS system into the robot to make direction sensor to locate

the robots and its directions. With implementation all the recommendation as mention

before this, the smart and intelligent of Sniffing Robot will be produce.

Page 85: Mobile Robot With Gas Sensor

66

REFERENCES

[1] E. Kress-Rogers (ed.), Handbook of biosensors and electronic nose, CRC Press,

Bocs Raton (USA) 1996

[2] Mohd Nizam Bin Saad, An autonomous four legged Crocobo, Universiti

Teknoogi Malaysia, Bachelor of Electrical Engineering (Mechatronics) Thesis,

May 2009.

[3] Federico Cuesta, A. Ollero, Aníbal Ollero, (2005), Intelligence Mobile Robot

Navigation.

[4] James Hannah, Bomb-sniffing robots put to test in Iraq, (30/3/2007), Associated

Press.

[5] Josh Clark, How China's Pollution Sniffers Work, (2009), How Stuff Works “A

Company Discovery”.

[6] E.B. Goldstein, Sensation and perception, Sixth Edition, Wadsworth Inc

Fulfillment, 2002.

[7] Che Harun, F. K., J. A. Covington, et al. (2009). "Portable e-Mucosa System:

Mimicking the biological olfactory." Procedia Chemistry 1(1): 991-994.

[8] Che Harun, F. K., J. E. Taylor, et al. (2009). "An electronic nose employing

dual-channel odour separation columns with large chemosensor arrays for

advanced odour discrimination." Sensors and Actuators B: Chemical 141(1):

134-140.

[9] http://en.wikipedia.org/wiki/Police_dog

[10] Llobet, E., J. Rubio, et al. (2001). "Electronic nose simulation tool centred on

PSpice." Sensors and Actuators B: Chemical 76(1-3): 419-429.

Page 86: Mobile Robot With Gas Sensor

67

APPENDIX A

Source Code for Sniffing Robot

//===========================================================

// Author :MOHAMAD IRWAN BIN IBRAHIM

// Project :SNIFFING ROBOT

// Supervisor :DR LEOW PEI LING

// Project description :TO DETECT GAS SENSOR

// Year :MAY 2011

//===========================================================

//===========================================================

// INCLUDE

//===========================================================

#include <pic.h>

//===========================================================

// CONFIGURATION

//===========================================================

__CONFIG ( 0x3F32 );

//===========================================================

// DEFINE

//===========================================================

#define sw1 RE0

#define sw2 RE1

#define motor_ra RC0

#define motor_rb RC3

#define motor_la RC4

#define motor_lb RC5

#define s_left RB0

Page 87: Mobile Robot With Gas Sensor

68

#define s_mleft RB1

#define s_mright RB2

#define s_right RB3

#define buzzer RE2

#define rs RB7

#define e RB6

#define lcd_data PORTD

#define b_light RB5

#define SPEEDL CCPR1L

#define SPEEDR CCPR2L

#define CHANNEL0 0b10000001

#define CHANNEL1 0b10001001

#define p_con_status 28

#define p_motor1 29

#define p_motor2 30

#define RX_PIN RC7

#define TX_PIN RA2

#define BOT_ADD 100

//===========================================================

// GLOBAL VARIABLE

//===========================================================

unsigned char data[6] = 0;

const unsigned char line [] = "SNIFFING ROBOT ";

const unsigned char US[] = "2.NOT AVAILABLE";

Page 88: Mobile Robot With Gas Sensor

69

const unsigned char AS[] = "3.NOT AVAILABLE";

const unsigned char XB[] = "4.NOT AVAILABLE";

const unsigned char SKPS[] = "5.NOT AVAILABLE";

const unsigned char *mode [5] = &line[0],&US[0],&AS[0],&XB[0],&SKPS[0];

unsigned int result;

unsigned int To=0,T=0,TH=0;

unsigned char REC;

unsigned char i=0,raw;

unsigned int us_value (unsigned char mode);

//===========================================================

// FUNCTION PROTOTYPE

//===========================================================

void init(void);

void delay(unsigned long data);

void send_config(unsigned char data);

void send_char(unsigned char data);

void e_pulse(void);

void lcd_goto(unsigned char data);

void lcd_clr(void);

void send_string(const char *s);

void dis_num(unsigned long data);

void sniff_robot(void);

void forward(void);

void stop (void);

void backward (void);

void reverse (void);

Page 89: Mobile Robot With Gas Sensor

70

void left(void);

void right(void);

void uart_send(unsigned char data);

unsigned char uart_rec(void);

unsigned char skps(unsigned char data);

void skps_vibrate(unsigned char motor, unsigned char value);

void read_adc(char config);

//===========================================================

// INTERRUPT PROTOTYPE

//===========================================================

static void interrupt isr(void)

if (TMR0IF) // TMR0 is overflow

TMR0IF = 0; // clear flag bit

To +=0x100; // count number of TMR0 overflow (make it to 16bit TMR)

if(RBIF) // there is change bit on RB4-RB7

RBIF = 0;

if (RB4) // Rb4 is 1 mean is rising form 0

TMR0 = 0;

To = 0;

else TH = TMR0 + To;

if(RCIF)

Page 90: Mobile Robot With Gas Sensor

71

RCIF = 0; // clear flag bit

if (RCREG == 'R') data[i=0]= RCREG;

else if (RCREG == 100) data[i=0]= RCREG;

if ((data[0] == 'R'))data [i++] = RCREG;

if (i>4) i = 4;

//===========================================================

// MAIN FUNCTION

//===========================================================

void main(void)

unsigned char m=0,i =0;

delay(20000);

init(); // initiate cnfiguration and initial condition

buzzer = 1; // inditcate the circuit is on with beep

lcd_clr(); // clear the LCD screen

send_string("MOHAMAD IRWAN "); // display "select mode"

lcd_goto(20); // move to 2nd line

send_string(mode[m]); // display string according to the mode

buzzer = 0;

while(1) // loop

if( !sw1) // if button SW1 is pressed

while(!sw1); // wait ubtul button is released

m++;

if ( m > 4) m = 0;

lcd_goto(20); // start display at 20

Page 91: Mobile Robot With Gas Sensor

72

send_string(mode[m]);// display string depend on mode

send_string(" "); // space to overwrite long words

if (!sw2) // if button SW2is pressed

while(!sw2); // wait until button is released

switch(m) // check what is the current mode, execute the mode

case 0 :sniff_robot(); // mode 1 : sniffing robot

break;

//===========================================================

// Initailization

// Description : Initialize the microcontroller

//===========================================================

void init()

// ADC configuration

ADCON1 = 0b10000100; //set RA0 and RA1 as Analog Input, left justified

// setup for capture pwm

RBIE = 1; // enable interrupt on change of port B

// motor PWM configuration

PR2 = 255; // set period register

T2CON = 0b00000100;

CCP1CON = 0b00001100; // config for RC1 to generate PWM

Page 92: Mobile Robot With Gas Sensor

73

CCP2CON = 0b00001100; // config for RC2 to generate PWM

// Tris configuration (input or output)

TRISA = 0b00000011; //set RA0 and RA2 pin as input,other as output

TRISB = 0b00011111; //set RB0-RB4 pin as input, other as output

TRISC = 0b10000000; //set PORTC pin as output

TRISD = 0b00000000; //set all PORTD pin as output

TRISE = 0b00000011;

// TMR 0 configuation

T0CS = 0;

PSA = 0;

PS2 = 1;

PS1 = 1;

PS0 = 1;

TMR0IE = 1; // TMR0 Interrupt

TMR0 = 0;

//setup UART

SPBRG = 0x81; //set baud rate to 9600 for 20Mhz

BRGH = 1; //baud rate high speed option

TXEN = 1; //enable transmission

TX9 = 0;

CREN = 1; //enable reception

SPEN = 1; //enable serial port

RX9 = 0;

RCIE = 1; //enable interrupt on eachdata received

// enable all unmasked interrupt

GIE = 1;

PEIE = 1;

// LCD configuration

Page 93: Mobile Robot With Gas Sensor

74

send_config(0b00000001); //clear display at lcd

send_config(0b00000010); //Lcd Return to home

send_config(0b00000110); //entry mode-cursor increase 1

send_config(0b00001100); //diplay on, cursor off and cursor blink off

send_config(0b00111000); //function

TX_PIN = 1;

b_light = 0;

buzzer = 0;

stop();

//===========================================================

// Mode subroutine

//===========================================================

// Mode 1: Sniffing Robot

//===========================================================

void sniff_robot()

unsigned char memory;

lcd_clr(); // clear lcd screen

send_string("FIND GAS"); // display "position" string

while(1)

if ((s_left==1)&&(s_mleft==0))

forward(); // motor forward

SPEEDL = 255;

SPEEDR = 255;

memory = PORTB&0b00001111;

lcd_goto(20);

send_string ("Gas Ethanol ");

buzzer=0;

Page 94: Mobile Robot With Gas Sensor

75

else if ((s_left==0)&&(s_mleft==1))

forward();

// motor forward

SPEEDL = 255;

SPEEDR = 255;

memory = PORTB&0b00001111;

lcd_goto(20);

send_string ("Gas Ethanol ");

buzzer=0;

else if ((s_left==1)&&(s_mleft==1))

stop();

SPEEDL = 255; // motor stop

SPEEDR = 255;

buzzer=1;

if ((s_left==0)&&(s_mleft==1))

stop();

SPEEDL = 255;

SPEEDR = 255;

buzzer=1;

//===========================================================

Page 95: Mobile Robot With Gas Sensor

76

// READ ADC

// Description: subroutine for converting analog to digital

// Parameter : config ( select the channel )

//===========================================================

void read_adc(char config)

unsigned short i;

unsigned long result_temp=0;

ADCON0 = config;

delay(10000); // delay after changing configuration

for(i=200;i>0;i-=1) //looping 200 times for getting average value

ADGO = 1; //ADGO is the bit 2 of the ADCON0 register

while(ADGO==1); //ADC start, ADGO=0 after finish ADC

result=ADRESH;

result=result<<8; //shift to left for 8 bit

result=result|ADRESL; //10 bit result from ADC

result_temp+=result;

result = result_temp/200; //getting average value

ADON = 0; //adc module is shut off

//===========================================================

// Motor control function

// Description: subroutine to set the robot moving direction

//===========================================================

void forward ()

Page 96: Mobile Robot With Gas Sensor

77

motor_ra = 0;

motor_rb = 1;

motor_la = 0;

motor_lb = 1;

void backward ()

motor_ra = 1;

motor_rb = 0;

motor_la = 1;

motor_lb = 0;

void left()

motor_la = 1;

motor_lb = 0;

motor_ra = 0;

motor_rb = 1;

void right()

motor_la = 0;

motor_lb = 1;

motor_ra = 1;

motor_rb = 0;

void stop()

Page 97: Mobile Robot With Gas Sensor

78

motor_la = 1;

motor_lb = 1;

motor_ra = 1;

motor_rb = 1;

//===========================================================

// LCD FUNCTIONS

//===========================================================

void delay(unsigned long data) //delay function, the delay time

for( ;data>0;data-=1); //depend on the given value

void send_config(unsigned char data) //send lcd configuration

rs=0; //set lcd to config mode

lcd_data=data; //lcd data port = data

delay(400);

e_pulse(); //pulse e to confirm the data

void send_char(unsigned char data) //send lcd character

rs=1; //set lcd to display mode

lcd_data=data; //lcd data port = data

delay(400);

e_pulse(); //pulse e to confirm the data

Page 98: Mobile Robot With Gas Sensor

79

void e_pulse(void) /pulse e to confirm the data

e=1;

delay(300);

e=0;

delay(300);

void lcd_goto(unsigned char data) //set the location of the lcd cursor

if(data<16) //if the given value is (0-15) the

//cursor will be at the upper line

send_config(0x80+data);

else //if the given value is (20-35) the

//cursor will be at the lower line

data=data-20; //location of the lcd cursor(2X16):

send_config(0xc0+data); // -----------------------------------------------------

// | |00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15| |

// | |20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35| |

// -----------------------------------------------------

void lcd_clr(void) //clear the lcd

send_config(0x01);

delay(350);

void send_string(const char *s) //send a string to display in the lcd

Page 99: Mobile Robot With Gas Sensor

80

while (s && *s)send_char (*s++);

void dis_num(unsigned long data)

unsigned char hundred_thousand;

unsigned char ten_thousand;

unsigned char thousand;

unsigned char hundred;

unsigned char tenth;

hundred_thousand = data/100000; // devide to get the numerator

data = data % 100000; // modulas to get the remainder

ten_thousand = data/10000;

data = data % 10000;

thousand = data / 1000;

data = data % 1000;

hundred = data / 100;

data = data % 100;

tenth = data / 10;

data = data % 10;

send_char(hundred_thousand + 0x30);

send_char(ten_thousand + 0x30);

send_char(thousand + 0x30);

send_char(hundred + 0x30);

send_char(tenth + 0x30);

send_char(data + 0x30);

Page 100: Mobile Robot With Gas Sensor

81

//===========================================================

// UART FUNCTION

//===========================================================

void uart_send(unsigned char data) //function to send out a byte via uart

while(TXIF==0); //wait for previous data to finish send out

TXREG=data; //send new data

unsigned char uart_rec(void) //function to wait for a byte receive from uart

unsigned char temp;

while(RCIF==0); //wait for data to received

temp=RCREG;

return temp; //return the received data

//===========================================================

// SKPS FUNCTION

//===========================================================

unsigned char skps(unsigned char data)

uart_send(data);

return uart_rec();

void skps_vibrate(unsigned char motor, unsigned char value)

uart_send(motor);

uart_send(value);