1 INTRODUCTION The alarm annunciator systems are used to give alarms for some dangerous conditions e.g. fire, gas leakage, temperature rise, water over-flow etc. In most of the industries now-a-days safety is matter of concern. So, at various parts of the factory special sensors are used to monitor various physical quantities and provide an alarm in case of any dangerous situation in order to report to the main control room. Block Diagram: The basic the functioning of the Alarm Annunciator System can be well understood from the following functional block diagram, Input Processor Output The function of each of these components is as given below: 1. Sensors: These are the inputs to the micro-controller unit. The sensor used in various industries includes the temperature sensor, fire detector, water level detector, pressure sensor, smoke detector etc, depending upon the type of industry. These basically consist of the transducer circuits that essentially convert the physical quantities into the corresponding electrical signals to be given to the electrical circuits so a specific voltage is developed across the element according Sensors Micro- controller Display & Alarm
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
INTRODUCTION
The alarm annunciator systems are used to give alarms for some dangerous
conditions e.g. fire, gas leakage, temperature rise, water over-flow etc. In most of
the industries now-a-days safety is matter of concern. So, at various parts of the
factory special sensors are used to monitor various physical quantities and provide
an alarm in case of any dangerous situation in order to report to the main control
room.
Block Diagram:
The basic the functioning of the Alarm Annunciator System can be well understood
from the following functional block diagram,
Input Processor Output
The function of each of these components is as given below:
1. Sensors:
These are the inputs to the micro-controller unit. The sensor used in various
industries includes the temperature sensor, fire detector, water level detector,
pressure sensor, smoke detector etc, depending upon the type of industry.
These basically consist of the transducer circuits that essentially convert the
physical quantities into the corresponding electrical signals to be given to the
electrical circuits so a specific voltage is developed across the element according
Sensors
Micro-controller
Display &
Alarm
2
to the magnitude of the physical quantity.
The sensors are generally located at remote location from the main control room. A
separate power supply is used for these sensors in order to provide an electrical
isolation between the main circuit and the sensor circuit.
2. Processor:
The processor can be a micro-processor or a micro-controller, to process the data
given by the sensors. The technique of processing the data depends upon the user
who then suitably programs this micro-controller unit.
The user has to define the different alarm conditions to observe by programming
the micro-controller using assembly language program or by programming in
higher level languages like C, C++ etc. The processor thus provides an output
under occurrence of any fault to the display and alarm unit.
3. Display & Alarm:
The display and alarm unit ultimately finishes the role of the alarm annunciator by
displaying the fault visually through LEDs (Light Emitting Diode), LCD (Liquid
Crystal Display) etc and also audibly with the help of buzzers, horn, siren etc.
This permits the operator on the control room to inform a person installed at the
location where the fault has occurred. This person can immediately look into the
fault and rectify the same before occurrence of any dangerous situation. This
removes the need of the person at each location to carefully observe for any faults
occurring at any location of the industry.
3
4 CHANNEL ALARM ANNUNCIATOR SYSTEM
The four channel alarm annunciator system can give alarm for different four fault
conditions. The front panel consists of a four windows, of four LEDs (Light Emitting
Diode) each corresponding to each channel and one LCD display. Even a buzzer
is included to provide the alarm. There are also three pushbuttons namely,
• ACCEPT,
• RESET, and
• TEST.
When there is no fault at any channel of the alarm annunciator, all the LED
windows and the buzzer are off with no faults displayed in the LCD display.
Occurrence of Fault
Now, suppose a fault occurs at, say, channel three, then the window three starts
blinking i.e. the four LEDs of the channel three starts blinking with buzzer is turned
ON and the LCD displays channel 3 indicating the occurrence of fault.
When the operators detect such an alarm, he can ask the respective person to
look after the problem so as to undertake the required action.
Function of Pushbuttons:
The three pushbuttons used on the front panel of the annunciator used by the
operator having the following functions,
4
• ACCEPT
The continuously ringing buzzer irritates, so the operator can press ACCEPT
button to tell the annunciator that he has detected the fault condition. Now Buzzer
is turned off and window is kept continuously on to indicate that it is accepted fault
i.e. the fault has not been solved as yet.
Now if fault is generated in say channel one, then again the buzzer starts ringing
with window one starts blinking and window three continuously on.
• RESET
When all faults are removed the operator can check it by pressing RESET button
to reset the annunciator, if all faults are removed then all windows and buzzer will
be off. But if still there is fault in some channel the buzzer starts ringing with
corresponding window starts blinking.
• TEST
The TEST button is given for testing. When it is pressed all windows starts blinking
and buzzer starts ringing until button is released. Thus operator can check whether
all LEDs and buzzer are working or not. So an occasional testing of the equipment
can also be very easily carried out by the operator.
Role of LCD Display:
The use of LCD display permits an easy understanding of faults. The display is
meant to show at which channel number (1, 2, 3 or 4) the fault has occurred and
the channel number whose fault has been accepted. When there are no faults the
display shows,
5
FAULT AT CHANNEL NO. NONE ACCEPTED CHANNEL NO. NONE
Now, suppose a fault has occurred at say channel three then it shows,
FAULT AT CHANNEL NO. 3 ACCEPTED CHANNEL NO. NONE
And when this fault has been accepted by the operator i.e. pressing of ACCEPT button the respective fault gets accepted and accordingly the LCD display changes
to, FAULT AT CHANNEL NO. 3 ACCEPTED CHANNEL NO. 3
Hence, after rectification of the problem the display shows none for both.
FAULT AT CHANNEL NO. NONE ACCEPTED CHANNEL NO. NONE
Additional computer support can also be provided to the project. The system is
connected to personal computer using the data communication through the serial
port. The computer software is written in Microsoft Visual Basic. It provides the
status of each channel on the screen and also keeps record of various faults
occurred in the form of database. This information is stored in file as history and
can be used while planning security measures etc.
6
PROGRAMMING The project of the micro-controller is done with the help of Assembly language
program. There are basically two programs, namely one as the master program
for the micro-controller to fulfill the basic functions of the annunciator and the
second for the working of the LCD Display.
MASTER PROGRAM BAUD9600 EQU 0FDH
HEADER EQU "H"
FOOTER EQU "F"
STX EQU "$"
ETX EQU "#"
RXSTFLG EQU 029H
STACK EQU 030H
PCON EQU 087H
RXMEM EQU 080H
TXMEM EQU 090H
DATAMEM EQU 0B0H
ORG 0000H
START: LJMP MAIN
ORG 0003H ; EXTERNAL INTERRUPT 0
; LJMP GETCMD
RETI
ORG 000BH ; TIMER0 INTERRUPT
RETI
ORG 0013H ; EXTERNAL INTERRUPT 1
7
RETI
ORG 001BH ; TIMER1 INTERRUPT
RETI
ORG 0023H ; SERIAL PORT INTERRUPTS
LJMP RXDATA
RETI
ORG 002BH ; TIMER2 INTERRUPT
; LJMP INTRT2
RETI
ORG 0040H
MAIN: MOV SP, #STACK ; INITIALISE STACK
MOV P1, #0FFH ; SET ALL 3 PORTS AS I/O PORTS
MOV P2, #0FFH
MOV P3, #0FFH
NOP
NOP
MOV RXSTFLG, #HEADER; SET RECIEVE STATUS FLAG = HEADER
LCALL FILL1
SETB P3.3
LCALL INIT96 ; INITIALISE SERIAL PORT WITH 9600
BAUDRATE
SETB IE.4 ; ENABLE SERIAL PORT INTERRUPT
SETB EA ; ENABLE COMMON INTERRUPT CONTROL BIT
AGAIN:; LCALL GET1
LCALL GET2
LJMP AGAIN
8
FILL1: MOV B, #004H
MOV R0, #DATAMEM
MOV A, #041H
FILLN: MOV @R0, A
INC R0
INC A
DJNZ B, FILLN
RET
INIT96: MOV PSW, #00H
MOV TCON, #00H ; STOP TIMER1/0
MOV PCON, #00H ; SMOD=0 FOR BAUDRATE CALCULATION OF
DATASHEETS The datasheets for the various components used in the project is as shown
below,
8-Bit Microcontroller with 8K Bytes Flash
AT89C52
Features
• Compatible with MCS-51™ Products
• 8K Bytes of In-System Reprogrammable Flash Memory
• Endurance: 1,000 Write/Erase Cycles
• Fully Static Operation: 0 Hz to 24 MHz
• Three-Level Program Memory Lock
• 256 x 8-Bit Internal RAM
• 32 Programmable I/O Lines
• Three 16-Bit Timer/Counters
• Eight Interrupt Sources
• Programmable Serial Channel
• Low Power Idle and Power Down Modes
In addition it provides the following standard features: 8K bytes of Flash, 256
bytes of RAM, 32 I/O lines, three 16-bit timer/counters, six-vector two-level
interrupt architecture, a full duplex serial port, on-chip oscillator, and clock
circuitry.
35
Description
The AT89C52 is a low-power, high-performance CMOS 8-bit microcomputer
with 8K bytes of Flash programmable and erasable read only memory
(PEROM). The device is manufactured using Atmel’s high density nonvolatile
memory technology and is compatible with the industry standard 80C51 and
80C52 instruction set and pin out.
The on-chip Flash allows the program memory to be reprogrammed in-
system or by a conventional nonvolatile memory programmer. By combining a
versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C52 is a
powerful microcomputer which provides a highly flexible and cost effective
solution to many embedded control applications.
Pin Configurations
In addition, the AT89C52 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle
Mode stops the CPU while allowing the RAM, timer/counters, serial port, and
interrupt system to continue functioning.
36
The Power Down Mode saves the RAM contents but freezes the oscillator, disabling
all other chip functions until the next hardware reset.
Block Diagram The block diagram for AT89C52 is as given below,
Pin Description
• VCC Supply voltage.
37
• GND Ground.
• Port 0 Port 0 is an 8-bit open drain bidirectional 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
high-impedance inputs.
Port 0 can also be configured to be the multiplexed low-order address/data bus
during accesses to external pro-gram and data memory. In this mode, P0 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.
• Port 1 Port 1 is an 8-bit bidirectional 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.
In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external
count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX),
respectively, as shown in the following table.
Port 1 also receives the low-order address bytes during Flash programming and
verification.
38
Port Pin Alternate Functions
P1.0 T2 (external count input to Timer/Counter 2), clock-out
P1.1 T2EX (Timer/Counter 2 capture/reload trigger and direction control)
• Port 2 Port 2 is an 8-bit bidirectional 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, Port 2 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 P2 Special Function Register.
Port 2 also receives the high-order address bits and some control signals during
Flash programming and verification.
• Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The 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 are externally being pulled low will source current (IIL) because of the
pull-ups.
Port 3 also serves the functions of various special features of the AT89C51, as
shown in the following table. Port 3 also receives some control signals for Flash
programming and verification.
39
Port Pin Alternate Functions
P3.0 RXD (serial input port)
P3.1 TXD (serial output port)
P3.2 INT0 (external interrupt 0)
P3.3 INT1 (external interrupt 1)
P3.4 T0 (timer 0 external input)
P3.5 T1 (timer 1 external input)
P3.6 WR (external data memory write strobe)
P3.7 RD (external data memory read strobe)
• RST Reset input. A high on this pin for two machine cycles while the oscillator is running
resets the device.
• ALE/PROG Address Latch Enable is an 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. Note,
however, that one ALE pulse is skipped during each access to external
data memory.
If desired, ALE operation can be disabled by setting bit 0 of SFR location
8EH. With the bit set, ALE is active only during a MOVX or MOVC
instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-
disable bit has no effect if the microcontroller is in external execution mode.
40
• PSEN Program Store Enable is the read strobe to external program memory.
When the AT89C52 is executing code from external pro-gram memory,
PSEN is activated twice each machine cycle, except that two PSEN
activations are skipped during each access to external data memory.
• EA/VPP External Access Enable. EA must be strapped to GND in order to enable
the device to fetch code from external pro-gram memory locations starting
at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA
will be internally latched on reset.
EA should be strapped to VCC for internal program executions. This pin
also receives the 12-volt programming enable volt-age (VPP) during Flash
programming when 12-volt programming is selected.
• XTAL1 Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.
• XTAL2 Output from the inverting oscillator amplifier.
Special Function Registers A map of the on-chip memory area called the Special Function Register (SFR).
Note that not all of the addresses are occupied, and unoccupied addresses may
not be implemented on the chip. Read accesses to these addresses will in general
return random data, and write accesses will have an indeterminate effect.
• Timer 2 Registers Control and status bits are contained in registers T2CON and T2MOD for Timer 2.
41
The register pair (RCAP2H,RCAP2L) are the Capture/Reload registers for Timer 2
in16-bit capture mode or 16-bit auto-reload mode.
• Interrupt Registers: The individual interrupt enable bits are in the IE register. Two priorities can be set
for each of the six interrupt sources in the IP register.
• Data Memory The AT89C52 implements 256 bytes of on-chip RAM. The upper 128 bytes occupy
a parallel address space to the Special Function Registers. That means the upper
128 bytes have the same addresses as the SFR space but are physically separate
from SFR space.
When an instruction accesses an internal location above address 7FH, the address
mode used in the instruction specifies whether the CPU accesses the upper 128
bytes of RAM or the SFR space. Instructions that use direct addressing access
SFR space.
For example, the following direct addressing instruction accesses the SFR at
location 0A0H (which is P2).
MOV 0A0H, #data
Instructions that use indirect addressing access the upper 128 bytes of RAM. For
example, the following indirect addressing instruction, where R0 contains 0A0H,
accesses the data byte at address 0A0H, rather than P2 (whose address is 0A0H).
MOV @R0, #data
Note that stack operations are examples of indirect addressing, so the upper 128
bytes of data RAM are avail-able as stack space.
42
• Timer 0 and 1 Timer 0 and Timer 1 in the AT89C52 operate the same way as Timer 0 and Timer
1 in the AT89C51.
• Timer 2 Timer 2 is a 16-bit Timer/Counter that can operate as either a timer or an event
counter. The type of operation is selected by bit C/T2 in the SFR T2CON.
Timer 2 has three operating modes: capture, auto-reload (up or down counting),
and baud rate generator. The modes are selected by bits in T2CON. Timer 2
consists of two 8-bit registers, TH2 and TL2. In the Timer function, the TL2 register
is incremented every machine cycle. Since a machine cycle consists of 12
oscillator periods, the count rate is 1/12 of the oscillator frequency.
• Oscillator Characteristics
C1, C2 = 30 pF ± 10 pF for Crystals = 40 pF ± 10 pF for Ceramic Resonators
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier
that can be configured for use as an on-chip oscillator. Either a quartz crystal or
ceramic resonator may be used.
To drive the device from an external clock source, XTAL2 should be left
unconnected while XTAL1 is driven.
43
There are no requirements on the duty cycle of the external clock signal, since the
input to the internal clocking circuitry is from a divide-by-two flip-flop, but minimum
and maximum voltage high and low time specifications must be observed.
Absolute Maximum Ratings
44
TSOP17
PHOTO MODULES FOR PCM REMOTE CONTROL SYSTEMS
Available types for different carrier frequencies
Type fo
TSOP1730 30 kHz
TSOP1733 33 kHz
TSOP1736 36 kHz
TSOP1737 36.7 kHz
TSOP1738 38 kHz
TSOP1740 40 kHz
TSOP1756 56 kHz
Description
The TSOP17... – series are miniaturized receivers for infrared remote control
systems.
45
PIN diode and preamplifier are assembled on lead frame, the epoxy package is
designed as IR filter. The demodulated output signal can directly be decoded by
a microprocessor. TSOP17... is the standard IR remote control receiver series,
supporting all major transmission codes.
Features
• Photo detector and preamplifier in one package
• Internal filter for PCM frequency
• Improved shielding against electrical field disturbance
• TTL and CMOS compatibility
• Output active low
• Low power consumption
• High immunity against ambient light
• Continuous data transmission possible (up to 2400 bps)
Block Diagram
46
Absolute Maximum Ratings Tamb = 25°C
Parameter Test Conditions Symbol Value Unit
Supply Voltage (Pin 2) VS –0.3...6.0 V Supply Current (Pin 2) IS 5 mA Output Voltage (Pin 3) VO –0.3...6.0 V Output Current (Pin 3) IO 5 mA Junction Temperature Tj 100 _C Storage Temperature Range Tstg –25...+85 _C Operating Temperature Range Tamb –25...+85 _C Power Consumption (Tamb _ 85 _C) Ptot 50 mW Soldering Temperature t _ 10 s, 1 mm from case Tsd 260 _C
Basic Characteristics Tamb = 25°C
Parameter Test Conditions Symbol Min Typ Max Unit
VS = 5 V, Ev = 0 ISD 0.4 0.6 1.5 mA Supply Current (Pin 2) VS = 5 V, Ev = 40 klx, sunlight ISH 1.0 mA