Professional Documents
Culture Documents
2883 PDF
2883 PDF
A PROJECT REPORT
Submitted by
RAGHAVENDRAN R. (41501112025)
SUBRAMANI C. (41501112029)
MURUGAN K. (41501112016)
in
MAY 2005
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
HEAD OF DEPARTMENT Dr. RANGANATH MUTHU
Department of Instrumentation SUPERVISOR
and Control Engineering PROFESSOR
S.R.M. Engineering College Department of
Kattankulathur Instrumentation and Control
Kanchipuram-603203 Engineering
S.R.M. Engineering
College, Kattankulathur
Kanchipuram-603203
ABSTRACT
In this project, five critical parameters namely fire, level, intruder, temperature and
smoke are sensed and detected. The thermistor is used to detect the fire; the level sensors
are used to detect the level at two levels. IR Transmitter and Receiver are used to detect
the trespassing, temperature detector is used to detect temperature and smoke sensor is
used to detect smoke. The sensors give the appropriate control signal to the
microcontroller unit. The microcontroller unit gives the control signal to the controlling
unit, like Water splashing unit, Motor control and Alarm unit. This project is mainly
implemented in industries to sense the critical parameters and to control the same. By
implementing this project the critical parameters are monitored continuously and the
ii
alarm signal is given for indication and the control action is also performed. This project
TABLE OF CONTENTS
ABSTRACT iii
LIST OF TABLES vi
LIST OF FIGURES vii
LIST OF ABBREVIATIONS viii
AND NOMENCLATURE
1 INTRODUCTION
1.1 OUTLINE OF THE THESIS 1
1.2 BLOCK DIAGRAM OF THE PROJECT 3
1.3 REAL TIME APPLICATIONS OF THE
PROJECT 4
2 SENSOR DESCRIPTION
2.1 SMOKE SENSOR 5
2.2 TEMPERATURE SENSOR 8
2.3 WATER LEVEL DETECTION 11
2.4 FIRE DETECTION AND CONTROL LOOP 13
2.5 INTRUDER DETECTION 17
4 POWER SUPPLY
4.1 POWER SUPPLY COMPONENTS 22
4.2 CIRCUIT DIAGRAM OF POWER SUPPLY 24
5 MICROCONTROLLER
5.1 ATMEL 89C51 25
5.2 PROGRAMMING 28
6 RELAYS
6.1 INTRODUCTION 36
6.2 TYPES OF RELAYS 37
6.3 APPLICATION OF RELAYS 39
iii
7.1 OVERVIEW OF THE PROJECT 40
7.2 BLOCK DIAGRAM OF THE 42
ENTIRE PROJECT
9 APPENDIX
9.1 PROGRAM CODE FOR OPERATION 46
10 REFERENCES 56
LIST OF TABLES
LIST OF FIGURES
iv
2.6 Block diagram of Intruder Detection Loop 17
ABBREVIATIONS
SS - Smoke Sensor
FD - Fire Detector
TS - Temperature Detector
ID - Intruder detector
ADC - Analog to Digital converter.
NOMENCLATURE
v
CHAPTER 1
INTRODUCTION
The various safety parameters that are monitored in this project are:
∗ Temperature control
∗ Water level indicator
∗ Fire Detection
∗ Intruder Detection
∗ Smoke detection
The basic idea involved in this loop is to maintain the temperature of the room at
a required ambient level. Temperature is one of crucial parameter, which has to be
monitored and controlled in an industry. In this loop, continuous scanning of room
temperature is done using a suitable sensor. By switching on/off the heating element, the
room temperature can be maintained at the required level.
vi
The water level in a tank is monitored using a suitable sensor. So when the water
reaches low level, a control signal is sent to activate the motor and as soon as water
reaches the high level another control signal is sent to stop the motor.
Fire detection sensor is situated in a suitable position in the industry. As soon as there is
accidental fire the sensor detects it and sends caution signal to the control room from were a control signa
sent to actuate the fire extinguishing unit.
An optical type smoke sensor is used for smoke detection. When the smoke
enters, it scatters photons on to the photodiode to excite it into activity. The LED then
emits two further bursts of light, at 2-second intervals. If light is scattered on to the
photodiode on both these pulses due to the presence of smoke, the detector will change to
the alarm state. Then a silicon controlled rectifier on the printed circuit board is switched
on and the current drawn by the detector is increased from an average of 40µA to a
maximum of 61mA. This comprises of a sensing chamber and a printed circuit board
within a white polycarbonate housing. The sensing chamber is a black molding
configured as a labyrinth which prevents ambient light penetrating into the chamber. The
labyrinth has a fine gauge cover to prevent insects from migrating into the chamber.
Within this chamber is an optical arrangement consisting of two main parts: an infrared
light emitting diode and a photo diode. The LED is positioned at an obtuse angle to the
photo diode, which has an internal daylight filter for further protection against ambient
light.
vii
Fig. 1.1 Block diagram of the project
1.3.1 Industries
This project can also be implemented for domestic uses such as in homes and also
in hotel and catering establishments, which are susceptible to hazards of smoke and fire.
For personal usage this is a best way to prevent fire.
viii
This is implemented in a comparatively cheap manner. This is operated using a
microcontroller ATMEL 89C51 that has flash memory that can be reprogrammed.
CHAPTER 2
SENSOR DETAILS
The smoke sensor that is being used here is APPOLO series 60 optical detector
type sensor. This comprises of a sensing chamber and a printed circuit board within white
polycarbonate housing. The sensing chamber is a black molding configured as a labyrinth
which prevents ambient light penetrating into the chamber. The labyrinth has a fine gauge
cover to prevent insects from migrating into the chamber. Within this chamber is an
optical arrangement consisting of two main parts: an infrared light emitting diode and a
photo diode. The LED is positioned at an obtuse angle to the photo diode, which has an
internal daylight filter for further protection against ambient light [Ross, 2004].
The LED emits collimated light for every 10 seconds. In clean air conditions, the
photo diode will not receive light particles or photons due to the collimation of light and
the angle at which the light is traveling relative to the photodiode. When the smoke enters
the chamber, it scatters photons onto the photodiode to excite it into activity. The LED
then emits two further bursts of light at 2-second intervals. If light is scattered onto the
photodiode on both these pulses due to the presence of smoke, the detector will change to
the alarm state. A silicon controlled rectifier on the printed circuit board is switched on
and the current drawn by the detector is increased from an average of 40µA to a
maximum of 61mA.
ix
method of connection permits continuous monitoring of the supply through the detector
and the end of line device.
A remote alarm indicator may be connected between the positive supply line and
the –R terminal. The –R terminal is to protect it against accidental connection to the
negative supply and to permit the connection of more than one detector to a single remote
indicator. The current taken from the above terminal should be externally limited to
23mA. The Apollo remote indicator typically sinks 20mA. The supply range is 8V to
28V to the detector.
The control unit must be arranged to supply a maximum of 28V and a minimum
of 6V in the alarm condition for correct operation of the detector. To ensure effective
illumination of the indicator, the supply to the indicator should exceed 12V. The
electrical details of the smoke detector are tabulated in the Table 2.1 [EPA].
Average Smoke
Supply Pulse Smoke
standby alarm
voltage current alarm
current current
(V) (µA) (mA)
(µA) (mA)
28 38 110 61 54
24 37 90 52 48
17 25 60 37 33
10 1 1 18 16
second. The alarm-reset voltage is 1V. In remote output characteristics there is 9000 Ω
resistor in series with a 3V drop at 24V with 5000 Ω line impedance gives 1mA at 9V.
The principle that is being used here is photoelectric detection of light scattered in a
forward direction by smoke particles. The holding voltage is 6V and the holding current
x
is 10mA. In the chamber configuration there is a horizontal optical bench housing an
infrared emitter and sensor arranged radically to detect forward scattered light.
2.2.1 Applications
This can be applied easily as any other integrated circuit temperature sensor. It
can be glued or cemented to a surface. This is especially true for the TO-92 plastic
package, where the copper leads are the principal thermal package and carry heat to the
device so that its temperature might be closer to the air temperature rather than to the
surface temperature. These devices are sometimes soldered to a small lightweight fin, to
decrease the thermal time constant and speed up the response in a slowly moving air. The
temperature control loop is a closed one in which the temperature of a processing zone
has to be maintained at a temperature of 40°C to 70°C. A Blower is used to blow the air
into the processing zone. From the processing zone the air is passed through closed pipe
to heating zone, where it is heated by a heating coil and recycled into the processing zone
by the blower unit.
xi
2.2.2 Temperature Control Loop
The LM 35 sensor is used to sense the temperature in the processing zone. The
LM 35 gives the output from 0.1V to 1V for the temperature range of 0°C to 100°C. The
output of LM 35 is amplified 5 times using LM 324 to give reference signal to the ADC
0809. The output of ADC 0809 is latched for 0.1 seconds using 74LS373 for every 6
seconds using 555 timer. The latched output is given to the ULN 2803 driver IC to drive
the relay units.
Digital input of microcontroller is allocated to read the ADC output signal from
relay units. The potential free contacts from relay units are connected to the digital inputs
of the microcontroller. The microcontroller is programmed to convert the 8-bit digital
data to the corresponding analog signal. The analog signal is compared with the set point
and the appropriate control signal is given to the control unit from microcontroller [LM
324].
If the temperature of the processing zone is above/below the set point, the heater
is switched OFF/ON accordingly. Thus the appropriate control action takes place with the
help of LM 35 sensor.
xii
The block diagram of the temperature control loop using LM 35 is depicted in the
Fig.2.1.
2.3.1 Working
System consists of two sensors-one to indicate low level and another to indicate
high level. The signals from these sensors after proper conditioning are given as input to
microcontroller, which, after going through given logics, control the pumping unit.
A simple water level indicator & control circuit can be constructed using a
comparator and relay. Whenever the water is at the low level, lead 1 senses it and gives
an output pulse, which makes the motor ON and fills the tank. As the water level rises
and reaches the high level, lead 2 senses it and switches the motor OFF .The output pulse
is given to the motor through the relay section. This can also be implemented using a
LDR circuit.
xiii
Whenever the photoconductive cell has the appropriate light incident upon it, its
resistance is low and the current through the relay is consequently high to operate the
relay. When the light is interrupted or shut-off partially or completely, the resistance of
the photocell increases thereby reducing the current through the relay. The current may
drop down to a level where it will not be able to operate the relay there by de-energizing
the relay [Northcutt, 2001].
The water level in a tank is monitored using a suitable sensor. So when the water
reaches low level, a control signal is sent to activate the motor and as soon as water
reaches the high level another control signal is sent to stop the motor.
The block diagram of water level detection loop is shown in the Fig.2.2.
xiv
2.3.3 Circuit diagram of water level detection loop
The circuit diagram of water level detection loop, which is implemented using a
comparator and a relay, is shown in the Fig. 2.3.
In this system, the fire is sensed by means of a suitable detector, which contains
board within white polycarbonate housing. One thermistor is exposed and is therefore in
good thermal contact with the surrounding air and responds quickly to changes in air
temperature. The other thermistor is insulated from the surrounding air and responds
Under stable conditions, both the thermistors are in thermal equilibrium with the
surrounding air and will have the same resistance value If the air temperature increases
rapidly then a temperature difference develops between the thermistors and the resistance
xv
of the exposed thermistors becomes less than that of the insulated thermistor. The ratio of
the resistances of the thermistors is monitored electronically and a fire alarm is initiated if
the ratio exceeds the limit. The detector is designed to be connected to a two wire
2.4.1 Thermistor
2.4.1.1 Construction
nickel, cobalt, copper, iron and uranium. They are available in variety of sizes and
2.4.1.2 Working
xvi
A thermistor produces a large change of resistance with a small change in the
temperature being measured. This large sensitivity of thermistor provides good accuracy
and resolution. A typical industrial-type thermistor with a 2000 Ώ resistance at 25˚C and
The block diagram of fire detection loop is shown in the Fig. 2.5.
xvii
Fig. 2.5 Block diagram of Fire Detection Loop
Infrared transmission is placed on one side and the transmitter is placed on other
side. When there is an intrusion, the path of propagation is disturbed and a signal is sent
to the microcontroller, which in turn raises an alarm based upon the logic given to it.
xviii
Fig. 2.6 Block diagram of Intruder Detection Loop
xix
2.5.4 Circuit diagram of IR receiver
CHAPTER 3
SIGNAL CONDITIONING CIRCUIT
down-counter controls the DAC and the clock pulses are directed to pertinent counter
xx
input depending on whether the D/A output must increase or decrease to reach the analog
input voltage.
The obvious advantage of the A/D converter is that it can continuously follow the
input signal and give updated digital output data if the signal does not change too rapidly.
Also, for small input changes, the conversion can be quite fast. The converter can be
operated in either the track or hold modes by a digital input control.
The block diagram of a successive approximation register (SAR) is shown. It
consists of a DAC, as comparator, and a successive approximation register. One terminal
is required for analog input voltage. The digital output is available in either serial or
parallel form. A minimum of three-control terminal is required. Start of conversion
(SOC) initiates an A/D conversion and End of conversion (EOC) tells when the
conversion is completed. An external clock terminal sets the time to complete each
conversion.
3.2 BLOCK DIAGRAM OF ADC CIRCUIT
The block diagram of the ADC circuit is shown in the Fig. 3.1.
xxi
Fig. 3.1 Block diagram of ADC Circuit
CHAPTER 4
POWER SUPPLY
Most electronic circuits need a source of D.C. power. For our device a simple
power supply is sufficient where the input voltage is converted to D.C. through full wave
rectification.
xxii
∗ Bridge rectifier
∗ Voltage regulators
∗ Filter circuit
4.1.1 Transformer
When A.C. is applied to the primary winding of the power transformer it can
either be stepped down or up depending on the value of the D.C. needed. In our circuit
the transformer performs the step-down operation where the 230V A.C. appears as 12V
A.C. across the secondary winding (practically as 15V A.C.). One alteration of the input
voltage will cause the top of the transformer to be positive and the bottom negative. The
next alteration will cause the polarity reverse. The current rating of the transformer used
in this project is 1A.
A commonly used circuit for supplying large amounts of DC power is the bridge
rectifier. In this rectifier configuration, we have used four diodes. Two diodes will
conduct during the negative alternation and two will conduct during positive alternation.
The bridge transformer is used in the half wave rectifier. The DC output voltage
appearing across the output of the bridge circuit will be somewhat less than 90% of the
applied R.M.S. value. A boosting capacitor is provided for boosting the DC voltage.
xxiii
ICs are always followed by filter circuit which is usually a capacitor acting as a
surge arrester. This capacitor, also called as a DC coupling capacitor or bypassing
capacitor, is used to short the ripple with frequency of 120 Hz to ground but leave the DC
frequency to appear at the output. The load resistor R is connected so that a reference to
the ground is maintained. The load resistor should be 1% to 2.5% of the load.
The circuit diagram of power supply circuitry is shown in the Fig. 4.1.
CHAPTER 5
MICROCONTROLLER
xxiv
5.1 ATMEL 89C51
5.1.1.1 VCC
Supply voltage to the microcontroller is 5V.
5.1.1.2 GND
Supply voltage to the microcontroller is 0V.
5.1.1.3 Port 0
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin
can sink eight TTL inputs. When 1s are written to Port 0 pins, the pins can be used as
xxv
high impedance inputs. Port 0 may also be configured to be the multiplexed low order
address/data bus during accesses to external program and data memory. In this mode Port
0 has internal pull-ups. Port 0 also receives the code bytes during flash programming, and
outputs the code bytes during program verification. External pull-ups are required during
program verification.
5.1.1.4 Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output
buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that
are externally being pulled low will source current (IIL) because of the internal pull-ups.
Port 1 also receives the low-order address bytes during Flash programming and
verification.
5.1.1.5 Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output
buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, port 2 pins that
are externally being pulled low will source current (IIL) because of the internal pull-ups.
Port 2 emits the high-order address byte during fetches from external program memory
and during accesses to external data memory that uses 16-bit addresses (MOVX
@DPTR). In this application, it uses strong internal pull-ups when emitting 1s. During
accesses to external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits
the contents of the Port 2 Special Function Register. Port 2 also receives the high-order
address bits and some control signals during Flash programming and verification.
5.1.1.6 Port 3
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. Port 3 output
buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that
xxvi
are externally being pulled low will source current (IIL) because of the pull-ups. Port 3
also receives some control signals for Flash programming and verification.
5.1.1.7 RST
This is Reset input (RST). A high on this pin for two machine cycles while the
oscillator is running resets the device.
5.1.1.8 ALE/PROG
Address Latch Enable (ALE) output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG)
during flash programming. In normal operation ALE is emitted at a constant rate of 1/6
the oscillator frequency, and may be used for external timing or clocking purposes.
5.2 PROGRAMMING
The AT89C51 is normally with the on-chip flash memory array in the erased state
(that is, contents = FFH) and ready to be programmed. The programming interface
accepts either a high-voltage (12V) or a low-voltage (VCC) program enable signal. The
low-voltage programming mode provides a convenient way to program the ATMEL
89C51 inside the user’s system, while the high-voltage programming mode is compatible
with conventional third party Flash or EPROM programmers. The AT89C51 is made
with either the high-voltage or low-voltage programming mode enabled. The AT89C51
code memory array is programmed byte by byte in either programming mode. To
program any nonblank byte in the on-chip Flash Memory, the entire memory must be
erased using the Chip Erase Mode.
xxvii
The AT89C51 features data polling to indicate the end of a write cycle. During a
write cycle, an attempted read of the last byte written will result in the complement of the
written datum on Port 0.7. Once the write cycle has been completed, true data are valid
on all outputs, and the next cycle may begin. Data polling may begin any time after a
write cycle has been initiated.
5.2.1.2 Ready/Busy
The progress of byte programming can also be monitored by the RDY/BSY output signal. Port 3.4
pulled low after ALE goes high during programming to indicate BUSY. Port 3.4 is pulled high again wh
programming is done to indicate READY.
If lock bits LB1 and LB2 have not been programmed, the programmed code data
can be read back via the address and data lines for verification. The lock bits cannot be
verified directly. Verification of the lock bits is achieved by observing that their features
are enabled.
The entire flash array is erased electrically by using the proper combination of
control signals and by holding ALE/PROG low for 10 ms. The code array is written with
all “1”s. The chip erase operation must be executed before the code memory can be re-
programmed.
The signature bytes are read by the same procedure as a normal verification of
locations 030H, 031H, and 032H, except that P3.6 and P3.7 must be pulled to logic low.
The values returned are as follows.
(030H) = 1EH indicates manufactured by Atmel
(031H) = 51H indicates 89C51
xxviii
(032H) = FFH indicates 12V programming
(032H) = 05H indicates 5V programming
Every code byte in the Flash array can be written and using the appropriate combination of cont
signals can erase the entire array. The write operation cycle is self timed and once initiated, w
automatically time itself to completion. All major programming vendors offer worldwide support for
ATMEL microcontroller series.
xxix
5.2.4.1 Port Used for Input
During programming, the controller must be isolated from signals sourced by the
application circuitry. A buffer with three state outputs might be inserted between the
application circuitry and the controller, with the buffer outputs three stated when
programming is enabled. Alternately, a multiplex might be used to select between signal
sources, with signals applied to the controller by either the application circuitry or the
programmer circuitry.
No circuit changes are required if the application circuitry can tolerate the state
changes which occur at the port during programming. If the prior state of the application
circuitry must be maintained during programming, a latch might be inserted between the
controller and the application circuitry. The latch is enabled during programming,
preserving the state of the application circuitry. Programming requires programmer
access to all of the four AT89C51 I/O ports. The programmer generates the addresses,
data and control signals necessary to program the AT89C51 embedded in the application.
The programmer circuitry consists of an AT89C51 and an RS-232 level translator. The
controller runs at 11.0592 MHz, which allows the serial port to operate at a number of
standard baud rates. A Maxim MAX232 line driver/receiver produces RS-232 levels at
the serial interface while requiring only a 5V supply. Many of the signals generated by
the programmer are connected directly, without buffering, to the AT89C51 in the
application. These signals, when inactive, are pulled high. The AT89C51 has internal
pull-ups of approximately 3 Ω on ports one, two and three. Because port zero does not
have internal pull-ups, external pull-ups of 10 Ω have been added to permit proper
operation of program verification mode. The sample application operates correctly in this
environment. If required for compatibility with an application, programmer signals may
be buffered with three-state buffers. The AT89C51 in the programmer does not utilize
external program or data memory, which would require sacrificing needed I/O pins. This
requires that program code and I/O buffers be kept small enough to fit in on-chip
memory.
xxx
The pin diagram of the microcontroller ATMEL 89C51 is shown in the Fig. 5.1.
xxxi
5.2 Control blocks of Microcontroller
The timer operations of the microcontroller are tabulated in tables 5.1, 5.2 and 5.3
respectively.
xxxii
CHAPTER 6
RELAYS
6.1 INTRODUCTION
A relay is used to isolate one electrical circuit from another. It allows a low
current control circuit to make or break an electrically isolated high current circuit path.
The average remote lead can only handle about one half of an amp of current. If a circuit
with a large amount of current must be controlled by the remote output lead of a head
unit, a relay could be used to buffer the remote output from the head unit. The basic relay
consists of a coil and a set of contacts. The most common relay coil is a length of magnet
wire wrapped around a metal core.
xxxiii
This is a Single Pole Single Throw relay. Current will only flow through the
contacts when the relay coil is energized. The diagram of SPST relay is shown in the Fig
6.2.
This is a Single Pole Double Throw relay. Current will flow between the movable
contact and one fixed contact when the coil is de-energized and between the movable
contact and the alternate fixed contact when the relay coil is energized. The diagram of
SPDT relay is shown in the Fig.6.3.
This is a Double Pole Single Throw relay. When the relay coil is energized, two
separate and electrically isolated sets of contacts are pulled down to make contact with
their stationary counterparts. There is no complete circuit path when the relay is de-
energized. The diagram of DPST relay is shown in the Fig. 6.4.
xxxiv
Fig. 6.4 DPST Relay
6.2.4 DPDT Relay
This relay is a Double Pole Double Throw relay. It operates like the SPDT relay
but has twice as many contacts. There are two completely isolated sets of contacts. The
diagram of DPDT relay is shown in the Fig 6.5.
A relay is used to isolate one electrical circuit from another. It allows a low
current control circuit to make or break an electrically isolated high current circuit path.
The average remote lead can only handle about one half of an amp of current. If a circuit
with a large amount of current must be controlled by the remote output lead of a head
unit, a relay could be used to buffer the remote output from the head unit.
xxxv
CHAPTER 7
1) Temperature
2) Smoke
3) Fire
4) Intruder and
5) Level
xxxvi
7.2 BLOCK DIAGRAM OF THE ENTIRE PROJECT
xxxvii
CHAPTER 8
The speed of the execution is 564 ms. If a particular sensor is enabled, the LCD
screen will output a * symbol before the sensor name. User can also set the alert
temperature, enable/disable voice or buzzer alarm, and even specify the ring tone and
frequency of the buzzer alarm and the time before voice alarm goes off. The button de-
bounce scheme also works fine so users can navigate through the menu and use the
keypad perfectly.
8.1.2 Accuracy
After the user enables the security system, the green status LED will be lit to
indicate the system status. User can now enter proper password to unlock the system. If
any sensor goes wrong, the LCD will output ERROR and with proper initial for the
sensor (T for temperature, M for motion, S for smoke, D for door or window magnetic
switch). The red led light will flash at 4 Hz to indicate such an event. If the buzz alarm is
enabled, it will sound the tone that user choose. If the voice alarm is enabled, it will wait
for few seconds (user specified), if the system is still not locked, then it will start playing
voice to indicate which sensor had gone wrong. (For example, “Temperature Error,
please check and unlock the security system.”). If another sensor goes wrong after that,
the system will also act accordingly and indicate that in the voice alert in addition to the
LCD screen. (“Temperature Motion Error, please check and unlock the security
system.”).
8.1.3 Safety
xxxviii
There are two kinds of smoke detectors, ionization chamber and photoelectric
smoke detectors. Our detector is optical type. So there is no concern for any radiation
coming from our detector.
8.1.4 Usability
Our home security system is very practical. It can be used not only in the home
environment but also in a business environment too. It can monitor the surrounding to not
only protect our properties but also our lives. Besides, it can be highly customized to suit
one's need and preference. So our security system is very useful for us as well as other
people. We believe every house in the world should equip a security system like the one
we have designed.
The result of our design has met our expectation, in which every sensor is
working and will sound specific alarm when the system goes into alert status. The keypad
and LCD also offer great interface and users can be familiar with our system in less than
few seconds. If we have chance to design this project again, we will add a phone dialer
chip like the Zarlink MT8880C we had mentioned before. By doing so, we can make sure
that if no one is at home or if no one is around the area, someone else can be notified to
take immediate action. In addition, we feel like our PORT B is a little bit wasted.
Besides, we will like to have another small microcontroller at a higher frequency, so we
can output our buzz alarm at a higher frequency tone.
8.3 CONCLUSION
This project is done mainly considering safety and security of the equipments and
the industry. The heart of this project is a microcontroller, which does all the activities
like monitoring, displaying and controlling the given parameters. In this project we have
monitored and controlled the five critical parameters like intruder, water level,
temperature, smoke and fire. This project can also monitor and control more than five
parameters by adding more number of interfacing circuits and control units. This project
can be used for domestic purpose as well as industrial usage. The main advantage of this
project is simple and easy method of controlling and it requires very low voltage for its
xxxix
operation and also faster in controlling the input parameters. So with this project can safe
guard the equipments and prevent heavy loses. Also, it guards the work place and
improves the safety and security of the industry.
CHAPTER 9
APPENDIX
#include "reg52.h"
#include "stdio.h"
#include "string.h"
data unsigned char temp;
data unsigned char val;
char line1[16];
char line2[16];
sbit RS = P3^2;
sbit RW = P3^3;
sbit EN = P3^4;
sbit BF = P1^7;
sbit ADCSC = P3^5;
// inputs
xl
// outputs
void dely(void)
{
int j;
for(j=0;j<5000;j++);
}
void delay(void)
{
int j;
for(j=0;j<10000;j++);
}
void lcdready(void)
{
EN=0;
P1=0xff;
RS=0;
RW=1;
while(BF==1)
{
EN=0;
EN=1;
}
EN=0;
}
xli
{
lcdready();
P1=lcddata;
RS=0;
RW=0;
EN=1;
EN=0;
xlii
command(value);
value=0x80;
command(value);
for(i=0;i<len1;i++)
{
value=buff1[i];
display(value);
if(x==1)
delay();
}
value=0xc0;
command(value);
for(i=0;i<len2;i++)
{
value=buff2[i];
display(value);
if(x==1)
delay();
}
}
void main()
{
int sp=40;
int ap=32;
pump = 0;
blower = 0;
heating = 0;
alarm = 0;
flash = 0;
xliii
delay();
lcddisplay(" INDUSTRIAL"," SAFETY SYSTEM",1);
delay();
lcddisplay("This Project ","is Done by ",1);
delay();
lcddisplay(" C.SUBRAMANI ","R.RAGHAVENDRAN ",1);
delay();
lcddisplay(" AND "," K.MURUGAN ",1);
for(;;)
{
P2 = 0xff;
ADCSC=0;
dely();
ADCSC=1;
temp=P2;
ap=(int)temp;
sprintf(line1,"Zone Temp:%d'C",ap = (int)(ap/5)*3);
sprintf(line2,"Set Point:%d'C ", sp );
delay();
lcddisplay(line1,line2,0);
delay();
if(sp < ap)
{
heating = 0;
}
if((sp-5)> ap)
{
blower = 1;
}
if((sp - 10) > ap)
{
heating = 1;
}
inc = 1;
xliv
if(inc == 0)
{
sp++;
if(sp >= 60)
sp = 30;
inc = 1;
while (inc==0);
dec = 1;
if(dec == 0)
{
sp--;
if(sp < 30)
sp = 60;
dec = 1;
while (dec==0);
}
low = 1;
high = 1;
if(low == 1 && high == 1)
{
pump = 1;
lcddisplay("Level","Low",1);
}
xlv
intr = 1;
dely();
if(intr ==1)
{
alarm = 1;
lcddisplay("INTRUDER","ALARM ENABLE",1);
while(inc==1)
{
inc =1;
}
alarm = 0;
lcddisplay("INTRUDER","ALARM DISABLE",1);
}
heat = 1;
dely();
if(heat == 0)
{
flash = 1;
lcddisplay("FIRE ALARM ","ENABLE",1);
inc = 1;
while(inc == 1)
{
inc=1; }
flash = 0;
lcddisplay("FIRE ALARM ","DISABLE",1);
}
smoke = 1;
dely();
if(smoke == 0)
{
flash = 1;
xlvi
lcddisplay("SMOKE ALARM ","ENABLE",1);
inc = 1;
while(inc == 1)
{
inc=1;
}
flash = 0;
lcddisplay("SMOKE ALARM ","DISABLE",1);
}
}
}
This program was initially done in C and loaded into the microcontroller using
Keil compiler.
xlvii
CHAPTER 10
REFERENCES
2. LM34 specification
http://instruct1.cit.cornell.edu/courses/ee476/labs/s2004/LM34. pdf
3. Northcutt and Novak, (2001) “Network Intrusion and Detection –An Analysts
Handbook”, 2nd Edition, New Riders.
xlviii