GHG Monitoring Station & Power Source Switch • UNISA HRELE80 • live over MQTT
Download the readings received by this browser this session (this page doesn't have access to the board's own on-device log).
Download the readings received by this browser this session.
When ON, motion (PIR) fades the light in/out automatically on the board itself.
Switching stays fully automatic on the board, by design, since Part 2's output powers Part 1 and must stay safe. There's no relay override here or on the local dashboard. Tune the voltage thresholds and timing from the Settings tab instead.
Send a message about either system, powered by Formspree.
UNISA HRELE80 Honours. Two ESP32 boards working together: the GHG Monitoring Station (Part 1) reads ambient and soil conditions, air quality and solar current/voltage, and drives a cooling fan, PIR-triggered enclosure light and buzzer. The Power Source Switch (Part 2) automatically switches between Municipality and Solar power so Part 1 stays continuously powered. This page mirrors both boards' local dashboards, live over MQTT, so the system can be viewed and controlled from anywhere, not just the local network.
An ESP32-WROOM-32 reads a DHT11 (ambient temperature/humidity), a DS18B20 waterproof probe, an MQ-135 air-quality proxy sensor, a resistive soil-moisture probe, and an ACS712 current sensor plus a 0-25V voltage sensor for monitoring the solar input. A PIR sensor triggers the enclosure light, fading it in and holding it on while motion continues, then fading it out a configurable number of seconds after motion stops. A temperature-controlled fan and an alert buzzer are both driven through TIP120 low-side stages. Status is shown on a 20x4 I2C LCD and published to MQTT every 5 seconds.
A separate ESP32 senses the Municipality and PV supply lines through 22k-over-10k voltage dividers and automatically switches two relays so exactly one source feeds Part 1 at any time: Municipality whenever it's present, PV only when Municipality is down, and Municipality as the default if both are absent. To keep switching stable, the board applies hysteresis (separate ON/OFF voltage thresholds), exponential-moving-average smoothing on the readings, and a time-based confirmation delay before a candidate source is actually switched to, three layers added specifically after bench testing exposed relay chatter under noisy and slowly-drifting real-world readings.
This page connects directly from your browser to the same HiveMQ Cloud broker both boards use, over MQTT/WebSocket (port 8884). Dashboard tiles update from each board's published state topic. Controls and Settings publish MQTT commands to each board's command topic, the same mechanism the local dashboards already use, so nothing here bypasses the board's own logic. Power Switch stays automatic-only everywhere, on purpose, there is no relay override anywhere in this project.
| ghg/monitor/state | Part 1 → broker, every 5s |
| ghg/monitor/cmd | broker → Part 1, fan/buzzer/light/settings |
| power/switch/state | Part 2 → broker, every 5s |
| power/switch/cmd | broker → Part 2, settings only |