I will describe here below a timer project. Some time ago a friend asked me for a timer powered by 24V for some devices running in buses. It is a simple project with several components easy to find and can run also at lower voltage. The devices are powered on through the relay. The timer is supposed to keep the device powered on as long as CMD line is tied to VCC. As soon as it is removed it should keep the device ON for another small period then switch it OFF.
The schematic contains a comparator (LM393) which has the “-” input set to a reference voltage set by R3/R4. On the “+” input there is a RC filter which gives the actual timing. When CMD line is active the output of LM393 will be high. This will drive Q1 & Q2 in saturated mode, so the relay will be closed. After removing CMD line from VCC, C1 starts discharging through R1/R2. When the voltage across “+” input gets lower than the reference voltage on “-” input the LM393 output gets low. This will block Q1 as well as Q2 so the relay gets back to open position. DS1 LED will be switched on when relay is closed. D1 is only for protecting against reverse polarization. The relay is a RAS-2415, powered at 24V so for lower voltages it will not work.
There can be several changes made on this schematic like setting the “-” input directly to GND, or driving a single transistor instead of 2 or lower the voltage and adapt the components values accordingly and so on.
A rough estimation of the period when relay is still closed after CMD line is not active anymore can be estimated to RC time divided by 2. This division comes because of reference voltage set around VCC/2.
Here below a picture with the final board assembled.
The components and pcb layout:
For any question please use “Contact form”.