How to use AT89S51 microcontroller to realize the design of home voice alarm system

Publisher:Serendipitous33Latest update time:2023-05-23 Source: elecfansKeywords:AT89S51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

The modern living pattern makes the safety of family life particularly important. Currently, security prevention and alarm systems are important guarantees for ensuring the safety of homes and residents. The best way to prevent theft is to issue a voice warning when criminals attempt to invade, increasing their psychological pressure and causing them to leave voluntarily. This system is based on this idea, using Atmel's AT89S51 microcontroller as the control core and the American ISD's ISD1420 as the voice chip. It is a new type of home voice alarm system.


System working principle

The working principle block diagram of this system is shown in Figure 1. Criminals will cause changes in infrared radiation when they move within the protected area. When the infrared rays it radiates are focused on the detection element of the pyroelectric infrared sensor PIS-209S through the Fresnel lens, the pyroelectric infrared sensor will output a voltage signal, which will then be amplified by the signal amplifier circuit and sent to the signal acquisition and The processing circuit outputs a high level to the microcontroller after processing.

How to use AT89S51 microcontroller to realize the design of home voice alarm system

Since criminals generally stay outside the door for a relatively long time, users can set the optimal alarm response time through the keyboard based on the flow of people near their home to distinguish them. After the setting is completed, the microcontroller will identify the digital signal that has passed through the signal acquisition and processing circuit based on the alarm response time, and determine whether to activate the alarm. If the alarm is activated, the criminals will be given a voice warning by controlling the voice chip that already has the alarm content, and then the voice alarm content will be played repeatedly several times to alert the owner or people around, and then the scene will be recorded to record the alarm time. At the same time, you can query the alarm time through the corresponding keys on the keyboard, and the alarm time will be displayed on the LCD screen.


Introduction to each part of the system block diagram

Pyroelectric infrared sensing device

The human body has a constant body temperature of about 37°C, so it emits infrared rays with a wavelength of about 10 μm. The pyroelectric infrared sensor PIS-209S works by detecting infrared rays of about 10 μm emitted by the human body. Pyroelectric infrared sensor is a new type of sensitive element. The high-heat material used to make the pyroelectric infrared sensor is a broad-spectrum material, and its detection wavelength range is 0.2~20μm. In order to have a higher sensitivity to infrared radiation in a certain wavelength range, the sensor is equipped with a An interference filter. This filter allows only certain wavelength ranges of infrared light to pass through, while blocking light, sunlight and other infrared light from passing through. In actual use, a Fresnel lens must be installed in front of the pyroelectric infrared human body sensor. The Fresnel lens is a specially designed optical lens made of plastic that can focus the infrared rays radiated by the human body onto the pyroelectric infrared sensor, thereby improving the sensitivity of the sensor and expanding the monitoring range. It can produce alternating high-sensitivity zones and blind zones of infrared radiation to adapt to the changing characteristics of signals required by pyroelectric detection elements. The two pyroelectric elements connected in reverse series of the sensor take turns to sense the moving object, so the infrared radiation of the human body continuously changes the temperature of the pyroelectric element in the form of infrared pulses, causing it to output a series of pulse signals. If the human body is in front of the sensor If it doesn't move, there will be no output.


signal amplifier circuit

The signal amplification circuit is shown in Figure 2. The pyroelectric infrared sensor PIS-209S will output a voltage signal, and then the signal will first pass through a band-pass filter composed of resistors and capacitors. The upper cutoff frequency of the filter is 16Hz and the lower cutoff frequency is 0.16Hz. Due to the thermal release The detection signal voltage output by the electric infrared sensor is very weak (usually only about 1mV), and it is a changing signal. At the same time, the function of the Fresnel lens makes the output signal voltage appear in the form of pulses (the frequency of the pulse voltage is determined by the measured object). Determined by the moving speed, usually around 0.1~10Hz), so the voltage signal output by the pyro infrared sensor should be amplified. After two stages of amplification by the general integrated operational amplifier LM324, sufficient gain is obtained, and the VO1 signal is output to the signal acquisition and processing unit circuit.

How to use AT89S51 microcontroller to realize the design of home voice alarm system

Signal acquisition and processing unit circuit

The hardware circuit is shown in Figure 3. After the signal VO1 from the signal amplifier is pre-amplified by the operational amplifier OP1 in the infrared sensing signal processor BISS0001, it is capacitively coupled to the operational amplifier OP2 for secondary amplification, and then passes through the bidirectional amplitude detector composed of voltage comparators COP1 and COP2. After processing by the processor, a valid trigger signal is detected to start the delay timer. The output signal is connected to the microcontroller through the transistor VT1, and the output signal VO2 is read by it.

How to use AT89S51 microcontroller to realize the design of home voice alarm system

BISS0001 is a CMOS digital-analog hybrid dedicated integrated circuit composed of an operational amplifier, a voltage comparator and a state controller, a delay time timer, a blocking time timer and a reference voltage source. It is widely used in a variety of sensors and delay controllers. It has an independent high input impedance operational amplifier and can be matched with a variety of sensors for signal preprocessing. Its internal two-way amplitude detector can effectively suppress interference. It also has a built-in time timer and a blocking time timer. It has a novel structure, is stable and reliable, and has a wide adjustment range. It has two working modes: repeatable triggering and non-repeatable triggering. Pin A of this circuit is connected to the power supply, so that the circuit is in repetitive triggering mode. During the timing period TX, the output of BISS0001 is high potential, then the transistor VT1 is saturated and turned on, and its collector is low potential, sending this signal to the microcontroller; at the end of Tx, BISS0001 enters the blocking period Ti, and its output terminal becomes Low level, the transistor is turned off, and its collector is high level. The TX timing interval can be determined by the resistor and capacitor connected to pins 3 and 4 of BISS0001.


Voice recording and playback circuit

The system's voice recording and playback circuit is shown in Figure 4. The AT89S51 is used as the CPU in the circuit, and its P0.0~P0.5 is connected to the ISD1420. When designing the circuit, all address terminals and control terminals of ISD1420 must be connected to high level or low level and cannot be left floating, otherwise the playback may stop. The microphone signal coupling capacitor must be the same as the capacitor connecting the MICREF terminal to analog ground. Special attention should be paid to the fact that the SP+ and SP- terminals of the ISD1420 chip must not be directly connected to the ground. They can only be connected to speakers or left floating. When connecting to an external power amplifier, use a single-ended output and connect 10μF to the other end to ground or leave it floating, otherwise the ISD device will be damaged.

How to use AT89S51 microcontroller to realize the design of home voice alarm system

The AT89S51 microcontroller is a low-power, high-performance CMOS 8-bit microcontroller. It contains a 4KB in-circuit programmable (ISP) Flash read-only program memory that can be repeatedly erased and written 1,000 times. The ISD1420 chip has low power consumption (0.5W) when in standby, and the playback current is 15mA; the playback time is 20s, and can be expanded to cascade; it can play continuously, and can also be recorded and played in segments. The minimum segmentation: 20s/160 segments = 0.125s, It can be divided into 160 segments; the number of recording and playback times reaches 100,000 times; information storage when power is off, no backup battery is needed, and the information can be stored for 100 years; no special programmer or voice developer is required; high priority recording, low level or Negative edge playback. Among its pins, SP+ and SP- are the audio signal output terminals, which can drive 8~16Ω speakers; MIC is the microphone input terminal, and an electret microphone can be used and coupled through capacitance; MICREF is the microphone input reference terminal, which should be left floating if not used.


Usually the driving capability of ISD1420 is limited (0.5W), so the effect of directly connecting it to a speaker is not ideal. If it is connected to a speaker above 1W, distortion will occur. Usually speakers below 1W can be driven by chips such as LM386, D2283, D2822, MC34119 and TA7368. This circuit uses a speaker below 1W, and uses a low-voltage general-purpose integrated power amplifier LM386 as the driver chip of the speaker. The circuit is shown in Figure 5. 1W~10W speakers are driven by TDA2003 and LA4440 chips. The circuit using TDA2003 as the speaker driver chip is shown in Figure 6.

How to use AT89S51 microcontroller to realize the design of home voice alarm system

Keyboard and display circuit

The keyboard uses a 4×4 matrix; the display uses the HT1621 LCD driver chip, which is a multi-functional LCD driver with 32×4 video memory. It only needs 4 interfaces to connect to the controller and can provide a watchdog clock. In addition to 4 digits, the LCD display also has up to 16 Chinese characters for alarm, fire alarm, unprepared, bypass, arm, etc. to form an intuitive Chinese character display. When setting up a fortification point, the monitoring point number, time, fortification mark, etc. are displayed; when querying the accident alarm record, the date, hour, minute, and accident point are displayed. At the same time, the watchdog clock provided by the HT1621 LCD driver chip is used to automatically reset the keyboard system when it crashes and restore the keyboard system to work.

[1] [2]
Keywords:AT89S51 Reference address:How to use AT89S51 microcontroller to realize the design of home voice alarm system

Previous article:stc52 microcontroller keyboard schematic diagram and program introduction
Next article:Detailed description of the usage skills of AT89S51 microcontroller timing counter

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号