introduction

The home environment refers to the environment of family reunion, rest, study and housework. The quality of home environmental conditions directly affects the morbidity and mortality of residents. Urban residents spend 90% of their time working, studying and living indoors every day. Therefore, the relationship between the living environment and human health and children's growth and development is extremely close. In recent years, the emergence of acute infectious atypical pneumonia (SARS), H1NI swine flu and super bacteria have all pointed out the importance of indoor environmental health. Therefore, the new concept of “healthy home” and “smart home” highlights its significance, that is, home should put safety, health and comfort at the forefront.

Strengthening the real-time monitoring and treatment of the environmental conditions of the home environment (including harmful gas content, air humidity, indoor temperature, smoke caused by fire, etc.) can provide people with a safe, healthy and comfortable living environment.

Overall system design

The system is mainly for real-time monitoring of temperature, humidity, smoke concentration, carbon monoxide concentration and methane concentration in the home environment. The main work of the system includes: automatic data collection, processing, index analysis, real-time display of indicator information on the LCD screen and remote monitoring webpage. When the temperature is too high, the smoke concentration and harmful gas concentration exceed the standard, the local sound and light alarm is performed. Prompt and send remote alarm information to the remote monitoring host. According to requirements, the environmental monitoring system mainly includes three parts: the front-end information collection end, the information processing center, and the remote monitoring end.

Front-end information collection end: Because WIA-PA wireless sensor network has flexible and fast network topology maintenance; adaptive frequency hopping mode and retransmission mechanism ensure communication reliability more effectively; support intra-network packet aggregation, reduce network overhead, and extend Battery life; Compatible with IEEE802.15.4 standard, it can use existing commodity devices, easy to implement; Compatible with wireless HART standard, support HART command, it is easy to upgrade traditional instrument to increase wireless communication function; Users can conveniently use and manage without having to compare High professional knowledge. Therefore, the temperature, humidity, smoke, carbon monoxide, methane and other sensors in the WIA-PA industrial wireless sensor network independently developed based on the WIA-PA standard are distributed in the home environment, collecting various environmental variable information and transmitting information. Go to the wireless gateway.

The information processing center is an indoor central control unit with GM8120 as the core processor. It is mainly responsible for receiving, processing, forwarding, local real-time display, abnormal alarm and remote transmission of alarm information.

The remote monitoring terminal is the smart home remote monitoring host. The remote monitoring host displays the sensor data indicator on the remote monitoring page in real time after receiving the environmental information forwarded from the indoor center control machine; when receiving the remote alarm, the remote alarm is performed. Prompt and store the alarm information in the appropriate database. The system network topology is shown in Figure 1.

Figure 1 System network topology

Hardware platform

The hardware platform uses a hardware system with the GM8120 Soc as the core processor. The hardware structure of the indoor center control machine is shown in Figure 2.

Figure 2 indoor center control machine hardware structure

The GM8120 core processor has the following features:

• 1.8V core power supply, 3.3V external I/O power supply;

• 8KB I-Cache and 8KB D-Cache/MMU;

• External memory controller (SDRAM control and asynchronous SRAM/ROM/Flash controller);

• LCD controller;

• has a PLL on-chip clock generator;

• Video capture interface: CCIR-656 and CCIR601 interface;

• MPEG-4 and JPEG encoding/decoding engines;

• 10M/100M Ethernet card controller;

• The external storage interface integrates the IP of the High Speed ​​USB2.0 OTG controller and PHY;

• Universal Asynchronous Receiver UART, serial I2C and I2S interface;

• 32-bit watchdog timer;

• RTC with calendar function;

• Debug interface JTAG;

• SD card interface;

• 16 general purpose I/O ports and 4 channel external interrupt sources.

At the same time, GM8120 is a SoC chip for transmitting audio/video data on the Internet. The kernel is ARM9, supports MPEG-4 encoding/decoding, and MPEG-4 real-time encoding/decoding can reach 30fps and resolution can reach D1. Rarely high-integration hardware MPEG4 encoding/decoding chip. Therefore, it is a core processing chip that is more suitable for indoor center control machine.

Software implementation

After the hardware platform is set up, the software development environment of the system is built. To develop the ARM-Linux embedded operating system, firstly, a supporting development environment needs to be established, including the transplantation, configuration, compilation, and debugging environment of the operating system. The system program is written in Source Insight using C language and Linux functions, and the program is compiled, debugged and downloaded in the virtual machine.

The core of the smart home's home environment real-time monitoring and alarm system is the indoor center control machine. The indoor center control machine is mainly responsible for receiving, forwarding, and processing home environment information, and coordinating and controlling important equipment for normal operation of each module. Therefore, the indoor central control machine mainly has the following functional modules: an indoor central control system initialization module, an environmental information capture module, an environmental information processing module, an environmental information real-time display processing module, an information abnormal sound alarm module, and an environmental information abnormal image display module. The software architecture diagram of the indoor center controller is shown in Figure 3.

Figure 3 indoor center control machine software architecture diagram

System initialization module: configure all the hardware interfaces of the indoor central control unit and initialize each variable.

Environmental information capture module: The indoor central control unit captures the home air and environmental information data collected by the wireless sensor sent by the WIA-PA wireless gateway by listening to the UDP port, and transmits the received data to the environmental information processing module.

Environmental information processing module: Analyzes and processes the received sensor data to calculate the value of each sensor. On the one hand, the processed information is sent to the remote monitoring center, so that the data information of the remote monitoring center can also be updated in real time. On the other hand, the processed data is sent to the environmental information real-time display processing module to realize real-time display of the home environment information on the indoor center control machine.

The environmental information real-time display processing module: performs interface display processing on the data transmitted by the environmental information processing module.

Information abnormal sound alarm module: When the indoor temperature is too high or the smoke concentration and harmful gas content exceed the standard, the indoor central unit emits a voice alarm prompt to attract the attention of the system user.

Environmental information anomaly image display module: When the indoor temperature is too high or the smoke concentration and harmful gas content exceed the standard sound and light alarm, the indoor center machine emits an audible and visual alarm and pops up the alarm image operation interface, waiting for the user to view the touch screen of the indoor center control machine. Information or cancel alarm information, etc.

After the system initialization is completed, the indoor center controller creates a data receiving thread to obtain home environment information. The sensor sends two packets: one for the incoming packet and one for the packet. After receiving the network packet, it is determined by analysis which sensor is online, and then the corresponding sensor name is displayed on the corresponding interface of the indoor center machine. After receiving the data packet, the data packet is processed to present valid data information, the value of the sensor is calculated, and the sensor value is displayed in real time on the indoor central control unit. At the same time, the received environmental information is sent to the remote monitoring center for timely updating and display of the information. When the indoor temperature is too high or the smoke concentration and harmful gas content exceed the standard, the indoor central control unit will perform real-time local alarm and send the alarm information to the remote monitoring host. The main flow chart of the indoor center control machine software is shown in Figure 4.

Figure 4 indoor center control machine software flow chart

System function test

The main functional test of the environmental real-time monitoring system: mainly tests the real-time display of environmental monitoring values ​​and the alarm function when the environmental value is abnormal.

Hardware components: indoor central control unit, WIA-PA gateway, switch; WIA-PA temperature/humidity sensor, WIA-PA methane sensor, WIA-PA carbon monoxide sensor, WIA-PA smoke sensor, and router.

Software composition: download the written indoor control center machine program into the indoor center control machine to ensure that the indoor center function works normally, and download the programs of each WIA-PA sensor and the WIA-PA gateway program to their respective hardware systems. Make sure it works. At the same time, the management software of the remote monitoring center is opened.

The location of the system test is selected in the showroom where the home environment is laid out. Place an indoor center control unit at the entrance to the showroom. Place the WIA-PA gateway in the switch box behind the door, arrange the sensors according to the layout of the room (living room, kitchen), and place the WIA-PA router and WIA-PA temperature and humidity sensor, WIA-PA smoke sensor in the living room. , WIA-PA carbon monoxide sensor; WIA-PA router, WIA-PA temperature and humidity sensor and WIA-PA methane sensor in the kitchen. The system test environment diagram is shown in Figure 5.

Figure 5 system test environment diagram

Test process: Connect the remote monitoring host to the indoor central control unit through the network cable, and then open the WIA-PA wireless gateway and WIA-PA router and various sensors. Click the wireless measurement value button in the home security control home security main interface to enter the environmental information monitoring data display interface. On the indoor center control machine interface, you can see the room information, sensor data information and the calculated values ​​of each sensor. .

Adjust the heating wire from 10 °C to 100 °C to different temperature and place it under the temperature sensor. You can see that the value of the temperature sensor on the page of the indoor central control unit and the remote monitoring center is continuously refreshed in real time; when the value of the temperature sensor is changed After exceeding the preset threshold, the indoor center control opportunity will issue a local sound and light alarm in real time, and at the same time issue a remote alarm message. A temperature abnormality alarm prompt appears on the remote monitoring page. At the same time, the database is checked and the alarm information is stored. The real-time display of environmental information and the alarm interface are shown in Figure 6.

Figure 6 Environmental measurement real-time display alarm interface

in conclusion

Through the system function test, the real-time monitoring system of home environment based on WIA-PA wireless sensor network can achieve real-time collection of home environment information; indoor central control machine can also receive, forward, process and display environmental information in real time. Data, and local sound and light alarms and remote alarm messages when abnormal. The remote monitoring page can also update the environmental information in real time, the temperature is too high, the harmful gas exceeds the alarm prompt and the alarm information is stored. Therefore, it is verified that the WIA-PA wireless sensor network can be better applied to smart home environment monitoring.

OEM Connector

Oem Connector,Audio Connector,Power Supply Connectors,Jack Connector

Dongguan Swan Electronic Technology Co., Ltd , https://www.swanconnector.com