Design of wireless monitoring and alarm system based on pyroelectric infrared sensor

Publisher:Dingsir1902Latest update time:2011-03-26 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
This design aims to produce a powerful alarm system that can notify the parties in time when an emergency occurs, even if they are not near the scene, and automatically call the alarm. Compared with ordinary alarms, this design focuses on remote voice alarms. As long as the appropriate sensors are connected, it can form a multifunctional alarm system such as anti-theft alarm, fire alarm, gas leak alarm, etc., and additionally realize some intelligent control functions, giving the alarm system more powerful and complete functions to meet people's needs for safety alarms. This system is based on the telephone network but is independent of the telephone and will not affect the normal use of the telephone. It is operated through voice prompts and has friendly human-computer interaction. System

principle and system block diagram

This system mainly includes telephone automatic off-hook and on-hook circuits, DTMF signal transceiver circuits, voice prompt circuits, alarm circuits, keyboard display circuits, human signal detection circuits, encoding circuits, wireless transmission circuits, and single-chip microcomputer control circuits as the main core. The system structure block diagram is shown in Figure 1. We set the alarm part as the main working part of this system, that is, real-time monitoring of the safety situation in the room. It is manifested as the main loop in the software. When there is a ringing signal or a set signal, it will interrupt to perform the corresponding operation. Here we need a sensor that is sensitive to human infrared radiation and resistant to interference (such as small animals, etc.). For this reason, we use a passive pyroelectric infrared detector and cover its radiation surface with a special Fresnel filter to significantly control environmental interference. The function of the setting part is to store the number to be dialed when an alarm is triggered and set the owner's identity authentication password. For the simplicity of the system, an LCD screen is used for display.


Figure 1 System structure block diagram

When the infrared human body detection circuit detects human intrusion, the encoding circuit encodes the address of the detection probe, and sends the address of the probe that detects human intrusion to the wireless receiving circuit through the wireless transmitting circuit. After decoding by the CPU, the LED displays the alarm address, and at the same time, an audible and visual alarm is issued or a pre-set phone number is called to the director to alarm.

Signal detection circuit

The signal detection circuit is mainly composed of the pyroelectric infrared detection probe SD02 and the BISS0001 signal processing circuit.

The signal detection circuit is shown in Figure 2. The pyroelectric infrared sensor composed of a filter lens and an impedance matching field effect tube detects infrared radiation from the human body in a non-contact manner and converts it into an electrical signal. After the pre-amplification of the operational amplifier N1 in BISS0001 and the second-stage amplification of the operational amplifier N2, the DC potential is raised to the built-in voltage Um and sent to the bidirectional amplitude detector composed of comparators N4 and N5 to detect the effective trigger signal Us. Since the built-in voltage UH≈0.7UDD and UL≈0.3UDD, when UDD=5V, the noise interference of ±1V can be effectively suppressed. N3 is a conditional comparator. When the input voltage Uc is less than the built-in voltage UR (≈0.2UDD), N3 outputs a low level to block Us from being delivered to the next level. When Uc>UR, N3 outputs a high level to open the AND gate N7. At this time, if the leading edge of the trigger signal Us arrives, the delay timer can be started, and Uo output is a high level. The selection of the comparator's domain value is very important. If the domain value is too low, it is easy to report a false alarm, and if it is too high, the sensitivity is low.


Figure 2 Signal detection circuit

In the timing cycle Tx, the output terminal 2 of BISS0001 is high, then the transistor VT1 is saturated and turned on, and its collector is low, sending this signal to the encoding and wireless transmission circuit composed of the single-chip microcomputer and the wireless transmission circuit, and connecting it to the P0.0 port of the single-chip microcomputer used for encoding. The single-chip microcomputer encodes the probe and transmits it wirelessly; at the end of Tx, BISS0001 enters the blocking cycle Ti, its output terminal becomes low level, the transistor is cut off, and its collector is high level. Pin 1 (A terminal) of BISS0001 is connected to the power supply, so that the signal detection circuit is in repeated triggering. The Tx timing interval can be determined by the resistor and capacitor connected to pins 3 and 4 of BISS0001. The elevation angle of the signal detection probe can be adjusted within the range of 120°, and the actual detection distance can be adjusted by changing the elevation angle. We can adjust it through actual tests, or adjust the adjustable resistor RP in the signal detection circuit to adjust the detection distance of the probe. The detection distance of this design circuit is 30m.

Coding circuit and wireless transceiver module

The coding circuit and wireless transmission circuit are composed of a single-chip microcomputer and a transceiver integrated chip nRF401. The circuit has few peripheral components and a simple circuit.

This design uses the nRF401 wireless data transmission chip newly launched by Nordic Company of Norway, which integrates transmission and reception. It is a real single-chip UHF wireless transceiver chip designed for the 433MHz ISM frequency band and adopts FSK modulation and demodulation technology. The transmission distance can reach 3000m when a high-gain antenna is used.

The coding and wireless transceiver circuit is shown in Figure 3. The PWR_UP of the RF chip is controlled through the P2.0 port of AT89C51. When it is "1", it means entering the normal working mode, and when it is "0", it means entering the standby mode; P2.2 is connected to the CS of the RF chip to control the transmission and reception frequency. When it is "1", it means the working frequency is 434.32MHz. When it is "0", it means the working frequency is 433.92MHz. P2.1 controls the TXEN terminal of the RF chip, so that "1" indicates entering the transmit mode, and "0" indicates entering the receive mode.


Figure 3 Interface between wireless transmitter and receiver circuit

MT8880 and AT89C51 and voice circuit

The DTMF signal transmission/reception circuit uses the MT8880 chip, a dedicated integrated circuit launched by MITEL for processing DTNF signals. It not only has the automatic dialing function of receiving and sending DTMF signals, but also can detect signal tones such as dial tone, ringback tone and busy tone on the telephone trunk line. It is suitable for interfacing with a single-chip microcomputer, and the peripheral circuit is simple.

There are 5 registers inside the MT8880, namely the receiving data register, the sending data register, the transceiver control registers CRA and CRB, and the transceiver status register. In this design, only the sending data register, the transceiver control registers CRA and CRB are used to send DTMF signals to realize the automatic dialing function. The data in the sending data register determines the frequency of the dual audio signal to be sent, so data can only be written to the sending data register. The two transceiver control registers occupy the same address, so whether to operate CRB is determined by the value of the register selection bit in CRA.

ISDl420 voice chip adopts direct analog storage technology, and the recording and playback sound quality is excellent, and there is a certain reverberation effect; its peripheral components are simple, and only simple resistors and capacitors are needed to form a simple recording and playback circuit; no backup power supply is required, the information storage time is long, and no special programmer and voice developer are required; it has a strong address selection ability, and the memory can be divided into 160 segments for management, forming a minimum recording and playback time of 125ms. In this design, because four segments of alarm prompt voice are required, each segment of voice is set to 5s when designing the voice segmentation method, and its starting address is 00000000B, 00101000B, 01010000B, and 01111000B respectively.

The data ports A3, A4, A5, and A6 of ISD1402 are connected to the PB0, PB1, PB2, and PB3 ports of the microcontroller port expansion chip 8255 respectively. A0, A1, A2, and A7 are grounded. PLAYL is connected to the PB5 pin of 8255. SP couples the voice signal through capacitor C14 and sends it to the telephone interface circuit. When the switch SB1 is pressed, the recording indicator LED lights up and starts recording at the same time. When there is an alarm, the microcontroller controls the DTMF signal sending/receiving circuit to automatically dial a phone call. After the call is connected, the microcontroller sends the instructions for which recording to play and the playback instructions to ISD1420 according to the signals sent by different detectors. ISD1420 sends the voice signal to the telephone interface circuit. After waiting for the playback to be completed, the microcontroller sends a hang-up command and the alarm is completed.

The D0~D3 ports of MT8880 are connected to the PA0~PA3 ports of 8255 respectively, CLK2 is connected to the PA4 port, R/W is connected to the PA5 port, RSO is connected to the PA6 port, CS is connected to the PA7 port, and IRQ is connected to the T0 port of the main control circuit processor 89C51 to record the number of various pulses. The signal from the voice circuit is sent to the telephone line through R44. Relay K is used to control the on-hook and off-hook operation. The B pole of the transistor is connected to the P1.2 port of the main control circuit processor 89C51. When P1.2 is "1", V2 is turned on, relay K is closed, and the phone is connected. When P1.2 is "0", V2 is turned off and the phone is on-hook.

The P0 port of the main control circuit processor 89C51 is connected to the D0~D7 ports of 8255 and the D0~D7 ports of 74HC373 respectively, the Q0 and Q1 of 74HC373 are connected to the A0 and A1 of 8255 respectively, the P2.5, P2.6 and P2.7 of 89C51 are connected to the A, B and C ports of 74HC138 respectively, and the YO of 74HC138 is connected to the CS terminal of 8255.

Software Design

1 Signal Tone Recognition Method

After the system detects the alarm signal, it simulates picking up the phone. In order to identify whether the telephone system is in a dialable state after simulating picking up the phone, whether the phone is connected after dialing the number, and whether the other party picks up the phone to answer the call, the system must identify the signal tone. In order to identify the signal tone, the characteristics of various signal tones must be known. The characteristics of various signal tones are as follows.

● Dial tone: 450±25Hz continuous buzzer.

● Busy tone: 450 ±25Hz buzzer with 0.35s off and 0.35s on, with a tone segment period of 0.7s.

● Ringback tone: 450±25Hz buzzer with 4s off and 1s on, with a tone segment period of 5s.

These telephone signals are all analog signals, but the microcontroller cannot recognize analog signals, so the analog signals must be converted into pulse signals first, and then recognized based on the number of pulses in the pulse signal. The formula for calculating the number of pulses of these telephone audio signals is N=tm/T. Among them, N is the number of pulses per tone segment period; T is the audio period of the telephone audio signal, in seconds; tm is the conduction time of the signal tone segment period, in seconds.

In actual use, it is mainly necessary to identify dial tone, busy tone and ringback tone. Analysis of the characteristics of these three signals shows that the number of pulses is different within a certain counting time. In this design, 2s counting is used to determine the dial tone, and 2.8s (i.e. 4 busy tone cycles) is used to determine whether it is a busy tone. Then 1s is used as a counting unit, and the accumulated pulse number after five counts is used to determine whether the other party answers the call. If yes, the corresponding alarm prompt voice is played; otherwise, 1s is counted again, and then the number of pulses in the last 5s is calculated to determine again whether the other party picks up the phone. Repeat this process. If no one answers the call after the waiting time has expired, the phone is hung up. Due to interference and some other factors, it is inevitable that there will be misjudgments and missed alarms. Therefore, if at least one of all pre-set calls is dialed, it is dialed only once. If all are dialed or no one answers, all pre-stored calls are redialed, so that the probability of missed alarms is very low and can be ignored.

2 Software Flowchart and Dial-up Program

The flowchart of the automatic dial-up program is shown in Figure 4.


Figure 4 Dialing subroutine flow chart

3 Points to note during programming

First, the DTMF generator of MT8880 is the main body of the sending part. It generates all 16 standard dual-tone signals with low distortion and high precision. These frequencies are generated by the frequency division of the 3.579545MHz crystal oscillator. The circuit consists of a digital frequency synthesizer, a row/column programmable divider, and a switched capacitor D/A converter. The row and column single-tone sine waves are mixed and filtered to generate dual-tone signals. The encoded data is written into the MT8880 sending register through the DTMF codec table to generate separate flow and fhigh. Once the encoding is wrong, the dialing will fail. Therefore, be very careful during the programming process.

Secondly, after picking up the phone, you should delay for a period of time before judging the off-hook tone. Because this system uses a mechanical relay to achieve automatic off-hook, the response time of the relay should be considered. Finally, after

dialing a phone number, you cannot dial the next phone number immediately. The shortest effective time of hanging up should be guaranteed to ensure that the previous phone number has been hung up, otherwise there will be no dial tone when dialing the next phone number.

Conclusion

The system uses software to implement encoding and decoding, and the transmission method uses bidirectional transmission. If an alarm occurs, a data string is sent to the host, which consists of the following parts: 4-bit address code, 8-bit data code, 1 start bit, and 1 parity bit. After receiving the data, the host first checks it. If the data is wrong, it requires the previous data to be resent until it is correct. After receiving the correct data information, the next task is to check the address code. If the address code is the same as the address set by the host, it indicates that the data may be sent from a device outside the system. No decoding is performed. Data with the same address as the host setting is received for decoding.

Reference address:Design of wireless monitoring and alarm system based on pyroelectric infrared sensor

Previous article:Geotechnical Engineering Stress Monitoring Based on Sensor Network and GPRS Network
Next article:Coal mine roof pressure monitoring system based on wireless sensor network

Latest Industrial Control 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号