0% found this document useful (0 votes)
52 views4 pages

Design of Temperature and Humidity Detection System For A Material Warehouse Based On GM

Uploaded by

Duval Alava
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views4 pages

Design of Temperature and Humidity Detection System For A Material Warehouse Based On GM

Uploaded by

Duval Alava
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

2020 IEEE 4th Information Technology,Networking,Electronic and Automation Control Conference (ITNEC 2020)

Design of Temperature and Humidity Detection


System for a Material Warehouse Based on GM
Haibing Yuan ,Ziping Wang,Lei Xia
School of Mechanical Engineering,Hubei University of Automotive Technology,Shiyan, China
[email protected], [email protected], [email protected]

Abstract—In view of the measurement and control of and OneNet server to build an extensible Internet of things
temperature and humidity in the material warehouse of a system. He Chao et al[6] Based on the ESP8266 IOT scheme,
factory, the Internet of things scheme is adopted, ESP8266 chip a library detection reservation system is built. The system
is used to connect WiFi, temperature and humidity sensor uses the ESP8266 module to realize the function of serial
DHT11 is used to collect temperature and humidity, the port to WiFi, and finally transmits the seat information to the
collected temperature and humidity data is connected to Baidu server. Users can access the web page to realize the function
intelligent cloud server through MQTT protocol, and the of query and reservation.
collected temperature and humidity data is sent to WeChat
and stored in cloud through topic subscription and release of This paper uses the Internet of things scheme to build the
Baidu intelligent cloud According to, and at the same time use temperature and humidity collection system, which is
gray prediction model to predict the temperature and connected to the Internet of things through the ESP8266 chip.
humidity data of the warehouse, through the WeChat end, you DHT11 temperature and humidity sensor collects the
can view the current and predicted temperature and humidity temperature and humidity data, and transmits the
data of the warehouse. The design of the measurement and temperature and humidity sensor data to Baidu cloud
control system is convenient and effective for real-time platform through MQTT protocol. Meanwhile, Baidu cloud
detection and prediction of the temperature and humidity data platform will build the temperature and humidity gray
of the material warehouse. The system has the advantages of
prediction model according to the collected temperature and
small size, low deployment cost and so on.
humidity data, and predict the temperature and humidity data
Keywords—Warehouse temperature and humidity; Gray of a warehouse , Baidu cloud platform publishes the topics of
prediction; measurement and control system; MQTT; temperature and humidity by publishing topics and
subscribing topics, and at the same time, it subscribes to
topics on the WeChat side of mobile phone, which is
I. INTRODUCTION displayed by analyzing the subscribing topic data. The
With the development of science and technology, collection system realizes the collection of temperature and
temperature and humidity have a great impact on our humidity data through the scheme of Internet of things. At
production and life. Whether in the process of production the same time, the gray prediction model of temperature and
and manufacturing or in the transportation of products, it is humidity is established to predict the temperature and
necessary to detect the temperature and humidity to ensure humidity of a warehouse.
the safety of materials or products. With the arrival of the
Internet of things, the traditional temperature and humidity II. DESIGN OF TEMPERATURE AND HUMIDITY
detection system can no longer meet people's needs. COLLECTION SYSTEM
Therefore, it is very important to study an efficient, real-time
and predictable temperature and humidity detection system. A. System Scheme Design
Zhao, J, Liu N et al [1,2] build a temperature and humidity The temperature and humidity measurement and control
acquisition system based on MSP430 and CC2530, which system includes DHT11 temperature and humidity sensor,
uses ZigBee technology for network construction. Wang Hao ESP8266 chip and Baidu cloud platform. Through DHT11
et al[3] Used TMS320 series DSP and DS18B20 digital temperature and humidity sensor, ESP8266 chip is connected
sensor to build the temperature measurement and control to collect the current temperature and humidity. Through
system. The temperature and humidity acquisition system configuring ESP8266 to connect WiFi, Baidu cloud platform
based on MSP430 and TMS320 has better acquisition is automatically logged in. Through the internal setting of
accuracy, but its deployment cost is higher. Zhao Jinyan et ESP8266, the topic is published and subscribed. ESP8266
al[4] temperature and humidity acquisition system based on issues the topic "TH" every 5 seconds to transmit the
temperature and humidity Degree data is sent to Baidu cloud
AT89C2051 can realize the detection of temperature and
platform, and WeChat terminal of mobile phone receives
humidity data, but can't process the detected data, which
collected and predicted temperature and humidity data by
lacks certain flexibility. With the advent of Internet of things
subscribing topics, and displays them in real time. The
technology, its temperature and humidity acquisition,
scheme design of temperature and humidity measurement
temperature and humidity data processing using the IOT
scheme have certain research value, Chang Xin, Wang Qi et and control system is shown in Fig. 1.
al [5] through ESP8266 chip and STM32 use EDP protocol

978-1-7281-4390-3/20/$31.00 ©2020 IEEE 2516


Authorized licensed use limited to: UNIVERSIDAD POLITECNICA SALESIANA. Downloaded on October 23,2024 at 02:07:51 UTC from IEEE Xplore. Restrictions apply.
information transmission; remaining length refers to the
DHT11 temperature and
ESP8266 Chip message length other than fixed header 2byte, including
humidity sensor
variable header and payload.
MQTT protocol
ESP8266 Modular
TABLE I. MQTT MESSAGE FIXED HEADER
byte 7 6 5 4 3 2 1 0
MQTT protocol
byte 1 Message DUP Quality RETAI
WeChat Terminal Baidu Cloud
type flag grade N
byte 2 Remaining Length

3) Release and reception of temperature and humidity


Fig. 1. Temperature and humidity measurement and control system
topics: The temperature and humidity topic is published by
using the MQTT protocol of ESP8266. The system
B. Construction and Configuration of Related Hardware publishes the "TH" topic every 5 seconds. The "TH" topic is
1) ESP8266 and Baidu cloud platform configuration: mainly the collected temperature and humidity data. For the
The ESP8266 chip is configured via environment and configuration of MQTT protocol, you need to configure the
header files, and ESP8266 connects to the Internet via MQTT server domain name, network connection port
WiFi.ESP8266 acquisition control module is mainly number, MQTT user name and password. First, read the
responsible for WiFi connection network and temperature temperature and humidity value of DHT11 sensor, and
and humidity data collection. Publish/subscribe topics format the temperature and humidity value into JSON string.
through MQTT protocol and upload temperature and The format is as follows, where requestld is the identifier
humidity data to baidu intelligent cloud platform.The design and reported is the temperature and humidity data:
of temperature and humidity measurement and control {"requestId":"{1887959326}","reported":{"Temperature
system based on ESP8266 mainly uses the intelligent ":20.8,"Humidity":66.0}}
Internet of things platform. The platform can connect a large Publish the temperature and humidity data in JSON
number of industrial equipment, sensors, etc. to the cloud, format to Baidu cloud access platform through MQTT
and process and analyze data in Baidu cloud server. A data- publish "TH" topic. For the configuration of Baidu cloud
based project needs to be created in the physical access. Internet of things access platform, first log in to Baidu cloud
Users in the data-based project need to be configured and service platform, find out the Internet of things service's
each user's subject and subscription/publishing authority Internet of things access, and create the Internet of things
should be set. The domain name, user name and password access project. The configuration of Baidu cloud Internet of
of the device connection should be generated to facilitate things access mainly includes configuration strategy,
the configuration on the device side. The physical access identity, user, among which the most important is the policy
device side of the measurement and control system mainly setting, which topics are set for the policy name and
includes ESP8266 and WeChat. subscription and publishing authority of each topic. And
2) MQTT protocol: In this paper, the temperature and identity setting, which is mainly used to set the equipment
humidity data collection based on the Internet of things connecting to Baidu cloud platform. The equipment of the
scheme is built, mainly through the MQTT protocol for data temperature and humidity measurement and control system
transmission. The MQTT protocol [7] was proposed by IBM is the WeChat end and the ESP8266 data end, through
in 1999. The protocol is a lightweight message transmission which the temperature and humidity data are collected.
protocol based on the publish/subscribe mechanism of TCP, The reception of temperature and humidity topics is
which is the main communication protocol for the mainly completed by Baidu cloud access configuration.
realization of the Internet of things. The protocol uses WeChat subscribes to the temperature and humidity topics
publish/subscribe message mode, which enables one of Baidu cloud platform. WeChat analyzes the received
subscriber to subscribe to multiple topic messages. MQTT temperature and humidity topics through MQTT protocol,
message body mainly consists of fixed header, variable and then displays the temperature and humidity data in
header and payload. Fixed header is fixed to 2 bytes, MQTT WeChat. The JSON data is parsed in WeChat, and the
has three quality of service levels: QOS0, QOS1, QOS2. parsed data is displayed in WeChat.
Different message levels represent the transmission
III. CONSTRUCTION OF GRAY PREDICTION MODEL OF
reliability of messages. The message level set by the
TEMPERATURE AND HUMIDITY
temperature and humidity measurement and control system
is QOS0, in which QOS0 means sending at most once, and Grey model GM (M,N) was put forward by Professor
the message depends on the underlying TCP/IP network, Deng Julong in 1982, in which M represents the order of
and there is no reply confirmation in this way. The ordinary differential equation and N represents the number
of variables. In this paper, a grey model of GM (1,1) [8] is
transmission format of MQTT data is shown in Table 1,
used as an input variable. In this paper, through the collected
where DUP flag is used to ensure the reliability of temperature and humidity data, a predictive model of

2517
Authorized licensed use limited to: UNIVERSIDAD POLITECNICA SALESIANA. Downloaded on October 23,2024 at 02:07:51 UTC from IEEE Xplore. Restrictions apply.
temperature and humidity is established to predict the 
b b
temperature and humidity of a warehouse. The establishment x (1) (k + 1) = [ x (0) (1) − ]e − ak + (k = 1, 2, , n) (7)
process of grey prediction model of a warehouse temperature
a a
and humidity is as follows: Next:   
x (0) (k + 1) = x (1) (k + 1) − x (1) (k ) (8)
• The temperature and humidity data collected are
listed as follows: According to the time series of the grey differential

x (0)
= ( x (1), x (2)
(0) (0) (0)
x (n)) (1) equation, the accumulated value x (1) ( k + 1) and predicted

In the formula, n is the number of temperature and value x (k + 1) of temperature and humidity at the predicted
(0)

(0) (k + 1) time can be obtained


humidity data collection, where x ( n) is the measured
The temperature and humidity prediction model based
value of temperature and humidity collection, and the more on grey theory is applied to the temperature and humidity
n is, the more calculation is required, and the more accurate acquisition system. The temperature and humidity data of a
the prediction result is. Here, five data are selected for warehouse are collected by the temperature and humidity
temperature and humidity prediction, that is, n = 5. acquisition system, and the temperature and humidity data
• The data series of known temperature and humidity of the warehouse are predicted by the model. In this paper,
are accumulated once (AGO) to generate data series the temperature and humidity data of nearly 2 hours and 2
days are predicted.
x(1) = ( x(1) (1), x(1) (2) x(1) (n)) (2)
IV. EXPERIMENTAL VERIFICATION AND CONCLUSION
k
x (1) (k ) =  x (0) (i )(k = 1, 2 , n) (3) The above-mentioned temperature and humidity
i =1
measurement and control system is used to deploy the
experiment in the material warehouse of a factory, and the
(1)
Among them, x (n) represents the accumulation of temperature and humidity data collected by the system are
collected for nearly 8 days. According to the temperature and
the first n items of data, through which the measured humidity data collected by the system, the corresponding
temperature and humidity data can be simply processed for partial temperature and humidity curve is drawn, as shown in
noise reduction. Fig .3 According to the deployed temperature and humidity
• Establishing gray differential equation and whitening model based on gray prediction, the temperature and
differential equation humidity data of nearly 2 hours and 2 days are respectively
predicted here For prediction, if the prediction is conducted
x0 (k ) + az (1) (k ) = b(k = 2,3 n) (4) for 2 hours, the mean value of temperature and humidity in
the past 5 hours will be calculated; if the prediction is
dx (1) (t ) conducted for the data in the past 2 days, the mean value of
+ ax (1) (t ) = b (5) temperature and humidity in the past 5 days will be
dt calculated; the temperature and humidity in the warehouse
Where a is the development coefficient and b is the will be predicted by this method, and the temperature and
grey action quantity, among humidity data in the past 2 hours will be predicted, and the
results are shown in Fig. 3 and Fig. 4.
u = ( a, b ) ,Y =( x (0) (2), x (0) (3),
T
, x (0) (n), )T

 − z (1) (2) 1
 (1) 
 − z (3) 1
B=
 
 (1) 
 − z (n) 1
Then the least square estimation parameters of the grey

differential equation satisfy u = ( BT B)−1 BTY
• Solve the whitening differential equation and predict
the temperature and humidity according to the time Fig. 2. Partial temperature data curve
series of the grey differential equation
b b (6)
x (1) (k + 1) = ( x (0) (1) − )e− ak + (k = 1, 2, , n − 1)
a a

2518
Authorized licensed use limited to: UNIVERSIDAD POLITECNICA SALESIANA. Downloaded on October 23,2024 at 02:07:51 UTC from IEEE Xplore. Restrictions apply.
through the temperature and humidity measurement and
control system built by Baidu Internet of things platform and
WeChat terminal. Through the prediction and analysis of the
temperature and humidity data collected by the system, the
results of the analysis and prediction can be applied to the
adjustment of the temperature and humidity of the material
warehouse to improve the safety of the material warehouse.
The experimental results show that the temperature and
humidity measurement and control system based on GM has
a high application value, which can be used in agricultural
production, environmental monitoring, etc. to guide people's
production practice.
Fig. 3. 2-hour temperature comparison curve
ACKNOWLEDGMENT
This work was supported by Hubei Education
Department of Science and Technology Research Project
(#D20151803) , 2019 Undergraduate Innovation and
Entrepreneurship Project (#DC2019004, #DC2019005),and
Graduate Education Innovation Plan Project (#Y2017203).

REFERENCES
[1] Zhao, J., Lian, X., Wu, Y., Zhang, X., & Wang, S. (2012). Design of
wireless temperature and humidity data collection system based on
MSP430 and CC2530. 2012 3rd International Conference on System
Science, Engineering Design and Manufacturing Informatization.
doi:10.1109/icssem.2012.6340841.
Fig. 4. 2-hour humidity comparison curve [2] Liu Na. Granary temperature and humidity measurement and control
system based on ZigBee module [J]. Application of Single Chip
According to the accuracy of the gray-scale temperature Microcomputer and Embedded System, 2016,16 (05): 69-72.
and humidity prediction model, the relative error calculation [3] Wang hao,Sha sha. Based on TMS320LF2407 Environment
formula of the actual measured value and the predicted value Temperature Humidity Detection[J]. Physics Procedia,2012,25.
is adopted: [4] Zhao Jinyan, Wu Xingchun, he Jiyan, Wang baijuan, Wang Ruigang.
Hardware design of temperature and humidity acquisition system
based on AT89C2051 [J]. Electronic Design Engineering, 2011,19
Xm − X p (12): 172-174.
= 100% (9) [5] Chang Xin, Wang Qi. Scalable Internet of things system implemented
Xm by STM32 and ESP8266 [J]. Application of Single Chip
Microcomputer and Embedded System, 2018,18 (12): 58-61.
Among them, X m is the actual acquisition value and [6] He Chao. Reservation system of Library seat monitoring based on
X p is the gray-scale prediction value. The prediction ESP8266 IOT Scheme [J]. Electronic World, 2019 (07): 149-150.
relative error of the last two hours and two days is shown in [7] Froiz-Mí guez Iván,Fernández-Caramés Tiago M,Fraga-Lamas
Paula,Castedo Luis. Design, Implementation and Practical Evaluation
Table 2, It can be seen from table 2 that the maximum of an IoT Home Automation System for Fog Computing Applications
relative error is 0.69%, so the temperature and humidity Based on MQTT and ZigBee-WiFi Sensor Nodes.[J]. Sensors (Basel,
model based on gray prediction can be applied to the Switzerland),2018,18(8).
measurement and control system. [8] Guo Peng. Application of grey prediction adaptive internal model
control in superheated steam temperature control of power plant [J].
Power Engineering, 2007 (04): 560-563.
TABLE II. RELATIVE ERROR
2 hour 2 day
Relative error of
0.69 0.89
temperature
Relative humidity
0.44 0.57
error

V. CONCLUSION
The temperature and humidity data of a factory is
collected and predicted based on the temperature and
humidity collection model built by gray prediction. The
temperature and humidity measurement and control system
is based on ESP8266 chip, and it can predict the temperature
and humidity of the material warehouse environment while
collecting the temperature and humidity data of a factory

2519
Authorized licensed use limited to: UNIVERSIDAD POLITECNICA SALESIANA. Downloaded on October 23,2024 at 02:07:51 UTC from IEEE Xplore. Restrictions apply.

You might also like