Delay timer


This circuit is based around the PIC 16C84 (or PIC 16F84) microcontroller. This chip is actually a small computer contained in a single chip, including RAM memory, EEPROM, I/O ports, CPU and so on. When you buy this chip, it comes empty with no program on it. You have to compile the source code and download the resulting machine code into it, using a PC and a small programmer attached to the parallel port of the PC and the chip. To get yourself familiar with this stuff, I suggest you first read this link: Getting started with microcontrollers.

The circuit is a delay switch with one-button operation. Pressing the button once will lit the first LED, pressing it twice will lit the LED 1 and 2 and so on. Each LED that is lit, represents one hour of time. When the button is not pressed anymore, the countdown will start (relay activated). When the countdown is finished, all LEDS are off and the relay will not be activated anymore.

In stead of 8 LEDS showing 8 hours of time, one could also use a 7-segment LED display. In this case, some modifications must be done to the circuit and the software. Refer to the source code for this.

Schematic diagram

List of components

Link to Eagle schematic file

Link to Eagle PCB file

Link to PDF file with PCB layout and components setup

Circuit explanation:

Eight LEDs are connected to ports RB0..RB7 which are configured as outputs. The relay is de-activated at start, so the user gets power as before (as if the delaytimer was not present). If someone presses the pushbutton, one more LED is lit. If one or more LEDs are lit, the relay will activate so the power to the user is interrupted. The countdown starts after the pushbutton is released. Each hour one LED gets off. When all LEDs are off, we are back to square one (power to the user).

Source code for this project

Some pictures:

All components: base circuit, display and housing. The device, built with two relays.
I use the device as a delay-timer for my washing machine. The user interface, consisting of 8 LEDs and one pushbutton in the middle.

  Home         Back to Electronic Projects