This post was last edited by littleshrimp on 2019-9-29 22:12
HTS221 has a self-heating function inside to detect whether the sensor is working properly
The location is in bit 1 of the CTRL_REG2 (21h) register.
When the Heater bit is 1, the sensor starts to heat internally. Different operating voltages correspond to different heating currents.
After enabling internal heating, the sensed temperature starts to rise
The manual mentions that temperature and humidity data should not be read during heating
In actual testing, it was found that the temperature can be read "normally", and the humidity reading is 0.
") rgba(220, 220, 220, 0.5); top: -15px; left: 0px; display: block;">
The test code turns the heating on or off every 50 seconds, and continuously reads the temperature and humidity data during the on and off process.
if(counter++ % 500 == 0)
{
hts221_heater_set(&dev_ctx, heater_flag);
sprintf((char*)tx_buffer, "heater:%d\r\n", heater_flag);
tx_com( tx_buffer, strlen( (char const*)tx_buffer ) );
heater_flag = !heater_flag;
}
The test data is as follows
") rgba(220, 220, 220, 0.5); top: -15px; left: 0px; display: block;">
The temperature curve changes can be observed more easily through the line graph
After turning on the heating, the temperature rises rapidly and the humidity becomes 0
After stopping heating, the temperature drops rapidly and the humidity rises slowly. This is because relative humidity is related to temperature.
Enlarging the temperature curve can more clearly observe the temperature changes
When the heating is not turned on, the humidity is around 27 degrees Celsius
After turning on the heating, the temperature can rise to 36 degrees
The test used the IKS01A3 evaluation board. The sensor was powered by 1.8V, and the corresponding heating current was 12mA.
If you use 3.3V power supply for heating, the temperature of the sensor will rise even higher.
|