Design and Implementation of Low Power Temperature and Humidity Collector Based on STM32

The STM32 embedded system has a wide range of applications in many control areas. The STM32 is a Cortex-M3 core-based microcontroller that sets new standards in performance and cost as well as low power operation and hard real-time control.

Although there are various temperature and humidity acquisition systems on the market, there are fewer collectors with low power consumption and self-contained data recording functions, and the cost is high. In this paper, the temperature and humidity acquisition system is designed with STM32F103RET6. The system works for about 30 days, the low-power mode is implemented in a stop mode, and the temperature and humidity sensor uses a SHTIO temperature and humidity sensor. Combined with the actual use environment, the acquisition cycle is 5 minutes. It is powered by 18650 lithium battery, has SD card storage function, and can realize USB full-speed communication and serial communication.

1, temperature and humidity collector design 1.1, hardware design

The structure of the collector is shown in Figure 1. It mainly consists of a power supply module, a USB full-speed communication module, an STM32 chip, an SD card storage module, a temperature and humidity sensor, a serial communication module, and a JTAG online debugging module.

Design and Implementation of Low Power Temperature and Humidity Collector Based on STM32

Figure 1 System hardware composition diagram

Considering the volume factor, the system is powered by a 18650 rechargeable lithium battery. After a single 2400mah battery is fully charged, it can work for about 2 months.

STM32 is powered by He Qin's HT7333 step-down module. Through RTC real-time clock control, wake up every 5 minutes for data acquisition. Data is acquired by the SHT10 temperature and humidity sensor in a custom communication protocol. The collected temperature and humidity data is written to the SD card in hexadecimal format. The data in the SD card can be exported via the serial communication module and the USB full-speed communication module, or directly from the SD card.

1.2, SHT10 temperature and humidity sensor communication timing

The communication timing of the SHT10 temperature and humidity sensor is shown in Figure 2.

Design and Implementation of Low Power Temperature and Humidity Collector Based on STM32

Figure 2 SHT10 timing diagram

After the sensor is powered at a power-up rate of no less than 1V/ms, it first enters a sleep state of 11ms, during which no instructions are sent to the sensor. When preparing to transfer data, a set of "start timing" is required to complete the initialization of the data transfer. The startup timing is: When the SCK clock is high, DATA is flipped low, then SCK goes low, then DATA flips high when the SCK clock is high. Subsequent commands contain three address bits and five command bits. After the sensor receives the command, it will pull DATA low (ACK bit) after the 8th SCK falling edge. After the 9th SCK falling edge, DATA is released and is restored to a high level.

Stainless Steel Sheet

Stainless Steel Sheet,Stainless Steel Circle Plate,Black Stainless Steel Plate,Stainless Steel 316 Sheet

ShenZhen Haofa Metal Precision Parts Technology Co., Ltd. , https://www.haofametals.com

This entry was posted in on