1 Introduction
With the rapid development of my country's national economy and the improvement of people's living standards, people pay more and more attention to the anti-theft, anti-robbery and fire prevention equipment of their homes. Therefore, more people in modern society need to monitor and alarm for accidents such as theft, robbery, fire and gas leakage. In order to effectively ensure the safety of life and property of residents, we have designed an intelligent home anti-theft alarm system. The system uses the ubiquitous telephone network for monitoring, and organically combines the AT89S51 single-chip microcomputer, ISD4000 integrated voice chip, HT1602 LCD display driver chip and integrated circuit composed of dual-tone multi-frequency dialing circuit, etc., to form an advanced, practical and low-cost home intelligent anti-theft alarm.
2 Circuit diagram and basic working principle
2.1 Circuit diagram
The intelligent home anti-theft alarm system is composed of wireless sending/receiving module, alarm module, keyboard module, LCD display module, voice module, DTMF decoding/encoding module, etc. The overall block diagram of the system hardware is shown in Figure 1.
Figure 1 Overall block diagram of system hardware
2.2 Introduction to the basic working principle of the circuit
When an alarm occurs at home, the wireless module or other sensor module set in the home will send an abnormal signal to the microcontroller. After receiving the signal, the microcontroller will immediately send out an on-site sound and light alarm signal to deter intruders. At the same time, the microcontroller will automatically call the phone number pre-stored in 24C02 to alarm the owner or the community property, so that anti-theft measures can be taken in time to avoid property loss.
When the owner wants to monitor the situation at home or remotely control the switch of home appliances, he only needs to dial the landline number at home. Because the telephone interface of the alarm system is connected in parallel to the telephone, if no one answers after the ringing five times (the specific number can be set by the software), the alarm system will automatically simulate picking up the phone. After the owner enters the preset password, he can monitor the movement at home and control the switch of home appliances.
When the owner is at home and does not need to set up defense, the alarm system can also display the clock, temperature, etc., and can also set multiple functions such as wake-up alarms. These can be achieved by combining software and related chips.
3. Introduction to some circuit functions of the system
3.1 MCU module
The MCU device uses the AT89S51 chip produced by ATMEL, as shown in Figure 2. AT89S51 is a low-power, high-performance CMOS 8-bit single-chip microcomputer, which contains 4k Bytes ISP (In-system programmable) Flash read-only program memory that can be repeatedly erased and written 1000 times. It has the characteristics of high-density, non-volatile storage technology, and integrates a general-purpose 8-bit central processing unit and ISP Flash storage unit in the chip.
Figure 2 MCU module circuit diagram
3.2 Wireless Module
The wireless module mainly processes infrared and wireless signals, including door and window magnetic alarm modules, fire detection modules, harmful gas detection modules and other sensor modules.
Here we mainly explain the door and window magnetic alarm module. The door and window magnetic detector uses a wireless door magnet, which consists of a permanent magnet and a door magnet body (with a normally open reed switch inside). The sensor application circuit diagram of the wireless receiving module is shown in Figure 3.
Figure 3 Wireless door magnetic receiving module sensor circuit diagram
H1 is a reed switch. When the door is closed, H1 is energized, the two ends of C1 are at the same position, Q1 is cut off, and Q2 is also cut off. When the door is opened, the contacts of the reed switch open, and a current flows through the emitter of Q1, R32 (in parallel with H12), C1, R31, and ground, causing Q2 to be saturated and turned on, outputting a low level 0 to the microcontroller, and sending out an alarm signal.
3.3 Alarm module
P3.2 (INT0) is connected to the anti-theft detector to detect theft. If theft occurs, external interrupt 0 is triggered. After the MCU receives the alarm signal, it starts to activate the LED flashing alarm and the 100dB sound alarm to deter the thief from breaking into the house. At the same time, the signal is sent to the telephone module to tell the owner or the alarm center that a thief has broken into the house.
3.4 LCD Module
The liquid crystal display module is implemented using LCD1602, and its main functions are to display time, date, home temperature, and the type of alarm when an alarm is triggered.
Figure 4 LCD display circuit diagram
3.5 Voice Module
The voice module uses ISD4000 chip, and its connection circuit diagram is shown in Figure 5.
Figure 5 Voice chip connection circuit diagram
3.6 DTMF Encoding/Decoding Module
The alarm circuit shares a telephone line with the user's telephone. HT9200B is selected as the DTMF encoder and HT9170 is selected as the DTMF decoder. The application circuit diagram is shown in Figure 6 and Figure 7.
Figure 6 HT9200B circuit diagram
Figure 7 HT9170B circuit diagram
Provide the HT9200B with a certain 4-bit binary number (such as a telephone number) and input it from D0--D3, then the corresponding DTMF signal can be output from pin 13 and sent to the telephone line to realize the automatic dialing function; the function of the HT9170 is mainly to convert the input DTMF signal into the corresponding binary number, decode the remote telephone key signal, and transmit it to the microcontroller to realize remote control.
DTMF (Dual Tone Multi Frequency) is basically used in touch-tone telephones all over the world. A DTMF signal is composed of two frequency audio signals superimposed. The relationship between DTMF signals and telephone buttons is shown in Figure 8.
Figure 8 Relationship between DTMF signals and telephone buttons
3.7 Telephone Interface Module
The telephone interface module includes a ring detection circuit, an off-hook control circuit and a ringback detection circuit.
Ring detection means that after a certain number of rings (such as 5 times, which can be set by software), if no one answers, the owner enters the password. After the password is entered correctly, the microcontroller automatically simulates picking up the phone to check the situation at home. If the password is entered incorrectly for 3 consecutive times, the phone is forced to hang up.
Figure 9 Ring detection circuit diagram
The circuit diagram of the ringing detection circuit is shown in Figure 9. After the 25Hz AC ringing signal is rectified and stabilized, it is sent to the optocoupler and then outputs a square wave signal to the external interrupt 0 of the microcontroller to identify the ringing signal using software.
The circuit diagram of the analog off-hook detection circuit is shown in Figure 10. This circuit uses a triode to simulate the telephone off-hook. When the base of Q4 is low, the collector and transmitter of Q3 are disconnected, which is the on-hook state; when the base of Q4 is high, the collector and transmitter of Q3 are saturated and turned on, which is the off-hook state, so the telephone signal is sent in.
Figure 10 Analog off-hook detection circuit diagram
The ringback tone, busy tone, line error tone and other telephone process tones are signals with a carrier of 450Hz. The only difference between the various signals is the modulation period and duty cycle. Therefore, the detection of these signals is to detect the period and duty cycle of the 450Hz signal. This circuit uses the phase-locked loop LM567 to form a detection circuit (the center frequency of LM567 is adjusted to 450Hz). When the input signal is 450Hz, LM567 outputs a low level and sends it to the microcontroller to distinguish various signals using software. The detection circuit is shown in Figure 11.
Figure 11 Ringback tone detection circuit diagram
4. Introduction to the program flow chart
The overall flow chart of this project is shown in Figure 1 2.
Figure 12 Overall program flow chart
Here we will focus on the flow chart of the main loop module, as shown in Figure 13.
Figure 13 Main loop flow chart
5 Conclusion
This system uses telephone network for communication, which does not require rewiring, is convenient, has no electromagnetic pollution, is environmentally friendly, and has low cost; the system has been debugged, runs stably and reliably, and has great practical value.
Previous article:Design of intelligent pneumatic pump control system based on C8051F020
Next article:Design of music water lamp control system based on FPGA
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- What exactly is op amp noise?
- [Hua Diao Experience] 11 Getting Started with ESP32C3
- 【GD32E503 Review】 Experiment on displaying Chinese characters and character strings
- Analog Discovery 2 Review (1) DIY or buy?
- I bought a Juyang JY-E2300 emulator on Xianyu, but it lacks an emulation head. Does anyone have an emulation head or schematic diagram for this emulator?
- This week's highlights
- 03. Light up the LED and test the buttons
- TI z-stack's OSAL multi-task scheduling mechanism
- Help
- Sensor question