With the rapid development of computer network technology, mobile communication technology, and multimedia technology, wireless monitoring systems have been widely used in military, industrial, agricultural and other occasions because of their convenience, practicality, and easy installation. They have also entered people's daily lives. It has brought convenient information services to people's lives. This paper designs and implements an indoor wireless monitoring and alarm system based on ARM9, which realizes the functions of indoor environment information monitoring, smart home control, image information collection and storage, and real-time remote information interaction with users, and can alarm in emergency situations. It has wide application and development prospects in smart buildings, smart homes, agricultural greenhouses, breeding and other fields.
1. Hardware design
1.1 Overall system architecture
The wireless monitoring and alarm system uses ARM9 as the core and mainly implements functions such as indoor environment information collection, smart home control, image information collection, and remote wireless monitoring and alarm. The overall architecture of the system is shown in Figure 1, which consists of 7 main modules. Among them, the indoor information collection module realizes the collection of indoor environment information, which is completed by different sensors. The temperature and humidity sensor is used to collect indoor temperature and humidity, the infrared sensor detects whether there is an intruder, the smoke sensor detects whether there is a fire, and the gas sensor detects whether there is a fire. Gas leak. The indoor home control module controls the switches of home appliances based on instructions sent back by the user's mobile phone or indoor information collected. The CMOS camera is used to capture indoor conditions. When a thief breaks into the room, it can capture his profile picture and send it to the mobile phone and store it in the SD card. The SD card is used to save the pictures taken by the camera and the historical information of the indoor environment status. The buzzer sounds when an abnormality occurs in the indoor environment and can be used to wake up the user and also act as a deterrent when thieves break in. The touch screen is used to display the human-computer interaction interface, configure the alarm system, observe indoor status, view historical information, etc. The GPRS module can realize wireless monitoring. Users can query indoor status and control indoor homes by sending text messages to the system. When an abnormality occurs indoors, the monitoring system will send remote alarm information and pictures to the user.
1.2 ARM9 core control module
The core control of the system is completed by Samsung's ARM9 processor S3C2440. S3C2440 is a high-performance 32-bit RISC microprocessor, using the ARM920T core, 0.13μm CMOS standard macro cells and memory cells, with a main frequency of up to 400 MHz. The design uses Friendly Arm's smallest system Micro2440, which includes basic power circuit, reset circuit, standard JTAG debugging port, user debugging indicator light, CPU and storage unit, etc. The storage units include 64 MB of SDRAM, 64 MB of NAND Flash and 2 MB of NOR Flash. In addition, its U-shaped interface expands various commonly used buses, LCD and CAMERA interfaces, GPIO, etc.
1.3 Indoor information collection module
The temperature and humidity sensor adopts Sensirion's digital sensor SHT11, which uses CMOSens technology to integrate the humidity sensitive element, temperature measuring element, 14-bit A/D and serial interface circuit. It has the advantages of fast response speed, strong anti-interference and high cost performance. . In the design, the GPIO port is used to simulate its serial port protocol to read and write sensor data. The infrared detector uses ZT-7225 with a detection range of 10 m, powered by 12 V and with relay output. The gas sensor uses an MQ-4 sensor that is sensitive to methane and natural gas. As the gas concentration increases, its internal resistance becomes smaller. The designed circuit is shown in Figure 2, in which the variable resistor can set different alarm thresholds, and the smoke sensor uses MQ-2, which is sensitive to smoke. In the design, the outputs of infrared, gas and smoke sensors are sent to the processor through an AND gate to generate interrupt signals.
1.4 Indoor home control module
The indoor home control module realizes the control of home appliances by the system or the user. The design uses AC solid-state relays to realize the control of weak currents to strong currents. AC solid-state relays have no contacts, good reliability, long life, and are easy to use. The relay load voltage selected in this article 24~380 V, control voltage 3~24 V, control current 3~25 mA. The control principle of home appliances is shown in Figure 3. ARM outputs high level through the GPIO port to turn on the power supply, and outputs low level to turn off the power supply.
1.5 CMOS camera module
The system processor uses S3C2440, which has its own CMOS camera interface. In the design, it is led out through the interface. The interface pin assignment is shown in Figure 4. The camera uses Friendly Arm’s CAM130 camera module, which includes an adapter board and ZT130G2 camera.
1.6 GPRS module
The GPRS network is a wireless network with wide coverage and perfect performance. It has fast communication speed, strong anti-interference ability, low communication bit error rate, and fully utilizes the existing mobile communication network with no construction and operation costs. The monitoring system implemented using GPRS has high real-time performance, safety and reliability, and low communication cost. In this article, Huawei EM310 module is used to implement GPRS communication. The working frequency band of EM310 is EGSM900/GSM1800. It is compatible with GSM/GPRS Phase2/2+ protocol and supports a UART interface. In the design, the EM310 module communicates with ARM9 through this interface. The circuit principle is shown in Figure 5. The system can use this module to send text messages to users to report alarm information, or receive user text message instructions to respond to user remote operations.
2. Software design
2.1 System main program
The embedded Linux operating system is a real-time multi-tasking embedded operating system with excellent performance, open source code, portability, curability, tailorability and preemptive type. It is widely used in small and medium-sized control systems. It has a small footprint and high execution efficiency. It has the characteristics of high performance, good real-time performance and strong scalability. The system software design part includes three main parts: transplantation and tailoring of the embedded Linux operating system, system application development, and graphical user interface design using Qt/Embedded. The transplantation and tailoring of the embedded Linux operating system is mainly divided into five steps: setting up a Linux development environment and establishing a cross-compilation environment; configuring and compiling the bootloader; configuring and compiling the Linux kernel; and installing the Linux embedded operating system. After completing the above steps, start the development of the application program on the embedded operating system, which is the core control program of this system. The process is shown in Figure 6. When the program starts running, it first initializes the buffer and some variables inside ARM9, then initializes the serial port, timer, interrupt and peripheral equipment, and then reads whether there is any instruction information from the customer in the SIM card. If there is an instruction Then execute the user's instructions; otherwise, the program starts to collect data from various indoor sensors and controls the corresponding home appliances based on the collected data. If there is abnormal information such as smoke or high gas concentration, a text message alarm will be sent to the user through the GPRS module; if the infrared sensor detects someone in the room, the camera will be controlled to capture a frame of image and sent to the customer via MMS. In order to prevent the user from not seeing the message in time, a reminder will be called to the user's mobile phone 30 seconds after sending the message.
After the program design is completed, it is downloaded and run in ARM9 through cross-compilation; in addition, this system also uses Qt/Embedded to design a good human-computer interaction interface, which can be used to set the control mode and alarm mode of home appliances, and can also manually set the opening of home appliances. with closure.
2.2 GPRS module subroutine
The GPRS module subroutine involves GPRS module initialization, SMS service center address setting, short message format setting, alarm frame/control frame/response frame information assembly and analysis, short and multimedia message sending and receiving and making calls, etc. The basic process is shown in Figure 7. If you need to send MMS messages, dial up the Internet through GPRS Modem, establish a link with the MMS gateway, then encapsulate pictures and text into MMS data packets, and then submit the MMS data packets to the MMS gateway through the GPRS network, thereby realizing the sending of MMS messages. Sending text messages and dialing are implemented using a set of AT commands specifically designed to control the GPRS module. These commands usually start with "AT" and end with a carriage return character. The AT commands mainly used by the system are as follows: module wake-up: "AT\r"; short message information format setting: "AT+CMGF=1\r"; SMS service center address setting: "AT+CSCA=\"+8613800250500\" \r"; - Nanjing SMS center number; SMS reading: "AT+CMGL=\"ALL\"\r"; - Reading all short messages; SMS sending: "AT+CMGS=\"15105187703\" \r";-User number; call: "ATD15105187703;\r".
Previous article:Communication interface design of RS485 bus based on ARM9 and LINUX
Next article:ARM9 embedded processor S3C2440 implements a remote image light monitoring system
Recommended ReadingLatest update time:2024-11-16 15:03
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
- EEWORLD University Hall----Intelligent Control System
- Body fat scale is broken, pry it open and see
- 【New Year's Festival Competition】+ "Big Head Doll" Amusement Park
- OLED Technology Consulting Part-time
- What issues should be paid attention to when developing 51 single-chip microcomputer operating system
- What are the advantages of Qorvo's Fusion 5G product portfolio, which won the "Global Electronics Achievement Award"?
- EEWORLD University ----TI DLP? Labs - Display
- Predictive Control Algorithm Program
- How to configure 2 network ports?
- Prize live broadcast: C-V2X (Internet of Vehicles) test challenges and solutions, make an appointment to win Keysight gifts