Nowadays, people pay more and more attention to the security alarm system, and people have higher and higher requirements for the functions and performance of the alarm. This paper proposes an intelligent wireless security alarm based on AT89C52:
it can be wirelessly connected with standard security probes to achieve large-scale security monitoring and can be expanded at will.
Multi-zone function. It can distinguish various alarm situations and broadcast the alarm situation categories by voice.
Automatic telephone alarm, provide alarm voice and on-site sound to remote users, and receive user instructions for corresponding operations.
Multi-function free switching, low false alarm rate, high reliability.
Easy to use, with high cost performance.
This alarm is connected in series between the outside line and the user's ordinary telephone. The input of the alarm number, the recording of the alarm voice, the entry of the wireless sensor and the setting of other host parameters are all completed through the telephone, which does not affect the work of the telephone at ordinary times. The user uses the remote control to arm or disarm the host. When the host receives the coded signal sent from the wireless probe, the host compares the code with the original stored code, and queries the system parameters to decide whether to alarm and what method to take. It can automatically dial the alarm number set by the user and inform the user of the alarm situation through voice. The user can monitor the sound on the scene and activate the alarm and other actuators (such as preventing gas leakage and starting the exhaust fan) through telephone commands, and decide whether the host enters the arming or disarming state. The user can also actively call the host from a different location to arm or disarm the host.
Figure 2 DTMF transceiver circuit
Figure 3 Digital voice recording and playback circuit
Figure 4: Disconnection and ringback detection circuit
Figure 5 Backup power supply circuit
Figure 6 Main program flow chart
System Structure
The core of this system is AT89C52. Other main unit circuits include: wireless coding receiving circuit, DTMF transceiver circuit, digital voice circuit, call circuit, line switching circuit, disconnection detection and ringback detection circuit, as well as power supply and backup power supply circuit. The system block diagram is shown in Figure 1. [page]
The single-chip microcomputer, watchdog circuit, and wireless coding receiving circuit
use the AT89C52 single-chip microcomputer of the MCS-51 series. It has 8K EEPROM and does not need to expand external memory. 256 bytes of RAM and 32-line I/O ports can fully meet the requirements of this system. The watchdog circuit uses X5045, which is a programmable circuit that integrates three functions of watchdog, voltage monitoring and serial EEPROM. Its internal 512-byte EEPROM is used to store the code of the wireless probe and some system setting parameters. X5045 can provide 1,000,000 erases and writes and 100 years of data retention. The wireless coding reception adopts the common super regenerative receiving module, frequency 315MHz, ASK mode, without decoding chip PT2272 (using software decoding), corresponding to the encoding chip PT2262 at the wireless probe end, with 312 kinds of encoding, ensuring sufficient confidentiality. The signal output end of the module is directly connected to P1.1 of the microcontroller for software decoding.
DTMF transceiver circuit
The DTMF (dual tone multi-frequency) transceiver circuit is shown in Figure 2. Its core chip is MT8880, which can receive and send all 16 DTMF signals, has the function of receiving call tone and bandpass filtering, and can directly interface with the microprocessor. The microcontroller dials the phone number through the DTMF transceiver circuit for telephone alarm, and receives the telephone remote control command from the remote user for corresponding operation. The input and output signals of the DTMF circuit will pass through the signal amplifier circuit (with TEA1062 as the core) for gain adjustment.
Digital voice recording and playback circuit
The digital voice recording and playback circuit is shown in Figure 3. The digital voice chip ISD1420 uses advanced analog digital voice storage technology, good sound quality, no A/D conversion required, can record 20 seconds of voice information, can store information in segments, uses bus technology, and is suitable for interface with single-chip microcomputers. In addition, it is a zero-power information storage method. In the case of power failure, the information can be retained for more than 10 years; it is easy to use, the recording content can be changed at will, and the recording and playback times can reach more than 100,000 times. In this system, users use telephones to enter various alarm voices and user address voices (for networking with 110) in segments into ISD1420. 6 types of alarms (or corresponding to 6 defense zones) total 62 seconds = 12 seconds, and address voice 8 seconds. When using the ISD1400 series voice chip, pay attention to connecting a 0.1mF capacitor between REC and VCC to prevent recording operations from occurring when power is on and destroying the original recorded information.
The call circuit
TEA1062 is a dedicated call integrated circuit for telephones. When sending a call, the voice signal (from ISD1420 and the collective microphone) is input through the MIC+ pin, and the DTMF signal (from MT8880) is input through the DTMF pin. After being amplified by TEA1062, it is sent to the telephone line from the LN pin. When receiving a call, the signal is input from the IR pin through the sidetone cancellation network, and is output from the QR pin after amplification. It is divided into two paths: one is sent to the ANA-IN terminal of ISD1420 for voice recording, and the other is sent to the IN- terminal of MT8880 to extract the DTMF signal.
The disconnection and ringback detection circuit
is a remedial measure to prevent the telephone line from failing to alarm due to failure or human damage. The disconnection detection circuit is added to this system as a remedial measure. Figure 4 shows the disconnection and ringback detection circuit. There are two disconnection detection circuits. One is a high input impedance detection circuit composed of a rectifier bridge and 9018, which is used to detect the line voltage of the telephone line at ordinary times and is part of the host self-test. This circuit should meet the requirements for telephone access to the network and ensure that the leakage current of the external line is below 15mA. The other is composed of the optocoupler 4N33. The voltage of the external line is sent to the B terminal of 4N33. If the external line is suddenly cut off during the telephone alarm, the C terminal jumps to a high level. At this time, the single-chip microcomputer will automatically switch from the telephone alarm mode to the alarm mode, achieving the purpose of double protection. At the same time, 4N33 also constitutes a ringback detection circuit. When the user calls the host from a different place to arm and disarm, the ringing signal is sent to the IN+ and IN- pins of 4N33 through the polyester capacitor and the rectifier bridge, causing the C terminal level to jump. Optical isolation can prevent high-voltage ringing signals from entering the host. When the host detects that the ringing signal reaches the corresponding number of times, the host automatically picks up the phone and receives the password entered by the user. If the password is correct, the host begins to accept the user's remote control instructions.
Line switching, telephone setting circuit The line
switching circuit consists of two double-pole double-position relays to realize the switching of the connection relationship between the host, the external line, and the telephone. Normally, the external line is connected to the telephone; when an alarm is triggered and when active monitoring is performed remotely, the external line is connected to the host; when setting the host (including recording the alarm phone number, recording voice, and other parameter settings), the host disconnects the external line and is only connected to the telephone. At this time, the host needs to provide power to TEA1062 through a constant current source. The constant current source consists of a light-emitting diode, S8550, and several resistors. Whether to enter the setting state is determined by a setting switch. When the setting switch is turned on, the constant current source is turned on, and the software enters the corresponding setting subroutine.
Backup power supply circuit, display circuit, and drive circuit
To ensure that the host can still make a telephone alarm when the city power is cut off, a backup power supply circuit is provided in this system, as shown in Figure 5. Four 1.2V nickel-cadmium rechargeable batteries are used as backup power supplies, which can automatically charge at a constant current when the power is insufficient; using the voltage detection module HT7050A, the battery automatically stops charging when it is fully charged. When the city power is cut off, the electronic switch is turned on and the backup power supply is connected to the system.
Since there is voice to distinguish the alarm category, the system does not have high requirements for the display circuit. Using one LED as power indicator and another LED to indicate the working status: armed (lit), disarmed (off) or in alarm (flashing) can meet the requirements. The
actuator is used in some special occasions, such as starting the exhaust fan in case of gas leakage. To ensure that the actuator has sufficient driving capacity, the system uses zero-crossing trigger optocoupler MOC3041 to drive the bidirectional thyristor, which can have a driving capacity of 220V and 10A.
System software design
The system software adopts modular structure and subroutine nesting technology, which has good readability and is easy to compile and expand. The main process adopts sequential query method to detect wireless coding signals, the switch status of setting buttons, and external ringing signals respectively. The time used to detect the latter two signals is very short, and it can be considered that the host is receiving wireless coding signals at any time.
Main program flow
The main program flow is shown in Figure 6. It repeatedly loops and calls the following main subroutines:
(1) Wireless coding detection program. If a valid signal is detected, it will transfer to the software simulation PT2272 decoding subroutine and alarm subroutine.
(2) Setting button status detection. If the setting switch is turned on, it will transfer to the setting subroutine to set the host parameters.
(3) External ringing detection program. If the ringing reaches the set number of times, it will transfer to the monitoring subroutine. Through parameter setting, remote active monitoring can also be prohibited.
Setting subroutine flow
The setting subroutine flow is shown in Figure 7.
Brief introduction of main subroutines
(1) Alarm subroutine: Determine whether to alarm and what alarm method to use (telephone alarm, siren alarm or both alarms). If the telephone alarm method is used, it will call the dialing subroutine to dial the pre-set alarm phone number and select the appropriate voice to broadcast to the telephone line. During this process, it will also detect whether there is a disarming signal from the remote control or a reverse control signal from the user end.
(2) Monitoring subroutine: When the user calls the host in a different location to arm, disarm or perform other operations, the monitoring subroutine will receive these instructions from the user. It first verifies the user password to see if it is a legitimate user. If so, the monitoring subroutine can arm, disarm, activate the alarm, switch the relay output port, etc. according to the user's instructions.
A few points to note
(1) Software decoding of wireless code. This alarm uses software to simulate PT2272 for software decoding, so that no matter what the address code of the transmitter PT2262 is, the alarm can receive the code. When using hardware PT2272 for decoding, it can only be successfully decoded when it is completely consistent with the address code of PT2262. Since an alarm host needs to be able to wirelessly connect to multiple wireless sensor probes and be able to distinguish each probe to achieve the purpose of partitioning, software decoding must be used.
(2) The host's anti-false alarm function. During the use of this alarm, we found that most smoke detectors had the problem of battery voltage drop (9 volt battery dropped to about 7.5 volts) causing false signals, which would cause false alarms in the host. This is a common problem with similar alarms. Based on the research on the false alarm characteristics of low-power smoke detectors, it was found that the code signal sent by the smoke detector at this time was shorter than that of the normal alarm. Therefore, a sensitivity adjustment module was added to the program, stipulating that the host will only start the alarm after receiving valid signals several times in a row (only for the defense zone equipped with smoke detectors). The sensitivity is adjustable in 6 levels. As long as the setting is appropriate, sensitivity and reliability can be taken into account to solve the false alarm problem of smoke detectors.
(3) The flexibility of the host's working mode. More than 30 instructions are defined in the software, which can select various working modes for the host and set the parameter size, which is convenient for debugging personnel and users to use, and maximize the functions of the software.
Conclusion
The security alarm introduced in this article can realize partitioning and has an automatic telephone voice alarm function. It uses an ordinary telephone as a keyboard to set the alarm host and realize powerful functions through software. Taking scalability into consideration, the software contains a networking subroutine that can be connected to the PC in the monitoring center, making it suitable for centralized management in communities, buildings and other places.
Previous article:Application of DS18B20 in temperature detection system
Next article:Gas state monitoring system based on intelligent sensor NPX
Recommended ReadingLatest update time:2024-11-16 14:42
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Brain-electromechanical control robot arm (robot arm for elderly care and disabled assistance)
- [NXP Rapid IoT Review] + Mobile Synchronizer 5
- EEWORLD University Hall----Live Replay: Detailed Explanation of Ultra-Low Power RSL10 Bluetooth SoC Development Board
- 51 single chip digital tube display
- EEWORLD University ---- Training series for BQ76952 & BQ76942, 3-16S & 3-10S battery monit
- How to deploy Wi-Fi connectivity for grid protection and control?
- Common knowledge of inductors
- Three design challenges that the new generation of SimpleLink Wi-Fi devices will help you solve
- How to use the internal LDO of CC1310
- 【TGF4042 Signal Generator】+ Actual Project Application