Design of intelligent home anti-theft alarm system based on single chip microcomputer control

Publisher:云淡风轻2014Latest update time:2011-03-08 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Abstract: This paper designs a smart home burglar alarm based on DTMF technology and a single-chip remote control system. The system can use the existing public telephone network to monitor the situation at home at any time, and can promptly transmit information to the owner when a dangerous situation occurs at home. It has the advantages of convenience and safety.

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.

System hardware overall block diagram

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.

MCU module circuit diagram

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.

Wireless door magnetic receiving module sensor circuit diagram

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.

LCD display circuit diagram

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. Voice chip connection circuit diagram

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.

HT9200B Circuit Diagram
Figure 6 HT9200B circuit diagram

HT9170B 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.

Diagram of the relationship between DTMF signals and telephone buttons

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. Ringing detection circuit diagram

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.

Analog off-hook detection circuit diagram

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.

Ringback tone detection circuit diagram

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.

Overall program flow chart

Figure 12 Overall program flow chart

Here we will focus on the flow chart of the main loop module, as shown in Figure 13.

Main loop flow chart

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.

Reference address:Design of intelligent home anti-theft alarm system based on single chip microcomputer control

Previous article:Design of intelligent pneumatic pump control system based on C8051F020
Next article:Design of music water lamp control system based on FPGA

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号