Skip to content
Adaptive AgroTech NetworkUniversity of Southern Denmark · SDU Drone Center
Cover for Humidity-Controlled Fan | ESP32, SHT31 & Hysteresis

Video by Adaptive AgroTech. If the embedded player is unavailable, open the original video ↗.

Humidity-Controlled Fan | ESP32, SHT31 & Hysteresis

An ESP32 can use relative humidity from an SHT31 to decide when to run a fan. A higher start threshold and lower stop threshold prevent repeated toggling near the setpoint.

Understand the concept

The key idea

Between the thresholds the controller retains the previous fan state. The measured response also depends on sensor placement and whether replacement air can remove moisture.

What to remember

  • Separate the start and stop values by a meaningful humidity band.
  • Position the sensor where it represents the air being controlled.
Pause & think

Check your understanding

If humidity lies between both thresholds, what determines whether the fan runs?

Show the explanation

Its previous state determines whether it continues running or stays off.