**2. Materials and Methods**

According to the framework of IoT, the network frame of the proposed scheme is divided into four parts: data acquisition layer which includes sensor nodes and sink nodes, communication layer which is NB-IoT station, application layer which is IoT cloud platform and user layer which is the monitoring center. The sensor node is the detection terminal which is used to detect the information around the sensor and send these information to the sink node. The sink node is used to receive the information from the sensor nodes and compress the information and send it to the IoT cloud platform. The whole hardware frame of the monitoring system is shown in Figure 1. The monitoring system includes one monitoring center which is in PC, and two mobile carriages. Each carriage includes one sink node and three sensor nodes. The sensor node is mainly composed of a stm8 MCU, a temperature and humidity sensor, a RFID module and lithium battery. Stm8 controls the temperature and humidity sensor to collect the temperature and humidity information nearby, and then send the information to the sink node through the RFID. The sink node is mainly composed of a stm32 MCU, a TFT display panel, a RFID module, a BDS/GPS module, a NB-IoT module and battery. Stm32 receives the temperature and humidity information from the sensor node through RFID and gets the position information from BDS/GPS module, then compresses and sends these data to the OneNET cloud platform through the NB-IoT module. The monitoring center is in PC. The temperature and humidity of each sensor node, the sink node position can be acquired in monitoring center by accessing the cloud platform. My SQL database is used to manage current and historical data. Real time map of each mobile carriage can also be displayed.

**Figure 1.** Hardware frame of the monitoring system.

#### *2.1. Hardware Design*

The hardware of monitoring system includes two parts, one is the sink node hardware, the other is the sensor node hardware. The hardware of sink node includes stm32f103c8t6, cc1101 RFID module, wh-nb75-ba NB-IoT module, at6558 BDS/GPS positioning module, TFTLCD display screen, key module, 3.3 V voltage regulator module and several LED lights. The system is powered by 5 V battery. The physical hardware is shown in Figure 2. The wh-nb75-ba can access mobile developer platform OneNET for free, communicate with MCU by UART and configure with AT instruction set [50]. The positioning data collected by BDS/GPS module and temperature and humidity data sent by sensor nodes are sent to NB-IoT module through UART port during UART interrupt, and finally uploaded to cloud platform. At6558 chip is used in the positioning module with BDS/GPS dual positioning mode to obtain higher positioning accuracy. It is a real six in one multi-mode satellite navigation and positioning chip, which contains 32 tracking channels and can receive global navigation satellite system (GNSS) signals of six satellite navigation systems at the same time, and realize joint positioning, navigation and timing. This chip has high sensitivity, low power consumption and low cost, which is suitable for vehicle navigation, hand-held positioning and wearable devices [51]. The chip communicates with MCU through UART serial port. The baud rate of UART serial port is set to 9600, and the data format is strictly in accordance with international NMEA0183 standard. It is a low power chip. The working current is less than 23 mA, the sleep current is less than 10uA. RFID module cc1101 is a kind of RF application which is lower than 1 GHz for ultra-low power consumption. It has high data transmission speed and long transmission distance. It is connected with MCU through 4-wire SPI interface and provides two universal digital output pins with configurable functions [52]. The 2.3-inch TFTLCD is a color LCD, which can exchange data with MCU through SPI interface. CH340 is used to down load the program in the PC to the stm32. In addition, some LED lights are used to indicate whether modules are connected successfully or not. Some keys are used to reset system or initialize modules.

**Figure 2.** The Sink node physical diagram.

The hardware of each sensor node includes stm8s103f3p MCU, cc1101 module, dht11 temperature and humidity sensor chip, using dry battery for power supply. The hardware block diagram of sensor node is shown in Figure 3. The stm8s103f3p MCU of the sensor node which has various communication protocols such as I2C, SPI and UART are designed in the 20 pins. It has 8 KB flash program memory and 1 KB RAM space that is fully competent for the current temperature and humidity acquisition and subsequent data acquisition. There are 46 working state configuration registers and 32 command registers. The temperature and humidity sensor DHT11 has a single bus bidirectional serial communication interface, which can be directly connected with the serial port of MCU. It can measure

temperature and humidity at the same time. The measurement accuracy of humidity is ±5% RH, that of temperature is ±1 ◦C. In view of the low precision requirement, and the focus of our research is low power consumption, so we use this chip. It should be emphasized that in order to reduce the power consumption, the MCU does not read the temperature and humidity value of DHT11 all the time, but only reads when receiving the reading request from the sink node. SWD is used to load down the program from the PC to stm8s103f3p.

**Figure 3.** Sensor node physical diagram.
