Design of temperature and humidity monitoring and transmission system based on network

Publisher:EternalSmileLatest update time:2012-03-15 Keywords:Network Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Through comparison and solution demonstration, this paper has determined a new type of network-based temperature and humidity monitoring system, that is, the measurement results of one or more temperature and humidity sensors collected are dynamically published in the form of web pages through the Internet. At the same time, any host computer can issue instructions to the temperature and humidity control device through the network according to the administrator's authorization to control any node. For this solution, any PC that can access the Internet can monitor and manage the working status of each sensor, realizing a measurement and control network without distance restrictions, which is very convenient and flexible.

1 System overall structure

The overall structure of the system is shown in Figure 1. Each temperature and humidity test control module has a network interface and is connected to the central server through a router. The central server includes an IIS information server system and an SQL database server. The former is responsible for communicating with the temperature and humidity test nodes in an online state to obtain the temperature and humidity measurement results, and then broadcasts the received temperature and humidity detection data to customers through the Internet in the form of a website, and stores the received data (test node number, temperature, humidity, measurement time, etc.) in the SOL database. At the same time, customers can send instructions to each test control module through the central server according to different permissions to change a certain temperature and humidity control parameter.

The structure of the temperature and humidity test module is shown in Figure 2. Its structure includes: main controller (MCu), temperature and humidity sensor, digital display and button, Flash memory, network transmission module, clock device, and buzzer. The test control process is: MCU measures temperature and humidity once every certain period of time. If it is connected to the central server, the result is uploaded to the central server through the network, otherwise the result and the current time are stored in the Flash on the board; then the humidity measurement value is compared with the user set value, and different processing is performed according to the comparison result. For example, when the test humidity is higher than the set value, the humidity is reduced by controlling the dehumidification material to absorb moisture. If the set humidity value is reached, the humidity in the cabinet is kept within the set range through certain feedback control. If the temperature or humidity is higher than the dangerous threshold, the system will alarm through the buzzer.

2 Temperature and humidity test control module

2.1 Selection of temperature and humidity sensors

Since the temperature and humidity measurement accuracy is the key to determine the system performance, the digital temperature and humidity sensor SHl75 produced by Swiss Scnsirion Company is selected here to realize temperature and humidity measurement. The characteristics of this device are: before leaving the factory, each sensor has been precisely calibrated in an extremely accurate humidity chamber, and the calibration coefficient is programmed into the corresponding program and stored in the calibration memory; it is highly integrated, with internal functions such as temperature measurement, humidity measurement, signal conversion, A/D conversion and heater; it provides two-wire digital serial interface SCK and DATA, with a simple interface, supports CRC transmission verification, and has high transmission reliability; the measurement accuracy is programmable, with a built-in A/D converter (resolution is 8 to 12 bits, which can be selected by programming its internal registers), and has high measurement accuracy. Since the temperature and humidity sensor is integrated at the same time, it can provide temperature-compensated humidity measurement values ​​and high-quality dew point calculation functions, etc. The humidity accuracy is within ±4%, and the temperature accuracy is within ±0.4℃.

2.2 Detection data storage solution

When the temperature and humidity detection control module is not connected to the control host, the detection data needs to be saved for inspection. Therefore, the system uses SST25VF016B with a storage capacity of 16 Mb, which belongs to the NAND type non-volatile flash memory. This memory has the characteristics of fast speed, low cost and high density, and is widely used in sensor measurement systems. Its read/write operation is in bytes, while the erase operation is in blocks. Read, write and erase operations are all completed through commands; it cannot be erased by bytes, and a whole block needs to be erased before each rewrite operation; the number of erases for each block is limited to about 100,000 times. According to the needs of the system to store data types, the Flash is divided into two parts: one part (2 blocks, 32 kh each) stores the system information of the control block, including number, temperature correction information, humidity correction information, humidity control range, etc.; the other part (62 blocks, 32 kb each) stores real-time temperature measurement results, including measurement time, temperature, humidity, and whether the record is uploaded. The control algorithm of Fhash erasing and writing is as follows: when the system is turned on, it reads the system information and obtains various control parameters; then it finds the last storage location of the temperature and humidity record and the usage of each block, and continues to write new measurement information. After the current record block is full, the block usage record is updated in the system information, and a new block is found to write. If the storage information reaches the system capacity, the earliest block in the 62 blocks is selected for erasure and reuse. This design refers to the u-cos file management system, but because the length of the sensor measurement record is fixed, the read and write algorithm of each record is simplified.

2.3 Humidity Control Algorithm

For the monitoring and control of temperature and humidity, it is difficult to achieve ideal control if only simple feedback control is used (i.e., when the humidity is higher than the set value, the moisture absorber absorbs moisture, and after saturation, it will discharge moisture to the outside, and so on to achieve humidity control). The reason is that the working curves of the temperature control device and the moisture absorber are usually nonlinear, and this nonlinearity makes the calculation of the control time uncertain. After repeated research and experiments, this paper uses the fuzzy control method in the temperature and humidity detection and control system to achieve better results. That is, according to the temperature and humidity measurement values ​​within a period of time in the monitoring node, the fuzzy estimation of the capacity of the moisture absorber and the temperature control device is obtained (divided into 5 categories: strong, relatively strong, medium, relatively weak, and weak), and according to the difference between the humidity and the set range, the fuzzy estimation of the current humidity value is obtained (far greater than, close to, within the range, lower than, far lower than), and then the external solid-state relays are controlled according to the set fuzzy control rules to achieve good control of temperature and humidity.

2.4 Network interface implementation

The network connection between the temperature and humidity detection control module and the central server is realized through the NePort network serial port conversion module of Conextop Company. Its volume is about two standard RJ45 sockets, with a 10M/100M Ethernet interface, and can simultaneously transmit TCP/UDP packets to multiple data receiving devices, providing 1-2 high-speed serial ports with a baud rate of up to 921 600 b/s. The MCU is connected to the NePort through a standard serial port, and the NePort is connected to the central server through a router. Each temperature and humidity monitoring system has a unique system code and is connected to the central server through a certain command format. The main functions include: uploading temperature and humidity measurement information every 5 seconds; synchronizing the temperature and humidity monitoring system clock and server clock every day; setting temperature and humidity correction information and humidity control information through the network, etc.

3 Design of Network Monitoring System

3.1 Central Server

The central server is equipped with IIS information server and SQL database server, and uses ASP.net language to realize the temperature and humidity monitoring system and network service of B/S structure. The advantage of B/S structure is that any computer connected to the Internet in the system can become a monitoring client, and monitoring and management can be realized through IE browser without installing any software. The main functions realized are: registering and managing each temperature and humidity monitoring system; storing the temperature and humidity data of each temperature and humidity monitoring system in the database and being able to view and delete it, as well as generating historical curves and generating reports; reporting real-time temperature and humidity measurement information to Internet users through web pages; user registration and authority management, etc.

3.2 AJAX realizes asynchronous transmission of temperature and humidity data

In the traditional B/S structure, when a user needs certain information, the user sends a request to the server through the browser (for example, clicks on a link), and the server sends the web page pointed to by the link to the user's browser. This process must involve the user. For the sensor network monitoring system, the sensor measurement data is updated in real time, and the server can only automatically send new data to the browser at a fixed time, and the click update method cannot be used; in addition, the traditional web page transmission process is to completely transmit the content of a web page from the server to the client browser, but the network monitoring page of the sensor is updated only part of the new measurement data each time, and the monitoring background screen and the parameter information of each machine are fixed. If the traditional synchronous update method is used, a large amount of duplicate content will be transmitted, which reduces the response speed of the system. This system uses AJAX technology to overcome these problems.

AJAX technology uses an asynchronous update solution, in which the browser is allowed to update part of the information in the web page. Each time, only the sensor measurement information needs to be updated, which reduces the burden of network communication and achieves fast refresh. The working principle of AJAX is equivalent to adding an intermediate layer between the user and the server, making the user operation and the server response asynchronous. In this way, some of the work previously burdened by the server is transferred to the client, which is beneficial for the idle processing power of the client to handle, reducing the burden on the server and bandwidth, thereby achieving the purpose of saving bandwidth.

This system uses traditional HTMLl static pages to draw the monitoring background, parameters of each temperature and humidity monitoring node and other static content on the temperature and humidity monitoring page. JavaScript is used in the background to create the XMLHttpRequest class to send an HTTP request to the server regularly, requesting the transmission of the current temperature and humidity measurement results. After receiving the request, the server obtains the measurement information of each sensor through a web service and returns the result to the requested page. The network transmits only the measurement data that needs to be updated, so the response speed is very fast and no user participation is required.

3.3 VML realizes temperature and humidity data display

When the browser receives the measurement data sent back by the server, it must be displayed in a clear and friendly interface. In order to reduce the burden on the server, it should be avoided to draw charts on the server side (the traditional ASP.NET chart implementation method) and should be implemented on the browser side. There are also many implementation schemes, such as ActiveX, Java applet, SVG, VML, etc. ActiveX and Java applet insert binary components on the web page to realize dynamic and interactive multimedia web pages, but the binary code is a security threat to the browser side, so the general ActiveX or Java applet needs to be digitally signed before it can be accepted by users; in addition, the version change of Microsoft operating system will also affect the support for ActiveX and Java applet. SVG and VML use specific scripting languages ​​to realize the drawing on the browser side, and its code is open to the client, so there is no security problem. SVG requires the browser to install the corresponding plug-in to work, while VML is supported by the current mainstream browser IE and does not require any installation, so this system selects the implementation scheme of VML. VML (Vector Markup Language) is a language that describes graphics with vectors. Its graphics can be enlarged or reduced at will without losing quality. In VML, the markup uses XML extension. Combined with Javascript scripting language, VML can display graphics dynamically. VML avoids the need for a third party to provide digital signatures, and does not require the installation of new IE plug-ins. The results are shown in Figures 3 and 4. Figure 3 is a curve chart of the temperature and humidity measurements uploaded by each node. Customers can clearly understand the temperature and humidity changes of each node over a period of time. Figure 4 is a dynamic update that displays the real-time temperature and humidity measurements of multiple nodes at the same time.

Graph

4 Conclusion

This paper mainly introduces the development of a new type of network-based temperature and humidity monitoring and transmission system. Its innovative technical features are reflected in: higher measurement accuracy is achieved by adopting high-performance temperature and humidity measurement devices; fuzzy control technology is used for humidity control, which reduces the state switching of the system and has a good control effect; Flash file storage solution completes the storage and erasure of measurement data. In addition, the network monitoring solution adopts AJAX technology to realize the asynchronous transmission of sensor measurement data and improve the response speed of the system; and VML is used to realize the dynamic display of measurement data. This solution can also be promoted and applied to network monitoring systems of other sensors.

Keywords:Network Reference address:Design of temperature and humidity monitoring and transmission system based on network

Previous article:Application of Rugged Tablet Terminals in Railway Freight Dispatching System
Next article:Design of temperature and humidity monitoring and transmission system based on network

Latest Analog Electronics Articles
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号