Precision Delay Timer for PIC16F628A




Description

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.

Operation

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.

Precision Delay Timer

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




Current Project / Post can also be found using:

  • how to creat a delay in pic microcontrollers

Leave a Comment

*
= 4 + 2

Read previous post:
Race Start Lights
F1 Gantry Race Start Lights using PIC16F684

Description Featured in Electronics Weekly Gadget Freak (15/08/2008) The Control board for this project is now available in kit form or...

Close
Scroll to top