Add a Simulated Sunrise and Sunset to Your Aquarium
Matthew Lai's ESP32-controlled lighting array mimics the sun’s movement over his fish tank.
Matthew Lai has a fish tank with live plants inside, meaning that lighting isn’t just aesthetically pleasing, but necessary for the mini ecosystem’s survival. After purchasing a confusingly advertised 18W or 25W light for the tank and measuring the power draw, he found that it actually only put out around 12W. Whether that was less than half, or two-thirds of the advertised rating, this wasn’t satisfactory, so he took matters into his own hands and built something much cooler.
Instead of a normal overhead LED matrix that shines with a constant light, he constructed an assembly of eight MR16-style 12V bulbs. These are arranged in such a way that lights can progressively turn on, starting at one end of the tank to simulate sunrise, illuminating all of them for full daylight, then turning off one by one as the day fades.
The setup is controlled by an ESP32-WROOM-32 module, on a custom PCB with AO3400A MOSFETS. The MOSFET control scheme allows for brightness to be varied via PWM, while the ESP32 module gets the time over WiFi/NTP to keep the tank on schedule.
Code/board/Fusion 360 files are available on Lai's blog and more info on the ESP32 light controller board can be found in this “deep dive” electronics post.
The effect, as seen in the video below, is quite pleasing. Hopefully it'll help keep the plants healthy, and the fish entertained!