0
\$\begingroup\$

I'm new to electronics, so don't know where to begin -

I'm trying to create a push button which needs to be pressed twice in quick succession, to actually power on a device. Pressing it just once, or having a long gap between presses should be equivalent to not pressing the button at all.

Is there a way to do this ? How would I get started ?

\$\endgroup\$

3 Answers 3

5
\$\begingroup\$

There are many ways to do this. In most modern cases, this function would be a few lines of code in a microcontroller that is already present and is (for example) woken up by any closing of the switch.

A simple way to do it without a microcontroller is with a CD40106B hex Schmidt trigger gate and a CD4013B dual-D flip-flop that are both powered on continuously. You'll also need three RC circuits (so about 7 resistors and three capacitors). The time constants are:

  1. Debounce the switch. Needs a pullup resistor, discharge resistor, series resistor to ST input (1K-10K is okay for this purpose) and a cap to ground (1uF ceramic is okay for all these). Should be maybe 20-50msec, so 20-50K.

  2. Time the space between presses. Needs a series resistor to output, series resistor to input and a cap to ground. Time is up to you, probably < 2 seconds, so 500K-2M.

  3. Time power-on reset. Needs a series resistor to Vdd, series resistor to input and cap to ground. Time should be something like 100msec, so ~100K.

Clock both FFs from the debounced pushbutton (rising edge, so you need two ST inverters). D input of the first FF is tied to Vdd, so output goes high on the pushbutton press. Feed the Q output through delay (2) and through two ST inverters to self-reset and to the D input on the second FF. Delay (3) goes to the reset input on the second FF so that power is off when first applied (there is a brief instant after power is applied where a single press of the switch may turn the power on depending on the state of FF 1. Another gate would get rid of that, or connect the cap to Vdd rather than ground.

Something like this fairly straightforward circuit: (the ST "Not 5" is unnecessary, it's there because the FF symbol does not show the /Q output). The unmarked inputs are Reset. Set inputs must be grounded.

schematic

simulate this circuit – Schematic created using CircuitLab

R8 deliberately slows the turn-on of Q1 so the battery (generously bypassed by C4/C5) won't glitch if there are caps in the controlled circuit.

\$\endgroup\$
1
  • \$\begingroup\$ Awesome answer! But I'm ignorant of electronics, so now I've got to figure out what it means! XD \$\endgroup\$ Oct 1, 2014 at 11:47
1
\$\begingroup\$

Of course there is a way to do this. But in most solutions there must be some circuit that receives power while you are pushing the button, otherwise it won't be able to detect the rapid pushing.

I would use a micro-controller with suitable code programmed into it....

An IMO more complex solution could use a pulse generator that triggers a monostable, and a gate that detects a second pulse while the monostable is still triggered.

\$\endgroup\$
1
\$\begingroup\$

Microcontroller, which is powered on by first push, then checks the second push, and in case of success, send signal to main device.

Or the same algoritm in the device's microcontoller (if there is one already).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.