Main Content

Arduino Dusk/dawn Clock Timer

Summary:

This Arduino based timer can switch one 220V light at dusk, dawn or specified time.

Introduction:

Some of the lights in my house are automatically switched on at dusk, until either a pre-set time or until dawn (all night).
The location of the lights does not allow the use of a light sensor. The regular available clock timers switch on at a specific time. To switch on around dusk therefore requires regularly adjusting the timer program setting.
As a nice challenge, I decided to build a custom Arduino based stand alone timer instead. It uses a real time clock and the Dusk2Dawn library to determine the time at which the lights must be switched on or off. The enclosure for this timer is 3D printed and can be found on Thingiverse. The Arduino code for this project can be found on GitHub.
In the creation of this timer I got inspiration from many designs and circuits on the internet. My thanks to all the contributors that are not explicitly mentioned.
For readability partial diagrams are shown in the steps where needed, instead of a complete circuit diagram.
Alternative solutions:Instead of a stand-alone timer, there are many solutions where a smart home automation system steers the lights. My goal was to have an independant solution, that does not depend on WIFI (or other) connectivity.
Restrictions:The code provided with this project included a daylight saving changes implementation based on European daylight saving system.”

Link to article