166
Human Body Detection in Rescue Operation of Disaster Submitted in fulfillment of requirements For the degree of Bachelors in Electronics and Telecommunication Engineering by Bro. Udhav R. Pawar Roll No: 1323139 Guide Mrs. Jyoti M. Varvadekar Department of Electronics and Telecommunication Engineering K. J. Somaiya College of Engineering, Mumbai-77

Degree Project

Embed Size (px)

Citation preview

Page 1: Degree Project

Human BodyDetection in Rescue Operation of Disaster

Submitted in fulfillment of requirements

For the degree of

Bachelors in Electronics and Telecommunication Engineering

by

Bro. Udhav R. Pawar

Roll No: 1323139

Guide

Mrs. Jyoti M. Varvadekar

Department of Electronics and Telecommunication Engineering K. J. Somaiya College of Engineering, Mumbai-77

(Autonomous College Affiliated to University of Mumbai)

Page 2: Degree Project

Batch 2012 -2016

Page 3: Degree Project
Page 4: Degree Project
Page 5: Degree Project

Abstract

In this wonderful world, various robots are being made for various purposes. Every

robot circuits perform individual tasks assigned to it. In this project a human detector

robot is designed to detect and to inform the presence of human. Many areas of world

are getting affected due to natural calamity. Disasters are exceptional & unstoppable

events that are either man made or natural, such as terrorist attacks, earthquakes,

wildfires and floods etc. Disasters create emergency situations to provide basic

services to the victims must be coordinated quickly. Many times we observe that

many people dies by trapping in these disasters but the people also dies on large scale

just because they didn’t get help at instant time or the help provided to them is

late. This project proposes a system based on Wireless Sensor Network (WSN) which

is designed for human existence & detection in an unmanned area can be done only

by an automated system. This system proposed a monitoring system using sensors

unit and transmit data. Mobile robots perform cooperative Simultaneous human body

localization function and communicate over the WSN. The main objective of this

project is to rescue more & more number of people from the adverse condition.

Key words: body detection, Natural calamity, Mobile rescue robot, Wireless sensor

network, Disaster.

i

Page 6: Degree Project

ContentsList of Figures…………………………………………………………………………… iv

List of Tables……………………………………………………………………………. v

1 Introduction……..……………………………………………………......1

2 Literature Survey……..………………………………………………….

2.1 Survey of Human-Sensing………………………………………………...3

2.2 Sensor classification..................................................................................... 4

2.3 Survey of Human Detection in Disaster Zones using Manually Controlled Robots……………………………………………………………………... 5

3 Proposed System…………………………………………………………..

3.1 Robot Unit ………………………………………………………………..8

3.2 Control Unit………………………….……………………………………. 10

3.3 Power Supply……………………………………………………………… 11

4 Circuit Diagram..........................................................................................

4.1 Robot Unit & Power Supply………………………………………………. 15

4.2 Control Unit ZigBee USB………………………………………………… 17

5 PCB Layouts………………………………………………………………

5.1 Robot

Unit………………………………………………..……………………… 19

5.2 Control Unit…………………………….………………………………...20

5.3 Actual I ple e ted PCB………………………………………………………………………… 21

ii

Page 7: Degree Project

6 Software Development……………………………………………………

6.1 Express PCB and Express SCH………………………………………………………………….. 22

6.2 Ardui o……………………………………………………………………………………………………. 37

6.3 Visual Basic 6 VB6 …………………………………………………………………………………. 39

7 Description of Hardware………………………………………………

7.1 PIR Sensor……………………………………………………………….43

7.2 MQ6 Gas Sensor………………………………………………………... 45

7.3 Temperature Sensor-Thermistor………………………………………… 48

7.4 Wireless Camera Module………………………………………………. 50

7.5 ZigBee Module………………………………………………………….53

7.6 Arduino Uno R3 (ATMEGA328)………………………………………. 55

7.7 PUSH-PULL Four Channel Driver with Diodes L2963D……………… 57

7.8 PL-2303 USB to Serial Adapter……………………………………….... 58

8 Programming Code…………………………………………………….

8.1 Microcontroller Code…………………………………………………… 59

8.2 Visual Basic 6 Code…………………………………………………….. 64

8.3 VB6 Application Layout………………………………………………... 72

9 Conclusion and Scope for future work………………………………..

9.1 Conclusion……………………………………………………………….73

9.2Scope for Future Work…………………………………………………… 73

References……………………………………………………………………………….. 74

Acknowledgement………………………………………………………………………. 76

iii

Page 8: Degree Project

List of Figures

1.1 Rescue in the wreckage of WTC after it collapsed……………………………….. 1

1.2 Nepal earthquake Rescue team in Durbar Square………………………………… 2

3.1 Robot Unit………………………………………………………………………… 8

3.2 Control Unit………………………………………………………………………. 10

3.3 Power Supply……………………………………………………………………… 11

4.1 Robot Unit & Power Supply……………………………………………………… 15

4.2 Control Unit ZigBee USB………………………………………………………… 17

5.1 AVR328 & ZigBee Module……………………………………………………….19

5.2 MQ6 Gas Sensor………………………………………………………………….. 19

5.3 Temperature Sensor-Thermistor…………………………………………………...20

5.4 ZigBee Module & USB…………………………………………………………… 20

5.5 AVR328 & ZigBee Module, ZigBee Module & USB……………………………. 21

6.1 Aurdino Board…………………………………………………………………….. 37

6.2 New Project Dialog Box…………………………………………………………... 40

6.3 VB6 Programming Environment………………………………………………….41

6.4 Source Code Window……………………………………………………………..42

7.1 Proximity of PIRs…………………………………………………………………..44

7.2 DSN-FIR800……………………………………………………………………….44

7.3 MQ6 Gas Sensor Module………………………………………………………….46

7.4 Thermistor symbol & NTC thermistor, bead type, insulated wire……………….. 49

7.5 Camera Package Contents………………………………………………………….52

7.6 ZigBee Module…………………………………………………………………….53

7.7 ATMEGA328 Pin Configuration…………………………………………………..55

iv

Page 9: Degree Project

7.8 L293D Pin Configuration………………………………………………………….57

8.1 VB6 application Layout…………………………………………………………… 72

List of Tables6.1 Clearances for Electrical Conductors ……………………………………………..35

7.1 Pin Description …………………………………………………………………… 47

7.2 Specifications ……………………………………………………………………..47

7.3 Summary…………………………………………………………………………..55

v

Page 10: Degree Project

Chapter 1

Introduction

This chapter introduces us to the basic idea of the project. The chapter will make us clear that how this advanced technology using robot is useful to mankind for rescue operation in Disasters field.

Large scale disasters, both natural and man-made, are an unfortunate reality for many

people across the world. The situation in the wake of a disaster is often chaotic and

disaster victims who have become trapped or otherwise incapacitated by the events

surrounding them are for the most part fully reliant on the efforts of rescue workers. It

is therefore vital to the lives of victims that the search and rescue operation happens as

quickly and efficiently as possible. Advanced technology has so far only played a

minor role when rescue workers along with trained dogs attempt to locate and

evacuate victims who have been trapped in damaged or collapsed building.

Figure 1.1: Rescue in the wreckage of WTC after it collapsed

1

Page 11: Degree Project

Figure 1.2: Nepal earthquake Rescue team in Durbar Square

During the natural calamities like earthquakes, it is difficult to rescue the human

beings under the buildings. Though detection by rescue team is done, it consumes a

lot of time. Detection of human in appropriate time is very important in such

situations. So the project proposes a mobile rescue robot that is operated manually

using ZigBee wireless technology which moves in the Disasters area and helps in

identifying people and rescue operations.

2

Page 12: Degree Project

Chapter 2

Literature Survey

This chapter presents brief Literature survey for developing the project in simple &

cost efficient manner. Survey includes Human-sensing techniques, Classification of

sensors depending on Human traits and survey of Human Detection in Disaster Zones

using manually Controlled Robots.

2.1 Survey of Human-Sensing:

Human-sensing is the process of extracting any information regarding the people in

some environment. In this survey we have focused on the inference of spatio-temporal

property-Presence. Presence is arguably the property that is most commonly sought-

after in existing real-world applications, the most popular presence-sensor being

motion sensors (PIR) and proximity sensors (scalar infrared range-finders).At the

lowest level, human-sensing is equivalent to measuring, either directly or indirectly,

one or more of the myriad ways humans impact their environments. These are human

traits that are either related to human presence or to human actions.

There are also some human traits that can be exploited in human-sensing systems,

briefly describing the existing sensing modalities that can be used to measure them.

Static traits stem from the physiological properties are produced whenever a person is

present, irrespective of what he or she is doing. Common static traits are weight and

shape of which shape can be useful for developing our system. Shape is measured

indirectly: shape detectors operate by intersecting a person's shape with geometric

lines which are either actively produced by the sensor itself (in the case of radars, for

example) or passively appropriated from the environment (e.g. cameras). Therefore,

shape is a trait that must be extracted from one of three other traits: reflectivity (with

cameras or radars, for example), attenuation (tomographic sensors), or emissivity

(thermal imagers).

3

Page 13: Degree Project

Another static trait is the involuntary motion of internal organs, such as the heart and

lungs. This can be measured through skin-penetrating radio and ultrasound signals.

Finally, a relatively new avenue for human-sensing lies in scent detection [Pearce et

al. 2006].

Furthermore, CO2 levels have also been used to detect the presence of people, albeit with slow response times [De Cubber and Marton 2009].

Dynamic traits are those that arise from human activity. We divide these into three

categories: external motion, gait, and vibrations. As for vibrations, these are the

pressure waves that people produce either involuntarily (in the form of sounds and

vibrations from footsteps, for example) or voluntarily (in the form of speech), which

can be measured with accelerometers and microphones, respectively.

2.2 Sensor classification:

On basis of many different human traits that can be used for identifying human

presence large no. of sensors are available. Of which we limit ourselves to a selection

of approaches which are either the most useful, the most ubiquitous, or the most

ingenious. We discuss these in the context of similar solutions to illustrate the

advantages and disadvantages of each.

Binary Sensors:A variety of sensing modalities can be grouped into the broad category of “binary

sensors". In the context of human-sensing, binary sensors are those that return logic 1

if human presence is detected within a certain sensing area, otherwise returning logic

0. The modality of binary sensors includes sensors such as break-beams, contact

sensors, PIRs, and binary Doppler-shift sensors, all of which are currently used in

resource-constrained scenarios. In single-node configuration, binary sensors can only

be used to detect presence, and nothing more.

4

Page 14: Degree Project

Vibration Sensors:

Various commercial heartbeat detection systems employ a set of vibration or seismic

sensors to detect the presence of a person inside a vehicle or container by sensing

vibrations caused by the human heartbeat. This technique can also be used in our

system for detecting alive human.

Gas Sensors:

Another commercial product uses infrared light to detect the level of carbon dioxide

in an enclosed space, from which it infers the presence of humans or other living

creatures

Thermo graphic Camera:

Originally developed for military use during the Korean War, thermo graphic cameras

have slowly migrated into other fields as varied as medicine and archeology. More

recently, the lowering of prices have helped fuel the adoption of infrared viewing

technology. Advanced optics and sophisticated software interfaces continue to

enhance the versatility of IR cameras and are best suited for Night Vision. SO they

are also best suited in our system for detection of human under debris. Instead we

also can use low-cost web camera in order to confirm the existence of a human

shape.

2.3 Survey of Human Detection in Disaster Zones using Manually

Controlled Robots:

In initial days dogs were used because of their High sensitivity to any slight motion or

Human presence. But it was hard to totally depend on them since they can predict the

presence of a living victim and dead victim and also they were not able to expose the

exact situation of the human. One major drawback was dogs couldn’t work

independently; they need assistance of a human. It means, the need is totally or

partially independent to human factor but still depends on human.

5

Page 15: Degree Project

Later techniques such as

1. Optical devices namely Tactic Pole Utility system

2. Acoustic devices like Microphones and Amplifiers were used but with limited applications.

Robots are now achieving good progress in many fields like Military, Industry,

Medicine, etc., with proven efficiency. They are playing an important role in

replacing Human factor in almost all fields.

Usha Tiwari, Rahul Kaushik, Shraddha Subramaniyan, (2012), “A technical review

on Human Rescue Robots”, VSRD-IJEECE, Vil. 2 (3), 127-134 has explained about

designing a Robot to navigate in the rubble with various sensors. This method used 2

methods to detect alive human, one is IR radiation emerging from the live humans

and other is using the sound or cry for the help made from the humans.

Mauricio Correa, Gabriel Hermosilla, Rodrigo Verschae, Javier Ruiz-del-Solar,

(2012), “Human Detection and Identification by Robots using Thermal and Visual

information in Domestic Environments”, J Intell Robot System (2012) 66:223-243

has given the concept of enabling robots to detect and identify humans in domestic

environment. This work was done with the aid of Thermal and Visual Information

sources that were integrated to detect humans and further processed to verify it.

Remote Operated and Controlled Hexapod (ROACH) is a six-legged design that

provides significant advantages in mobility over wheeled and tracked designs. It was

equipped with predefined walking gaits, cameras, which transmit, live audio and

videos of the disaster site, as well as information about locations of objects with

respect to the robot’s position to the interface on the laptop. Specialized robots have

been designed for these types’ of environments such as KOHGA the snake like

robot. This robot was constructed by connecting multiple crawler vehicles serially,

resulting in a long and thin structure so that it can enter narrow space.

6

Page 16: Degree Project

Quality work has been done in the field of robotics. They came into existence in the

early 21st century but since then enormous improvements have been made in its

concept, design based on purpose of use. Various rescue robots have been developed

and some of these are – CRASAR (Centre for Robot-Assisted Search and Rescue) in

University of South Florida. This robot was used for first time in real conditions on

11th September 2001 in the World Trade Centre disaster. Different sensors like

millimeter wave radar for measuring distance, a color CCD camera for vision and a

forward-looking infrared camera for the human heat detection were used in it.

Shwetha, R, Dr. Chethan H K, (2014), “Automatic and Manual Controlled Alive

Human Detection Robot during disaster Management”, International Journal for

Technological Research in Engineering”, ISSN: 2347-4718,Volume 1, Issue 11 has

done a work on designing an economical robot, which works using AVR, MCU, PIR

sensor. This robot senses the human body temperature using PIR sensor and an

alarm/indicator is used to indicate the signal when it detects alive body and this

message is sent through SMS using GSM technology to enable rescue operation.

Burion presented a project that provided a sensor suitable for human detection for the

USAR robots. It evaluated several types of sensors for detecting humans such as pyro

electric sensor, USB camera, microphone, and IR camera. The pyro electric sensor

was used to detect the human body radiation. The USB camera was used for motion

detection. A microphone was used for long duration and high amplitude sound

detection. The IR camera was used to detect humans by their heat image. The main

idea was to detect a change in the image scene by checking the values of the pixels.

Several images for the scene were acquired and subtracted from each other to discover

if a motion has occurred. The used technique was fairly efficient in detecting the

victims. But still, the robot was not fully autonomous and was dependent on the

operator.

7

Page 17: Degree Project

Chapter 3

PROPOSED SYSTEMS

This chapter represents the design of the proposed system to fulfill the objective of the project post study of detailed Literature survey in the form of block schematic which is easy to implement with minimum cost and be able to produce desired outcome.

The system can be divided into two units 1) Robot Unit and 2) Control Unit

3.1 Robot Unit:

This unit consists of ATMEGA328 Microcontroller, L293D Motor Driver IC, ZigBee

Module, motors of the robot & various sensors for detection of human presence as

shown in the block diagram.

Figure 3.1: Robot Unit

8

Page 18: Degree Project

ATMEGA328 is a single chip 8-bit AVR RISC-based microcontroller created by Atmel and belongs to the megaAVR series. It has 28 pins. It has flash memory of 32 Kbytes.

ZigBee module is connected to PD0 and PD1 pins of the microcontroller i.e. data pins

of ZigBee module are connected to RXD and TXD pins of microcontroller. The two

Vcc pins are shorted and connected to a supply of 5v.GND pins are shorted and

connected to ground. The ZigBee module receives the data and transmits it to the

microcontroller.

PIR sensor is used to detect the human beings. The PIR sensor is nothing but Passive

Infra-Red sensor. These sensors work on the principle that they every human being

emits infra-red radiations of very low wave length. Thus this sensor senses these

radiations and outputs a logic high value. This sensor can sense the human within the

range of 20feet. They have an operating voltage of 2.2-5V. PIR sensor is connected to

A3 pin of the microcontroller.

MQ6 gas sensor is also used to detect the human presence. This sensor is suitable for

sensing carbon dioxide (CO2) concentration in the air ranging from 100 to 10000

PPM which is exhaled during breathing. Also it has high sensitivity and fast response

time. Gas sensor is connected to A4 pin of the microcontroller.

Temperature sensor- Thermistor is another sensor used for detecting human being by

measuring surrounding temperature. It is resistor with resistance varying according to

its temperature. Here we are using NTC (Negative Temperature Coefficient)

thermistor where resistance decreases with increasing temperature. Temperature

sensor is connected to A5 pin of the microcontroller.

Camera module is also used for purpose of the project. Super mini wireless color camera with excellent wireless transmission range is used.

9

Page 19: Degree Project

L293D is a motor drive IC. This IC is required to drive the motor and also eliminates back EMF generated. This IC internally has H-bridge circuit. This has 16 pins out of which four input pins are used to drive two motors. Enables are used to enable these

input pins. A supply voltage of 5v is applied at the 16th pin to operate the IC.8th pin is applied with a voltage of 12v required to drive the motors. The L293D IC can drive

voltages up to 36v.That is 8th pin can be applied with a voltage ranging from 2.4v to 3.6v.

3.2 Control Unit:

The control unit consists of PC/Laptop, ZigBee Module, USB Module, Wireless Camera receiver & TV Tuner card as shown.

Figure 3.2: Control Unit

10

Page 20: Degree Project

The USB Module used is PL-2303 USB Serial cable adapter which is designed to

work on all Windows operating systems. It is used for connecting ZigBee module to

PC/Laptop. It provides serial connection up to 1 Mbps of data transfer rate with easy

plug and play installations.

ZigBee is the wireless technology used here to transmit data over 30 meters range.

The ZigBee module uses frequency of 2.4 GHz with baudrate of 9600. The Data pins

of ZigBee module are connected to RX & TX pins of the PL-2303 USB to Serial

adapter. A Vcc of 3.3v is applied to the module.

The wireless camera receiver is having receiving frequency of 0.9/1.2 GHz. It is

supplied by DC 12V 1A adaptor via plugging into the power jack. It has standard AV

output compatible with TV screens. TV tuner card is needed to make it compatible

with PCs/Laptops.

On PC/Laptop application developed using Visual Basic 6 software is run and is used

for guiding robot for its movements. It also shows graph related to various sensors i.e.

variations in their values which help in determining human presence. Also live video

received by wireless camera receiver is displayed on the screen for simplicity of

purpose.

3.3 Power supply:

Power supply is necessary in both; Robot as well as Control unit. So it is the most important part of system. For our project we require +5V regulated power supply

with maximum current rating 500Ma. It consists of Step-down transformer, Rectifier,

Filter circuit & Voltage regulator as shown below.

Figure 3.3: Power Supply

11

Page 21: Degree Project

Step-down transformer:

Step down transformer is the first part of regulated power supply. To step down the

mains 230V A.C. we require step down transformer. Following are the main

characteristic of electronic transformer.

• Power transformers are usually designed to operate from source of low impedance at a single freq.

• It is required to construct with sufficient insulation of necessary dielectric strength.

• Transformer ratings are expressed in volt–amp. The volt-amp of each

secondary winding or windings is added for the total secondary VA. To this

are added the load losses.

• Temperature rise of a transformer is decided on two well-known factors i.e. losses on transformer and heat dissipating or cooling facility provided unit.

Rectifier:

Rectifier unit is a circuit which converts A.C. into pulsating D.C. Generally semi-

conducting diode is used as rectifying element due to its property of conducting

current in one direction only. Generally there are two types of rectifier.

• Half wave rectifier

• Full wave rectifier.

In half wave rectifier only half cycle of mains A.C. is rectified so its efficiency is very

poor. So we use full wave bridge type rectifier, in which four diodes are used. In each

half cycle, two diodes conduct at a time and we get maximum efficiency at output.

Following are the main advantages and disadvantages of a full-wave bridge type

rectifier circuit.

12

Page 22: Degree Project

Advantages:

• The need of center tapped transformer is eliminated.

• The o/p is twice that of center tap circuit for the same secondary voltage.

• The PIV rating of diode is half of the center tap circuit.

Disadvantages:

• It requires four diodes.

• As during each half cycle of A.C. input, two diodes are conducting therefore

voltage drop in internal resistance of rectifying unit will be twice as compared

to center tap circuit.

Filter circuit:

Generally a rectifier is required to produce pure D.C. supply for using at various

places in the electronic circuit. However, the o/p of rectifier has pulsating character

i.e. if such a D.C. is applied to electronic circuit it will produce a hum i.e. it will

contain A.C. and D.C. components. The A.C. components are undesirable and must

be kept away from the load. To do so a filter circuit is used which removes (or filters

out) the A.C. components reaching the load. Obviously a filter circuit is installed

between rectifier and voltage regulator. In our project we use capacitor filter because

of its low cost, small size and little weight and good characteristic. Capacitors are

connected in parallel to the rectifier o/p because it passes A.C. but does not pass D.C.

at all.

Voltage Regulator:

A voltage regulator is a circuit. that supplies constant voltage regardless of change in

load current. IC voltage regulators are versatile and relatively cheaper. The 7800

series consists of three terminal positive voltage regulator. These ICs are designed as

13

Page 23: Degree Project

fixed voltage regulator and with adequate heat sink, can deliver o/p current in excess

of 1A. These devices do not require external component. This IC also has internal

thermal overload protection and internal short circuit and current limiting protection.

For our project we use 7805 voltage regulator IC.

14

Page 24: Degree Project

Chapter 4

Circuit Diagram

This chapter includes the actual circuit schematic of the proposed system by referring

the block schematic diagram to produce desired outcome.

4.1 Robot Unit& Power supply:

Figure 4.1: Robot Unit & Power Supply

15

Page 25: Degree Project

This unit consists of ATMEGA328 Microcontroller, L293D Motor Driver IC,

ZigBee Module, motors of the robot & various sensors for detection of human

presence as shown in the block diagram.

ATEGA328 is a single chip 8-bit AVR RISC-based microcontroller created by Atmel and belongs to the megaAVR series. It has 28 pins. It has flash memory of 32 Kbytes.

ZigBee module is connected to PD0 and PD1 pins of the microcontroller i.e.

data pins of ZigBee module are connected to RXD and TXD pins of

microcontroller. The two Vcc pins are shorted and connected to a supply of

5v.GND pins are shorted and connected to ground. The ZigBee module

receives the data and transmits it to the microcontroller.

PIR sensor is used to detect the human beings. The PIR sensor is nothing but

Passive Infra-Red sensor. These sensors work on the principle that they every

human being emits infra-red radiations of very low wave length. Thus this

sensor senses these radiations and outputs a logic high value. This sensor can

sense the human within the range of 20feet. They have an operating voltage of

2.2-5V. PIR sensor is connected to A3 pin of the microcontroller.

MQ6 gas sensor is also used to detect the human presence. This sensor is

suitable for sensing carbon dioxide (CO2) concentration in the air ranging

from 100 to 10000 PPM which is exhaled during breathing. Also it has high

sensitivity and fast response time.Gas sensor is connected to A4 pin of the

microcontroller.

Temperature sensor- Thermistor is another sensor used for detecting human

being by measuring surrounding temperature. It is resistor with resistance

varying according to its temperature. Here we are using NTC (Negative

Temperature Coefficient) thermistor where resistance decreases with

16

Page 26: Degree Project

increasing temperature. Temperature sensor is connected to A5 pin of the

microcontroller.

Camera module is also used for purpose of the project. Super mini wireless color camera with excellent wireless transmission range is used.

L293D is a motor drive IC. This IC is required to drive the motor and also

eliminates back EMF generated. This IC internally has H-bridge circuit. This

has 16 pins out of which four input pins are used to drive two motors. Enables

are used to enable these input pins. A supply voltage of 5v is applied at the

16th pin to operate the IC.8th pin is applied with a voltage of 12v required to

drive the motors. The L293D IC can drive voltages up to 36v.That is 8 th pin can be applied with a voltage ranging from 2.4v to 3.6v.

4.2 Control Unit ZigBee USB:

Figure 4.2: Control Unit ZigBee USB

17

Page 27: Degree Project

The control unit consists of PC/Laptop, ZigBee Module, USB Module, Wireless Camera receiver & TV Tuner card as shown.

The USB Module used is PL-2303 USB Serial cable adapter which is designed

to work on all Windows operating systems. It is used for connecting ZigBee

module to PC/Laptop. It provides serial connection up to 1 Mbps of data

transfer rate with easy plug and play installations.

ZigBee is the wireless technology used here to transmit data over 30 meters

range. The ZigBee module uses frequency of 2.4 GHz with baud rate of 9600.

The Data pins of ZigBee module are connected to RX & TX pins of the PL-

2303 USB to Serial adapter. A Vcc of 3.3v is applied to the module.

The wireless camera receiver is having receiving frequency of 0.9/1.2 GHz. It

is supplied by DC 12V 1A adaptor via plugging into the power jack. It has

standard AV output compatible with TV screens. TV tuner card is needed to

make it compatible with PCs/Laptops.

On PC/Laptop application developed using Visual Basic 6 software is run and

is used for guiding robot for its movements. It also shows graph related to

various sensors i.e. variations in their values which help in determining human

presence. Also live video received by wireless camera receiver is displayed on

the screen for simplicity of purpose.

18

Page 28: Degree Project

Chapter 5

PCB Layouts

This chapter includes layouts of the fabricated Printed Circuit Boards (PCBs) which

are used in implementation of project and also images of actual implemented PCBs.

5.1 Robot Unit:

Figure 5.1: AVR328 & ZigBee Module

Figure 5.2: MQ6 Gas Sensor

19

Page 29: Degree Project

Figure 5.3: Temperature Sensor-Thermistor

5.2 Control Unit:

Figure 5.4: ZigBee Module & USB

20

Page 30: Degree Project

5.3 Actual Implemented PCB:

Figure 5.5: AVR328 & ZigBee Module, ZigBee Module & USB

21

Page 31: Degree Project

Chapter 6

Software Development

This chapter presents information about or explanation of various software used in development of the project such as Express SCH & Express PCB, VB6, Arduino, etc.

6.1 Express PCB and Express SCH:Five steps to PCB making

1) Draw the schematic of the circuit on a computer using EXPRESS PCB.

Entering the Schematic into Express SCH

1. Open Express SCH to create a fresh schematic. The first time you start

Express SCH you will get a dialog box with a link to a quick start guide for

Express SCH. Once you are ready to start, close the dialog box to view the

empty schematic.

22

Page 32: Degree Project

2. Click on Op-Amp-like symbol to place components. To place the resistors, select “Passive-Resistor” in the text box in the upper right corner.

3. Then click on the schematic for the 4 resistors (not including the photoresistor or potentiometer) in roughly the location you want them to display.

23

Page 33: Degree Project

4. Now you need to give each of the resistors unique identifiers. Right click on a

resistor and choose “Set component properties.” In the Component Properties box,

under “Component ID,” select “Auto assign Part ID.” The program should assign this

resistor to be R1. Set its value 10k in the “Part Name” field and hit OK. Repeat this

process to identify and label R2 (10k), R3 (100k), and R4 (10k). Rotate R4 by right

clicking on it, selecting “Rotate component” and the “Body left 90º”.

5. Now add the capacitor, potentiometer, comparator, and transistor to the circuit by

first clicking back on the component placement tool (the red op-amp symbol) and

using the component names “Passive-Capacitor polarized,” “Passive- Potentiometer,”“IC – National - LM311 – Comparator – DIP-8,” and “Semiconductor – Transistor

NPN.” Use “set component properties” to assign all of these parts Part IDs, label

them and position them (using the arrow tool) in a logical manner.

24

Page 34: Degree Project

6. Now we need to add some components (the photoresistor and the buzzer) that

don’t exist in the library. Let’s start with the photoresistor. The easiest way to make

new parts is to start with a symbol that’s already close to what you want and modify

it. Place a regular resistor on the layout (using the placement tool with ‘Passive –

Resistor’). Go to the selection tool (the arrow), choose that resistor and go to the

“Component” menu at the top and select “Ungroup component”

25

Page 35: Degree Project

7. Using the circle shaped tool from the tool menu, draw a circle around the resistor.

8. Select the whole object (using the arrow tool), and choose “Component” -> “Group

to make component”

26

Page 36: Degree Project

9. Select the whole object (using the arrow tool), and choose “Component” -> “Group

to make component”

10. In the component properties box that appears, assign the photoresistor a unique part ID, such as “PR1”.

27

Page 37: Degree Project

11. Move the photoresistor to the spot you want it in the circuit.

12. Now we will create the buzzer. The buzzer is a polarized device, so a good

starting point is a polarized capacitor. Go to the component selector, choose a

polarized capacitor, ungroup the capacitor, and then add a circle to the symbol to

distinguish it as a buzzer. Group the entire object as a component with part ID,

“BZ1,” and label “CEP-2224” and save the component as a “Buzzer” under custom

components. At the last step, you’re display will be as follows:

13. Now we need to add our connections to power and ground. Let’s start with

ground. Go to the “symbol or signal label” tool, which looks like a ground, and select

“Power – ground” from the text box in the upper right.

28

Page 38: Degree Project

14. Place 5 grounds into the circuit, at the bottom of R2, near pins 1 and 4 of the

LM311, near the bottom of the capacitor, at the emitter of the BJT, and at the bottom

of the potentiometer.

29

Page 39: Degree Project

15. Repeat this process, but using “Power – Voltage Supply +9V” to put 5 power

connections in at the top of R1, the photoresistor, pin 8 of the LM311, the top of R3

and the top of the buzzer.

16. Now let’s add in our battery connection. Place a battery into the circuit, using

“Misc – Battery.” Assign the battery the part ID “B1” and give it the label “9V.”

Then, use the symbol tool to add a ground connection and a +9V network connection

(this will link the positive terminal of the battery with every other point in the circuit

that should go to 9V—if you wanted to add a switch to the circuit, you would add it

between the + terminal of the battery and the ‘+9V’ symbol.)

30

Page 40: Degree Project

17. Now select the wire tool, and wire your circuit together. The left-click starts the

wire and sets a bend, and the right click ends a wire. After wiring, the schematic

should appear as follows:

18. Save your work, using “Save As..” to create a unique filename.

19. Check your file for netlist errors using “File” -> “Check schematic for netlist

errors”

20.The pins inside of the BJT are not specified (this is because pin assignments vary

for different BJTs) so you will probably will get an error message, like that shown

below:

21. Hit “cancel” on the error message, and then as that message suggested, select the

part and choose “Component” and then “Ungroup Component.” This example uses

the 2n1711 BJT in the little tin can (the TO-39 package). For this package the base is

pin 2, the emitter is pin 1, and the collector is pin 3. To set this in the schematic,

double click on just the collector pin, and assign it to pin 3.

22. In a similar fashion, assign “2” to the base, and “1” to the emitter. Then select the

entire component (this takes a lot of shift-clicking—be sure to get all the little parts),

31

Page 41: Degree Project

choose “Group to make component” from the Component menu, and assign the part

ID to be Q1.

23. If you’re going to be using the transistor again, it’s probably a good idea to

then click on it, select “Component” -> “Save custom component” and save it as the

transistor name, which in this case is 2n1711.

24. Now check your file for netlist errors again, using “File” -> “Check schematic for

netlist errors,” you might get an error like that shown below (if not skip to #28)

32

Page 42: Degree Project

25. The cause of this error is that the wire isn’t really connected. The “snap-to-

grid” function has prevented you from making a connection. Hit continue to exit the

netlist check. Then toggle the “snap-to-grid” function off, select the errant line end(s)

and move it (them) into the correct position. Repeat this process until all the lines are

properly connected.

33

Page 43: Degree Project

26. Reattempt the netlist error check.

27. Once the netlist error check runs clean, you will be asked to save your file, which you should definitely do. The final schematic should look like this:

28. Print your schematic to reference as you work on your layout. At this

point, you should review your schematic carefully to check for errors. Once you

are satisfied that the schematic is correct, close Express SCH.

2) Design the PCB on the computer using the EXPRESS PCB. While designing a PCB, try to make it compact as possible.

RULES FOR MAKING PCB:

1. There should not be 90 degree connections of wire. All connections should preferably made at 45 degrees.

2. The mirror image of the PCB layout will be imprinted on the copper side of the

actual PCB. So any text to be written on the copper side the text should be mirrored

during layout design so that the text appears normal on the copper side of the PCB.

3. Always print from a laser printer. Printout from inkjet or any other printer will not work as it may not be sharp enough.

34

Page 44: Degree Project

4. You can print on both top and bottom parts of the board, but here we will print text only on the top copper layer.

5. There are standards for using traces of different thicknesses for different purposes:

(a) 0.6mm (0.025-inch) trace for single tracks(b) 1.3mm (0.050-inch) trace for power and ground tracks(c) 0.2mm to 0.4mm (0.010- to 0.015-inch) traces for going between IC and

component pads6. Tracking from large to small and back to large is known as ‘nack-ing’ or

‘nacking down’.

7. You can also let rest of the space remain covered by copper, leaving clearance

beside each line. We will not use it as this type of filled circuit is best for industrial

level machine etching

8. The standards for clearances for electrical conductors are listed here

Table 6.1: Clearances for Electrical Conductors

Voltage (DC or Peak AC) Internal External (<3050m) External (>3050m)0-15V 0.05 mm 0.1 mm 0.1 mm

16-30V 0.05 mm 0.1 mm 0.1 mm

31-50V 0.1 mm 0.6 mm 0.6 mm

51-100V 0.1 mm 0.6 mm 1.5 mm

101-150V 0.2 mm 0.6 mm 3.2 mm

151-170V 0.2 mm 1.25 mm 3.2 mm

171-250V 0.2 mm 1.25 mm 6.4 mm

251-300V 0.2 mm 1.25 mm 12.5 mm

301-500V 0.25 mm 2.5 mm 12.5 mm

9. For thin tracks (<0.6mm traces), it is good to add ‘chamfer’ to ‘T’ junction, thus

eliminating 90° angles.

3) Print the PCB design through a laser printer.

Go to File→Print. Select ‘Layers to Print.’ Keep ‘Enlarge to Fit Page’ option

unchecked as it will not give the exact layout of the components. Print the PCB layout

from a laser printer.

4) Take the impression of the circuit on a copper clad board.

35

Page 45: Degree Project

5) Remove the excess copper by etching

Cut the copper-clad board to a size matching the size of the PCB design printout. You can also use a glass epoxy board but it’s costlier than a copper-clad board.

Put the paper printout on the board with the printed side facing the copper side. Affix the paper to the board using cellotape so that the paper does not move while ironing.

Now take your household electric iron and set its temperature to the maximum . Press

the hot iron on the paper and carefully move it across the paper for about four

minutes. While doing so, check for impressions. Continue ironing until the complete

impression of the circuit comes on the copper side.

Complete the blanks, if any, with a good permanent marker. If any line is not dark

enough, redraw it on the board using the permanent marker. Wash the board in normal

tap water.

Drill IC holes using a 1mm hand PCB drill as shown in Fig. 14. Redraw the lines using the permanent marker if they have been defaced by the drill.

Now mix some FeCl3 (ferric chloride) powder in hot water. The reaction is vigorous,

so take safety precaution. Put the copper-clad board in the solution and constantly tilt

the container from side to side without spilling its contents. This is done to speed up

the reaction. It takes five to six minutes to wash away all the excess copper. In

between, keep checking the board. Ensure that the marker or carbon of the impression

does not wash away.

Take the board out and wash it under tap water to remove the permanent marker ink.

Remove carbon by using nail polish remover. Use a scrubber to gently scrub the

copper surface till it shines. Your PCB is ready.

36

Page 46: Degree Project

6.2 Arduino:

Arduino is an open-source prototyping platform based on easy-to-use hardware and

software. Arduino boards are able to read inputs - light on a sensor, a finger on a

button, or a Twitter message - and turn it into an output - activating a motor, turning

on an LED, publishing something online. You can tell your board what to do by

sending a set of instructions to the microcontroller on the board. To do so you use the

Arduino programming language (based on Wiring), and the Arduino Software (IDE),

based on Processing.

Figure 6.1: Arduino Board

Why Arduino?

Thanks to its simple and accessible user experience, Arduino has been used in

thousands of different projects and applications. The Arduino software is easy-to-use

for beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and

Linux. Teachers and students use it to build low cost scientific instruments, to prove

37

Page 47: Degree Project

chemistry and physics principles, or to get started with programming and robotics.

Designers and architects build interactive prototypes, musicians and artists use it for

installations and to experiment with new musical instruments.

Inexpensive - Arduino boards are relatively inexpensive compared to other

microcontroller platforms. The least expensive version of the Arduino module

can be assembled by hand, and even the pre-assembled Arduino modules cost

less than $50.

Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating systems. Most microcontroller systems are limited to Windows.

Simple, clear programming environment - The Arduino Software (IDE) is

easy-to-use for beginners, yet flexible enough for advanced users to take

advantage of as well. For teachers, it's conveniently based on the Processing

programming environment, so students learning to program in that

environment will be familiar with how the Arduino IDE works.

Open source and extensible software - The Arduino software is published as

open source tools, available for extension by experienced programmers. The

language can be expanded through C++ libraries, and people wanting to

understand the technical details can make the leap from Arduino to the AVR C

programming language on which it's based. Similarly, you can add AVR-C

code directly into your Arduino programs if you want to.

Open source and extensible hardware - The plans of the Arduino boards are

published under a Creative Commons license, so experienced circuit designers

can make their own version of the module, extending it and improving it. Even

relatively inexperienced users can build the breadboard version of the module

in order to understand how it works and save money.

38

Page 48: Degree Project

6.3 Visual Basic 6 (VB6):

VISUAL BASIC is a high level programming language which evolved from the

earlier DOS version called BASIC. BASIC means Beginners' All-purpose Symbolic

Instruction Code. It is a relatively easy programming language to learn. The code

looks a lot like English Language. Different software companies produced different

versions of BASIC, such as Microsoft QBASIC, QUICKBASIC, GWBASIC, IBM

BASICA and so on. However, people prefer to use Microsoft Visual Basic today, as it

is a well-developed programming language and supporting resources are available

everywhere. Now, there are many versions of VB exist in the market, the most

popular one and still widely used by many VB programmers is none other than Visual

Basic 6.

Before you can program in VB 6, you need to install Visual Basic 6 compiler in your

computer. You can purchase a copy of Microsoft Visual Basic 6.0 Learning Edition or

Microsoft Visual Basic Professional 6.0 with Plus Pack from Amazon.com, both are

vb6 compilers. If you have already installed Microsoft Office in your PC or laptop,

you can also use the built-in Visual Basic Application in Excel to start creating Visual

Basic programs without having to spend extra cash to buy the VB6 compiler.

After installing vb6 compiler, the icon with appears on your desktop or in your

programs menu. Click on the icon to launch the VB6 compiler. On startup, Visual

Basic 6.0 will display the following dialog box as shown in figure.

39

Page 49: Degree Project

Figure 6.2: New Project Dialog Box

You can choose to start a new project, open an existing project or select a list of

recently opened programs. A project is a collection of files that make up your

application. There are various types of applications that we could create; however, we

shall concentrate on creating Standard EXE programs (EXE means executable).

Before you begin, you must think of an application that might be useful, have

commercial values .educational or recreational. click on the Standard EXE icon to go

into the actual Visual Basic 6 programming environment.

When you start a new Visual Basic 6 Standard EXE project, you will be presented

with the Visual Basic 6 Integrated Development Environment (IDE). The Visual

Basic 6 Integrated Programming Environment is show in Figure 6.3.2. It consists of

the toolbox, the form, the project explorer and the properties window.

40

Page 50: Degree Project

Figure 6.3: VB6 Programming Environment

Form is the primary building block of a Visual Basic 6 application. A Visual Basic 6

application can actually comprises many forms; but we shall focus on developing an

application with one form first. We will learn how to develop applications with

multiple forms later. Before you proceed to build the application, it is a good practice

to save the project first. You can save the project by selecting Save Project from the

File menu, assign a name to your project and save it in a certain folder.

Creating Your First Application:

First of all, you have to launch Microsoft Visual Basic 6.In the Visual Basic 6

integrated development environment, a default form with the name Form1 will be

available for you to work on your new project. Now, double click on Form1, the

source code window for Form1 as shown in figure 2.1 will appear. The top of the

source code window consists of a list of objects and their associated events or

procedures. In figure 2.1, the object displayed is Form and the associated procedure

is Load.

41

Page 51: Degree Project

Figure 6.4: Source Code Window

When you click on the object box, the drop-down list will display a list of objects you

have inserted into your form as shown in figure 2.2. Here, you can see a form with the

name Form1, a command button with the name Command1, a Label with the name

Label1 and a Picture Box with the name Picture1. Similarly, when you click on the

procedure box, a list of procedures associated with the object will be displayed as

shown in figure 2.3. Some of the procedures associated with the object Form1 are

Activate, Click, DblClick (which means Double-Click), DragDrop, keyPress and

more. Each object has its own set of procedures. You can always select an object and

write codes for any of its procedure in order to perform certain tasks.

42

Page 52: Degree Project

Chapter 7

Description of Hardware

This chapter gives the specifications and datasheets of the main hardware

components used in implementing the projects such as sensors for detecting human

presence i.e. wireless camera, MQ6 Gas sensor, Thermistor, PIR sensor and wireless

modules i.e. ZigBee & Microcontroller ATMEGA328, etc.

7.1 PIR Sensor:Working Principle:-

• PIR sensor is the abbreviation of Passive Infrared Sensor. It measures the

amount of infrared energy radiated by objects in front of it. They does not emit

any kind of radiation but senses the infrared waves emitted or reflected by

objects.

• The heart of a PIR sensor is a solid state sensor or an array of such sensors

constructed from pyro-electric materials. Pyro-electric material is material by

virtue of it generates energy when exposed to radiation. Gallium Nitride is the

most common material used for constructing PIR sensors. Suitable lenses are

mounted at the front of the sensor to focus the incoming radiation to the sensor

face. Whenever an object or a human passes across the sensor the intensity of

the incoming radiation with respect to the background increases.

• As a result the energy generated by the sensor also increases. Suitable signal

conditioning circuits convert the energy generated by the sensor to a suitable

voltage output. In simple words the output of a PIR sensor module will be

HIGH when there is motion in its field of view and the output will be LOW

when there is no motion.

43

Page 53: Degree Project

• PIR sensors are more complicated because there are multiple variables that

affect the sensors input and output. To begin explaining how a basic sensor

works, we'll use this diagram.

Figure 7.1: Proximity of PIRs

Figure 7.2: DSN-FIR800

44

Page 54: Degree Project

7.2 MQ6 Gas Sensor:

Used in gas leakage detecting equipment's for detecting of LPG, iso-butane, propane,

LNG combustible gases. The sensor does not get trigger with the noise of alcohol,

cooking fumes and cigarette smoke.

Applications:

• Gas leak detection system

• Fire/Safety detection system

• Gas leak alarm / Gas detector

Features:

• Simple analog output

• High sensitivity to LPG, iso-butane, propane

• Small sensitivity to alcohol, smoke

• Fast response

• Wide detection range

• Stable performance and long life

45

Page 55: Degree Project

Figure 7.3: MQ6 Gas Sensor Module

• Warm up Time:

The sensor needs 10 minutes of warm up time after first power is applied.

After 10 minutes you can take its readings. During warm up time the output

analog voltage would go up from 4.5V to 0.5V in variation down gradually.

During this warm up time the sensor reading should be ignored.

• Using the Sensor:

The sensor needs 5V to operate, Give regulated +5V DC supply, The sensor

will take around 180mA supply. The sensor will heat a little bit since it has

internal heater that heats the sensing element.

• Testing the sensor:

Measure the output voltage through multi-meter between A.OUT and Ground

pins or Use a microcontroller to measure the voltage output. Take the sensor

near combustible gas place like cooking gas stove with flame off or near bottle

of after shave liquid or cigarette light with flame off. You will notice sudden

jump in analog voltage output since the gas concentration will increase.

46

Page 56: Degree Project

Table 7.1: Pin Description

Table 7.2: Specifications

47

Page 57: Degree Project

7.3 Temperature Sensor-Thermistor:

A thermistor is a type of resistor with resistance varying according to its temperature.

The word is a portmanteau of thermal and resistor . Samuel Ruben invented the

thermistor in 1930, and was awarded U.S. Patent No. 2,021,491.

Thermistors are widely used as inrush current limiters, temperature sensors, self-resetting overcurrent protectors, and self-regulating heating elements.

Assuming, as a first-order approximation, that the relationship between resistance and temperature is linear, then:

R = k T

where

R = change in resistance

T = change in temperature

k = first-order temperature coefficient of resistance

Thermistors can be classified into two types depending on the sign of k. If k is

positive, the resistance increases with increasing temperature, and the device is called

a positive temperature coefficient (PTC) thermistor, or posistor. If k is negative, the

resistance decreases with increasing temperature, and the device is called a negative

temperature coefficient (NTC) thermistor. Resistors that are not thermistors are

designed to have a k as close to zero as possible, so that their resistance remains nearly

constant over a wide temperature range.

Thermistors differ from resistance temperature detectors in that the material used in a

thermistor is generally a ceramic or polymer, while RTDs use pure metals. The

temperature response is also different; RTDs are useful over larger temperature

ranges.

48

Page 58: Degree Project

Figure 7.4: Thermistor symbol & NTC thermistor, bead type, insulated wire

Applications:

PTC thermistors can be used as current-limiting devices for circuit protection,

as replacements for fuses. Current through the device causes a small amount

of resistive heating. If the current is large enough to generate more heat than

the device can lose to its surroundings, the device heats up, causing its

resistance to increase, and therefore causing even more heating. This creates a

self-reinforcing effect that drives the resistance upwards, reducing the current

and voltage available to the device.

PTC thermistors can be used as heating elements in small temperature-

controlled ovens. As the temperature rises, resistance increases, decreasing the

current and the heating. The result is a steady state. A typical application is a

crystal oven controlling the temperature of the crystal of a high-precision

crystal oscillator. Crystal ovens are usually set at the upper limit of the

equipment's temperature specification, so they can maintain the temperature by

heating.

NTC thermistors are used as resistance thermometers in low-temperature measurements of the order of 10 K.

NTC thermistors can be used as inrush-current limiting devices in power

supply circuits. They present a higher resistance initially which prevents large

currents from flowing at turn-on, and then heat up and become much lower

resistance to allow higher current flow during normal operation. These

49

Page 59: Degree Project

thermistors are usually much larger than measuring type thermistors, and are

purposely designed for this application.

NTC thermistors are regularly used in automotive applications. For example

they monitor things like coolant temperature and/or oil temperature inside the

engine and provide data to the ECU and indirectly the dashboard.

Thermistors are also commonly used in modern digital thermostats and to monitor the

temperature of battery packs while charging.

7.4 Wireless Camera Module:

• Super mini wireless color camera and wireless receiver set for wireless transmission and receiving of video.

• This is a great low priced option for covert surveillance and security, as well

as, with a little moddling, an excellent choice for sending video direct from

your model as it is being used.

• It features an excellent wireless transmission range, broadcasts on 1.2 GHz to avoid interference, and a receiver with Video OUT so it can easily and quickly

• Be set up with a TV for viewing the images from the camera as they are being sent. This product uses the PAL color system.

Camera Specifications:

• Image Device: 1/4 Inch CMOS

• TV system: PAL/CCIR: 628 x 582

• Horizontal Definition: 380 Lines

• Angular Field of View: 38 degree

50

Page 60: Degree Project

• Minimum Illumination: 3 LUX

• Synchronization System: Internal

• Backlight Compensation: Auto

• White Balance: Auto

• S/N Ratio: >48dB

• Operation Temperature: 5~ 35 deg C

• Transmission Frequency: 1.2Ghz

• Locked Frequencies

• Power Adapter: DC 9V

• Dimension: 20x20x22mm (LxWxD)

• Recommended Max Range for Objects: 7~8 Meters

• Transmission Range: 20 Meters.

Receiver Specifications:

• Receiving Frequency: 0.9/1.2Ghz

• Intermediate Frequency: 480Mhz

• Frequency Stabilization: +/-100Khz

• Demodulation Mode: FM

• Antenna: 50ohm SMA

• Receiving Sensitivity: -85dBm

• Power Source: 9V

51

Page 61: Degree Project

• Dimensions: 120mm x 81mm x 20mm (L x W x D)

• Video OUT

Package Contents:

• Pinhole Camera

• Receiver

• Receiver Antenna

• 9V battery attachment for camera

• Video cable

• 2x power adapters

• Instructions – English

Figure 7.5: Camera Package Contents

52

Page 62: Degree Project

7.5: ZigBee Module:

Why is ZigBee needed?

• There are a multitude of standards that address mid to high data rates for voice,

PC LANs, video, etc. However, up till now there hasn’t been a wireless

network standard that meets the unique needs of sensors and control devices.

Sensors and controls don’t need high bandwidth but they do need low

latency and very low energy consumption for long battery lives and for large

device arrays.

• There are a multitude of proprietary wireless systems manufactured today to

solve a multitude of problems that also don’t require high data rates but do require low cost and very low current drain.

• Low power consumption, simply implemented

• Low cost (device, installation, maintenance)

• High density of nodes per network

• Simple protocol, global implementation

Figure 7.6: ZigBee Module

53

Page 63: Degree Project

ZigBee/IEEE 802.15.4 - General Characteristics:

• Dual PHY (2.4GHz and 868/915 MHz)

• Data rates of 250 kbps (@2.4 GHz), 40 kbps (@ 915 MHz), and 20 kbps (@868 MHz)

• Optimized for low duty-cycle applications (<0.1%)

• CSMA-CA channel access

• Yields high throughput and low latency for low duty cycle devices like sensors and controls

• Low power (battery life multi-month to years)

• Multiple topologies: star, peer-to-peer, mesh

• Addressing space of up to:

• 18,450,000,000,000,000,000 devices (64 bit IEEE address)

• 65,535 networks

• Optional guaranteed time slot for applications requiring low latency

• Fully hand-shake protocol for transfer reliability

Range: 50m typical (5-500m based on environment)

54

Page 64: Degree Project

7.6 Arduino Uno R3 (Atmega328):

Figure 7.7: ATMEGA328 Pin Configuration

Table 7.3: Summary

S u m m ar y

Microcontroller ATmega328Operating Voltage 5V

Input Voltage (recommended) 7-12VInput 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 (ATmega328) of which 0.5 KB used by bootloader

SRAM 2 KB (ATmega328)EEPROM 1 KB (ATmega328)Clock Speed 16 MHz

55

Page 65: Degree Project

Features:

• High Performance, Low Power AVR® 8-Bit Microcontroller

• Advanced RISC Architecture

• High Endurance Non-volatile Memory Segments

• Peripheral Features

• Special Microcontroller Features

• I/O and Packages

• Operating Voltage: 1.8 - 5.5V

• Temperature Range: -40°C to 85°C

• Speed Grade:

0 - 4 [email protected] - 5.5V, 0 - 10 [email protected] - 5.5.V, 0 - 20 MHz @ 4.5 - 5.5V

• Power Consumption at 1 MHz, 1.8V, 25°C

– Active Mode: 0.2 mA

– Power-down Mode: 0.1 μA

– Power-save Mode: 0.75 μA (Including 32 kHz RTC)

56

Page 66: Degree Project

7.7 PUSH-PULL FOUR CHANNEL DRIVER WITH DIODES

L2963D:

Description:

The Device is a monolithic integrated high voltage, high current four channel driver

designed to accept standard DTL or TTL logic levels and drive inductive loads (such

as relays solenoids, DC and stepping motors) and switching power transistors. To

simplify use as two bridges each pair of channels is equipped with an enable input. A

separate supply input is provided for the logic, allowing operation at a lower voltage

and internal clamp diodes are included. This device is suitable for use in switching

applications at frequency up to 5 Khz.

The L293D is assembled in a 16 lead plastic package which has 4 center pins connected together and used for heat sinking.

Figure 7.8: L293D Pin Configuration

57

Page 67: Degree Project

7.8 PL-2303 USB to Serial Adapter:Introduction:

The PL-2303 USB to Serial adapter is your smart and convenient accessory for

connecting RS-232 serial devices to your USB-equipped Windows host computer. It

provides a bridge connection with a standard DB 9-pin male serial port connector in

one end and a standard Type-A USB plug connector on the other end. You simply

attach the serial device onto the serial port of the cable and plug the USB connector

into your PC USB port. It allows a simple and easy way of adding serial connections

to your PC without having to go thru inserting a serial card and traditional port

configuration.

This USB to Serial adapter is ideal for connecting modems, cellular phones, PDAs,

digital cameras, card readers and other serial devices to your computer. It provides

serial connections up to 1Mbps of data transfer rate. And since USB does not require

any IRQ resource, more devices can be attached to the system without the previous

hassles of device and resource conflicts.

Finally, the PL-2303 USB to Serial adapter is a fully USB Specification compliant

device and therefore supports advanced power management such as suspend and

resume operations as well as remote wakeup. The PL-2303 USB Serial cable adapter

is designed to work on all Windows operating systems.

Features & Specifications:

• Smart USB to RS-232 (DB 9-pin male serial port) interface

• Supports various serial devices like modems, PDAs, cellular phones, digital Cameras, card readers, and more with easy Plug and Play Installation

• Full Compliance with the Universal Serial Bus Specification v1.1

• Supports the standard RS-232 Serial Interface

• Supports automatic handshake mode

• Over 1Mbps data transfer rate

• Supports Remote Wake-up and Intelligent Power Management

• Provides Dual Buffers for upstream and downstream data transfer

• No IRQ resource required

• Bus Powered – no separate power supply or battery required

58

Page 68: Degree Project

Chapter 8

Programming Code

This chapter includes the programming codes used in project implementation for interfacing sensors with Microcontroller. Also it contains code for developing desktop application for controlling robot using VB6 software.

8.1 Microcontroller Code:

const int M1 = 5;

const int M2 = 6;

const int M3 = 7;

const int M4 = 8;

const int sp=9;

int inByte = 0;

int count=100;

int gasValue = 0;

int tempValue = 0;

void setup() {

Serial.begin(9600);

pinMode(M1, OUTPUT);

pinMode(M2, OUTPUT);

59

Page 69: Degree Project

pinMode(M3, OUTPUT);

pinMode(M4, OUTPUT);

pinMode(sp, OUTPUT);

}

void loop() {

while (Serial.available() > 0) {

inByte = Serial.read();

if(inByte == 49)

{

digitalWrite(M1,HIGH);

digitalWrite(M2,LOW);

digitalWrite(M3,HIGH);

digitalWrite(M4,LOW);

//Serial.print("M1" );

}

if(inByte == 50)

{

digitalWrite(M1,LOW);

digitalWrite(M2,HIGH);

digitalWrite(M3,LOW);

60

Page 70: Degree Project

digitalWrite(M4,HIGH);

//Serial.println("M2" );

}

if(inByte == 51)

{

digitalWrite(M1,HIGH);

digitalWrite(M2,LOW);

digitalWrite(M3,LOW);

digitalWrite(M4,HIGH);

//Serial.println("M3" );

}

if(inByte == 52)

{

digitalWrite(M1,LOW);

digitalWrite(M2,HIGH);

digitalWrite(M3,HIGH);

digitalWrite(M4,LOW);

//Serial.println("M4" );

}

if(inByte == 48)

{

digitalWrite(M1,LOW);

61

Page 71: Degree Project

digitalWrite(M2,LOW);

digitalWrite(M3,LOW);

digitalWrite(M4,LOW);

//Serial.println("M0" );

}

/*

if(inByte == 53)

{

if(count<=250)

{

count=count+5;

}

}

if(inByte == 54)

{

if(count<=250)

{count=count-5;

}

}

analogWrite(sp,count);

*/

digitalWrite(sp,HIGH);

62

Page 72: Degree Project

gasValue = analogRead(A0);

tempValue = analogRead(A1);

Serial.print("M1" );

Serial.print(gasValue);

Serial.print("M2" );

Serial.print(tempValue);

}

}

63

Page 73: Degree Project

8.2 Visual Basic 6 Code:

Option Explicit

Private Declare Function SendMessage Lib "USER32" Alias "SendMessageA"

(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As

Any) As Long

Private Declare Function capCreateCaptureWindow Lib "avicap32.dll" Alias

"capCreateCaptureWindowA" (ByVal lpszWindowName As String, ByVal dwStyle

As Long, ByVal x As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal

nHeight As Long, ByVal hwndParent As Long, ByVal nID As Long) As Long

Private mCapHwnd As Long

Private Const CONNECT As Long = 1034

Private Const DISCONNECT As Long = 1035

Private Const GET_FRAME As Long = 1084

Private Const COPY As Long = 1054

Dim x(1 To 100, 0 To 1) As Variant

Dim id As Integer

Dim RCount As Integer

Dim CHNo As Variant

Dim Data As Variant

Dim c As Byte

Dim go As Byte

64

Page 74: Degree Project

Private Sub Command1_Click()

If Port.PortOpen = True Then

Port.PortOpen = False

End If

If optCom1.Value Then

Port.CommPort = 1

End If

If optCom2.Value Then

Port.CommPort = 2

End If

If optCom3.Value Then

Port.CommPort = 3

End If

If optCom4.Value Then

Port.CommPort = 4

End If

Port.Settings = "9600,N,8,1"

Port.InputLen = 1

Port.InBufferSize = 2000

Port.OutBufferSize = 2000

65

Page 75: Degree Project

Port.RThreshold = 1

Port.PortOpen = True

Timer1.Enabled = True

End Sub

Private Sub Command2_Click()

Port.Output = "1"

End Sub

Private Sub Command3_Click()

Port.Output = "2"

End Sub

Private Sub Command4_Click()

Port.Output = "3"

End Sub

Private Sub Command5_Click()

Port.Output = "4"

End Sub

Private Sub Command6_Click()

Port.Output = "0"

go = 0

End Sub

66

Page 76: Degree Project

Private Sub Form_Load()

mCapHwnd = capCreateCaptureWindow("WebcamCapture", 0, 0, 0, 640, 480, Me.hwnd, 0)

DoEvents

SendMessage mCapHwnd, CONNECT, 0, 0

Text1.Text = "o"

Text2.Text = "o"

On Local Error Resume Next

Call VR.Deactivate

Call VR.GrammarFromFile(App.Path & "\Commands.Txt")

Call VR.Activate

End Sub

Private Sub VR_PhraseFinish(ByVal flags As Long, ByVal beginhi As Long, ByVal

beginlo As Long, ByVal endhi As Long, ByVal endlo As Long, ByVal Phrase As

String, ByVal parsed As String, ByVal results As Long)

On Local Error Resume Next

If Trim$(Phrase) <> "" Then

Me.Caption = Phrase

Call ExecuteVoiceCommand(Me, Phrase)

Else

Me.Caption = "Unrecognized Command..."

67

Page 77: Degree Project

End If

End Sub

Function ExecuteVoiceCommand(Who As Form, sPhrase As String) As Boolean

On Local Error GoTo ExecuteVoiceCommandError

Dim x

Dim TaskID As Long

'Carry out command...

Select Case LCase$(sPhrase)

Case "stop"

Port.Output = "0"

Case "back"

Port.Output = "1"

Case "right"

Port.Output = "4"

Case "left"

Port.Output = "3"

Case "forward"

Port.Output = "2"

68

Page 78: Degree Project

End Select

ExecuteVoiceCommand = True

Exit Function

ExecuteVoiceCommandError:

Exit Function

End Function

Private Sub getPic()

SendMessage mCapHwnd, GET_FRAME, 0, 0

SendMessage mCapHwnd, COPY, 0, 0

'If Clipboard.GetData = Image Then

Image1.Picture = Clipboard.GetData

'End If

Clipboard.Clear

DoEvents

End Sub

Private Sub Timer2_Timer()

Call getPic

End Sub

Private Sub Form_Unload(Cancel As Integer)

DoEvents: SendMessage mCapHwnd, DISCONNECT, 0, 0

69

Page 79: Degree Project

End Sub

Private Sub Port_OnComm()

Dim RChr As String

If Not Port.CommEvent = comEvReceive Then Exit Sub

RChr = Port.Input

RCount = RCount + 1

If RChr = "M" Then

RCount = 0

If CHNo = 1 Then

Text1.Text = Data

End If

If CHNo = 2 Then

Text2.Text = Data

End If

If CHNo = 3 Then

Text3.Text = Data

End If

Data = ""

Exit Sub

End If

70

Page 80: Degree Project

If RCount = 1 Then

CHNo = RChr

Exit Sub

End If

If RCount >= 2 Then

Data = Data & RChr

End If

End Sub

Private Sub Timer1_Timer()

If id <= 99 Then

id = id + 1

x(id, 0) = Val(Text1.Text)

x(id, 1) = Val(Text2.Text)

MSChart1.ChartData = x

Else

id = 2

End If

Port.Output = "X"

End Sub

71

Page 81: Degree Project

8.3 VB6 Application Layout:

Here is the look of the application developed by VB6. After compilation when the

code is run this application screen appears through which we can control the robot and

receive various data and their respective graphical representation. Also we can see

live video footage of field.

Figure 8.1: VB6 application Layout

72

Page 82: Degree Project

Chapter 9

Conclusions and Scope for future work

This chapter presents the conclusion of the project and also the scope in the future to extract more features in the project if any.

9.1 Conclusion:

The project “Human Body Detection in Rescue Operation in Disaster” has been

successfully designed and tested. Integrating features of all the hardware components

used have developed it. Presence of all reasoned out and placed carefully thus

contributing to the best working. The controller makes use of a PIR based input

sensor, thermal sensor and CO2 sensor to sense the human being and give us an alert

indication. A wireless camera module is also used which provides live footage of the

field where rescue operation for determining human presence is performed. Also

ZigBee has been used for wirelessly transmitting and receiving data for controlling the

robot and identifying variations in sensed values. Hence this project provides best

solution for the human to detect the humans while they are trapped under the building

because of natural calamity like earthquake more quickly.

9.2 Scope for Future Work:

• The main purpose of the proposed system is to detect human beings and give us information about their presence and location.

• Henceforth we can use GPS system to know their exact location.

• For increasing the range of communication with the rescue team, GSM module can be included.

• Furthermore, metal and bomb detectors can be used to avoid possible damage. Light-weighted solar panels can be included to make robot ‘Self Charging’

73

Page 83: Degree Project

REFERENCES

THIAGO TEIXEIRA Yale University, GERSHON DUBLON Massachusetts Institute of Technology and ANDREAS SAVVIDES Yale University-“A Survey of Human-Sensing:

Methods for Detecting Presence, Count, Location, Track, and

Identity” ACM Computing Surveys, Vol. V, No. N, 20YY.

Geetha Bharathi.V.S PG Student, Department of ECE, Easwari Engineering

College, Chennai, TN, India , Dr.S.Sudha Professor, Department of ECE,

Easwari Engineering College, Chennai, TN, India-“Alive Human Detection in

Disaster Zones using Manually Controlled Robots”

IJIRCCE Vol. 3, Special Issue 2, March 2015.

Trupti B. Bhondve PG student[VLSI], Dept. of E&TC , Dr.D.Y.Patil College

of Engineering, University of Pune, Ambi, Pune, India, Prof.R.Satyanarayan

Assistant Professor, Dept. of E&TC , Dr.D.Y.Patil College of Engineering,

University of Pune, Ambi, Pune, India, Prof. Moresh Mukhedkar Assistant

Professor, Dept. of E&TC , Dr.D.Y.Patil College of Engineering, University

of Pune, Ambi, Pune, India-“Mobile Rescue Robot for Human Body

Detection in Rescue Operation of Disaster”

IJIRCCE Vol. 3, Issue 6, June 2014.

Rajeev Joshi *, Pratap Chandra Poudel **, Pankaj Bhandari Department of

Electronics & Communication, N.I.T, Raichur, Karnataka, India-“An

Embedded Autonomous Robotic System for Alive Human Body Detection

and Rescue Operation”

International Journal of Scientific and Research Publications, Volume 4, Issue 5, May 2014

Basic Electronics – B.Ram

Digital Electronics – R.P.Jain

74

Page 84: Degree Project

https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/how- pirs-work

http://www.electronicshub.org/human-detection-robot/

http://www.redcircuits.com

http://www.alldatasheet.com

http://www.elctronicsforu.com

https://www.youtube.com/watch?v=sMafgIlZpDM https://www.youtube.com/watch?v=oK6VnigINWw https://www.youtube.com/watch?v=pLalw4_DuSo https://www.youtube.com/watch?v=KqJwA5AQ2C4 https://www.youtube.com/watch?v=VLYDurLo2VI

75

Page 85: Degree Project

ACKNOWLEDGEMENT:

We would like to express our deepest appreciation to all those who provided us the

possibility to complete this project. A special gratitude to our final year project

manager MR. MARUTI ZALTE whose contribution in suggestions and

encouragement helped our group to complete the project successfully. Furthermore

we would like to acknowledge Mr. Amit who helped us to assemble the parts and

gave suggestions about the project. Last but not the least, many thanks go to our

project guide Mrs. Jyoti M. Varvadekar who has invested her full effort in guiding the

team achieving the goal. We have to appreciate the guidance given by her for our

project presentation that has improved our presentation skills thanks to their comment

and advice.

76