I'm going to use this schematic (allowing a power-on by a sensor and a power-on by a pio from the ESP8266), which works very well, for a small project. Instead of the magnetic switch as in this schema, I'll use a tilt sensor (SW-520D). I don't need to know the inclination. So it'll be ON or OFF. My concern is to avoid false positives before the sensor reaches its ON position. How can I avoid this electronically and introduce "as a delay" before really considering an ON position?
-
\$\begingroup\$ When do you want the power to turn ON? When switch is closed or when it is open? or are both schemes ok? \$\endgroup\$– saiCommented Jun 17, 2023 at 13:46
-
\$\begingroup\$ When switch is closed \$\endgroup\$– hervemaCommented Jun 17, 2023 at 14:05
-
1\$\begingroup\$ @hervema So this would be like something used go make an object (bomb for example) not do something until its tilt sensors settle down? You could use a retriggerable one-shot, I suppose. \$\endgroup\$– periblepsisCommented Jun 17, 2023 at 14:37
1 Answer
Here's an idea to achieve the delayed turn ON. SW1 is your tilt sensor. When the SW1 is open, gate of M1 is low and voltage across C1 is equal to 0 (i.e., input to schmitt trigger is supply voltage). This switches OFF M3 and hence Q1 in your schematic will be OFF.
When SW1 is closed, the gate of M1 goes to supply. The capacitor voltage starts increasing as per the R2C1 time constant. Until the schmitt trigger input does not reach the threshold voltage, M3 and hence Q1 do not turn ON. During this delay if the SW1 switch gets opened, M2 will quickly discharge C1 and hence reset the delay. This is basically a de-bouncer.