With the continuous development of electronic and communication technology, single-chip microcomputers have been widely used in data compression and acquisition, electronic equipment, industrial control, and various household appliances. Wireless communication has made up for the shortcomings of wired communication due to its advantages of low investment, simple maintenance, convenience, speed and strong real-time performance. In particular, the GPRS network that has covered the whole country has been widely used.
At the same time, wireless alarm systems are becoming more and more popular. Wireless monitoring alarm systems do not require the presence of personnel. They combine single-chip microcomputer technology, communication technology, network technology and computer technology, establish communication relationships through certain network equipment, have high reliability, integrate software and hardware, and are a system that automatically and accurately collects and transmits data for the monitored equipment within the monitoring range.
It is necessary to design a low-cost intelligent intrusion monitoring alarm system suitable for home use with stable and reliable working performance. Through this system, alarm information data is automatically sent to the burglary and other situations that occur at home, and the user is notified in time to handle and solve them.
1. Functional requirements analysis of the system
This project is mainly designed for small-scale civilian monitoring and alarm facilities that are easy to install and low-cost for homes, offices and other places. The goal of this design is to detect intrusion signals and collect on-site intrusion images through wireless communication networks to achieve the purpose of remote monitoring. The application diagram of the system is shown in Figure 1. The monitoring terminal is generally installed in a relatively hidden part of the room, and the human intrusion detection module should be aimed at doors or windows and other parts.
Figure 1 System application diagram
2. System workflow
When an intruder breaks into the monitoring range of the pyroelectric infrared detector, the infrared sensor immediately sends an alarm signal to the main controller. After receiving the alarm, the main controller confirms the information. After confirming that it is correct, it initializes the image collector and takes an intrusion image. Then, the image data information is sent to the user's mobile phone through the GPRS module in the form of MMS. If the user wants to actively check the situation at home, he can send a short message to the alarm system. After receiving the information, the GPRS module transmits the signal to the monitoring system through the program, and then repeats the above process, thus completing the active query function. Let the user understand the situation at home. The overall working process of the system is shown in Figure 2.
Figure 2 System overall working process diagram
3. System hardware design
The hardware of the whole system mainly consists of the main controller, CMOS image acquisition module pyroelectric infrared sensor and signal amplification circuit, GPRS module, relay circuit, power supply and reset circuit. The overall structure of the system is shown in Figure 3.
Figure 3 System overall structure diagram
The monitoring system is based on the microprocessor, and ensures the stable and orderly operation of the system by controlling and coordinating the normal operation of each module. This system uses the STM32F103 series processor chip of ST Company based on the ARMCortex-M3 core, which has low power consumption, reasonable price, small size and high reliability, as the main control unit of the system. The STM32F103 series chip uses the latest and advanced architecture of ARM's Cortex-M3 core, adopts the Harvard structure with separate instruction and data buses, can read or store data while fetching instructions, and has a 16-bit and 32-bit mixable Thumb-2 instruction set. It has a high code density, which can reduce the demand for memory, a 3-level pipeline, and an internally integrated real-time clock function to meet the requirements of this project for time interception. It has a built-in fast interrupt controller, providing excellent real-time performance, and can run up to 35% faster than ARM7TDMI and save 45% of code.
The system uses the pyroelectric infrared sensor LHi778 to detect the infrared radiation generated by the intruder's body and convert it into electrical signal output, thereby triggering the camera to take photos of the scene and transmit them to the user's mobile phone terminal.
The GXT-M201 serial camera module is used to complete the acquisition and compression of on-site images. GXT-M201 is an image acquisition module that can integrate video acquisition and image compression. It controls the capture and acquisition of images through relatively simple serial port instructions, and compresses the acquired images into JPEG format, and then outputs them through the serial port.
IWOW's TR800 GPRS module is selected. The receiving and sending rates of TR800 can ensure stable and reliable data, fax, voice transmission and short message services. TR800's ultra-low power consumption can ensure its normal operation when using batteries. It has a standard AT instruction set interface, is compatible with the ESTIGSMPhase2+ standard, supports text and PDU format SMS transmission, and supports the fax function and voice function of the Group3 (Class2.0) protocol. TR800's download speed can reach up to 85.6kbps, and it has TCP/IP protocol stack, WAP protocol stack and MMS (multimedia messaging) protocol stack embedded inside.
4. System software analysis
The program of this system is mainly the single-chip microcomputer control program. Its main function is to cooperate with the hardware function of the system to ensure the stable and reliable operation of the entire system and meet the requirements of the design. The structure function of the monitoring terminal software of the system is shown in Table 1.
Table 1 System software structure
4.1 Image acquisition module communication protocol
The software of the camera module mainly consists of two parts, namely the camera initialization subroutine and the camera photo taking subroutine. The protocol used for camera communication is the UART serial protocol, which transmits 6 bytes of separate instructions to the microcontroller each time, and the packet header of the instruction is 0xAA. When the camera module communicates with the microcontroller, the communication method used is the response method.
4.2 User Terminal Request Protocol
If the user wants to take the initiative to understand the safety situation at home, he can send a short message command to the GPRS module through the mobile phone, enter the serial port receiving interrupt entry, and the microcontroller triggers the camera to take pictures of the scene, which are then sent by the GPRS module in the form of MMS.
Figure 4: Software structure of user request to take photo
4.3 GPRS module software analysis
The GPRS module TR800 communicates with the microcontroller STM32F103 through the serial port USART2. Through this serial port, standard AT commands can be used to control TR800 to complete the wireless transmission of data. The GPRS module TR800 has an embedded MMS protocol stack and supports the sending and receiving of MMS. The module is controlled by AT commands through the serial port. Some of the commands are:
4.4 Infrared Sensing Program
If the infrared detection I/O port interrupt of the microprocessor STM32F103 occurs, it proves that someone has broken in. At this time, the camera module should be triggered immediately to take a photo of the intruder, and then the intruder's photo data will be sent out or stored in the NANDFLASH chip. As shown in Figure 5 below.
Figure 5 Infrared sensor I/O port interrupt subroutine flow chart
5. Conclusion
The system combines single-chip microcomputer technology, communication technology, network technology and computer technology, establishes communication relationships through certain network equipment, has high reliability, integrates software and hardware, and is a system that automatically and accurately collects and transmits data for the monitored equipment within the monitoring range. The system has the advantages of low cost, practicality, convenience, and friendly human-computer interface, thus meeting users' needs for home security.
Previous article:Working principle of mine sound and light alarm based on TTS technology
Next article:Analysis on the application of new generation network monitoring and alarm linkage technology
- Popular Resources
- Popular amplifiers
- Mir T527 series core board, high-performance vehicle video surveillance, departmental standard all-in-one solution
- Akamai Expands Control Over Media Platforms with New Video Workflow Capabilities
- Tsinghua Unigroup launches the world's first open architecture security chip E450R, which has obtained the National Security Level 2 Certification
- Pickering exhibits a variety of modular signal switches and simulation solutions at the Defense Electronics Show
- Parker Hannifin Launches Service Master COMPACT Measuring Device for Field Monitoring and Diagnostics
- Connection and distance: A new trend in security cameras - Wi-Fi HaLow brings longer transmission distance and lower power consumption
- Smartway made a strong appearance at the 2023 CPSE Expo with a number of blockbuster products
- Dual-wheel drive, Intellifusion launches 12TOPS edge vision SoC
- Toyota receives Japanese administrative guidance due to information leakage case involving 2.41 million pieces of user data
- 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 recommended course] #[High Precision Laboratory] Interface: RS-485#
- Carbon dioxide gas sensor detection circuit
- The SDA and SCL of this clock IC can be connected to the MCU's normal IO! Does the 7th pin have to be connected to the interrupt port? If the MCU interrupt port...
- E1 can be burned on PCB using RFP software, but simulation connection cannot be made
- Considerations for selecting solid-state relays
- Download and get a gift: Explore 5G together and win a surprise~
- Motor drive control popular data download collection
- Let’s discuss briefly the advantages of GaN in the RF field
- Detailed explanation and analysis of op amp parameters - part 18, slew rate (SR)
- Pingtouge RVB2601 board initial evaluation