Tele Alarming Smoke Detecting Device Usi

You might also like

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

TELE-ALARMING SMOKE DETECTING DEVICE USING GSM

BY

HUSSAINI ALKASIM

U1OEE1008

SUPERVISED

BY

ENGR. A S ADAMU

A FINAL YEAR PROJECT SUBMITTED TO THE DEPARTMENT OF ELECTRICAL

AND COMPUTER ENGINEERING AHMADU BELLO UNIVERSITY ZARIA IN

PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE AWARD OF

BACHELOR’S OF ENGINEERING DEGREE (B. ENG) IN ELECTRICAL

ENGINEERING

AUGUST, 2016

i
DECLARATION

I, HUSSAINI ALKASIM with registration number U10EE1008 solemnly declare that this project

was carried out by me and it has not been submitted or presented in any previous work.

Hussaini Alkasim

(U10EE1008)

_________________ _____________________

(SIGNATURE) (DATE)

ii
CERTIFICATIONS
This is to certify that this project work entitled “Tele-Alarming Smoke detecting Device using

GSM” has met the requirement for the award of B.Eng.(Electrical and Computer Engineering) at

Ahmadu Bello University Zaria and is approved for contribution to knowledge and literary

presentation

__________________ ________________

ENGR. A S. ADAMU Date

PROJECT SUPERVISOR

__________________ _________________

ENGR. O. GBENGA Date

PROJECT COORDINATOR

__________________ _________________

DR. Y JIBRIL Date

HEAD OF DEPARTMENT

iii
DEDICATION
This project is humbly dedicated to my beloved father Malam Hussaini Isah Dantagwai.

iv
ACKNOWLEDGEMENT

First and foremost, I wish to thank Almighty God for all His benevolence. I also wish to

acknowledge with immense gratitude, the guidance I have received throughout this work from my

Project Supervisor Engr. A S Adam. In addition to his painstaking efforts of going through the

work, pin pointing errors and offering useful suggestions, Engr. Adamu’s tireless explanations

each time I met him have significantly helped in determining the content of this work. I am in the

same vein grateful to my brother Lawal Hussein who served as the financial backbone to see the

success of this work. Similarly, I am indebted to the moral support and useful company of my

course mate and friend, Garba Hamza. He has indeed been a source of strength over the years.

Finally, I wish to acknowledge the enormous moral support of the entire members of my family,

Friends and well-wishers.

v
ABSTRACT

Tele-alarm smoke detecting system employs an embedded GSM module to send an emergency

message to fire service hotline. It contain a smoke sensor MQ-2 set in a fire prone place or near

crucial equipment to be secured. The sensor, 16×2 LCD display and GSM module are connected

to the microcontroller unit (PIC16F887). Smoke detected by the sensor is reported via the GSM

module to a fire service hotline for the emergency action. Any process performed by the project is

displayed on the LCD. 12V and 5V separate power supplies are deployed for the |GSM module

and other components like LCD, microcontroller etc.

vi
TABLE OF CONTENTS

Declaration i

Certification ii

Dedication iii

Acknowledgement iv

Abstract v

CHAPTER ONE 1

1.1 PREAMBLE 1

1.2 AIM AND OBJECTIVES 2

1.3 PROJECT MOTIVATION 3

1.4 METHODOLOGY 3

1.5 PROJECT OUTLINE 3

CHAPTER TWO 5

2.1 INTRODUCTION 5

2.2 THEORITICAL BACKGROUND 5

2.3 REVIEW OF SIMILAR WORK 8

2.4 COMPONENT DESCRIPTION 9

2.4.1 GSM TECHNOLOGY 9

vii
2.4.1.1 GSM MODEM 11

2.4.1.2 SUBSCRIBER IDENTITY MODULE 12

2.4.2 MICROCONTROLLER 12

2.4.2.1 TYPES OF MICROCONTROLLER 13

2.4.2.2 EMBEDDED SYSTEM 14

2.4.3 MAX232 15

2.4.4 CRYSTAL OSCILLATOR 16

2.4.5 MQ-2 GAS SENSOR 17

CHAPTER THREE 19

3.1 INTRODUCTION 19

3.2 POWER SUPPLY UNIT 20

3.2.1 TRANSFORMER SELECTION 20

3.2.2 RECTIFIER SELECTION 21

3.2.3 SELECTION OF FILTERING CAPACITOR 21

3.5 INTERFACING GSM MODEM WITH MCU 24

3.6 CALCULATION OF EXTERNAL CRYSTAL 25

3.7 LCD INTERFACING 26

3.8 SOFTWARE DESIGN 27

viii
CHAPTER FOUR 29

4.1 INTRODUCTION 29

4.2 CONSTRUCTION 29

4.3 MOUNTING THE CIRCUIT ON VERO BOARD 29

4.4 CONSTRUCTION PROCESS 30

4.7 RESULT 32

4.8 CASING 33

CHAPTER FIVE 34

5.1 INTRODUCTION 34

5.2 LIMITATION 34

5.3 RECOMMENDATION 35

5.4 CONCLUSION 35

5.5 REFRENCES 36

ix
CHAPTER ONE

INTRODUCTION

1.1 PREAMBLE

Fire outbreak is the avoidable disaster that usually ravaged homes, offices, school,

industrial buildings and many other places. Most cases of fire accident occurrences

started as result of excited carbon element or flammable carbonated material that

immediately emit volume of carbon particles in form of smoke and other gaseous

substances. If the rays of the smoke are detected at right time, great percentage of fire

outbreaks could be quickly nib at the bud before erupting into disastrous situations (Jozef,

2009).

In a bid to avert the disaster, some safety measures has been employed over time

depending on the safety equipment and technology obtainable for the rescue. Fire

fighting vehicle and extinguishers are normally deployed to the scenes of inferno. In most

cases that are beyond control, colossal amount of valuable properties and several lives

may have been lost before the fire could be put out.

The necessity to have a sensitive gadget in place to detect the presence of smoky particles

cannot be over emphasized. Timely detection of smoke is very helpful in forestalling fire

outbreaks. This proactive idea is developed into a system that is capable of detecting

smoke and alert the fire fighter for an emergency action.

Tele-alarm smoke detecting system employs an embedded GSM module to send an

emergency message to fire service hotline. The smoke sensor and the GSM module are

connected to a microcontroller unit (mcu), in which the processing activities take place.
1
When reasonable quantity of smoke is sensed, the mcu trigger the in situ and remote

alarm. The diagram in figure: 1.0 shows the complete block diagram of the project.

Figure 1.0: The block diagram of the Project

1.2 AIM AND OBJECTIVES OF THE PROJECT

The aim of this project is to design and construct smoke detecting device that is capable

of sending alarming message to Save Of Soul number (SOS) over a telecommunication

line. The objectives to accomplish this aim are itemized as follows:

1) Designing alternative circuit diagrams and selection components.

2) Developing a program for the microcontroller.


2
3) Simulation and debugging of the project by using software, whiteboard etc.,

4) Implementing on a Vero board and;

5) Calibration of the developed prototype.

1.3 PROJECT MOTIVATION

The motivation is simply drawn from the pathetic scenes of fire disaster that is common in

residential buildings as well as in industrial structures. The unimaginable chars and pains of fire

accidents had inspired my innermost consciousness to contribute my little to fire safety with this

project work piece.

1.4 METHODOLOGY

The methodological procedures employed in carrying out this project are itemized as follows:

1. The sensory unit was firstly configured and tested with different volumes of smoke. Its

output was separately observed and reconfigured until reasonable output was achieved from the

sensor.

2. Writing and debug of program for the AT89C52 microcontroller in Kiel C Integrated

Development Environment (IDE).

3. Breadboard assembling of some components to test GSM and processing units together.

4. Permanent construction of the project and development of the case body for the project.

5. Result analysis to determine the accuracy, tolerance and limitations of the device.

1.5 PROJECT OUTLINE

The project was categorized into chapters, each discussing a particular or related topic. Chapter

one entails the general introduction to the project which includes a preamble, aim and objectives,

motivation, definition of problem, methodology and report outlines. Chapter two talks on the
3
general overview of the project: mainly the theoretical background of the project and description

of major components used as referred in their various datasheets or other information source

consulted. Chapter three is about the design and implementation of the project software and the

hardware assembling, debugging, and simulating. Chapter four discusses on construction and

testing. Lastly, chapter five deals with the summary, conclusion and useful recommendations.

4
CHAPTER TWO

THEORETICAL BACKGROUND

LITERATURE REVIEW

2.1 INTRODUCTIOM

This chapter contains different literature pertaining; the theory behind different part of the

circuit, the working principles of some sections and components of the project and the

device at large.

The design and construction of the Tele-alarm smoke detecting device is to showcase the

technology of detecting some unusual amount of smoke and send an emergency message

to the safety office for the necessary actions. The detailed design and the technical

analysis shall be covered in the next chapter.

2.2 Theoretical Background

Smoke is a collection of airborne solid and liquid particles and gases emitted when a

material undergoes combustion or pyrolysis, together with the quantity of air that is

entrained or otherwise mixed into the mass (George, 2007). It is commonly an unwanted

by-product of fires, explosions, electrical arching etc. The chemical composition of

smoke depends on the nature of the burning material (fuel) and the conditions of

combustion (George, 2007). Fires with high availability of oxygen burn at a high

temperature and with small amount of smoke produced while fires burning with lack of

oxygen produce a significantly wider palette of compounds, many of them toxic

(Mauseth, 1991). The like of Hydrogen Sulfide, Carbon monoxide, Nitrogen oxide etc.

are very dangerous to ecological system (Mauseth, 1991). Pyrolysis of burning material,

especially incomplete combustion or smoldering without adequate oxygen supply, also


5
results in production of a large amount of hydrocarbons, both aliphatic (methane, ethane,

ethylene, acetylene) and aromatic (benzene and its derivatives, polycyclic aromatic

hydrocarbons; studied as a carcinogen, or retene) (Moldoveanu, 1998). Heavier

hydrocarbons may condense as tar; smoke with significant tar content is yellow to brown.

(George, 2010). Presence of such smoke, soot, and/or brown oily deposits during a fire

indicates a possible hazardous situation, as the atmosphere may be saturated with

combustible pyrolysis products with concentration above the upper flammability limit,

and sudden inrush of air can cause flashover or backdraft. (Frank L, 2009).

There is a wild anomalous properties that characterize smokes of different natures;

flammability, colour, odour, constituents, toxicity, motion (Brownian), level of oxidation

and so many others behaviors that make smokes’ chemistry somewhat tedious to analyze.

Its chemistry is though beyond the scope of this work piece. The concern here; is the

chemistry of smoke that involves electronic characteristics (Belenger R, 1979).

Ionizing tendency of smoke is the key property to harness electronically for its presence

to be detected by the sensory unit. Basically, there are two categories of smoke sensing

techniques: sensor due to photoelectric and sensor due to ionic property (Belenger R

1979).

Photoelectric smoke detector or optical smoke sensor contains a source of infrared,

visible, or ultraviolet light (typically an incandescent light bulb or light-emitting diode), a

lens, and a photoelectric receiver (typically a photodiode). In spot-type detectors all of

these components are arranged inside a chamber where air, which may contain smoke

from a nearby fire, flows. In large open areas such as atria and auditoriums, optical beam

or projected-beam smoke detectors are used instead of a chamber within the unit: a wall-
6
mounted unit emits a beam of infrared or ultraviolet light which is either received and

processed by a separate device, or reflected back to the receiver by a reflector. In some

types, particularly optical beam types, the light emitted by the light source passes through

the air being tested and reaches the photosensor. The received light intensity will be

reduced by absorption due to smoke, air-borne dust, or other substances; the circuitry

detects the light intensity and generates the alarm if it is below a specified threshold,

potentially due to smoke. In other types, typically chamber types, the light is not directed

at the sensor, which is not illuminated in the absence of particles. If the air in the chamber

contains particles (smoke or dust), the light is scattered and some of it reaches the sensor,

triggering the alarm. (Brazel D, 2009)

Ionization smoke sensor uses a radioisotope, typically americium-241, to ionize air; a

difference due to smoke is detected and an alarm is generated. Ionization detectors are

more sensitive to the flaming stage of fires than optical detectors, while optical detectors

are more sensitive to fires in the early smoldering stage (Fleming J, 2007).

The smoke detector has two ionization chambers, one open to the air, and a reference

chamber which does not allow the entry of particles. The radioactive source emits alpha

particles into both chambers, which ionizes some air molecules. There is a potential

difference between pairs of electrodes in the chambers; the electrical charge on the ions

allows an electric current to flow. The currents in both chambers should be the same as

they are equally affected by air pressure, temperature, and the ageing of the source. If any

smoke particles enter the open chamber, some of the ions will attach to the particles and

not be available to carry the current in that chamber. An electronic circuit detects that a

7
current difference has developed between the open and sealed chambers, and sounds the

alarm (Cote, 1988).

2.3 REVIEW OF SIMILAR WORKS

The first automatic electric fire alarm was patented in 1890 by Francis Robbins Upton, an

associate of Thomas Edison (Prosser, 1970). In the circuit of Francis’ fire alarm uses the

principle of thermal stresses of metallic element to form the fire sensor. There is an open

circuit to be closed whenever the ambient temperature rises above some certain degree

due to heat of the burning fire. This methodology might be a great achievement of 19

century but it is bulky and insensitive to be relied upon for fire safety (Prosser, 1970).

Adewale (2011), produced a smoke alarm using the basic concept of photoelectric. As

shown in figure 2.1, in spot-type detectors all of these components are arranged inside a

chamber where air, which may contain smoke from a nearby fire, flows.

Figure 2.1: Image of smoke optical smoke detector with the cover removed
8
Tajudeen (2014), designed a smoke triggered alarm device that used MQ-2 hydrocarbon sensor.

This is relatively trendy with current state of the art of smoke alarm. The accessory feature like

networking of multiple smoke sensors, remote alarm capability and intelligent differentiating of

fire-laden smoke from non-fire-laden smoke are lacking in his final year project work.

However, Tajudeen inclusion of microcontroller chip and sensitive ionization based smoke

sensor in his work served as a solid stepping stone to be improved upon. Improvement on the

sensor is possible by employing the digital MQ-2 instead of analog one. The digital smoke

sensor can be easily calibrated and its output can be processed to produce some intelligences.

Intelligent detecting fire-laden smoke from non-fire-laden, smoke emission persistency, smoke

volume, and incorporation of telecommunication module in form of GSM, are the basic

improvement this project work of mine stand to contribute.

2.4 COMPONENTS’ DESCRIPTION

There are four major components used in this project. Namely:

1) GSM module,

2) MQ-2 gas sensor

3) LM016L Liquid Crystal Display.

4) AT9C552 Microcontroller

5) MAX232

Also several trivial components used for power supply and the entire design are: 4 MHz crystal

oscillator, 10K variable resistor, 12V transformer, diodes etc. these trivial components are not

discussed in this chapter.

9
2.4.1 GSM TECHNOLOGY

GSM is a cellular network, which means that mobile phones connect to it by searching for cells

in the immediate vicinity. GSM networks operate in four different frequency ranges. Most GSM

networks operate in the 900 MHz or 1800 MHz bands

[http://www.worldtimezone.com/gsm.htm]. Some countries in the Americas (including Canada

and the United States) use the 850 MHz and 1900 MHz bands because the 900 and 1800 MHz

frequency bands were already allocated.

GSM has used a variety of voice codecs to squeeze 3.1 kHz audio into between 5.6kbits/s and

13kbit/s. Originally, two codecs, named after the types of data channel they were allocated, were

used, called Half Rate (5.6 kbit/s) and Full Rate (13 kbit/s). These used a system based upon

linear predictive coding (LPC). In addition to being efficient with bitrates, these codecs also

made it easier to identify more important parts of the audio, allowing the air interface layer to

prioritize and better protect these parts of the signal. GSM was further enhanced in 1997 with the

Enhanced Full Rate (EFR) codec, a 12.2 kbit/s codec that uses a full rate channel[EST PHASEII,

1997]. Finally, with the development of UMTS, EFR was refactored into a variable-rate codec

called AMR Narrowband, which is high quality and robust against interference when used on

full rate channels, and less robust but still relatively high quality when used in good radio

conditions on half-rate channels.

There are five different cell sizes in a GSM network—macro, micro, picofemto and umbrella

cells. The coverage area of each cell varies according to the implementation environment. Macro

cells can be regarded as cells where the base station antenna is installed on a mast or a building

above average roof top level. Micro cells are cells whose antenna height is under average roof

top level; they are typically used in urban areas. Picocells are small cells whose coverage
10
diameter is a few dozen meters; they are mainly used indoors. Femtocells are cells designed for

use in residential or small business environments and connect to the service provider’s network

via a broadband internet connection. Umbrella cells are used to cover shadowed regions of

smaller cells and fill in gaps in coverage between those cells.

The modulation used in GSM is Gaussian minimum-shift keying (GMSK), a kind of continuous-

phase frequency shift keying. In GMSK, the signal to be modulated onto the carrier is first

smoothed with a Gaussian low-pass filter prior to being fed to a frequency modulator, which

greatly reduces the interference to neighboring channels (adjacent channel interference).

2.4.1.1 GSM MODEM

A GSM modem is a wireless modem that works with a GSM wireless network. A wireless

modem behaves like a dial-up modem. The main difference between them is that a dial-up

modem sends and receives data through a fixed telephone line while a wireless modem sends and

receives data through radio waves.

A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an external

GSM modem is connected to a computer through a serial cable or a USB cable. A GSM modem

in the form of a PC Card / PCMCIA Card is designed for use with a laptop computer. It should

be inserted into one of the PC Card / PCMCIA Card slots of a laptop computer. Like a GSM

mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate.

The images below shows a typical GSM modem

11
Figure 2.2: Image of GSM modem 2.4.1.2

SUBSCRIBER IDENTITY MODULE (SIM)

One of the key features of GSM is the Subscriber Identity Module (SIM), commonly known as a

SIM card. The SIM is a detachable smart card containing the user's subscription information and

phone book. This allows the user to retain his or her information after switching handsets.

Alternatively, the user can also change operators while retaining the handset simply by changing

the SIM. Some operators will block this by allowing the phone to use only a single SIM, or only

a SIM issued by them; this practice is known as SIM locking, and is illegal in some countries.

2.4.2 MICROCONTROLLER

A microcontroller (MCU or µC) is highly integrated functional computer system-on-a-chip. It

contains an integrated processor core, memory (a small amount of RAM, program memory, or

both), and programmable input/output peripherals. In contrast to a microprocessor which only

contains a CPU (the kind used in a PC) (Jack Gansel, 2000).

Another term to describe a microcontroller is embedded controller, because the microcontroller

and its support circuits are often built into, or embedded in, the devices they control. In addition

to the usual arithmetic and logic elements of a general purpose microprocessor, the

microcontroller integrates additional elements such as RAM for data storage, read-only

12
memory for program storage, flash memory for permanent data storage, peripherals, and

input/output interfaces.

Microcontrollers often operate at very low speed compared to microprocessors (at clock speeds

of as little as 32 kHz), but this is adequate for typical applications. They consume relatively little

power (milliwatts or even microwatts).

Microcontrollers are used in automatically controlled products and devices, such

as automobile engine control systems, remote controls, machines, appliances, power tools, toys,

these are called embedded systems.

2.4.2.1 Types of Microcontroller

Microcontrollers can be classified on the basis of internal bus width, architecture, memory and

instruction set. Figure 2.3 shows the various types of microcontroller.

13
2.4.2.2 Embedded System

An embedded system is a computer system designed for specific control functions within a larger

system, often with real-time computing constraints. It is embedded as part of a complete device

often including hardware and mechanical parts. By contrast, a general-purpose computer, such as

a personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs.

Embedded systems control many devices in common use today. Embedded systems contain

processing cores that are either microcontrollers or digital signal processors (DSP).When an

embedded system has a microcontroller unit that has all the functional blocks(including program

14
as well as data memory) available on a chip it is called an embedded microcontroller. For

example, 8051 having Program & Data Memory, I/O Ports, Serial Communication, Counters and

Timers and Interrupt Control logic on the chip is an embedded microcontroller. Figure 2.4 shows

the images of XC800 family of microcontroller

Figure 2.4: Images of XC800 Microcontroller

2.4.3 MAX 232

The MAX232 is an integrated circuit, first created by Maxim Integrated Products, that

converts signals from an RS-232 serial port to signals suitable for use in TTL compatible

digital logic circuits. The MAX232 is a dual driver/receiver and typically converts the

RX, TX, CTS and RTS signals. It is helpful to understand what occurs to the voltage levels.

When a MAX232 IC receives a TTL level to convert, it changes a TTL logic 0 to between +3 and

+15 V, and changes TTL logic 1 to between -3 to -15 V, and vice versa for converting from RS232

to TTL. This can be confusing when you realize that the RS232 data transmission voltages at a
15
certain logic state are opposite from the RS232 control line voltages at the same logic state. The

image of max 232 is shown in figure 2.5

Figure 2.5 Images of max 232

2.4.4 CRYSTAL OSCILLATOR

A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a

vibrating crystal of piezoelectric material to create an electrical signal with a very precise

frequency (Amos, 2002). This frequency is commonly used to keep track of time (as in quartz

wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize

frequencies for radio transmitters and receivers. The most common type of piezoelectric

resonator used is the quartz crystal, so oscillator circuits incorporating them became known as

16
crystal oscillators. But other piezoelectric materials including polycrystalline ceramics are used

in similar circuits.

Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of

megahertz. More than two billion crystals are manufactured annually. Most are used for

consumer devices such as wristwatches, clocks, radios, computers, and cellphones. Quartz

crystals are also found inside test and measurement equipment, such as counters, signal

generators, and oscilloscopes.

2.4.4.1 Principles and Function of Crystal Oscillator

Crystal is a circuit element commonly used in the clock, full name is called the crystal oscillator,

the role of crystal oscillator in microcontroller is very large, is a combination of MCU's internal

circuitry, resulting in the need microcontroller clock frequency, single-chip implementation of all

directives are built on this basis, the crystal clock frequency to provide higher speed and that the

sooner SCM. In normal working conditions, the ordinary crystal oscillator frequency absolute

accuracy of up to 50 millionths. High-level precision. Some crystal by the applied voltage can

also be adjusted within a certain range of frequencies, known as voltage-controlled oscillator

(VCO).

Crystal's role is to provide the basic system clock signal. Usually a system share a single crystal,

easy to synchronize the various parts. Some of the fundamental frequency communication

systems and RF using a different crystal and electronic means to adjust the frequency to keep

pace.

Crystal is usually used in conjunction with the phase-locked loop circuit to provide the required

system clock frequency. If different sub-systems need a different clock signal frequencies can be
17
used with the same crystal connected to a different phase-locked loop. Figure 2.6 shows the

images of a typical crystal.

Figure 2.6: Image of Crystal Oscillator.

2.4.5 MQ-2 GAS SENSOR

MQ-2 is one of ionization based sensor for hydrocarbon gases and smoke inclusively. Sensitive

material of MQ-2 gas sensor is SnO2, which with lower conductivity in clean air. When the

target combustible gas exists, the sensor’s conductivity is higher along with the gas

concentration. Simple electric circuit can be used to convert change of conductivity to

correspond output signal of gas concentration. MQ-2 gas sensor has high sensitivity to LPG,

Propane and Hydrogen, also could be used to Methane. Figure 2.7 shows an image of MQ-2 gas

sensor.

Figure 2.7: Image of MQ-2 gas sensor.


18
CHAPTER THREE

DESIGN AND IMPLEMENTATION

3.1 INTRODUCTION:

This chapter entails the detail design and development of both the software and hardware

sections involved in the project. As such, the first part of the chapter will discuss the hardware

design while the second discusses the software design. The hardware section is further broken

into four modules as shown in figure 3.1.

19
20
CHAPTER THREE

DESIGN AND IMPLEMENTATION

3.1 INTRODUCTION

This chapter entails the detail design and development of both the software and hardware

sections involved in the project. As such, the first part of the chapter will discuss the hardware

design while the second discusses the software design. The hardware section is further broken

into four modules as shown in fig.3.1.

Figure.3.1: Block Diagram for the Project Design

19
3.2 THE POWER SUPPLY UNIT

The complete electronic device or system requires a D.C voltage source for its operation.

An alternating (A.C) voltage source of 230V is used where the A.C voltage is converted

to D.C voltage by rectification process. Thus the process of converting the A.C voltage to

the D.C voltage was accomplished with the help of a rectifier, filter and voltage

regulators using voltage divider theorems. The main function of the voltage divider is to

provide the various D.C voltages needed by the different electronic components in the

system.

AC INPUT

VOLTAGE
TRANSFORMER RECTIFIER FILTER
REGULATOR

Figure 3.2: Conversion process of the voltage to the required voltage

The power supply requires has two outputs

I A 5V output required to supply the microcontroller, LCD, SIM 300cz

II A 12V output required for SIM 300cz GSM module and MQ-2 smoke sensor

3.2.1 Transformer Selection

A 240/15V transformer with 500mA rated current was selected

Primary voltage of the transformer = 240 while Secondary voltage of the transformer= 15V
20
Transformer ratio equation: K 
N1
(3.1)
N2

  16
N 1 240
From the Transformer ratio equation K=
N2 15

Vdc 

2vmax
(3.2)


2 I rms 2
Also, I dc (d.c current) = (3.3)

2  500  103  2
I dc    450mA

2 I rms 2
3.142

Vdc   2  2  3.142
Vmax dc    33.32v
2 2

3.2.2 Rectifier
A full wave rectifier (IN4001) is selected for this purpose.

3.2.3 Selection of Filtering Capacitor

The choice of smoothing capacitor can be obtained from the supply frequency of 50Hz, the

capacitor used was calculated based on the following approximation.

The ripple voltage is given by;

VR  VPP  Vrms (3.4)

Where Vpp = the peak to peak voltage = Vrms  2

Vrms=15v (the voltage of the secondary)


VPP  15  2  21.213v

21
Where

VR 
I dc
(3.5)
2 FC

C
I dc
(3.6)
2VR F

VR  VPP  Vrms  21.213  15  6.213

450 103
C  724F
2  6.213 50

Hence an electrolytic capacitor of capacitance greater than 724 microfarads (i.e.2200

microfarads) was selected for better filtration bearing that the higher the value of capacitor the

lesser the ripples.

In this design the transformer was used to step down the A.C supply voltage to a low voltage

output in order to suit the requirement of the circuit components fed by the D.C power supply.

The device is powered from a voltage of 230V AC mains electricity supply to the suitable

low voltages required. LM7812 and LM7805 voltage regulators were used in this design

to step down the voltages in order to obtain the desirable D.C output voltages needed by

the electronic components used in the system. The LM7812 provides a 12V D.C voltage

output which is used as the operating voltage of the GSM module while the LM7805

provides an output 5V D.C which is used as the operating voltage for the buzzer, LCD display and

the microcontroller. The power supply circuit diagram is shown in Fig: 3.2

22
Figure 3.2: power supply circuit

c) Total power consumption

Microcontroller=0.45w

GSM modem =2w

Buzzer =2.05w

LED =0.035w

Transistor =0.5w

Mq-2 Sensor =2.044w

= 7.079 w

3.4 MEANS OF COMMUNICATION BETWEEN SMOKE SENSOR AND MOBILE


PHONE.

The communication device selected was SIM300D modem because of the following:

i. It’s flexibility (can be used for sending SMS and data transfer)
ii. Easy to program (operate on AT (Attention) command
iii. Can be interfaced with the microcontroller easily

23
3.5 INTERFACING GSM MODEM WITH MCU

Fig 3.3 shows how to interface the GSM with microcontroller. The GSM module is

communicate the microcontroller with mobile phones through UART. To communicate

over UART or USART, we just need three basic signals which are namely, RXD

(receive), TXD (transmit), GND (common ground). GSM modem interfacing with

Microcontroller for SMS control of industrial equipment. The sending SMS through

GSM modem when interfaced with microcontroller or PC is much simpler as compared

with sending SMS through UART. Text message may be sent through the modem by

interfacing only three signals of the serial interface of modem with microcontroller i.e.,

TxD, RxD and GND. In this scheme RTS and CTS signals of serial port interface of

GSM Modem are connected with each other. The transmit signal of serial port of

microcontroller is connected with transmit signal (TxD) of the serial interface of GSM

Modem while receive signal of microcontroller serial port is connected with receive

signal (RxD) of serial interface of GSM Modem. The SMS message in text mode can

contain only 140 characters at the most. It depends upon the amount of information

collected from GPS Engine that you need at the base station for tracking vehicle or

person.

24
GSM MAX MICROCONTROLLER
232 UNIT
MODEM

Figure 3.3: Interfacing UART to Microcontroller

3.6 CALCULATION OF EXTERNAL CRYSTAL

To ensure high speed of operation a period of 1µsecond is selected for 1 machine cycle

From the Equation F 


1
(3.8)
period(T )

Frequency    1MHZ
1 1
period 1 106

For AT89C52 external frequency =12 X 1 MHz = 12 MHz

Check if the frequency selected can generate 9600bps

  3.2552
clockfrequency 12
456 baudrate 456 9600
Reload value =

But from the data sheet an integer has to be selected as the reload value to avoid error, hence

taking the approximate integer i.e. 3, we them calculate the clock frequency as

=456x3x baud rate=456x3x9600 = 11.05290 MHz, which is a standard crystal value.

25
3.7 LCD INTERFACING

The LCD is connected to the microcontroller as specified in the datasheet with the Vss and

VDD connected directly to the source and the four higher nibble pins (i.e. B4- B7) connected to

the I/O pin of the microcontroller. Figure 3.4 has illustrated how the LCD was interfaced with

the microcontroller.

Figure 3.4: LCD Interfaced with AT89C52

26
3.8 SOFTWARE DESIGN

The firmware for the AT89C52 microcontroller is written in C and compiled with Keil C51

compiler. All the registers were initialised with proper values necessary for the selection of the

functions. After the initialization is complete, the system will be on standby mode waiting for

port-change interrupt to occur. Pin P3.2 of microcontroller is dedicated to the external interrupt

from the smoke sensor. The moment smoke particles are perceived by the sensor; signal is sent

via P3.2 to the microcontroller and the predefined interrupt routine service (IRS) is automatically

executed.

The interrupt routine service includes the following algorithm:

1. Disable the interrupt flag

2. Blaring local buzzing alarm

3. Display caution message on LCD “SMOKE DETECTED”

4. Send SOS text message to fire-fighters’ hotline

5. Display any feedback text from fire-fighter’s

6. Enable the interrupt flag

As shown in Figure3.5, the check for smoke is a repeated routine. The processor jumps into IRS

as soon as smoke is prominent. After complete execution of IRS, the buzzing alarm will

continue blaring unless there is intervention by pressing the reset button or the smoke is

completely dispersed.

27
F
i
g F
i

28
CHAPTER FOUR

TESTING AND CALIBRATION

4.1 INTRODUCTION

This chapter describes the procedures of the construction of the project in stages; Testing of the

system hardware and software. The first stage is the design of the circuit using the PROTEUS

ISIS software. A program was written in C language and assembled to perform the functions

of the circuit designed using Keil uVision4. However the circuit was further simulated to ensure

that it works perfectly after the program have been compiled and assembled and the result is

obtained as discuss below.

4.2 CONSTRUCTION

All the required components used for the project were tested to make sure they operate

effectively. After the component analysis has been completed, the components were

tested to ensure that they are in good working condition. The circuit was then mounted on

a breadboard according to the specification in order to ascertain its performance. The

components were mounted with respect to the continuity of the breadboard and care was

taking in mounting each component to ensure that the correct configuration and

connections were made.

Afterwards, the circuit was transferred and assembled on a single compact vero-board in which all

the components were soldered accordingly.

4.3 MOUNTING THE CIRCUIT ON A VERO-BOARD

The circuit was mounted on a Vero-board. This is done in order to carry out test on the circuit and

also to minimize error during the soldering process. It also allowed tests to be

29
Carried out at different stages when tracing a fault on the system.

When assembling the components on the vero-board, the polarities of the components were

carefully observed. So also all soldering were checked for dry joints or for drops of solder that

may cause short circuit across the tracks before it was powered.

4.4 CONSTRUCTION PROCESS

The methodology in the construction process depends on the type of board to be used which

could be vero-board, strip board or printed circuit board (PCB). It also depends on the size and the

type of circuit to be constructed. As far as this project is concerned at this level, the vero-board is

the most appropriate board to be used. The methodology in construction using the vero-board is

as follows:

1. The surface of the Vero-board should be checked and cleaned in order to ensure that it has no

damage, breakage and lifted track before transferring the components to the

Vero-board. This was done in order to avoid poor soldering. All the components were soldered on

the Vero-board carefully using a soldering iron of 60 watts.

2. Small capacitors and resistors were mounted flush with the board and components

mounted vertically were seated squarely on the board.

When mounting the components, the following were considered

a) Component identification is visible

b) Rows of components form neat lines

c) The identification of components read from left to right in relation to diagram

4.5 TESTING

In this design PROTEUS ISIS was used to create the circuit of the vehicle smoke detecting

system and was further used to simulate the circuit to make sure the purpose of the design is

achieved.

30
Below is the schematic of the simulation for the circuit design using PROTEUS ISIS design

suit.

Figure 4.1: Simulation for smoke detecting system using Proteus

a) Testing of GSM Modem

The GSM modem was connected directly to the computer (the above setting was performed

but with baud rate now 9600bps), the AT (attention) commands was used to test its functionality:

AT<enter> (to initialize, after initialization process an “OK” is displayed on the screen)

ATE0 <enter> (to cancel echo mode which is not required for sending SMS)

AT+CMGS=’phone number beginning with zip code’ (to send SMS to the phone number eg

+234***********) > {type message e.g. hello} (a > will appear telling u to type message content)

31
CtrlZ (to send the message) AT+CMGD (to delete message from phone)

b) Testing of Max232A

A standard max 232 connection is made as shown in fig 4.1, the following was then

Carried out: The following two check test are both for the TTL and RS232 output converter

Put 0v into pin 10 and 11, then check pin 7 and 14 each should have a voltage of 10V output.

Put 5V into pins 10 and 11, then check pin 7 and 14< each should have about -10V output, if

each is successful, then TTL-RS232 converter is functional.

For the RS232-TTL converter the following is done:

Connect pin7 to pin8 and pin13 to pin 14, this will be a loopback. Put 0V into pins 10 and 11,

then check pins 9 and 12, each should have a voltage of 0.6V output. Put 5V into pin 10 and 11,

then check pins 9 and 12 again, each should have about 4.5v output hence proven its

functionality.

d) Testing of Program

The program was simulated on protues software, hence showing it ability to be able to get GSM data

and interpret it to readable form.

4.7 RESULT

Based on the result obtained by playing around with the various system components the

realistic baud rate of GSM module was 4600bps after connecting to a DB9 (dialog box 9)

of the computer using max 232 (level converter), while using AT (Attention command). The

written programme after burnt on the AT89C52 microcontroller when placed on Atmel keil made a

peep sound showing the presence of programme running, hence indicating the functionality and

the accuracy of microcontroller and programming code respectively.

32
4. 8 CASING

The casing of GSM based smoke detecting system is made from a well finished plastic material in

which the complete circuit constructed was packaged inside. A hole was provided via which the

main power supply wires ran into the case.

33
CHAPTER FIVE

CONCLUSION AND RECOMMENDATION

5.1 INTRODUCTION

It is imperative to note that, this smoking detecting device substitute the previous techniques to

combat rampant cases of disaster in our environment using modern technology. However,

there are limitations in using the device. For the cause of this project, this chapter discusses the

limitation, recommendation and future improvements that can be introduced to enhance its

functionality and usage, and conclusions.

5.2 LIMITATION

i. The system can only work well in an open and Network coverage area.

This is due to GSM modem limitation. The signal travels by line of sight in which it is able to pass

through clouds, glass and plastic but will not pass through physical solid objects such as mountains,

building and so on.

ii. Terrain

Signals can become degraded and the receiver system may not provide location Information if the

view of the sky is severely limited. This situation can occur in deep canyons, or under dense

vegetation.

iii. Subscription

The GSM (Handset) SIM has to be recharge as well as SIM on the GSM modem for effective

sending and receiving of sms, otherwise the entire operation of the device fail when any of the

account is zero.

34
iv. Weather

Signal strength can become degraded by moisture such as rainfall, fog, or snowfall.

Because of these factors, it is difficult to ensure complete or thorough GSM coverage at all times.

5.3 RECOMMENDATIONS

Ideally, the following recommendation are made for future development of the project;

i. This device can be made more enhanced in future to support automatic fire fighting system.

ii. The device can be made more secured with the aid of a security code which can only be

accessed by the user.

iii. Flat patch antennas are not as advanced and must maintain an upright position to receive

coverage. Reliable radio frequency (RF) technology, cellular towers and Advanced

Forward Link Trilateration (AFLT) can also be paired with GSM to enhance system

accuracy.

iv. The system may be made more efficient with the use of satellite modems instead of mobile

phone as a communication medium as the system may fail when there is no network

coverage in a particular region.

5.4 CONCLUSION

After successful completion of the design and construction of smoke detecting system,

the design of the project is based on embedded system which provides both remote and in situ

alarm against smoke in sensitive place. The GSM modem provides information to the user’s

phone whenever heavy smoke is detected. Thus the remote alarm is in form of SMS while the

immediate alarm is loud sound buzzing.

35
FREFERENCES.

[1] Bogard J. Theodere (2011), Electronic devices and circuit, Fifth Edition, Prentice hal

[2] GPSImages[online:] http://www.gpsvehiclenavigation.com/GPS/images.p Pp(3-16, 20-

30).

[3] Lawrence Lathen (2010), GPS Made Easy, Tenth Edition, London, Britain

[4] Micheal J. Pont (2002) Embedded C, First Edition, Pearson Education, London. 3 5]

Muhammad Ali Mazidi (2011), The 8051 Microccontroller And Embedded System, Second

Edition, Hanel, China.

[6] Musa Wuya, Design and Implementation of Car Demobilizer, Electrical and Electronic

Programme, AbubakarTafawaBalewa University, Bauchi, Nigeria. (unpublished).

[7] NBS/ EFCC (2007) Summary Report, Business Survey and Crime and Corruption and

Awareness of EFCC In Nigeria,( published).

[8] Tal Tech, USA, (2009), Introduction to Serial[

Communication Availability at http://

www.taltech.com/resource/Intro-sc html

[9] Limitation of car tracking device [online google search] http:// www.bi.com

[10] Theraja, B.L. & Theraja, A.K. (2005). A Textbook of Electrical Technology. India: S.Chand.
[11] http://en.wikipedia.org/wiki/Atmel_8051

36
[12] http://en.wikipedia.org/wiki/microcontroller

37

You might also like