This project is to build a "modern" landscape light timer from an ATX power supply.
The purpose/features that make this "better" than common setup using a wall timer are:
The application is written to pull sunset info from wunderground for my location. It then determines how long until sunset, and sleeps. It then runs for predetermined number of hours, turns off, and repeats again the following day.
A webserver is also run on port 80 that allows review of system status, turning on the lights, etc.
The latest version of the software can be found at
Simple. The ESP8266 is running off of the 5V standby line (via buck converter down to 3.3). The "green" signal line, on the ATX, is pulled to ground via "D4" digital line on the ESP8266, across a 10k resistor to turn on the ATX supply.
Pardon the "in progress" look. Still doing testing.
Wow, that's very cool. So do you have to turn the ATX power supply on before turning on WiFi, or does it provide enough standby power that you can connect to the internet even without turning the main part of it on?
5v standby power is sufficient to run the ESP8266 via buck converter.
New code updated
Code for sleeping until the sunset, based upon the wunderground API:
if(nHoursTilSunset > 0)
//add 15 minutes from sunset
var nMinutesTilSS = weather.moon_phase.sunset.minute - weather.moon_phase.current_time.minute + 15;
var nSleepTime = (nHoursTilSunset*nMilisPerHour) + (nMinutesTilSS*60000);
setMode("sleeping until sunset", "Turn on lights", nMilisForLights);
Code is updated.
I've been happily building these, but running on Sonoff now. I really like the convenience of having some house lights that follow the sunset. Probably over-engineered, but that is where the fun comes in!
Let me know if you'd like to buy one, $10 plus shipping.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem