Mini Project Report- Gsm Based Home Security Final1 (1)
Mini Project Report- Gsm Based Home Security Final1 (1)
P Balakrishna (21C45A0207)
Yatapolu Nuthan (20C41A0205)
Pathan Sharuk Khan (21C45A0252)
Ajmeera Praneeth Kumar (21C45A0225)
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).
Principal
ACKNOWLEDGEMENT
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.6.2 Applications 25
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].
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
5
CHAPTER 4
PROPOSED SYSTEM
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
7
CHAPTER 5
HARDWARE DESCRIPTION
FIG:5.1.1: Microcontrollers
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 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 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 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:
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.
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.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.
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.
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.
13
5.3.1 MODEM SPECIFICATIONS:
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.
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
1. Tricodec
(Echo cancellation)
15
Drivers:
MUX driver
Interfaces:
FTA
Local type approval
CE
The GSM study group aimed to provide the followings through the GSM:
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 added components of the GSM architecture include the functions of the databases and
messaging systems:
17
Equipment Identity Register (EIR)
Authentication Center (AuC)
SMS Serving Center (SMS SC)
Gateway MSC (GMSC)
Chargeback Center (CBC)
Transcoder and Adaptation Unit (TRAU)
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
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).
Description:
• Detection distance: 20cm (4.8V) ~ 100cm (1V) • Detection angle about 60 degrees, it is
sensitive to the flame spectrum.
• 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
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
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)
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:
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
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.
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.
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.
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.
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
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.
[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.
35