double-detent switch electronic simulation

Thread Starter

liquidrain84

Joined Sep 25, 2019
2
Hi,

I am fairly new to the field, and am trying to find a way to simulate a mechanical double-detent switch electronically. To clarify, a double-detent switch is a switch that when depressed once, something happens. Then, when depressed even further something else happens. An example might be like on a digital camera, where you might lightly push the button to focus the lens, then push it down all the way to actually take the picture.

Is there a way to recreate this action electronically? My first instinct was to use a 555 timer as a time delay. One would push the button, activating both an immediate output, i.e. an LED (first detent), as well as the trigger on the 555. Then after a specified amount of time, a second LED would go high (second detent). The issue I can already see with this is, if I want *only* the first LED to go high, without activating the second one. In my scenario above, the second LED would always go high after pushing the button, which is not what I want.

Any suggestions or ideas you can provide would be greatly appreciated.

Ted
 

AnalogKid

Joined Aug 1, 2013
11,042
If you limit the input to a simple pushbutton switch, that limits what the circuit can do. Here is a modification of something I did for an intercom system. The original talk switches were paddle switches with a momentary push down and a latching push up (flip it up and you can talk continuously with both hands free. Similar to your application in that we wanted two functions and only one momentary switch. That circuit required a latching function; yours is much more simple.

You can do this with a simple R-C timing circuit. You don't give any specifics about the output signals you need, so I'm going with generic descriptions.

Press button - first function output signal goes high
Release button before the timeout period - first function signal goes low

and

Press button - first function output signal goes high
Hold button until the end of the timeout period - first function stays high and the second function signal goes high
Release button - all functions signals go low.

Options:
1. When the second function output goes high, the first function output goes low
2. The function outputs are pulses rather than levels.

Not counting any required output drivers, the circuit fits in one CD4093 quad Schmitt trigger NAND gate, or one CD40106 Schmitt hex inverter. Other options are a couple of transistors, or a ULN2004 (for 24 V - 48 V logic), or one 74AC14 hex inverter (3.3 V - 5 V only). The timeout period depends on what the application is and how heavy-handed your users are. For the intercom I used 0.75 second.

Does this sound like what you need?

ak
 
Last edited:

Thread Starter

liquidrain84

Joined Sep 25, 2019
2
Press button - first function output signal goes high
Release button before the timeout period - first function signal goes low

and

Press button - first function output signal goes high
Hold button until the end of the timeout period - first function stays high (or goes low; your choice) and the second function signal goes high
Release button - all functions signals go low.

Not counting any required output drivers, the circuit fits in one CD4093 quad Schmitt trigger NAND gate, or one CD40106 Schmitt hex inverter. Other options are a couple of transistors, or a ULN2004 (for 24 V - 48 V logic), or one 74AC14 hex inverter (3.3 V - 5 V only). The timeout period depends on what the application is and how heavy-handed your users are. For the intercom I used 1 second.

does this sound like what you need?

ak
Your description of the switch's capabilities sound exactly like what I need. But I am looking at the CD4093 datasheet and am not entirely sure I understand how NAND gates are used as a timing circuit. Is the fact that they are Schmitt-Triggers what causes the time delay? Again, please remember I'm still new to this whole thing and have been having to piece together what I can with what I find online without any real guidance.
 

AnalogKid

Joined Aug 1, 2013
11,042
Resistor-Capacitor (R-C) timing circuits can have a slowly ramping voltage, and some types of logic gates produce a noise burst at the output during the middle of the ramp. A gate with a Schmitt trigger input is designed to perform much better in this type of circuit. The 4093 isn't the whole circuit, just the active parts. Other parts are resistors, capacitors, and probably one diode. I wanted to hear if the functions I described were worth moving forward with before committing to a schematic.

https://en.wikipedia.org/wiki/Schmitt_trigger

What do the outputs of the circuit do? What downstream stuff do they drive?

And, what voltage is available to run the circuit?

ak
 
Last edited:

crutschow

Joined Mar 14, 2008
34,428
An example might be like on a digital camera, where you might lightly push the button to focus the lens, then push it down all the way to actually take the picture.
That requires a special push-button that connects one circuit when pressed lightly and connects another circuit when pushed all the way.
There's no way to emulate that with a standard single-pole switch.
 

AnalogKid

Joined Aug 1, 2013
11,042
That requires a special push-button that connects one circuit when pressed lightly and connects another circuit when pushed all the way.
There's no way to emulate that with a standard single-pole switch.
True. To be clear, the circuit I'm discussing uses a simple SPST pushbutton switch. One push, one output; pressing the button further down past the action point (called overtravel) has no effect. The two outputs I describe are derived from the switch input using a timer and logic gating, and are *not* the same as an electronic camera shutter button.

ak
 
Top