What's going on

This is just a simple record of my electronics experiments trying to develop a small, battery powered ESP32 board that monitors temperature and humidity. The data collection process is straight forward:

graph LR; A[Wake] --> B(Collect data) B --> C[Send to MQTT Server] C --> D(Sleep 600 Seconds) D --> A style A fill:#d0b26d ,stroke:#333,stroke-width:4px style D fill:#d4a9b2 ,stroke:#333,stroke-width:4px style C fill:#afd4a9 ,stroke:#333,stroke-width:4px style B fill:#afd4a9 ,stroke:#333,stroke-width:4px

The goal is to be awake for as short a time as possible, limit power usage as much as possible.

The serial pin headers aren't usually populated as these are only needed if broken firmware is installed that breaks or disables OTA updates.


Since the board wakes up, sends data and immediately goes back to sleep all in the space of around 1.5-2 seconds it would be a little difficult to update firmware in that short timeframe. To solve this there's a jumper marked Stay Awake which will trigger the OTA task which keeps the device awake. Once the firmware is updated the jumper can be taken off and the device rebooted. In addition to the JST-XH battery connector, this revision of the board has a USB port but this only wired to power. No data, no firmware updates.

There are currently two firmware builds which are dependant on the temperature and humidity sensor attached. The two variants are for DHT11 and SHT31.

Since putting this page up I've moved to PlatformIO for building and installing which has allowed me to have a single codebase of three sensors, DHT11, SHT31 and LDR and select the code using with build_flags.