Timer circuit

Posted on Feb 7, 2014

The time can be set with a potentiometer between 1 minute and 1023 minutes, about 17 hours. A pushbutton starts the time, turns on a relais and the timer will turn off the relais when the time is elapsed. It can be switched to seconds for a shorter time period (17 minutes) e. g. to boil eggs, also easy to forget about. The ATTiny15 is using an inte

Timer circuit
Click here to download the full size of the above Circuit.

rnal oscillator only and needs a calibration for a 10 ms high pulse on PB1, so it is necessary to write a good calibration byte to the OSCCAL register, which is in the beginning of the program OSCCAL_val= 0x6F. It`s a bit of trial and error until the 10 ms are set for your contoller but is should be done. The total time is not extremely accurate because we can`t use a quartz, but for a battery charger I think it is good enough, the batteries don`t mind a few minutes more or less. However, time setting with a potentiometer is quick and easy. If 17 hours are not sufficient and a longer time is required it is possible to change the value of cnt_cmp = 100 ; 100 * 10 ms = 1 second in the program to e. g. cnt_cmp = 200, which will double the time to 34 hours. Depending on your application the time can also be much shorter, change cnt_cmp accordingly. Any high to low transition on PB4 will start the timer, even a LDR could be connected to PB4 to make a light switch which turns on for the preset time when it is dark. It will turn off even if PB4 is still low and then waits for the switch or LDR to go high again. This also prevents a false trigger when the time is short and the button is still pressed. It is quite flexible and can be adapted to many applications which need a timer.

Leave Comment

characters left:

New Circuits



Popular Circuits

Sound Operated Switch
Analog to Digital Conversion
Simple preamplifier circuits by transistors
Totem-Pole Output configuration found in ICs
ISL6291 Li-ion/Li Polymer Linear Battery Charger