The presented circuit triggers the relay when S is pressed for an instant, keeping it in these conditions for a time interval that depends on the setting of P1 and the value of C1. With the indicated values the time can reach more than half an hour. C1 can be increased as well as P1, but with high values the capacitor leaks can cause the circuit to become unstable. The relay used is 12 V with a current of 50 mA and contacts according to the type of load that must be controlled. Switch S can be replaced by sensors in parallel, in which case the same circuit can be used as an efficient alarm.