0% found this document useful (0 votes)
3 views41 pages

Mini Project Report- Gsm Based Home Security Final1 (1)

The document presents a mini project report on a GSM-based home security system developed by students at Jayamukhi Institute of Technological Sciences. The project aims to enhance home security through the use of various sensors (smoke, gas, fire) monitored by an Arduino microcontroller, with alerts sent via GSM and displayed on an LCD. The report includes sections on the introduction, literature survey, existing systems, proposed systems, hardware descriptions, code, results, and conclusions.

Uploaded by

balu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views41 pages

Mini Project Report- Gsm Based Home Security Final1 (1)

The document presents a mini project report on a GSM-based home security system developed by students at Jayamukhi Institute of Technological Sciences. The project aims to enhance home security through the use of various sensors (smoke, gas, fire) monitored by an Arduino microcontroller, with alerts sent via GSM and displayed on an LCD. The report includes sections on the introduction, literature survey, existing systems, proposed systems, hardware descriptions, code, results, and conclusions.

Uploaded by

balu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Mini Project on

GSM BASED HOME SECURITY SYSTEM


By

P Balakrishna (21C45A0207)
Yatapolu Nuthan (20C41A0205)
Pathan Sharuk Khan (21C45A0252)
Ajmeera Praneeth Kumar (21C45A0225)

Under the Guidance of


Mrs.T.Anusha
Assistant Professor,EEE

Department of Electrical and Electronics Engineering


JAYAMUKHI INSTITUTE OF TECHNOLOGICAL SCIENCES
(An Autonomous and Accredited Institution)
NARSAMPET, WARANGAL-506 332

December 2023
JAYAMUKHI INSTITUTE OF TECHNOLOGICAL SCIENCES
(Permanently Affiliated to JNTUH, Accredited by NAAC ‘A’)
NARSAMPET, WARANGAL-506 332

CERTIFICATE

This is to certify that the Mini project Report entitled “GSM BASED HOME SECURITY
SYSTEM” is a bonafide work of the students P. Balakrishna (21C45A0207), Yatapolu Nuthan
(20C41A0205), Pathan Sharuk Khan (21C45A0252), Ajmeera Praneeth Kumar (21C45A0225).

Guide Head of the Department

Principal
ACKNOWLEDGEMENT

It gives me immense pleasure in expressing sincere and deep sense of gratitude to


Dr.V.Janaki, Professor, Principal, Jayamukhi Institute of Technological sciences for the facility
made available for the progress and completion of my mini project.

It is my immense pleasure in expressing deep gratitude to Dr.P.Srinivas Rao,Professor,


Vice Principal, Jayamukhi Institute of Technological sciences for his continuous monitoring and
encouragement in project work.

I am extremely thankful to Mr.D.Rajani Kumar, Assoc.Prof, Head of the Department,


Electrical and Electronics Engineering for the permission and encouragement accorded to carry
out this project work.

I would especially like to express my extreme gratitude and sincere thanks to my guide
Mrs.T.Anusha,Assit.Prof. Department of Electrical and Electrical Engineering for his
enthusiastic and innovative guidance and support.

I would also like to express my extreme gratitude and sincere thanks to my mini project
coordinators Mr.L.Raju, Assit.prof. of Electrical and Electrical Engineering for their
enthusiastic and innovative guidance.

Last but not the least those who directly or indirectly helped to finish out my min
iproject.

P .Balakrishna (21C45A0207)
Yatapolu Nuthan (20C41A0205)
Pathan Sharuk Khan (21C45A0252)
Ajmeera Praneeth Kumar (21C45A0225)
CONTENTS
TITLE PAGE.NO
LIST OF FIGURES:
ABSTRACT:
Chapter-1 :Intoduction 01-02
Chapter-2: Literature Survey 03-04
Chapter-3:Existing System 05
Chapter-4:Proposed System 06-07
Chapter-5:Hardware Description 08-19

5.1 Arduino Uno 08-11

5.2 Regulated power supply 11-13


5.3 Gsm 13
5.3.1 Modem specification 14-16
5.3.2 Need of GSM 16
5.3.3 GSM – Architecture 17-18
5.4 Gas/Smoke Sensor 18-20
5.5 Fire Sensor 20-21

5.6 LCD Display 21

5.6.1 Pin description 21-25

5.6.2 Applications 25

5.7 Buzzer 25-28

Chapter-6: Code 29-31


Chapter-7: Results 32-33

Chapter-8: Conclusion & Reference 34-35


LIST OF FIGURES
FIGURE NO NAME OF THE FIGURE PAGE NO
3.1 Existing system 05

4.1 Block diagram OF GSM Based home security 06


4.2 Circuit diagram of GSM Based home security 07
5.1.1 Microcontrollers 08
5.1.2 Pin diagram of Atmega328 08
5.2.1 Block Diagram of Regulated Power Supply 12
5.2.2 Circuit diagram of Regulated Power Supply 12
5.3.1 GSM SIM300 13
5.3.2 GSM Network 17
5.4.1 Pollution sensor 19
5.5.1 Fire sensor 20
5.6.1 LCD 21
5.6.2 LCD Schematic circuit 23
5.7.1 Buzzer 27
5.7.2 Buzzer circuit diagram. 28
6.1 Result photos 32,33
ABSTRACT

The home security sensor monitoring is very important for security. Now a day’s
technology enhances the security system to next level. In the proposed article we monitor the
home security parameters and alerting system to prevent the over damage in case of emergency.
Proposed system uses, smoke, toxic gas, fire sensors for security monitoring and data will
process by Arduino Microcontroller. All the sensor data will post into GSM SMS and LCD
which inbuilt in Arduino. Buzzer module used to alert at home for security and alert through
GSM SMS. This proposed article will enhance the people security and necked eye monitoring
about the emergency in home.
CHAPTER 1
INTRODUCTION

In this 21st century, Home/domestic monitoring holds great importance and have uses in
several areas ranging from keeping track of agricultural field Home/domestic conditions to
Home/domestic conditions monitoring. Home/domestic monitoring would help in keeping track
of different climatic behaviors including temperature, humidity and light intensity.
Home/domestic Monitoring System can be either wired or wireless one. In case of wireless
communication, the connectivity will be more convenient and user friendly and Home/domestic
monitoring would not require physical presence of the person at the location. Wireless
communication is the transfer of information over a distance without the use of wires. The
objective of this project is to design a wireless Home/domestic monitoring system in which a
microcontroller is interfaced with sensors, GSM module to transmit sensed data wirelessly.
Analog data from LM35 is to be fetched and fed to one of the ADC channel of Microcontroller.
Display the temperature on GSM screen which is pre-processed and calculated by ATmega32.
An embedded system is a combination of software and hardware to perform a dedicated
task. Some of the main devices used in embedded products are Microprocessors and
Microcontrollers. Microprocessors are commonly referred to as general purpose processors as
they simply accept the inputs, process it and give the output. In contrast, a microcontroller not
only accepts the data as inputs but also manipulates it, interfaces the data with various devices,
controls the data and thus finally gives the result. The project “Home/domestic Reporting using
GSM Display” using ARDUINO microcontroller is an exclusive project which is used to display
Home/domestic parameters like Temperature and Humidity on an GSM Display. The thesis
explains the implementation of “Home/domestic Reporting using GSM Display” using
ARDUINO microcontroller.
A Home/domestic sensoris where plants such as flowers and vegetables are grown.
Home/domestics warmup during the day when sun-rays penetrates through it, which heats the
plant, soil and structure. Green houses help to protect crops from many diseases, particularly
those that are soil borne and splash onto plants in the rain. Home/domestic effect is a natural
phenomenon and beneficial to human being. Numerous farmers fail to get good profits from the

1
Home/domestic crops for the reason that they can’t manage two essential factors, which
determines plant growth as well as productivity. Home/domestic sensortemperature should not
go below a certain degree, High humidity can result to crop transpiration, condensation of water
vapour on various Home/domestic surfaces, and water evaporation from the humid soil. To
overcome such challenges, this Home/domestic monitoring and control system comes to rescue.
This project demonstrates the design and implementation of a various sensors for
Home/domestic environment monitoring and controlling.
This Home/domestic control system is powered by Atmega328 microcontroller it
consists of temperature sensor, light sensor, soil moisture sensor, LDR sensor, LCD display
module, 12v DC fan, Bulb and pump. Temperature sensor, senses the level of temperature., if it
goes high DC fans gets on and when the temperature goes low the fan gets off. Soil moisture
sensor, senses the water level as the level decreases the pumps gets on. In the absence of light,
the LDR sensor senses and the bulb starts glowing. By this way it will become easy to monitor
and control the system.
Conventional Home/domestics need regulated climate conditions to grow plants in there.
Without an automatic control system, it is quite impossible to maintain the accurate climate
conditions inside the green houses. This paper proposes such an automatic system for
Home/domestics to control its’ internal environment, to store each climate properties in a
database for future analysis and to ensure remote monitoring to those data. Internet of Things
(GSM) is used for remote monitoring and analysis of data. Also, an android application is
developed to display those data in a short range through Bluetooth technology. The system
controls the temperature, humidity, light and soil moisture level by sensing the values from
sensors and controlling heaters/coolers, sprayers, bulbs and water pumps accordingly.

2
CHAPTER 2

LITERATURE SURVEY

The Home/domestic manufacturing is the quickest developing part of the world. This
manufacturing isolates the yield from nature, subsequently giving some method for protection
from the immediate impact of the outside climate conditions [1].

This empowers the manufacture of harvests which generally couldn't be created at that
particular area. The Home/domestic walled in area empowers the control of the harvest
condition. This advantage enables the farmer to enhance the development in a way the plants
require. It prompts higher harvest yield, extended manufacturing period, higher quality, and less
utilization of defensive synthetic substances.

The introduced cost per unit region in Home/domestic vegetation is significantly higher
than that in open-field farming. In modest macroclimate zones, energy is required, while in dry
zones, the cooling and accessibility of water is of primary concern. The utilization of materials
and energy and in addition crop yield and quality can be impacted by working the flexible
segments of the Home/domestic, for example, warming and cooling inputs, window opening,
dribble water system, showing and CO2 dose [3], [4]. Consequently, it can be anticipated that the
manner in which these controls are worked impacts the final financial result. To absolutely take
advantage of the stronger probabilities for harvest and asset administration in a Home/domestic,
it is vital to know the control factors with a remote detecting framework utilizing the GSM. In
fact, remote correspondence structures are an essential issue of the arrangement of modernization
and innovation exchange, because of the expanding advancement of portable media
communications [6].

Internet of Things (GSM) can be expressed as the architecture of physical things


implanted with electronic circuits, sensors and programming along with an associative system
that empowers these things to trade information from each other. GSM is the combination of the
computerized and physical world. In a universe of GSM, a huge number of things or apparatuses
will be interconnected and interestingly recognized on the Internet [2]. The Internet of Things
enables the system to detect and control other devices remotely transversely over existing system
foundation, making good interrelation between the physical world and different computer-based
3
frameworks and creating chances for enhanced effectiveness, financial advantage and precision.
In near future, GSM is relied upon to give numerous more administrations like propelled
availability of physical questions over a wide system and furthermore numerous applications [5].
It is apparent to think that in utilizing these administrations given by this innovation, it is
conceivable to control and screen frameworks from a separation utilizing the GSM arrange.
Mobile internet is coordinated applications as valuable as home automation, Home/domestic
purposes for managing and far off monitoring of complicated systems however also in safety
systems and ensure property and individuals. Most physical factors important in a
Home/domestic can be estimated via automatic sensors [5].

This holds for temperature, light, soil dampness, and relative humidity. Precipitation can
additionally be detected, even though it is truly much less common. All the specified physical
factors are inspected and put away electronically at normal interims when something is evolving.
Inclusive, the estimations give a significant decent info yield snap of the physical phase of the
Home/domestic harvest structure. We suggest a commitment to the improvement of
Home/domestic monitoring Recently, the developments in the field of the GSM technology have
led to renewed interest in developing the Home/domestic technology system.

The pleasant was grumblings from a few things, for example, keep track the irrigation
system process and doing it manually. Also, the plants may suffer from bad effects of awful
conditions like temperature and light. An Intelligent Agriculture Home/domestic Environment
Monitoring System Based on GSM Technology [7] to those Mediterranean nations, for example,
Italy, Turkey, Greece Also Spain the place mechanical transformation level of Home/domestic
development may be low.

4
CHAPTER 3

EXISTING SYSTEM

In existing system of Home/domestic monitoring system all the temperature, humidity,


pollution sensors monitor the data and display in LCD module. There is no automation. Only the
manual mode of operation is going and it is very difficult to operate. No wireless technology
used to transfer the data automatically alerts through buzzer. Due to no wireless data
transmission it’s very dangerous in Home/domestic application. So we proposed new system
using GSM for easy access and alert the data.

FIG 3.1: Existing system

5
CHAPTER 4

PROPOSED SYSTEM

In this proposed system a low-cost, easily-installable and scalable Home/domestic sensor


monitoring system is developed with GSM technology after researching lots of recently
published papers and considering the reality of it. In this section, the experiment block diagrams
with setup are illustrated.

FIG 4.1: Block diagram

6
The proposed system needs to collect temperature, gas, and fire intensity of particulate
inputs from different sensors used to detect Home/domestic sensor monitoring. The monitoring
data inputs are collected by the Arduino micro processor control unit, and then Arduino
forwarded the monitoring signal conditionally to the ARDUINO control unit, after that
ARDUINO WiFi module upload the transmitted data to Thing Speak cloud. Data transferring
between Arduino and ARDUINO, a filtering algorithm is used to remove the invalid and
incomplete signals. After that the signals are sent to the cloud to reserve through the Internet. The
Home/domestic sensor monitoring information could be visualized through a web page and
mobile application provided by Thing Speak service

FIG 4.2: Circuit diagram of GSM Based home security

7
CHAPTER 5
HARDWARE DESCRIPTION

5.1 ARDUINO Micro controller:

The Arduino Uno is an open-source microcontroller board based on the Microchip


ATmega328P microcontroller (MCU) and developed by Arduino.

FIG:5.1.1: Microcontrollers

FIG:5.1.2: Pin diagram

8
VCC
Digital supply voltage magnitude of the voltage range between 4.5 to 5.5 V for the ATmega8 and
2.7 to 5.5 V for ATmega8L

GND
Ground Zero reference digital voltage supply.

PORTB (PB7.. PB0)

PORTB is a port I / O two-way (bidirectional) 8-bit with internal pull-up resistor can be
selected. This port output buffers have symmetrical characteristics when used as a source or
sink. When used as an input, the pull-pin low externally will emit a current if the pull-up resistor
is activated it. PORTB pins will be in the condition of the tri-state when RESET is active,
although the clock is not running.

PORTC (PC5.. PC0)

PORTC is a port I / O two-way (bidirectional) 7-bit with internal pull-up resistor can be
selected. This port output buffers have symmetrical characteristics when used as a source or
sink. When used as an input, the pull-pin low externally will emit a current if the pull-up resistor
is activated it. PORTC pins will be in the condition of the tri-state when RESET is active,
although the clock is not running.

PC6/RESET
If RSTDISBL Fuse programmed, PC6 then serves as a pin I / O but with different characteristics.
PC0 to PC5 If Fuse RSTDISBL not programmed, then serves as input Reset PC6. LOW signal
on this pin with a minimum width of 1.5 microseconds will bring the microcontroller into reset
condition, although the clock is not running.

PORTD (PD7.. PD0)

PORTD is a port I / O two-way (bidirectional) 8-bit with internal pull-up resistor can be
selected. This port output buffers have symmetrical characteristics when used as a source or
sink. When used as an input, the pull-pin low externally will emit a current if the pull-up resistor
is activated it. PORTD pins will be in the condition of the tri-state when RESET is active,
although the clock is not running.

9
RESET
Reset input pin. LOW signal on this pin with a minimum width of 1.5 microseconds will bring
the microcontroller into reset condition, although the clock is not running. Signal with a width of
less than 1.5 microseconds does not guarantee a Reset condition.

AVCC
AVCC is the supply voltage pin for the ADC, PC3 .. PC0, and ADC7..ADC6. This pin should be
connected to VCC, even if the ADC is not used. If the ADC is used, AVCC should be connected
to VCC through a low-pass filter to reduce noise.

Aref
Analog Reference pin for the ADC.

ADC7 .. ADC6

ADC analog input there is only on ATmega8 with TQFP and QFP packages / MLF.

PORTS

Term "port" refers to a group of pins on a microcontroller which can be accessed simultaneously,
or on which we can set the desired combination of zeros and ones, or read from them an existing
status. Physically, port is a register inside a microcontroller which is connected by wires to the
pins of a microcontroller. Ports represent physical connection of Central Processing Unit with an
outside world. Microcontroller uses them

The Atmega8 has 23 I/O ports which are organized into 3 groups:

 Port B (PB0 to PB7)


 Port C (PC0 to PC6)
 Port D (PD0 to PD7)

We will use mainly 3 registers known as DDRX, PORTX & PINX. We have total four
PORTs on my ATmega16. They are PORTA, PORTB, PORTC and PORTD. They are
multifunctional pins. Each of the pins in each port (total 32) can be treated as input or output pin.

10
Applications

Microcontroller perfectly fits many uses, from automotive industries and controlling
home appliances to Home/domestic instruments, remote sensors, electrical door locks and safety
devices. It is also ideal for smart cards as well as for battery supplied devices because of its low
consumption.

EEPROM memory makes it easier to apply microcontrollers to devices where permanent


storage of various parameters is needed (codes for transmitters, motor speed, receiver
frequencies, etc.). Low cost, low consumption, easy handling and flexibility make ATmega8
applicable even in areas where microcontrollers had not previously been considered (example:
timer functions, interface replacement in larger systems, coprocessor applications, etc.).

In System Programmability of this chip (along with using only two pins in data transfer)
makes possible the flexibility of a product, after assembling and testing have been completed.
This capability can be used to create assembly-line production, to store calibration data available
only after final testing, or it can be used to improve programs on finished products.

5.2 REGULATED POWER SUPPLY:

5.2.1 Introduction:

Power supply is a supply of electrical power. A device or system that supplies electrical or
other types of energy to an output load or group of loads is called a power supply unit or PSU.
The term is most commonly applied to electrical energy supplies, less often to mechanical ones,
and rarely to others.

A power supply may include a power distribution system as well as primary or


secondary sources of energy such as

 Conversion of one form of electrical power to another desired form and voltage, typically
involving converting AC line voltage to a well-regulated lower-voltage DC for electronic

11
devices. Low voltage, low power DC power supply units are commonly integrated with the
devices they supply, such as computers and household electronics.
 Batteries.
 Chemical fuel cells and other forms of energy storage systems.
 Solar power.
 Generators or alternators.

FIG:5.2.1: Block Diagram

FIG:5.2.2: Circuit diagram of Regulated Power Supply with Led connection

The components mainly used in above figure are

 230V AC MAINS
 TRANSFORMER
 BRIDGE RECTIFIER(DIODES)
 CAPACITOR

12
 VOLTAGE REGULATOR(IC 7805)
 RESISTOR
 LED(LIGHT EMITTING DIODE)

5.3 GSM
Global System for Mobile Communication (GSM)

Definition:

GSM, which stands for Global System for Mobile communications, reigns (important) as
the world’s most widely used cell phone technology. Cell phones use a cell phone service
carrier’s GSM network by searching for cell phone towers in the nearby area. Global system for
mobile communication (GSM) is a globally accepted standard for digital cellular
communication.

GSM is the name of a standardization group established in 1982 to create a common


European mobile telephone standard that would formulate specifications for a pan-European
mobile cellular radio system operating at 900 MHz. It is estimated that many countries outside of
Europe will join the GSM partnership.

FIG:5.3.1: GSM SIM300

13
5.3.1 MODEM SPECIFICATIONS:

The SIM300 is a complete Tri-band GSM solution in a compact plug-in module.

Featuring an industry-standard interface, the SIM300 delivers GSM/GPRS900/1800/1900Mhz


performance for voice, SMS, data and Fax in a small form factor and with low power
consumption.

The leading features of SIM300 make it deal fir virtually unlimited application, such as WLL
applications (Fixed Cellular Terminal), M2M application, handheld devices and much more.

1. Tri-band GSM/GPRS module with a size of 40x33x2.85


2. Customized MMI and keypad/LCD support
3. An embedded powerful TCP/IP protocol stack
4. Based upon mature and field proven platform, backed up by our support service, from
definition to design and production.

General Features:

 Tri-band GSM/GPRS900/1800/1900Mhz
 GPRS multi-slot class 10
 GPRS mobile station class –B
 Complaint to GSM phase 2/2+
i. -class 4(2W @900MHz)
ii. -class 1(1W @/18001900MHz)
 Dimensions: 40x33x2.85 mm
 Weight: 8gm
 7. Control via AT commands
 (GSM 07.07, 07.05 and SIMCOM enhanced AT commands)
 SIM application tool kit
 supply voltage range 3.5…….4.5 v
 Low power consumption
 Normal operation temperature: -20 ’C to +55 ‘C
 Restricted operation temperature : -20 ’C to -25 ‘C and +55 ’C to +70 ‘C

14
 storage temperature: -40 ‘C to +80 ‘C

Specifications for Fax:

Group 3 and class 1

Specifications for Data:

 GPRS class 10: max 85.6 kbps (downlink)


 PBCCH support
 coding schemes Cs 1,2,3,4
 CSD upto 14.4 kbps
 USSD
 Non transperant mode
 PPP-stack
Specifications for SMS via GSM/GPRS:

 Point to point MO and MT


 SMS cell broadcast
 Text and PDU mode
Compatibility:

At cellular command interface

Specifications for voice:

1. Tricodec

-Half rate (HR)

-Full rate (FR)

-Enhanced full rate (EFR)

2. Hands free operation

(Echo cancellation)

15
Drivers:

Microsoft windows mobile RIL driver

MUX driver

Interfaces:

 Interface to external SIM 3v 1.8v


 60 pins board-to-board connector
 Two analog audio interfaces
 Keypad interfaces
 LCD interface
 RTC backup
 AT commands via serial interface
 Dual-Serial interfaces
 Antenna connector and antenna pad
Approvals:

 FTA
 Local type approval
 CE

5.3.2 Need of GSM:

The GSM study group aimed to provide the followings through the GSM:

 Improved spectrum efficiency.


 International roaming.
 Low-cost mobile sets and base stations (BS)
 High-quality speech
 Compatibility with Integrated Services Digital Network (ISDN) and other telephone
company services.
 Support for new services.

16
5.3.3 GSM – Architecture:

A GSM network consists of several functional entities whose functions and interfaces
are defined. The GSM network can be divided into following broad parts.

 The Mobile Station (MS)


 The Base Station Subsystem (BSS)
 The Network Switching Subsystem (NSS)
 The Operation Support Subsystem (OSS)

Following fig shows the simple architecture diagram of GSM Network.

FIG:5.3.2: GSM Network.

The added components of the GSM architecture include the functions of the databases and
messaging systems:

 Home Location Register (HLR)


 Visitor Location Register (VLR)

17
 Equipment Identity Register (EIR)
 Authentication Center (AuC)
 SMS Serving Center (SMS SC)
 Gateway MSC (GMSC)
 Chargeback Center (CBC)
 Transcoder and Adaptation Unit (TRAU)

5.4 GAS/SMOKE Sensor

pollution sensors need to be calibrated and periodically checked to ensure sensor


accuracy and system integrity. It is important to install stationary sensors in locations where the
calibration can be performed easily. The intervals between calibrations can be different from
sensor to sensor. Generally, the manufacturer of the sensor will recommend a time interval
between calibrations. However, it is good general practice to check the sensor more closely
during the first 30 days after installation. During this period, it is possible to observe how well
the sensor is adapting to its new environment. Also, factors that were not accounted for in the
design of the system might surface and can affect the sensor’s performance. If the sensor
functions properly for 30 continuous days, this provides a good degree of confidence about the
installation. Any possible problems can be identified and corrected during this time. Experience
indicates that a sensor surviving 30 days after the initial installation will have a good chance of
performing its function for the duration expected. Most problems—such as an inappropriate
sensor location, interference from other gases, or the loss of sensitivity—will surface during this
time.

18
FIG:5.4.1: pollution sensor

During the first 30 days, the sensor should be checked weekly. Afterward, a maintenance
schedule, Hazardous Gas Monitors including calibration intervals, should be established.
Normally, a monthly calibration is adequate to ensure the effectiveness and sensibility of each
sensor; this monthly check will also afford you the opportunity to maintain the system’s
accuracy. The method and procedure for calibrating the sensors should be established
immediately. The calibration procedure should be simple, straightforward, and easily executed
by regular personnel. Calibration here is simply a safety check, unlike laboratory analyzers that
require a high degree of accuracy. For area air quality and safety gas monitors, the requirements
need to be simple, repeatable, and economical. The procedure should be consistent and traceable.
The calibration will be performed in the field where sensors are installed so it can occur in any
type environment. Calibration of the gas sensor involves two steps. First the “zero” must be set
and then the “span” must be calibrated.The sensing material in TGS gas sensors is metal oxide,
most typically SnO2. When a metal oxideCrystal such as SnO2 is heated at a certain high
temperature in air, oxygen is adsorbed on the crystal surface with a negative charge. Then donor
electrons in the crystal surface are transferred to the adsorbed oxygen, resulting in leaving
positive charges in a space charge layer. Thus, surface potential is formed to serve as a potential
barrier against electron flow.Inside the sensor, electric current flows through the conjunction
parts (grain boundary) of SnO2 micro crystals. At grain boundaries, adsorbed oxygen forms a
potential barrier which prevents carriers from moving freely. The electrical resistance of the
sensor is attributed to this potential barrier. In the presence of a deoxidizing gas, the surface

19
density of the negatively charged oxygen decreases, so the barrier height in the grain boundary is
reduced. The reduced barrier height decreases sensor resistance.Sensor resistance will drop very
quickly when exposed to gas, and when removed from gas its resistance will recover to its
original value after a short time. The speed of response and reversibility will vary according to
the model of sensor and the gas involved

5.5 FIRE SENSOR:

Introduction:

This module is sensitive to the flame and radiation. It also can detect ordinary light
source in the range of of a wavelength 760nm-1100 nm. The detection distance is up to 100 cm.
The Flame sensor can output digital or analog signal. It can be used as a flame alarm or in fire
fighting robots. Future Electronics Egypt Ltd. (Arduino Egypt).

FIG:5.5.1: Fire sensor

Description:

• Detects a flame or a light source of a wavelength in the range of 760nm-1100 nm

• Detection distance: 20cm (4.8V) ~ 100cm (1V) • Detection angle about 60 degrees, it is
sensitive to the flame spectrum.

• Comparator chip LM393 makes module readings stable.

• Adjustable detection range.


20
• Operating voltage 3.3V-5V

• Digital and Analog Output DO digital switch outputs (0 and 1) AO analog voltage output

• Power indicator and digital switch output indicator Interface Description (4-wire) 1) VCC --
3.3V-5V voltage 2) GND -- GND 3) DO -- board digital output interface (0 and 1) 4) AO --
board analog output interface

5.6 LCD DISPLAY

One of the most common devices attached to a micro controller is an LCD display. Some
of the most common LCD’s connected to the many microcontrollers are 16x2 and 20x2 displays.
This means 16 characters per line by 2 lines and 20 characters per line by 2 lines, respectively.

FIG:5.6.1: LCD

5.6.1 Pin description:

Pin No. Name Description


Pin no. 1 VSS Power supply (GND)
Pin no. 2 VCC Power supply (+5V)
Pin no. 3 VEE Contrast adjust
0 = Instruction input
Pin no. 4 RS
1 = Data input

21
0 = Write to LCD module
Pin no. 5 R/W
1 = Read from LCD module
Pin no. 6 EN Enable signal
Pin no. 7 D0 Data bus line 0 (LSB)
Pin no. 8 D1 Data bus line 1
Pin no. 9 D2 Data bus line 2
Pin no. 10 D3 Data bus line 3
Pin no. 11 D4 Data bus line 4
Pin no. 12 D5 Data bus line 5
Pin no. 13 D6 Data bus line 6
Pin no. 14 D7 Data bus line 7 (MSB)

Table 1: Character LCD pins with Microcontroller

The LCD requires 3 control lines as well as either 4 or 8 I/O lines for the data bus. The
user may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus. If a 4-bit
data bus is used the LCD will require a total of 7 data lines (3 control lines plus the 4 lines for the
data bus). If an 8-bit data bus is used the LCD will require a total of 11 data lines (3 control lines
plus the 8 lines for the data bus).

The three control lines are referred to as EN, RS, and RW.

The EN line is called "Enable." This control line is used to tell the LCD that we are
sending it data. To send data to the LCD, our program should make sure this line is low (0) and
then set the other two control lines and/or put data on the data bus. When the other lines are
completely ready, bring EN high (1) and wait for the minimum amount of time required by the
LCD datasheet (this varies from LCD to LCD), and end by bringing it low (0) again.

The RS line is the "Register Select" line. When RS is low (0), the data is to be treated as
a command or special instruction (such as clear screen, position cursor, etc.). When RS is high

22
(1), the data being sent is text data which should be displayed on the screen. For example, to
display the letter "T" on the screen we would set RS high.

The RW line is the "Read/Write" control line. When RW is low (0), the information on the
data bus is being written to the LCD. When RW is high (1), the program is effectively querying
(or reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are
write commands--so RW will almost always be low.

Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation
selected by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2,
DB3, DB4, DB5, DB6, and DB7.

Schematic:

FIG:5.6.2: LCD Schemaic circuit

Circuit Description:

Above is the quite simple schematic. The LCD panel's Enable and Register Select is
connected to the Control Port. The Control Port is an open collector / open drain output. While
most Parallel Ports have internal pull-up resistors, there is a few which don't. Therefore by

23
incorporating the two 10K external pull up resistors, the circuit is more portable for a wider
range of computers, some of which may have no internal pull up resistors.

We make no effort to place the Data bus into reverse direction. Therefore we hard wire
the R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the data
lines. As a result we cannot read back the LCD's internal Busy Flag which tells us if the LCD has
accepted and finished processing the last instruction. This problem is overcome by inserting
known delays into our program.

The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy here. As
with all the examples, I've left the power supply out. We can use a bench power supply set to 5v
or use an onboard +5 regulator. Remember a few de-coupling capacitors, especially if we have
trouble with the circuit working properly.

SETB RW

Handling the EN control line:

As we mentioned above, the EN line is used to tell the LCD that we are ready for it to
execute an instruction that we've prepared on the data bus and on the other control lines. Note
that the EN line must be raised/ lowered before/after each instruction sent to the LCD regardless
of whether that instruction is read or write text or instruction. In short, we must always
manipulate EN when communicating with the LCD. EN is the LCD's way of knowing that we
are talking to it. If we don't raise/lower EN, the LCD doesn't know we're talking to it on the other
lines.

Thus, before we interact in any way with the LCD we will always bring the EN line low
with the following instruction:

CLR EN

24
And once we've finished setting up our instruction with the other control lines and data bus
lines, we'll always bring this line high:

SETB EN

The line must be left high for the amount of time required by the LCD as specified in its
datasheet. This is normally on the order of about 250 nanoseconds, but checks the datasheet. In
the case of a typical microcontroller running at 12 MHz, an instruction requires 1.08
microseconds to execute so the EN line can be brought low the very next instruction. However,
faster microcontrollers (such as the DS89C420 which executes an instruction in 90 nanoseconds
given an 11.0592 MHz crystal) will require a number of NOPs to create a delay while EN is held
high. The number of NOPs that must be inserted depends on the microcontroller we are using
and the crystal we have selected.

The instruction is executed by the LCD at the moment the EN line is brought low with a
final CLR EN instruction.

Checking the busy status of the LCD:

As previously mentioned, it takes a certain amount of time for each instruction to be


executed by the LCD. The delay varies depending on the frequency of the crystal attached to the
oscillator input of the LCD as well as the instruction which is being executed.

While it is possible to write code that waits for a specific amount of time to allow the LCD
to execute instructions, this method of "waiting" is not very flexible. If the crystal frequency is
changed, the software will need to be modified. A more robust method of programming is to use
the "Get LCD Status" command to determine whether the LCD is still busy executing the last
instruction received.

The "Get LCD Status" command will return to us two tidbits of information; the
information that is useful to us right now is found in DB7. In summary, when we issue the "Get
LCD Status" command the LCD will immediately raise DB7 if it's still busy executing a
command or lower DB7 to indicate that the LCD is no longer occupied. Thus our program can

25
query the LCD until DB7 goes low, indicating the LCD is no longer busy. At that point we are
free to continue and send the next command.

5.6.2 Applications:

 Medical equipment
 Electronic test equipment
 Home/domestic machinery Interface
 Serial terminal
 Advertising system
 EPOS
 Restaurant ordering systems
 Gaming box
 Security systems
 R&D Test units
 Climatizing units
 PLC Interface
 Simulators
 Environmental monitoring
 Lab development
 Student projects
 Home automation
 PC external display
 HMI operator interface.
5.7 Buzzer
Basically, the sound source of a piezoelectric sound component is a piezoelectric
diaphragm. A piezoelectric diaphragm consists of a piezoelectric ceramic plate which has
electrodes on both sides and a metal plate (brass or stainless steel, etc.). A piezoelectric ceramic
plate is attached to a metal plate with adhesives. Applying D.C. voltage between electrodes of a
piezoelectric diaphragm causes mechanical distortion due to the piezoelectric effect.

26
FIG 5.7.1: Buzzer
For a misshaped piezoelectric element, the distortion of the piezoelectric element expands
in a radial direction. And the piezoelectric diaphragm bends toward the direction. The metal plate
bonded to the piezoelectric element does not expand. Conversely, when the piezoelectric element
shrinks, the piezoelectric diaphragm bends in the direction Thus, when AC voltage is applied
across electrodes, the bending is repeated, producing sound waves in the air.

To interface a buzzer the standard transistor interfacing circuit is used. Note that if a
different power supply is used for the buzzer, the 0V rails of each power supply must be
connected to provide a common reference.

If a battery is used as the power supply, it is worth remembering that piezo sounders
draw much less current than buzzers. Buzzers also just have one ‘tone’, whereas a
piezo sounder is able to create sounds of many different tones.

To switch on buzzer -high 1

To switch off buzzer -low 1

Notice (Handling) In Using Self Drive Method

1) When the piezoelectric buzzer is set to produce intermittent sounds, sound may be heard
continuously even when the self drive circuit is turned ON / OFF at the "X" point shown in Fig.
9. This is because of the failure of turning off the feedback voltage.

27
2) Build a circuit of the piezoelectric sounder exactly as per the recommended circuit shown in
the catalog of the transistor and circuit constants are designed to ensure stable oscillation of the
piezoelectric sounder.

3) Design switching which ensures direct power switching.

4) The self drive circuit is already contained in the piezoelectric buzzer. So there is no need to
prepare another circuit to drive the piezoelectric buzzer.

5) Rated voltage (3.0 to 20Vdc) must be maintained. Products which can operate with voltage
higher than 20Vdc are also available.

6) Do not place resistors in series with the power source, as this may cause abnormal oscillation.
If a resistor is essential to adjust sound pressure, place a capacitor (about 1μF) in parallel with
the piezo buzzer.

7) Do not close the sound emitting hole on the front side of casing.

8) Carefully install the piezo buzzer so that no obstacle is placed within 15mm from the sound
release hole on the front side of the casing.

FIG 5.7.2: Buzzer circuit diagram.

28
CHAPTER 5
CODE

##include <LiquidCrystal.h>
#include <stdio.h>
#include <SoftwareSerial.h>
LiquidCrystal lcd(6, 7, 5, 4, 3, 2);
int fire = 9;
int buzzer = 13;
int gas = 8;
void send_link()
{
Serial.write("AT+CMGS=\"");
Serial.write(pastnumber);
Serial.write("\"\r\n"); delay(2500);
Serial.write(0x1A);delay(4000);delay(4000);
}
void beep()
{

digitalWrite(buzzer,LOW);delay(1000);delay(1000);digitalWrite(buzzer,HIGH)
;
}
void setup()
{
// unsigned char rcr;
Serial.begin(9600);serialEvent();
pinMode(sw, INPUT); // Sets the trigPin as an Output
pinMode(ir, INPUT);
pinMode(relay, OUTPUT);
pinMode(buzzer, OUTPUT);
digitalWrite(sw, HIGH);
digitalWrite(buzzer, HIGH);
digitalWrite(relay, LOW);
lcd.begin(16, 2);lcd.cursor();

29
lcd.print("Home security");
delay(1000);
gsminit();
delay(1500);

lcd.clear();
lcd.setCursor(0,0);
lcd.print("IR:"); //3,0
lcd.setCursor(0,0);
lcd.print("gas:"); //9,0
lcd.setCursor(0,1);
lcd.print("fire:"); //3,1
//digitalWrite(relay, HIGH);
}
void loop()
{
while(1);
}
if(digitalRead(FIRE) == LOW)
{
lcd.setCursor(3,0);lcd.print("OFF ");
}
if(digitalRead(ir) == HIGH)
{
lcd.setCursor(3,0);lcd.print(" ON ");

digitalWrite(buzzer,LOW);

Serial.write("AT+CMGS=\"");
Serial.write(pastnumber);
Serial.write("\"\r\n"); delay(2500);
Serial.write("FIRE DETECT ");
while(1);
}

30
if(digitalRead(GAS) == LOW)
{
lcd.setCursor(3,0);lcd.print("OFF ");
}
if(digitalRead(ir) == HIGH)
{
lcd.setCursor(3,0);lcd.print(" ON ");
digitalWrite(buzzer,LOW);
Serial.write("AT+CMGS=\"");
Serial.write(pastnumber);
Serial.write("\"\r\n"); delay(2500);
Serial.write("GAS DETECT ");
while(1);
}

31
CHAPTER 6
RESULT

32
33
CHAPTER 8
CONCLUSION

An effective GSM based Home/domestic sensor Monitoring structure to monitor sensor


parameters using GSM is implemented. The developed device monitored the Home/domestic
sensormonitoring and an alert on GSM server when the harmful gases like smoke, temperture,
fire crosses the threshold level. We designed and implemented internet of things based
Home/domestic security system we obtained efficient results. Integrated all sensors to arduino
and monitor the display and post into Internet we can monitor anywhere in the world. This
Home/domestic security system enhance the previous system provides high effective secured.

34
REFERENCES

[1] P. Zheng et al., “Smart manufacturing systems for Industry 4.0: Conceptual
framework, scenarios, and future perspectives,” Frontiers of Mechanical
Engineering. 2018, doi: 10.1007/s11465-018-0499-5.

[2] A. Glória, F. Cercas, and N. Souto, “Design and implementation of an GSM


gateway to create smart environments,” in Procedia Computer Science, 2017, doi:
10.1016/j.procs.2017.05.343.

[3] J. Rigelsford, “GSM Networks: Protocols, Terminology and Implementation,”


Sens. Rev., 2003, doi: 10.1108/sr.2003.08723bae.001.

[4] S. Redl, M. Weber, and W. H. Y. Are, GSM and Personal. 1998.

[5] B. Schallock, C. Rybski, R. Jochem, and H. Kohl, “Learning Factory for Industry
4.0 to provide future skills beyond technical training,” in Procedia Manufacturing,
2018, doi: 10.1016/j.promfg.2018.03.156.

[6] G. Dinardo, L. Fabbiano, and G. Vacca, “A smart and intuitive machine condition
monitoring in the Industry 4.0 scenario,” Meas. J. Int. Meas. Confed., 2018, doi:
10.1016/j.measurement.2018.05.041.

[7] A. Pantelopoulos and N. G. Bourbakis, “A survey on wearable sensor-based


systems for health monitoring and prognosis,” IEEE Transactions on Systems, Man
and Cybernetics Part C: Applications and Reviews. 2010, doi:
10.1109/TSMCC.2009.2032660.

35

You might also like