Timer automatically shuts off
Yongping Xia, Teldata Inc, Los Angeles, CA -- EDN, 8/17/2000

The circuit in
Figure 1 is a programmable power switch that offers on-state periods of 5 sec to three hours. It consumes zero power in the off state and has zero voltage drop in the on state. S
1 is a power-on switch. When you press S
1, the battery powers an eight-pin PIC12C508 µC. Because the value of C
1 is fairly large, it powers the µC long enough for the processor to send out a pulse through GP5 and GP4 to turn on a latching relay. Once the relay is on, the µC derives power through D
1. C
1 discharges through D
2 when you release the button. After turning on the relay, the µC reads the four inputs GP0 through GP3 to determine the delay time (
Table 1). Once the time is over, an inverted pulse appears on GP5 and GP4 and turns off the latching relay. Once the relay turns off, the circuit consumes no power.
Click here to download the
PIC12C508 assembly program for the timer. (DI #2571)