Abstract: At present, people have an increasing demand for home fire prevention, anti-theft and remote control of household appliances. At the same time, mobile phones have become a communication tool that residents carry with them. Based on this, an automatic SMS security alarm system based on the GSM module is designed, which can remotely control household appliances through mobile phones and integrates fire and intrusion alarms. The system is controlled by an AVR ATmega16 microcontroller with an external GSM module as the control host, and is operated by SMS with passwords. It can set 8 groups of user phone numbers, can send Chinese SMS alarms, and has an infrared microwave dual-detection anti-theft and fire detection wireless communication interface. There are 2 wireless control relay output terminals, which can be linked to power supply, video recording, etc. Finally, the actual test shows that the system has a good detection effect.
Keywords: home security alarm; ATmega16; GSM; dual identification
0 Introduction
With the construction of a large number of modern residential areas in China, people's demand for fire prevention, anti-theft and remote power on and off of household appliances is increasing. In the current society, mobile phones have become a communication tool that residents carry with them every day. Based on this, this paper designs a security alarm system based on the GSM module, which can remotely control the power on and off of household appliances through mobile phones, integrates fire and intrusion alarms, and can automatically send Chinese alarm text messages to the owner.
1 System Structure
As shown in Figure 1, the schematic diagram of the GSM security alarm system, this system uses an AVR ATmega16 microcontroller with an external GSM module as the control host. The host is operated by SMS with passwords, and 8 groups of user phone numbers can be set. Chinese SMS alarm, the system has 3 wireless detectors (infrared microwave anti-theft, smoke alarm) wireless communication interface, and 2 wireless control relay output terminals, which can be linked to power supply, video recording, etc. The 3 wireless detectors are composed of infrared pyroelectric sensors, microwave sensors, smoke sensors and wireless transceiver modules. Infrared pyroelectric sensors and microwave sensors together constitute a microwave infrared composite intrusion detector, and the smoke sensor is mainly used for fire detection. Once the system is turned on by the owner through a mobile phone text message, if an illegal intrusion or a fire is detected, the system will immediately send a text message to the owner of the set user number (up to 8 mobile phone numbers). At the same time, in order to facilitate the owner to control the power on and off of household appliances when leaving home, this system also provides two wireless switches for remote control on and off, and users can control the remote wireless switches through text message commands.
As shown in the system host structure diagram in Figure 2, the system host is mainly composed of MCU (ATmega16 microcontroller), GSM (TC35i) and level conversion module, delay interface circuit (monostable trigger) and display module (12865LCD), 315 MHz transmitting circuit, 315 MHz and 433 MHz receiving circuit and power adapter module (AMS1117-3.3 and KIS3RR3 step-down module).
1.1 GSM and level conversion module
The GSM module uses Siemens industrial-grade GSM module TC35i. Since the level of TC35I UART is 2.9V TTL level, it cannot be directly connected to ATmega16. Therefore, as shown in the level conversion circuit in Figure 3, two simple NOT gates are used for level conversion at the RXD end and a current limiting resistor is connected in series at the TXD end. Since TC35I has high requirements for power supply (it will reset if the voltage drops more than 400 mV), and the current peak value during data transmission will reach 2.5 A, 3 300μF large-capacity electrolytic capacitors are connected in parallel near TC35I to reduce the requirements for power supply.
1.2 Delay interface circuit and display module
This system receives external wireless signals in the form of inquiries. In order to prevent signal loss and to be compatible with wireless modules with the same encoding on the market, this paper designs a monostable delay interface circuit. The schematic diagram of the circuit is shown in Figure 4. When the base of Q1 is at a high level, the power stored in C2 is released, and the comparator outputs a high level. When the base drops from a high level to a low level, C2 is charged through R3, and the potential of the inverting terminal of the comparator rises slowly. Once the voltage of C2 is higher than Vref, the comparator flips and outputs a low level, thereby achieving the purpose of delay.
The display part is composed of ST7920LCD, and the LCD is connected to the MCU using SPI. When a button is pressed, the LCD backlight is triggered. In the wireless interface part, since the probability of the anti-theft alarm, smoke alarm, and SMS remote control being triggered at the same time is very small, the entire system does not need to use too many frequencies for communication. The host uses a 315 MHz wireless module to control the wireless switch, while the pyroelectric infrared and microwave displacement sensors use two different frequencies of 315MHz and 433MHz to send alarm signals to the host, so that the alarms do not interfere with each other. The smoke sensor uses a frequency of 315MHz to send signals to the host.
1.3 Host wireless transceiver module
The wireless transceiver module is mainly composed of a wireless encoding chip SC2262, a wireless decoding chip PT2272, a 315MHz transmitting module, and a receiving module. When the host controls the wireless switch, the wireless encoding chip SC2262 is used. The address setting is consistent with the receiving part PT2272, and the oscillation resistor should be matched. When the MCU is powered on or the host receives a remote control text message, the MCU first changes the PD4~PD7 level according to the wireless switch status stored in the EEPROM, and then the MCU will send a low-level pulse with a width of 1s to the 16th pin (TE) of PT2262, so that SC2262 encodes the data of PD4~PD7 and then outputs it from the 17th pin to the 315 MHz transmitter module.
Since some detection sensors on the market only send a high level "1" when the wireless transmitter module is triggered, the host decoding chip cannot use the latched PT2272L4, otherwise the data output by PT2272L4 will always be high level, which will always generate false alarms. Therefore, in order to better be compatible with market products, the wireless receiving part of the host of this system uses a non-latched PT2272M4 chip to connect to the 315 MHz and 433 MHz receiving modules respectively. In this way, when someone invades and triggers the alarm, the signals sent by the two alarms will not interfere with each other because they are on the same frequency, resulting in decoding errors, thus avoiding the situation where someone invades but the host does not alarm. The smoke alarm receiving part and the microwave alarm use the same PT2272 M4 and receiving module. Since the signals emitted when the infrared, microwave, and smoke alarms are triggered are discontinuous and asynchronous, the received signal will be made high level for 3 s by the 3-way monostable trigger, which improves the accuracy of MCU sampling judgment.
2 System software flow
The system software flow chart is shown in Figure 5.
3 System test
Microwave sensors and infrared sensors are installed against the wall at a height of 3 to 5 m. The infrared sensor is tested from three different angles, namely, facing, 30° to the right of the front, and 45° to the right of the front. The effective sensing distances are shown in A, B, and C in Figure 6. The microwave sensor is tested from three different angles, namely, facing, 30° to the right of the front, and 135° to the right of the front. The effective sensing distances are shown in A, B, and C in Figure 7. The maximum sensing straight-line distance of the infrared sensor is 7m, the optimal use distance is 6m, and the sensing angle is 90°. The maximum sensing straight-line distance of the microwave sensor is 9m, and it is effective in all directions at close range, and the optimal use distance is 5m.
4 Conclusion
The automatic SMS security alarm system designed in this paper adopts pyroelectric infrared and microwave dual sensors, which greatly reduces false alarms and missed alarms, and improves the reliability of the security alarm system application. The AVR ATmega16 microcontroller is connected to a GSM module as the control host. As long as it is within the GSM network range, the user can remotely alarm no matter where he is; SMS with password operation increases the security of the system; 8 groups of user phone numbers can be set, and Chinese SMS alarms can be sent; it has an infrared microwave dual-detection anti-theft wireless communication interface, provides remote wireless switch function, and has 2 wireless control relay output terminals, which can be linked to power supply, video recording, etc. The design of this paper improves the performance of security products and reduces the cost of the system.
Previous article:Design of accelerated life test system for electromagnetic relay
Next article:Discussion on the Engineering Design Method of Harmonic Suppression
Recommended ReadingLatest update time:2024-11-16 19:27
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- 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
- TI Cortex MCU Industrial Safety Applications
- [Raspberry Pi Pico Review] WS2812B Snowflake Light Practice -- and IoT Communication RGB Control
- How to convert a sine wave into a square wave
- If you want to work in electronics, you need to remember these English words!
- Decoupling Technology
- Bluetooth 4.0 BLE Development Complete Manual: Practical IoT Development Technology
- UltraISO, English learning .iso files made on PC, cannot be played?
- How to calculate the saturation of an inductor with a magnetic core? Is there a calculation formula for reference?
- What is the difference between the PLL input clock (1) the clock generated by the XTH crystal oscillator and (2) the clock input from the XTH pin PD00?
- Summary: GigaDevice GD32F350 Innovation Design Competition Participants' Shared Content