Design of wireless monitoring and alarm system through embedded Linux and S3C2440 processor

Publisher:VS821001Latest update time:2023-02-01 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Design of wireless monitoring and alarm system through embedded Linux and S3C2440 processor

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.

Design of wireless monitoring and alarm system through embedded Linux and S3C2440 processor

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.

Design of wireless monitoring and alarm system through embedded Linux and S3C2440 processor

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.

Design of wireless monitoring and alarm system through embedded Linux and S3C2440 processor

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.

Design of wireless monitoring and alarm system through embedded Linux and S3C2440 processor

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.

Design of wireless monitoring and alarm system through embedded Linux and S3C2440 processor

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

[1] [2]
Reference address:Design of wireless monitoring and alarm system through embedded Linux and S3C2440 processor

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

S3C2440 timer 4 interrupt test program
__irq is a flag used to indicate whether a function is an interrupt function. For different compilers, the position of __irq in the function name is different, for example: In ADS compiler: void __irq IRQ_Eint0(void); In Keil compiler: void IRQ_Eint0(void) __irq; However, its meaning is the same. It completes the ta
[Microcontroller]
S3C2440 Real-time Clock RTC
        The Real Time Clock (RTC) unit can be operated by a backup battery when the system power is off. The RTC can be The RTC unit operates on an external 32.768kHz crystal oscillator and can perform alarm functions. RTC operation is relatively simple, and the register settings are described in detail in the d
[Microcontroller]
S3C2440 Real-time Clock RTC
s3c2440 external interrupt operation
    To correctly execute the external interrupt of 2440, generally two parts need to be completed: interrupt initialization and interrupt processing function.     Before executing the interrupt, the interrupt to be used must be initialized. The external interrupt pin EINT of 2440 is multiplexed with the general IO pin
[Microcontroller]
S3C2440 Timer Initialization Method
S3C2410 provides 5 16-bit Timers (Timer0~Timer4), of which Timer0~Timer3 support Pulse Width Modulation - PWM (Pulse Width Modulation). Timer4 is an internal timer (internal timer), PCLK is the signal source of the Timer, we convert PCLK into an input clock signal by setting the corresponding Prescaler and Clock Divid
[Microcontroller]
S3C2440 Timer Initialization Method
s3c2440 serial port usage
1. Serial communication principle UART: Universal Asynchronous Receiver/Transmitter, used to transmit serial data. When sending data, the CPU writes parallel data into the UART, and the UART sends it serially on the TxD line according to a certain format. When receiving data, the UART detects the signal on the RxD l
[Microcontroller]
s3c2440 serial port usage
Porting s3c2440 ads program to keil (I) Preliminary completion
1 Add the project to compile just like any other project 2440init.s(8): error: A1023E: File "option.inc" could not be opened:  etc.  Directly put option.inc Memcfg.inc 2440addr.inc directly in the directory of 2440init.s Then compile the current error and it will disappear 出现 .led.axf: Error: L6238E: 2440ini
[Microcontroller]
Porting s3c2440 ads program to keil (I) Preliminary completion
Introduction to the S3C2440 USB Host Driver protocol based on OHCI protocol (Part 2)
1 HCD's responsibilities: 1.HCD is responsible for the operation of HC. HCD can directly communicate with the operable registers of HC and establish the interrupt ED table header pointer in HCCA. HCD maintains the status of HC, table processing pointer, table processing enable, and interrupt enable. 2. Bandwidth
[Microcontroller]
Introduction to the S3C2440 USB Host Driver protocol based on OHCI protocol (Part 2)
Wiring Analysis of S3C2440 and NOR FLASH (AM29LV160DB)
The feature of NOR FLASH is on-chip execution (XIP, eXecute In Place), so that the application can run directly in the flash memory without having to read the code into the system RAM. NOR has high transmission efficiency and is very cost-effective at a small capacity of 1 to 4MB, but its performance is greatly affe
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号