Most terrarium controllers are glorified thermostats with a timer. A maker who goes by Fraxinas wanted something closer to the real thing, so his Geckocontroller replays the actual recorded weather of New Caledonia, the crested gecko's native home, inside a glass box in Germany. It is a good example of how far an ESP32, ESPHome and Home Assistant can go when the goal is simulation rather than simple on-off control, and the full build write-up was updated this week.
Weather from 182 days ago
New Caledonia sits around 22 degrees south, so its seasons run opposite to Germany's. To line the southern summer up with the northern one, the controller replays the weather from 182 days ago, roughly half a year. Fraxinas wrote his own Home Assistant integration, historic_weather, which keeps a week-ahead cache of hourly records from the Open-Meteo historical weather API for the Ile des Pins, an island believed to host the largest wild population of crested geckos. The controller subscribes to those values and turns them into terrarium weather:
- Temperature sets the target of a PID climate loop that drives a 150 W halogen daylight lamp by day and a 50 W ceramic heat emitter at night.
- Recorded rainfall decides how many seconds per hour the misting pump runs.
- Solar radiation compared with a clear sky dims the grow light, and the WMO weather code adds passing clouds, plus a thunderstorm mode where the tank goes dark and the LEDs flicker.
- Wind speed drives an 80 mm PWM PC fan, which also fights stale air and mould.
- A faint greenish moonlight follows the calculated lunar phase.
The sun is the one thing on local time. The controller uses New Caledonia's latitude mirrored across the equator, so sunrise and sunset follow German seasons while keeping the small tropical swing in day length. An 18-minute RGB colour sweep plays at sunrise and sunset. A load cell under the coconut nest, made from an old kitchen scale, even tells the owners whether the gecko is home.
Revision 2.0 hardware
The first board ran from May 2021 until this autumn. When a new 24 V full-spectrum LED strip and a professional misting pump arrived, their switched-mode power supplies quickly killed the board's 1 A solid-state relays. The new KiCad 10 revision swaps them for mechanical relays and a discrete triac-based AC dimmer, adds a MOSFET PWM channel for the 24 V strip, moves the load cell from an HX711 to an I2C NAU7802 to free a GPIO, and replaces the CP2102 USB bridge with a CH343G. A custom design rule enforces 6.4 mm of clearance around the mains nets, and isolation slots separate the mains and low-voltage sides.
Our take: the relay failure is the most useful lesson here. Switched-mode supplies draw large inrush currents into their input capacitors, which can be far beyond what a small SSR expects even when the steady load is tiny. Design for the switch-on surge, not the label on the load. If you are planning something similar, our HestiaGuard ESP32 smart home power and safety system is another ESP32 smart-home build worth a look.
Image credit: Fraxinas, purplegecko.de, cropped and resized.
About the author: Aswinth Raj is an electronics engineer and the editor of CircuitDigest, where he has published more than 150 hands-on projects and tutorials across Arduino, PIC, ESP32, Raspberry Pi and EV battery systems. He selects the stories on this page for what engineers and makers can actually learn or build from. Connect on LinkedIn
Add a comment
No account needed. Your comment appears once a moderator has reviewed it.