Ramblings of an aging IT geek
← Ramblings of an aging IT geek
hardware

an esp32 weather station that mostly works

A weekend ESP32 weather station that reports temperature, humidity and pressure to MQTT, with one sensor that lies about the temperature.

A soldering iron and electronics components on a bench

There is now an ESP32 on my windowsill that thinks it's a weather station. It reads a BME280 over I2C, temperature, humidity and pressure, and pushes them to MQTT every thirty seconds. Home Assistant draws nice little graphs. On a good day it is genuinely useful.

The "mostly" is doing some work in that title. The BME280 sits a few millimetres from the ESP32's own regulator and wifi radio, both of which produce heat, so the temperature reads consistently two to three degrees high. I knew this would happen and built it anyway, because I wanted the thing running before I cared about it being right. Classic.

The honest fix is to move the sensor off the board on a short flying lead, away from anything warm. I've ordered a longer JST cable for exactly this and it has been "ordered" for about a week. In the meantime I subtract 2.5°C in the Home Assistant template and pretend that's calibration rather than a fudge factor.

Pressure and humidity, mercifully, don't care about the heat soak and have been spot on against the Met Office figures for my area. Two out of three sensors honest is, for a Saturday afternoon and three jumper wires, a perfectly acceptable hit rate.