Long Duration Timer using A Ttiny 2313

This timer circuit is designed to switch on a 12 V load in a solar-powered installation for a preset period at the press of a button. When the period has expired a latching relay disconnects both the load and the controller circuit from the 12 V supply. The length of the period can be configured by making suitable changes to the microcontroller’s source code. When button S1 is pressed a voltage appears across relay coil L1, and the relay switches the load on. Since the relay is a latching type, it remains in this state when the but ton is released. There is now a supply to the 78L05 voltage regulator (a low-dropout type such as the LP2950CZ-5.0 may also be used) and the microcontroller is powered up. In the microcontroller the timer program runs until the configured time interval has elapsed. Around 90 % of the way through the time period LED D2 lights as a warning that the load will shortly be switched off, and this time can also of course be configured by changing the software. When ...