Double throw momentary switch question

H

Hal Leemux

Guest
Hi,

Can anybody tell me a simple way to tweak a simple latch circuit to
change state when the button is pressed in quick succession (say within
1 second). Exactly like a double click on a computer.

The schematic I've been working off is second circuit down at,

http://ourworld.compuserve.com/homepages/Bill_Bowden/page9.htm

Would really appreciate any advice,

Hal.
 
On Fri, 24 Sep 2004 22:49:22 GMT, Hal Leemux
<Hal_leemuxNOSPAMMMPLEASE@yahoo.co.uk> wrote:

Hi,

Can anybody tell me a simple way to tweak a simple latch circuit to
change state when the button is pressed in quick succession (say within
1 second). Exactly like a double click on a computer.
---
1. Do you want the latch to change state (toggle) each time you
double-click the pushbutton or do you only want it to react the
first time you double-click and then stay where it is until it's
reset by something else?

2. Do you have to use a SPST switch or can you use a DPDT?

--
John Fields
 
John Fields wrote:

1. Do you want the latch to change state (toggle) each time you
double-click the pushbutton or do you only want it to react the
first time you double-click and then stay where it is until it's
reset by something else?
It needs to change state every time it is double clicked.


2. Do you have to use a SPST switch or can you use a DPDT?
I need to be using a momentary switch which will eventually be
substituted with a vibration sensor.
 
On Sat, 25 Sep 2004 08:31:48 GMT, Hal Leemux
<Hal_leemuxNOSPAMMMPLEASE@yahoo.co.uk> wrote:

John Fields wrote:

1. Do you want the latch to change state (toggle) each time you
double-click the pushbutton or do you only want it to react the
first time you double-click and then stay where it is until it's
reset by something else?

It needs to change state every time it is double clicked.
---
OK
---

2. Do you have to use a SPST switch or can you use a DPDT?


I need to be using a momentary switch which will eventually be
substituted with a vibration sensor.
---
Aha!!! Now we're getting somewhere!

Is it the kind of vibration sensor which gives you a lot of outputs
when it's being vibrated past its threshold, like this:

| |||| |
VIB __||__|||_|__||____|_||||____|_______


OUT____________________|_||||____|_______


or does it just give you one output, like this:

| |||| |
VIB __||__|||_|__||____|_||||____|_______

_____ _
OUT____________________| |___| |_____


If it only gives you one output, how long does the output stay hot
after the vibration goes away?

--
John Fields
 
John Fields wrote:

If you need a circuit description or you need help with the timing
components and you know how much time you want between knocks and sets
of knocks post back (either here or to abse) and I'll help you figure
it out.

Thanks a lot John - I'm really grateful. It all seems very clear.

I might need a little help on the timing values though. Any two knocks
in 1 second and 2 seconds between knocks seems about what I need.
 
On Sunday 26 September 2004 10:32 am, Hal Leemux did deign to grace us with
the following:

John Fields wrote:


If you need a circuit description or you need help with the timing
components and you know how much time you want between knocks and sets
of knocks post back (either here or to abse) and I'll help you figure
it out.



Thanks a lot John - I'm really grateful. It all seems very clear.

I might need a little help on the timing values though. Any two knocks
in 1 second and 2 seconds between knocks seems about what I need.
Learn how to do this, and for version 2 you can make your secret knock,
"Shave and a haircut, six bucks!"

Cheers!
Rich
 
On Sun, 26 Sep 2004 17:32:01 GMT, Hal Leemux
<Hal_leemuxNOSPAMMMPLEASE@yahoo.co.uk> wrote:

John Fields wrote:


If you need a circuit description or you need help with the timing
components and you know how much time you want between knocks and sets
of knocks post back (either here or to abse) and I'll help you figure
it out.



Thanks a lot John - I'm really grateful. It all seems very clear.

I might need a little help on the timing values though. Any two knocks
in 1 second and 2 seconds between knocks seems about what I need.
---
I made a mistake on the schematic :-(

I've got the trigger input of the 7555 connected to Q of the second
half of the 4538 when it should be connected to Q\. Also, in order to
get you the 2s between successful sets of pairs of knocks I'll have to
add another one-shot. I'll fix it and post the values for the timing
components some time tomorrow.

--
John Fields
 
John Fields <jfields@austininstruments.com> wrote:

On Tue, 28 Sep 2004 16:14:41 +0100, Terry Pinnell
terrypinDELETE@THESEdial.pipex.com> wrote:

Maybe I've missed a crucial post, but the requirement still seems
ill-defined to me?

---
From what's been posted so far, here are what I think the answers are
to your questions:
---

1. What frequency is vibration?

---
Shouldn't matter.
---

2. What is voltage supply

---
Doesn't matter much.
---

3. Will vibration sensor signal have full amplitude of voltage supply?

---
Doesn't matter much, since if it doesn't it's pretty much a no-brainer
to run it through a comparator and clamp it to the rails.
---

4. If we call the period of vibration a 'knock', how long can each
knock be?

---
He specified that he wants, as a trigger for the toggle, a pair of
knocks to occur within one second, so I'm interpreting that to mean
from the leading edge of the first clump of edges to the leading edge
of the second clump. That can be done by starting a non-retriggerable
one-shot with a period of 1s when the first edge is detected and
starting a retriggerable one-shot with a period of, say, 250ms at the
same time, Then using the output of the 1s one-shot to allow the
second high-going edge out of the 250ms one-shot (if it happens
within the 1s window) to toggle the eventual output. If the second
edge doesn't happen in time, then no toggle and everything goes back
to square one.
---

5. Should that matter?

---
???
---

6. Should a *very* brief knock (possibly due to an accidental or
premature, or just external noise) count?

---
Yes, since the likelihood of a pair of random occurrences meeting the
triggering criteria will be slight. But, if it's important, it's easy
to put in go no-go time windows to discriminate between too short and
too long knock envelopes.
---

7. What happens with say 3 successive knocks within 1 s?
etc, etc.

---
If the first two meet the triggering criteria the toggle will occur
and the third will be ignored, since he specified a two second inhibit
between knock pairs.
---

I've tried to illustrate these in
http://www.terrypin.dial.pipex.com/Images/KnockKnockSignals.gif

Turning to the circuit, assuming we can tighten up the spec along the
lines above, intuition says a much simpler approach than John's ought
to be possible. (Although I haven't got one to offer <g>.)

---
After the learning curve, the acquisition of a programmer, and all the
rest of baggage that goes along with it, the simplest approach by far
would be to use a microcontroller. But, there _are_ all those snags,
so a couple of dual one-shots and a dual "D" flop is probably the
least painful way to get it done for a one-off.

I made a few errors in the circuit I posted earlier and I still need
to get the 2-second holdoff in there, so as soon as I get that done
(it won't be yesterday ;) I'll post it to abse and we'll see what
happens.
Thanks, that's clarified it nicely for me. Look forward to seeing the
circuit.

Your summary also helped crystallise this question to the OP: why not
simplify and toggle with *one* (significant) knock? By definition,
you're going to get a toggle with 2, 3, 4 or maybe even more rapid
knocks, so why single out 1 for exclusion?

--
Terry Pinnell
Hobbyist, West Sussex, UK
 
On Tue, 28 Sep 2004 20:59:24 +0100, Terry Pinnell
<terrypinDELETE@THESEdial.pipex.com> wrote:


Thanks, that's clarified it nicely for me. Look forward to seeing the
circuit.
---
"Dual knock detector 2" on abse...

--
John Fields
 

Welcome to EDABoard.com

Sponsor

Back
Top