DIY light timer - Build thread

ckarta

Active Member
Member
Messages
88
I have always wanted to build a programmable light timer for my fish tanks, but I have no knowledge of electronics + programming. Now is a great time to live because AI can help write these programs. (And in reality I now have a colleague who used to eat microcontrollers for breakfast in his past career, and is willing to donate supplies + train me to build this project). This will go on my shrimp colony, to go on a 6 hour light schedule with a siesta window to prevent algae breakouts.

Main goal Turn lights on and off in a staggered manner, twice a day.
Goal 2 Add a switch that allows turning the lights on/off without disturbing the schedule
Goal 3 Add capability to turn lights on/off or edit timings over internet (just for kicks because the board has WiFi built in, I have no real use case for this)

I plan to use a simple ESP32 development board with relay boards to accomplish this. Ill use this thread to document the process, and make a template for others to follow. Looking for others' inputs and expert opinions.


@Admins - I could not find a similar thread, thus starting one. Please move this to a more appropriate forum / remove if needed.
 

Advertisement
I have always wanted to build a programmable light timer for my fish tanks, but I have no knowledge of electronics + programming. Now is a great time to live because AI can help write these programs. (And in reality I now have a colleague who used to eat microcontrollers for breakfast in his past career, and is willing to donate supplies + train me to build this project). This will go on my shrimp colony, to go on a 6 hour light schedule with a siesta window to prevent algae breakouts.

Main goal Turn lights on and off in a staggered manner, twice a day.
Goal 2 Add a switch that allows turning the lights on/off without disturbing the schedule
Goal 3 Add capability to turn lights on/off or edit timings over internet (just for kicks because the board has WiFi built in, I have no real use case for this)

I plan to use a simple ESP32 development board with relay boards to accomplish this. Ill use this thread to document the process, and make a template for others to follow. Looking for others' inputs and expert opinions.


@Admins - I could not find a similar thread, thus starting one. Please move this to a more appropriate forum / remove if needed.
I hope you’ll post detailed progress notes. Cool idea.
 

Advertisement
  • Thread Starter
  • #3
The lighting timer is assembled, programmed, and deployed!

I have used a ESP32 board as controler, and it comes with Wifi and Bluetooth.

It uses micropython to run the code (Because I can only edit Python code)

The code tells the controller to connect to wifi, take time from network, and convert it to local time.

It also has 4 blocks where the 2 lights are supposed to be on. The code checks current time and if any lights are supposed to be on, turns them on, and off accordingly. It does this via a relay board that has two lights connected to two relays.

Currently this is it, and good enough till I can edit the code and added functionalities.

Planned functionalities are - edit light timings from an app without physically connecting to the board, and use the app to keep lights running for next X minutes when I'm doing maintenance.

Will also add aa physical switch to turn the lights on/off should the controller malfunction.

Experts - please let me know if I'm using wrong terminology, in eager to learn.
 

Attachments

  • IMG20260705162216.jpg
    IMG20260705162216.jpg
    822.1 KB · Views: 41
Nice. Way too complicated for me. Spotlight effect down center looks fab.

My terrestrial plant stand has 2 extra RGBW par20 bulbs at front deck door that gets good indirect light, both controlled by Alexa. Both come on 20min before actual sunrise time with lavender color and then both switch to bright neutral white about 40min after sunrise time. It reverses that sequence at sundown. Seasonal, 9+ hrs during winter solstice going up to 13+ at summer solstice.
 
  • Thread Starter
  • #5
Nice. Way too complicated for me. Spotlight effect down center looks fab.

My terrestrial plant stand has 2 extra RGBW par20 bulbs at front deck door that gets good indirect light, both controlled by Alexa. Both come on 20min before actual sunrise time with lavender color and then both switch to bright neutral white about 40min after sunrise time. It reverses that sequence at sundown. Seasonal, 9+ hrs during winter solstice going up to 13+ at summer solstice.

This reads much more complicated than it is to build. Any way I'll have ready code and hardware list when I'm done. Happy to share if you (or anyone else) is interested.

I tried to go the Alexa way, but WRGB lights suitable for aquarium are not available in India yet.
 
  • Thread Starter
  • #6
Update 7 7 2026

The timer can now be controlled via a bot in Telegram. It supports following commands as of now:
  • status - View current time, light states, and modes
  • boost - Force the particular light ON for specified minutes
  • kill - Kill the particular light for specified minutes
  • feed - Force BOTH lights ON for 10 minutes
  • sleep - Force the 20W light off immediately, and the 6W light after 1 minute. (In case we go to sleep before the lights are off)
The circuitry is kept in an old ice cream plastic box next to the tank. My 7 year old ho.mo sapiens sapiens brought friends over too look at the ice cream box that turns the lights on and off :)

(Tried to write the humans' scientific name normally, and the forum redacted the first word in it, making it read much worse :D)
 

Random Great Topic!

Advertisement



Advertisement








Advertisement




Back
Top Bottom