Friday, September 19, 2014

Build a PC Based Timer Circuit Diagram

Timers are very useful both for industrial applications and household appliances. Here is a PC-based timer that can be used for controlling the appliances for up to 18 hours. For control, the timer uses a simple program and interface circuit. It is very cost-effective and efficient for those who have a PC at workplace or home. The tolerance is ±1 second.

The circuit for interfacing the PC’s parallel port with the load is very simple. It uses only one IC MCT2E, which isolates the PC and the relay driver circuits. The IC prevents the PC from any short circuit that may occur in the relay driver circuit or appliance. The glowing of LED1 indicates that the appliance is turned on. Transistor BC548 is used as the relay driver.

The program code is written in ‘C’ language and compiled using ‘Turbo C’ compiler. When the program is run, it prompts the user to input the time duration in seconds or minutes to control the appliance. After entering the required timing, press any key from the keyboard.

Suppose you input the total duration as ‘x’ minutes, of which ‘on’ and ‘off’ durations are ‘y’ and ‘z’ minutes, respectively. The program will repeat the on-off cycle for x/(y+z) number of times. After completion of the total time, to repeat the cycle, you will have to reset the time in the program to activate the circuit.

PC-Based Timer Circuit Diagram

PC-Based Timer Circuit Diagram


The program uses two bytes for storing integer type data. So when input is given in terms of seconds or minutes, it can hold 216–1=65,535 seconds or 18 hours at the maximum. The sleep() function in the program is used to hold the appliance in ‘on’ or ‘off’ condition for the ‘on’ and ‘off’ periods as entered by the user against prompts. The sound() function is used to give a beep during ‘on’ condition of the appliance.

EFY note. The source code and executable file of this program have been included in this month’s EFY-CD.

Sourced By: EFY Author Akshy

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.