Lava Lamp Timer

Using the Internet to control the groove

I finally bought a lava lamp after wanting one for the longest time. It looks great once it gets going, but the wax takes hours to get flowing. Plus, I have to manually turn it on 🙄. I bought these cheap ESP-01 controlled relay boards from aliexpress previously and had the great idea to use the Internet to keep time instead of an RTC. The code is very simple. Every 5 minutes, it sends a request to pool.ntp.org and gets the current time. If it's between 5 pm and 11pm, the relay closes turning on the light.

Wiring it together was pretty easy. I took some lamp cord from a previous project and spliced it to the live side of the lava lamp wire. It's important relays are connected to the live side so that the fixture isn't energized when the relay is open. I did not trust the existing screw terminals to maintain a lasting connection so I scraped some of the solder mask off the PCB and soldered the wires to the normally open traces of the relay.

I whipped up a simple case in Fusion 360 and printed it out. I made sure to cover the exposed PCB with plenty of electrical tape before putting it in the case. I already have a 12V power supply under my desk powering my LED lights and was able to power the relay off that. Some double sided-tape secured everything in place. It hasn't missed a beat in the year since I installed it, turning on my lava lamp every evening and turning it off just after I go to bed. I have the NTP pool project to thank for the robustness of Internet time.

Lamp cord soldered to relay board.

Crimped ring terminals will ensure a secure connection.

Testing on the bench before installation under my desk.

Installed under my desk. Please excuse the dust.

Checkout the code on my Github