HygroCast — SHT31 Precision Climate Sensor
About this project
HygroCast connects an ESP32 to an SHT31 precision humidity and temperature sensor using raw I2C 2-byte command codes — no library. Every 500 ms the firmware issues a single-shot high-repeatability measurement command (0x24 0x00), waits 15 ms for the 14-bit ADC to settle, then reads a 6-byte response: two bytes of temperature data, a CRC-8 checksum, two bytes of humidity data, and a second CRC-8. A bitwise CRC-8 engine using Sensirion's polynomial (0x31, init 0xFF) independently verifies both measurements before they are accepted — any data corruption instantly trips the CRC-ERR badge on the dashboard. Temperature is converted via the datasheet formula (T = −45 + 175 × raw/65535) and relative humidity via (RH = 100 × raw/65535). Three derived climate quantities are computed: dew point using the Magnus equation, heat index using the Steadman regression, and absolute humidity in g/m³. The onboard resistive heater (activated by command 0x30 0x6D) can be toggled from the web dashboard to verify dehumidification response or test sensor self-heating. An SSD1306 OLED on the shared I2C bus shows all five readings in real time. The ESP32's Wi-Fi AP at 192.168.4.1 serves a live dashboard with large temperature and humidity displays, three derived-value cards, a 30-point humidity sparkline drawn on an HTML5 Canvas, a CRC health badge, and a heater toggle button.
What you get
- Complete, commented source code
- Full components list with quantities
- Pin-by-pin wiring guide and connection table
- Step-by-step upload and testing guide
- Project report (.docx, IEEE style)
- Presentation slides (.pptx)