Ethernet-based distributed temperature and humidity intelligent monitoring system

The existing multiple traditional temperature and humidity monitoring systems have been studied, and it is found that most of them use RS485 transmission mode, which has the limitations of small control range and cumbersome wiring. In order to build a large-scale cross-regional temperature and humidity monitoring system, a method that combines Ethernet technology with traditional temperature and humidity monitoring systems and the idea of ​​software and hardware co-design is developed to develop a modular, scalable, Ethernet-based distribution Intelligent temperature and humidity monitoring system. Practice has proved that the system has a large control range and utilizes the existing developed network without rewiring, which can effectively realize remote temperature and humidity monitoring. In this paper, the overall structure of the system and the working principle of each part are explained in detail.

1 Introduction

Many large enterprise units now have multiple warehouses scattered in different locations, which is not conducive to unified management; how to use the widely used Ethernet to transform the traditional temperature and humidity monitoring system based on RS485 bus to form a large-scale remote distributed [ 1] The temperature and humidity monitoring system has become an urgent problem to be solved. Here, this paper proposes a remote distributed temperature and humidity intelligent monitoring system that is easy to install, does not need to be rewired, and is based on the existing Ethernet. The overall structure and working principle of the system are introduced in detail. The system adopts a modular design, which can be slightly modified into a multi-site distributed remote temperature and humidity intelligent monitoring system suitable for many different occasions.

2 Design and implementation of hardware system

2.1 The overall composition of the system

Each temperature and humidity monitor is composed of a single chip microcomputer, temperature sensor, humidity sensor, DS1302, LED digital tube display module, address dialing module, external memory, buzzer, air conditioner, dehumidifier, humidifier, etc. 128 temperature and humidity monitors with independent addresses are connected in parallel through the RS485 bus, and then through an RS485 to TCP / IP protocol converter can directly communicate with the computer to form a unit temperature and humidity monitoring system (unit temperature and humidity monitoring system) The system structure diagram is shown in Figure 1).

According to the actual situation, a complete remote distributed temperature and humidity intelligent monitoring system can be formed by several unit temperature and humidity monitoring systems through a hub (see Figure 2 for the overall structure of the system).

2.2 Composition and implementation of specific temperature and humidity monitor

It consists of AT89C52 plus clock module, temperature measurement module, humidity measurement module, LED display module, external storage module, address module, air conditioner, humidifier, dehumidifier drive module, etc. to form a specific temperature and humidity monitor.

2.2.1 MCU module

Each temperature and humidity monitor adopts 8-bit single-chip AT89C52 of American ATMEL company; the chip contains 8K Bytes repetitive read-only program memory and 256 Bytes random access data memory.

2.2.2 Clock module

DS1302 increases the main power supply / backup power supply dual power supply pin, and at the same time provides the trickle current charging capacity of the backup power supply, so that when the main power supply is powered off, the battery can continue to save time information and data. The connection between DS1302 and the CPU only requires three lines, namely SCLK, I / O, and RST; data is written to the DS1302 at the rising edge of the next SCLK clock after the input of the control command word, and data input starts from the low bit, bit 0. Similarly, the DS1302 data is read out on the falling edge of the next SCLK pulse immediately following the 8-bit control instruction word [2].

2.2.3 Temperature measurement module

DS18B20 [3] is the latest single-line digital temperature sensor from DALLAS, which can directly convert the temperature signal into a serial digital signal for microcomputer processing; in this system, the resolution of DS18B20 is set to 12 bits; so the actual temperature = temperature integer part + Decimal part of temperature * 0.0625.

2.2.4 Humidity measurement module

HS1101 is equivalent to a capacitor in the circuit, and its capacitance increases with the increase of the relative humidity of the measured air; has an excellent linear output, and the error is not greater than ± within the range of (0-100)% RH 2% RH; annual drift 0.5% RH / year, response time is less than 5S [4].

Put the humidity-sensitive capacitor in the 555 oscillation circuit, and change the capacitance value into a voltage-frequency signal inversely proportional to it, which can be directly collected by the computer [5].

2.2.5 LED display module

A SN74LS145N chip drives 10 LED digital switches to form a display module to simultaneously display the temperature value, humidity value and current time.

2.2.6 External storage module

The external storage module uses ATMEL's 24C512 chip with a capacity of 64K bytes. It uses the I2C bus for read and write operations and can store 6,520 historical data records.

2.2.7 Address module

The address dialing module is composed of an 8-bit dialing tube, and the address of each temperature and humidity meter is determined by the method of 8421 encoding.

2.3 Communication module of unit temperature and humidity monitoring system

The RS485 to TCP / IP protocol converter is mainly responsible for the conversion and transmission of serial data frames and Ethernet data frames. After receiving the Ethernet data packet, the processor first queues the data packet according to a certain queuing rule. The data is placed in the buffer in a certain order. When a certain limit is reached, the internal data processing chip starts processing the data frame, and then uses the serial port The data frame is sent out. Conversely, when serial port data arrives, the converter converts the serial port data frame into an Ethernet data frame. The processing process is similar, and the two processing processes are inverse processes of each other [6].

3 Working principle of temperature and humidity monitor

After power-on initialization, read and save the temperature and humidity meter address according to the status of the DIP switch of the board; read the historical value of the upper and lower temperature and humidity limits that have been set last time in the external storage and the historical value of the saved sampling interval. Then, enter the main loop, according to the sampling interval time, save the temperature, humidity, etc. data to the external storage, light the LED digital tube to display the current time, temperature, humidity, and determine according to the set upper and lower limits of temperature and humidity Whether to drive the buzzer to alarm and control the operation of the air conditioner, humidifier, and dehumidifier for temperature and humidity control adjustment [7] (see the schematic diagram of temperature and humidity upper and lower limit control in Figure 3). The system has good interactive performance. You can set the time correction value, temperature and humidity upper and lower limits, sampling interval time value, temperature and humidity correction value online at any time using interrupts and save these data to external storage; you can extract the current temperature and humidity data online and Temperature and humidity meter status and other data; historical temperature and humidity data that has been stored in external storage according to the sampling interval can be extracted by corresponding instructions.

The format of the command sent by the microcomputer is: FF + slave address + command code + data, and the temperature and humidity controller can receive the command according to whether the broadcasted slave address matches its own address in the interrupt program, and do the corresponding action according to the command Set time correction value, temperature and humidity upper and lower limits, sampling interval time value, temperature and humidity correction value and save these data to external storage to prevent loss of power failure.

4 PC software design

The software part of the temperature and humidity monitoring system includes the following five major functional modules:

1. System settings:

(1) Set upper and lower temperature and humidity limits, date, sampling interval, interface converter parameters, etc .;

(2) User password modification and system user information management;

(3) Management of warehouse unit and management of temperature and humidity meter.

Second, extract data:

(1) System users can extract historical data of temperature and humidity at any time and store them in the system database;

(2) The system user can extract the current data of temperature and humidity and the current working status of temperature and humidity at any time.

2. Data collection and analysis:

(1) Collection of temperature and humidity data;

(2) Analysis of current data.

4. Data query and analysis: query the existing data by year, month, and day, and analyze the query results, and display them in the form of tables or curves.

Fifth, data backup and recovery: complete the backup and recovery of historical data in the database.

5 Conclusion

The system is flexible and interactive, and the parameters such as the upper and lower limits of temperature and humidity, sampling interval, correction value, etc. can be set online at any time as needed; the idea of ​​collaborative design of software and hardware is fully utilized in the system design and development process, and modules are used as much as possible in each part The design can be slightly cut and transformed into a multi-storey distributed remote temperature and humidity intelligent monitoring system suitable for many different occasions. The system has been put into practical operation. It is stable, reliable, strong in real-time and makes full use of the existing network, which is conducive to the rapid transformation of the traditional RS485-based temperature and humidity monitoring system into a large-scale distributed remote temperature and humidity intelligent monitoring system, which has achieved good social and economic benefits. .

Industrial Luminaires

LED Flood Light,Hot Selling Flood Light,LED UFO High Bay Light,Solar Panel

Jilin Province Wanhe light Co.,Ltd , https://www.wanhelight.com

Posted on