Paper— Implementation of Air-conditioning Control Technology Based on Wireless Sensor Implementation of Air-conditioning Control Technology Based on Wireless Sensor

— Using wireless sensor networks to collect indoor temperature and humidity data, a monitoring system is built. According to the data of the central processing unit, the state of the current room is analyzed, and the cooling capacity (heat) and air volume of the central air conditioner are calculated. Meanwhile, this system calculates the relevant fees based on the amount of cold (heat) consumed by each user, and provides a more accurate data base for the central air conditioning system for energy efficiency optimization. The results show that this system can accurately reflect the environmental status of the target room. Therefore, it is concluded that the indoor environment monitoring system based on wireless sensor network and embedded technology proposed in this paper is effective and feasible.


Introduction
The requirement of modern building for air conditioning control system has changed from centralized control to independent and individual control for rooms. Variable Air Volume (VAV) air conditioning control system can independently control the temperature according to the temperature requirements of each room [9]. It also can meet the needs of different rooms (or regions) for load changes by changing the amount of air supply. Meanwhile, the system allows the air volume delivered by the air conditioning system to be transferred between the various rooms in the building. Therefore, we can solve the problem that the load of each room is not at the maximum, thereby reducing the total air volume of the system design [1, 5~6,10]. Some material demonstrated that the VAV air conditioning control system can save 30% of the energy, and it can improve the comfort degree of the environment. The system is suitable for the building of large floor space and room, especially the office building. So the effects of simplicity, comfort and energy saving will be realized. Therefore, the object of this paper is VAV central air conditioning. The distribution of central air conditioning air ducts or hot and cold water pipes in the building is based on the floor.
Each floor has a duct or hot and cold water pipe, and then we extend a terminal device (fan coil) to the pipe of each room. Central air conditioning system is a tree topology structure, which is composed of the air conditioning host, pipe and terminal device.
Based on the tree network topology [7], this paper designs a three-tiered central air conditioning indoor environment monitoring system, which includes data acquisition layer, data communication layer and data processing layer. The data collection layer is composed of wireless sensor nodes arranged in each room of the target floor. The task of this system is to digitally storage the environment parameters (temperature, humidity) in the room after the sampling, so as to prepare for the data processing [11]. In the data communication layer, each node sends the collected data to the sink nodes of each floor in the form of wireless communication. The node sends the data to the floor's embedded microprocessor, and the embedded microprocessors at each floor send data of each layer to the central processing computer through the transport network. The data processing layer is composed of an embedded microprocessor and a central processing computer, and its task is to regularly store and analyze the data sent by the processing node.

State of the Art
With the development of the national economy and the improvement of people's living standards, the application of central air conditioning in commercial and civil buildings is more and more widely. Central air conditioning system is an indispensable energy operation system in modern architecture, and it can provide people with a comfortable living and working environment, but it will consume a lot of energy. In the design and equipment selection of air conditioning system, maximum load is usually as the design case. However, in the actual operation, air conditioning load varies with a variety of factors. Sometimes, the minimum is less than 10% of the design load. There is a serious phenomenon of energy waste, so the energy efficient air condition is of significance. At present, the interior temperature, humidity and other data of large building are not real-time collected, air conditioning system cannot timely adjust the cooling (heat) volume and air volume based on indoor environment parameters and changes of the external environment. So the system of energy-saving optimization control has not been realized [2~4, 8].

System hardware
The overall design of the system is shown in Figure 1:  Sensor board: The wireless sensor module is the core module for data acquisition and it has many types. And this module can measure various physical quantities. According to the environment and the collection manner of data, we can select the appropriate sensor.
At present, the price of the sensor is relatively expensive, which is limited by the accuracy of the sensor's acquisition. In the wireless sensor network, we introduce the sensor network processing. Through the manner of network, we can reduce the system measurement error caused by the single-point environment and transient errors caused by a single point of measurement. There are multiple measurement nodes in a monitoring area, so the measurement accuracy of a single node is not too high. We can use the multi-point measurement data in the region to get more accurate data through statistical methods. Therefore, in the wireless sensor network, the requirements of sensor acquisition accuracy are not very high.
The sensor board usually carries sensors of temperature, humidity, vibration, light intensity, gas alarm, magnetic resistance and infrared, and we can select the required sensor according to the actual application. The sensor can be divided into digital and analog sensor. The analog sensor outputs the analog signal and then gets the digital signal through the conversion. Digital sensors directly output digital signals. The node is mostly battery-powered, and the sensor must be small, low power, and simple periphery circuit, so it is preferable to use a digital sensor that does not require complicated signal circuits. When we design the hardware, it is best to separate the sensor board and calculation, communication sub-board, thereby improving the system's modular level, MDA300CA is a multi-function data acquisition board developed at the University of California, Los Angeles (UCLA) Embedded Network Sensor Center (CENS). The temperature and humidity sensors are integrated on the chip. It provides a flexible solution for sensor applications including environmental monitoring and many custom sensor applications on the basis of multifunction user interface. Its communication and control features include: (MDA300CA) • The number of precision differential ADC channel is 4; • The number of digital I/O channel is 6 (event-driven interruption); iJOE -Vol. 13, No. 7, 2017 • The number of single end is 7. The number of differential ADC channel is 3; • The number of feedback channel is 2. The one is power on, the other one is power off; • 64K EEPROM for onboard sensor calibration data storage; • 2.5V, 3.3V, 5V external incentive; • External 1 2 C interface; • 200Hzcounting channel used for wind speed and pulse frequency.
Gateway: In practical application, the wireless sensor network cannot exist as an independent communication network. The data monitored in the network needs to be sent to the upper server for analysis and processing. Sensor nodes also need to communicate and share the information with each other. Therefore, this system requires the wireless sensor network to be interconnected with different types of networks.
In the wireless sensor network, the gateway is the inter-network protocol converter, and is an important part of the whole network data aggregation storage processing. Its status is very special, and the role is very critical. So, it is an indispensable link between networks. So the selection of efficient and stable gateway node is the necessary guarantee, so as to make the entire network work normally. The MIB520CA provides a USB interface for the sensor node for communication and online programming. The sensor node can be used as a base station in conjunction with the MIB520CA-USB gateway. In order to transmit data, the MIB520CA also provides a USB programming port.
MIB520CA provides two separate ports. One for online Mote programming and the other for USB data transfer. The MIB520CA has an onboard processor that can run the processor / RF board of the sensor node. It does not require an external power supply based on USB bus. Compared to MIB510 serial gateway, MIB520-USB gateway has faster data transmission speed and it is easy to use. Compared to MIB600 Ethernet gateway, MIB520-USB gateway is cheaper. Therefore, according to the needs of practical applications, the system uses MIB520CA-USB gateway.
Embedded platform: The system uses the ARM9 development board as hardware platform, and the core of development board is ARM9 S3C2410X processor of SAMSUNG. This is a 16/32-bit embedded RISC microprocessor based on the ARM920T core, its basic frequency is 203MHz. It mainly used in handheld devices, and it has low power consumption and high performance-price ratio. The kernel of ARM920T uses a five-level pipeline and it includes ARM9TDMI, memory management unit (MMU) and cache. Among them, MMU can manage virtual memory. The cache consists of a separate 16KB address and a 16KB data cache. ARM920T has two internal coprocessors, CP14 and CP15. CP14 is used for debug control, and CP15 used for storage system control and test control.
Central processing computer and man-machine interaction equipment: The central processing computer is the site of data processing and analysis. We have to process all the temperature and humidity data of each floor, so the amount of data is large. Therefore, we choose Inter(R) Core(TM)2 Duo PC as processor, and the memory is 1G. Meanwhile, it is installed with Windows operating system and SQL Server database. Human-computer interaction device mainly includes display, keyboard and mouse.

System software
The entire software architecture platform can be divided into three parts: the operating system layer, the driver program and the user application program. The operating system is Linux. The driver is the underlying program, which communicates directly with the hardware peripherals. It is used for Ethernet driver, serial driver of RS232 and RS485 interface, and read and write driver for large capacity memory Nand Flash.
On the basis of API functions and task scheduling modules provided by the system layer, we design monitoring system, so as to achieve a variety of functions. This paper mainly studies the software realization of monitoring system function.
System is composed of six function modules based on monitor system functions. System function module diagram is shown in figure 2.  The data acquisition module mainly completes the collection of temperature and humidity data. The room condition monitoring module analyzes the current room status based on the collected data, so as to obtain the calculation evidence of cooling volume and air volume. Cooling volume and air volume module compute their required data. The billing system module estimates the relevant fees based on the amount of cold consumed by the user.

Database
With the extensive application of embedded systems and the continuous improvement of data processing and management of users, the integration of intelligent device and database technology has been paid more and more attention. This database not only has the main function of the traditional database, but also has embedded and mobile technology. So it is usually used in handheld computers, PDA, car equipment, mobile phones and other embedded devices. This database technology is not limited to the single operating system, and it can handle business and deliver information anytime, anywhere. The development of embedded database can improve the univer-sality of data access, thereby making it possible for people to access information anytime, anywhere.
The embedded database integrates the database system with the operating system and the specific application, and it can be executed on a variety of intelligent embedded devices. Compared with the traditional database system, it has small size, strong portability, usability and comparatively complete function to achieve the user's data management operations.
The embedded database can be executed in the application process, and it provides zero configuration operation modes and the resource consumption is very small. However, it cannot provide high-capacity data management as a complete database based on resource constraints of embedded systems. Embedded devices can be placed everywhere. It is affected by the environment, and the data reliability is low. Therefore, we configure the background database to achieve large-capacity data storage and management in the PC. Embedded database is front-end equipment, it requires GUI interface to achieve embedded terminal on the human-computer interaction. It also can complete the data exchange between the main data source on the PC based on serial port to achieve the system server-side data management. Meanwhile, it receives data from the embedded terminal, and downloads the data to the embedded terminal.
Berkeley DB, developed by Sleepycat Software in the United States, is an open source embedded database. It provides scalable, high-performance and transactional data management services for applications. It also provides a set of concise function API interfaces for data access and management. It is a classic C-library mode toolkit and provides rich function set. It is designed for application developers to provide industrial-grade database services.
Features of Berkeley DB are: • Embedded, no need to install the configuration; • It provides API interface based on multiple programming languages, including C, C++, Java, Perl, Tcl, Python and PHP; • Light and flexible. It can be executed on almost all UNIX and Linux systems and their variants of the system, Windows operating system and a variety of embedded real-time operating system; • Adjustable. Its database library is only a few hundred KB size, but it can manage the size of 256TB of the database. It can support high degree of coherence, and tens of thousands of users can simultaneously manipulate the same database.
The database mainly stores the temperature and humidity data, the historical data and the volume of each room in real time collected by the wireless sensor. Each floor is equipped with an embedded microprocessor for analyzing the real-time temperature and humidity data collected by the floor sensor network. And the data of each floor and need to be aggregated to the central processing computer. Based on this structure, the system intends to use a distributed database to achieve specific functions.
We use the SQLite embedded database in the floor of the embedded microprocessor. It takes very little resources, only a few hundred K of memory in the embedded device. We create an Airtable table that stores the temperature and humidity data for each floor, and define the Roomid, Time, Humid, Humtemp fields, corresponding to room number, time, humidity and temperature. We also create a Roominfo table to hold room information, and define the Roomid, Volume field, corresponding to the room number and the volume of the room.
In the central processing computer, the amount of data is very large, so we use SQL Server database. We create an Allinfo table to store temperature and humidity data for the entire building. We also define Roomid, Time, Humid, Humtemp fields, corresponding to room number, time, humidity and temperature. The data in the embedded microprocessor communicates with the data on the central processing computer via the communication network. In the central processing computer, we can access data, draw temperature and humidity curves, and we also can query, delete and print historical data. Meanwhile, we can calculate the air volume of the air conditioning based on the collected temperature and humidity data, analyze the status of the room and calculate the relevant costs

Result Analysis and Discussion
We arrange the wireless sensor nodes in each room to obtain the temperature and humidity data. According to the collected data, the relevant management functions will be completed. The trend curve can reflect the change of the data variable over time. This paper selects temperature and humidity as the system performance test index. The trends are shown in figure 3 and figure 4.

Conclusion
The experimental results show that this system can accurately reflect the environmental status of the target room. In the meantime, this system calculates the specific cooling (heat) volume, air volume and other related data based on the actual needs, and provides more accurate basic data to the central air conditioning optimization control. Therefore, the indoor environment monitoring system based on wireless sensor network and embedded technology proposed in this paper is effective and feasible, to meet the central air conditioning energy-saving optimization requirements. This system collects indoor environment parameters in real time, and solves the shortcomings of the traditional environmental monitoring system. However, it also has some problems. For example, when the number of task is increased, it is necessary to reduce the energy consumption of nodes by protocol optimization and data fusion, so as to achieve the stability of the system.