Nov 2018 Auto-timed Fish Tank Light

My roommates and I have a fish.

Sidon is our fish.

We’ve managed to keep him alive and more or less healthy for the past two years, but one thing we’re not super reliable about is turning on and off the tank light, which (I’m told) is important for fish circadian rhythms or something. (I’m not a biologist; ask the roommates!)

To solve this, I used an ESP8266 to automatically turn on the lights in the morning and turn them off in the evening. Because the ESP doesn’t have a built-in RTC, I sync every ten minutes with the NIST NTP servers (which likely makes this the most accurate timekeeping device in the house other than cell phones!) and fade the lights off at 7am and off at 9pm.

Schematic, assembled on perf board: the schematic

I began prototyping with an ESP32, since I couldn’t find my USB<->serial adapter: Tank and breadboard with ESP32

Later, testing the ESP-01 with the newfound serial adapter: Breadboard and more components

Here’s the final product, front: The front of the fish tank board, assembled

and back: The back of the fish tank board, assembled

I’m fairly proud of how neat it all turned out, especially in a few places like the removable ESP8266 for programming, and the outgoing wire strain relief loop!

Because I needed 12V for the LEDs and 3.3V for the ESP8266, I used the AMP MATE-N-LOK 1-480424-0 power connector, often used for PATA hard disks and commonly “the Molex connector”, for which I had a power supply sitting around:

The assembled board plus all the power cables

Source available on GitHub


If you have any questions or comments on this project, or if you're about to do or have done something similar yourself, send me an email! I'd be delighted to hear what you have to say.