Precision Delay Timer for PIC16F628A
|This project is a crystal controlled precision timer providing accurate delays from 1 second to 15 hours 45 minutes. The timer delay is set using a 10-way DIP switch. The timer is started by pressing a switch on the main PCB or from an external switch connected via the terminal block connection. A second switch and terminal block connection allow the timer delay to be cancelled.
There are two LEDs on board, one provides indication of the timer delay active, and the other is a blinking ‘heartbeat’ LED to show the timer is running.
The circuit provides a logic level timer output via a terminal block connection as well as the on-board relay for switching external loads.
The timer delay period is set using the 10-way DIP switch. The DIP switch is used to select a time interval and multiplier to give the actual delay time. As the length of the delay time increases the adjustment interval gets courser.
The timed delay is started by a falling edge at the Start input and can be cancelled at any time by taking the Clr input low. In re-trigger mode, the time delay can be restarted while the timer is active.
Timed delay is started by a falling edge on the ‘Start’ input. This can be done in several ways:
- Press the S1 ‘start’ switch on the board.
- By external switch connected between the ‘Start’ and ‘Gnd’ connection of the terminal block
- Logic level input at the terminal block
The Timed delay can be cancelled at any time by taking the ‘Clr’ input low. This can be done in several ways:
- Press the S2 ‘clr’ switch on the board.
- By external switch connected between the ‘Clrt’ and ‘Gnd’ connection of the terminal block
- Low logic level input at the terminal block
Examples below illustrate Precision Timer operation (examples use 5 second timer period)
Timer delay triggered by falling edge at Start input
While timer delay active, heartbeat LED blinks at 1Hz
Time Delay Restart mode
When the timer is running it can be set to re-trigger (restart) using DIP Switch 10.
When re-trigger is enabled, a falling edge (Start button pressed) while the timer is running will reset the timer back to the start of the delay period. For example, if the delay period is 45 minutes and the timer is re-triggered after 20 minutes, the time period will be 20 minutes + 45 minutes giving a total timed delay of 65 minutes. The timer can be re-triggered at any time while it is active and it can be re-triggered multiple times.
If the timer is set to Non-retriggerable, once the timed delay is active it cannot be retriggered and will time out when the preset delay period has elapsed.
For more detail: Precision Delay Timer for PIC16F628A
We recommend EasyEDA for electronic circuit design.
From Schematic Drawing to PCB Production, Just Need One Tool
Cheap PCB Prototype: 10 pcs 2 layers only $10, quick delivery, 100% E-test
Current Project / Post can also be found using:
- how to creat a delay in pic microcontrollers