Maker Pro
Maker Pro

Momentary Switch Circuit

E

ehsjr

Howard said:
You have a fundamental misunderstanding on how zener diodes function. I
recommend studying the (reverse) voltage vs. (reverse) current graph closely
in a zener diode data sheet. When a zener diode is reverse conducting, it
will have a voltage drop across it of appoximately the rated zener voltage.
In your circuit, immediately after the switch is moved to the right, Vout
should be close to Vcc-Vzener, not close to Vcc.

Thank you.
Ed
 
E

ehsjr

Terry said:
I'm curious. Why didn't you try this?

+Vcc ---o o---+---|<---- Vout
\ | Zener
o |
| |
[C1] [R1] 220K
| |
Gnd ------+-----+

Vzener is slightly below Vcc - eg 4.7 volts if Vcc is
5 V, 11 volts if Vcc is 12 volts etc.
Ed


Ed: That looked such an attractively simple circuit that I tried it
myself yesterday.
<snip>

Our ongoing conversation and different observations bugged me,
so I breadboarded the thing yesterday, and my results agree*
with yours. I can't post the waveforms like you can. :-(
What do you use? The postings are great! :)
*= essentially. I'm using different values to get the whole
picture on the display - I can't see 5 seconds.

Some observations:
I missed the time scale on your 5 second waveforms and the voltage
scale on the right. My scope doesn't do that! :) Took me a
while to catch on to how to read them.

Your comment about Vout = Vcc-Vz is correct. Henry also
pointed that out. I saw your first waveform showing a 14 volt
Vcc with a 12 volt zener yielding an "8" volt output, which
makes no sense either way - but now that I understand how to
read the waveform, that "8" volts is actually 2 volts, which
does make sense. So toss the zener from the circuit.

During the switch noisy time, I get some beautiful
transitions on the bounces like you have in the first
transition in Ed-11, but I view it at .1 ms per div.
How wide is your first transition? Mine varies from
..1 to .2 mS.

Ed
 
T

Terry Pinnell

ehsjr said:
Terry said:
I'm curious. Why didn't you try this?

+Vcc ---o o---+---|<---- Vout
\ | Zener
o |
| |
[C1] [R1] 220K
| |
Gnd ------+-----+

Vzener is slightly below Vcc - eg 4.7 volts if Vcc is
5 V, 11 volts if Vcc is 12 volts etc.
Ed


Ed: That looked such an attractively simple circuit that I tried it
myself yesterday.
<snip>

Our ongoing conversation and different observations bugged me,
so I breadboarded the thing yesterday, and my results agree*
with yours.

Good - that discussion was really perplexing me!
I can't post the waveforms like you can. :-(
What do you use? The postings are great! :)
*= essentially.

I use a PC-based 'scope. It's an ADC-200/50 from Pico Technology
http://www.picotech.com/
Wouldn't like to have to manage with only my Hameg analog scope. On
the other hand, it is good to get away from a PC for a while!

I take a screen capture (various ways; I use Snagit), and paste it
into PaintShop Pro 7. Occasionally I might edit it there, adding some
explanatory text etc.
I'm using different values to get the whole
picture on the display - I can't see 5 seconds.

Was there meant to be a link here to your display?
Some observations:
I missed the time scale on your 5 second waveforms and the voltage
scale on the right. My scope doesn't do that! :) Took me a
while to catch on to how to read them.

Yes said:
Your comment about Vout = Vcc-Vz is correct. Henry also
pointed that out. I saw your first waveform showing a 14 volt
Vcc with a 12 volt zener yielding an "8" volt output, which
makes no sense either way - but now that I understand how to
read the waveform, that "8" volts is actually 2 volts, which
does make sense. So toss the zener from the circuit.

I'd go further. To mis-quote an old Python sketch: That circuit is
deceased said:
During the switch noisy time, I get some beautiful
transitions on the bounces like you have in the first
transition in Ed-11, but I view it at .1 ms per div.
How wide is your first transition? Mine varies from
.1 to .2 mS.
Not exactly sure what you mean. As shown by the X-axis timescale, in
Ed-11 I was using 20 ms per division, and 100 ms in Ed-10. The former
was with a 5 uF cap, and the latter with 1 uF. In both cases I was
starting with toggle open, and then quickly closing and re-opening it
(about 300 ms), and then not repeating for several seconds.

BTW, that particular switch is one I reserve when I want to be sure of
seeing the effects of *lots* of noise.

But it's all rather academic now!
 
T

Terry Pinnell

A couple of other points have since emerged:

1) My simulation circuit was screwed up! To correctly simulate Ed's
SPDT toggle switch, *two* VCS elements are obviously necessary, not
the single VCS I used.

2) From feedback I've had from other CM users, the zener models are
definitely seriously flawed. Quoting an extract:
"Most of their zener models are created by connecting a diode in
series with a voltage source. While this approach makes a very coarse
voltage clamp it doesn't accurately reflect a true zener in circuit
and in fact has a number of problems. One particular problem ... is
that the diode in series with the voltage source has a reverse leakage
current. This leakage current can create error voltages in simulated
circuits."

Here's my revised simulation:
http://www.terrypin.dial.pipex.com/Images/ZenerSimulation2.gif

I reckon that 14V spike at the output is the spurious result of the
unrealistic modeling described above.

(I'll post this in the cad group too.)
 
E

ehsjr

Terry said:
I use a PC-based 'scope. It's an ADC-200/50 from Pico Technology
http://www.picotech.com/
Wouldn't like to have to manage with only my Hameg analog scope. On
the other hand, it is good to get away from a PC for a while!

I take a screen capture (various ways; I use Snagit), and paste it
into PaintShop Pro 7. Occasionally I might edit it there, adding some
explanatory text etc.




Was there meant to be a link here to your display?

No. The only way I can capture scope waveforms by taking a picture
of them. :-(
I'd go further. To mis-quote an old Python sketch: That circuit is
deceased, no longer with us, kicked the bucket... <g>.

Nope. The circuit works sans zener for devices that accept momentary
swicthes as input and have a built in debounce.
Not exactly sure what you mean. As shown by the X-axis timescale, in
Ed-11 I was using 20 ms per division, and 100 ms in Ed-10.

Right. What I'm calling the first transition starts at 0 mS,
goes up to 2 V then down to 1V, where the greatest amoubt of noise
starts. I'm wondering what is going on during that period.
I get about the same waveform, and the period for the
first transition varies from ~ .1 mS to ~.2 mS - I'm using
a Tek 485, & get the same thing on a Tek 475.

The former
was with a 5 uF cap, and the latter with 1 uF. In both cases I was
starting with toggle open, and then quickly closing and re-opening it
(about 300 ms), and then not repeating for several seconds.

BTW, that particular switch is one I reserve when I want to be sure of
seeing the effects of *lots* of noise.

But it's all rather academic now!

Yup. But it got me to wonder if anyone else uses toggle
switches in place of momentary. I'd never considered or heard
of doing that until the OP made his post. I did make a
relay "one-shot" once - OP needed a relay to energize for
one pulse at shut down. The supply energized a relay when power
was on. The open point charged a cap. When power was turned
off, the relay dropped out and transfered the charged cap to
a second relay:

+Vcc ---+---[RY1]---+-----+--- Gnd
| | |
o NO [C1] |
\ | |
RY1-1 o---------+ |
|
o NC |
| |
+-----[RY2]-------+

I never did learn why he wanted that circuit.

Ed
 
T

Terry Pinnell

ehsjr said:
No. The only way I can capture scope waveforms by taking a picture
of them. :-(

That was major motive for buying the PC-based scope. A digicam is OK
at a pinch, but not in the same league.
Nope. The circuit works sans zener for devices that accept momentary
swicthes as input and have a built in debounce.

OK, agreed.
Right. What I'm calling the first transition starts at 0 mS,
goes up to 2 V then down to 1V, where the greatest amoubt of noise
starts. I'm wondering what is going on during that period.
I get about the same waveform, and the period for the
first transition varies from ~ .1 mS to ~.2 mS - I'm using
a Tek 485, & get the same thing on a Tek 475.

OK, I see what you mean. But, if they do indeed follow that sort of
pattern no idea why. Switch bounce is something of a black art <g>.
Several toggles I tried were exceptionally low on noise. That
particular one exceptionally high. Presumably, if pole and both
contacts are connected to +Vcc and 0V respectively, swings must always
be across full supply, with no intermediate values possible. Maybe if
I'd set my timescale down to say 5 us I'd see even shorter pulses?
The former
was with a 5 uF cap, and the latter with 1 uF. In both cases I was
starting with toggle open, and then quickly closing and re-opening it
(about 300 ms), and then not repeating for several seconds.

BTW, that particular switch is one I reserve when I want to be sure of
seeing the effects of *lots* of noise.

But it's all rather academic now!

Yup. But it got me to wonder if anyone else uses toggle
switches in place of momentary. I'd never considered or heard
of doing that until the OP made his post. I did make a
relay "one-shot" once - OP needed a relay to energize for
one pulse at shut down. The supply energized a relay when power
was on. The open point charged a cap. When power was turned
off, the relay dropped out and transfered the charged cap to
a second relay:

+Vcc ---+---[RY1]---+-----+--- Gnd
| | |
o NO [C1] |
\ | |
RY1-1 o---------+ |
|
o NC |
| |
+-----[RY2]-------+

I never did learn why he wanted that circuit.

Did you also see my later follow-up yesterday?
 
E

ehsjr

Terry said:
Terry Pinnell wrote:



No. The only way I can capture scope waveforms by taking a picture
of them. :-(


That was major motive for buying the PC-based scope. A digicam is OK
at a pinch, but not in the same league.

Nope. The circuit works sans zener for devices that accept momentary
swicthes as input and have a built in debounce.


OK, agreed.

Right. What I'm calling the first transition starts at 0 mS,
goes up to 2 V then down to 1V, where the greatest amoubt of noise
starts. I'm wondering what is going on during that period.
I get about the same waveform, and the period for the
first transition varies from ~ .1 mS to ~.2 mS - I'm using
a Tek 485, & get the same thing on a Tek 475.


OK, I see what you mean. But, if they do indeed follow that sort of
pattern no idea why. Switch bounce is something of a black art <g>.
Several toggles I tried were exceptionally low on noise. That
particular one exceptionally high. Presumably, if pole and both
contacts are connected to +Vcc and 0V respectively, swings must always
be across full supply, with no intermediate values possible. Maybe if
I'd set my timescale down to say 5 us I'd see even shorter pulses?

The former
was with a 5 uF cap, and the latter with 1 uF. In both cases I was
starting with toggle open, and then quickly closing and re-opening it
(about 300 ms), and then not repeating for several seconds.

BTW, that particular switch is one I reserve when I want to be sure of
seeing the effects of *lots* of noise.

But it's all rather academic now!

Yup. But it got me to wonder if anyone else uses toggle
switches in place of momentary. I'd never considered or heard
of doing that until the OP made his post. I did make a
relay "one-shot" once - OP needed a relay to energize for
one pulse at shut down. The supply energized a relay when power
was on. The open point charged a cap. When power was turned
off, the relay dropped out and transfered the charged cap to
a second relay:

+Vcc ---+---[RY1]---+-----+--- Gnd
| | |
o NO [C1] |
\ | |
RY1-1 o---------+ |
|
o NC |
| |
+-----[RY2]-------+

I never did learn why he wanted that circuit.


Did you also see my later follow-up yesterday?

Yes. If both VCS1 and VCS2 are simultaneously energized,
D1 input "sees" the input to VCS1 normally open point -
not a good thing. The 14v spike might be that condition?

Ed
 
T

Terry Pinnell

ehsjr said:
Terry said:
Terry Pinnell wrote:



I use a PC-based 'scope. It's an ADC-200/50 from Pico Technology
http://www.picotech.com/
Wouldn't like to have to manage with only my Hameg analog scope. On
the other hand, it is good to get away from a PC for a while!

I take a screen capture (various ways; I use Snagit), and paste it
into PaintShop Pro 7. Occasionally I might edit it there, adding some
explanatory text etc.



I'm using different values to get the whole
picture on the display - I can't see 5 seconds.


Was there meant to be a link here to your display?


No. The only way I can capture scope waveforms by taking a picture
of them. :-(


That was major motive for buying the PC-based scope. A digicam is OK
at a pinch, but not in the same league.

Some observations:
I missed the time scale on your 5 second waveforms and the voltage
scale on the right. My scope doesn't do that! :) Took me a
while to catch on to how to read them.


Yes, I'd begun to suspect that you weren't reading the red scale <g>.



Your comment about Vout = Vcc-Vz is correct. Henry also
pointed that out. I saw your first waveform showing a 14 volt
Vcc with a 12 volt zener yielding an "8" volt output, which
makes no sense either way - but now that I understand how to
read the waveform, that "8" volts is actually 2 volts, which
does make sense. So toss the zener from the circuit.


I'd go further. To mis-quote an old Python sketch: That circuit is
deceased, no longer with us, kicked the bucket... <g>.

Nope. The circuit works sans zener for devices that accept momentary
swicthes as input and have a built in debounce.


OK, agreed.

During the switch noisy time, I get some beautiful
transitions on the bounces like you have in the first
transition in Ed-11, but I view it at .1 ms per div.
How wide is your first transition? Mine varies from
.1 to .2 mS.


Not exactly sure what you mean. As shown by the X-axis timescale, in
Ed-11 I was using 20 ms per division, and 100 ms in Ed-10.

Right. What I'm calling the first transition starts at 0 mS,
goes up to 2 V then down to 1V, where the greatest amoubt of noise
starts. I'm wondering what is going on during that period.
I get about the same waveform, and the period for the
first transition varies from ~ .1 mS to ~.2 mS - I'm using
a Tek 485, & get the same thing on a Tek 475.


OK, I see what you mean. But, if they do indeed follow that sort of
pattern no idea why. Switch bounce is something of a black art <g>.
Several toggles I tried were exceptionally low on noise. That
particular one exceptionally high. Presumably, if pole and both
contacts are connected to +Vcc and 0V respectively, swings must always
be across full supply, with no intermediate values possible. Maybe if
I'd set my timescale down to say 5 us I'd see even shorter pulses?

The former

was with a 5 uF cap, and the latter with 1 uF. In both cases I was
starting with toggle open, and then quickly closing and re-opening it
(about 300 ms), and then not repeating for several seconds.

BTW, that particular switch is one I reserve when I want to be sure of
seeing the effects of *lots* of noise.

But it's all rather academic now!

Yup. But it got me to wonder if anyone else uses toggle
switches in place of momentary. I'd never considered or heard
of doing that until the OP made his post. I did make a
relay "one-shot" once - OP needed a relay to energize for
one pulse at shut down. The supply energized a relay when power
was on. The open point charged a cap. When power was turned
off, the relay dropped out and transfered the charged cap to
a second relay:

+Vcc ---+---[RY1]---+-----+--- Gnd
| | |
o NO [C1] |
\ | |
RY1-1 o---------+ |
|
o NC |
| |
+-----[RY2]-------+

I never did learn why he wanted that circuit.


Did you also see my later follow-up yesterday?

Yes. If both VCS1 and VCS2 are simultaneously energized,
D1 input "sees" the input to VCS1 normally open point -
not a good thing. The 14v spike might be that condition?
Good point, I'll have to think about that. I vaguely thought I'd be OK
by ensuring both VCSs (identical) had a non-zero threshold. I
arbitrarily used a VCS I'd previously set at 10 mV. Their full specs
are:
VT: Threshold voltage 10.000m
VH: Hysteresis voltage 0.000
RON: On resistance 1.000
ROFF: Off resistance 1.000t

But I didn't think it through, and I think you may be right. Maybe
some hysteresis would fix it? Or maybe I need to design a simulation
with a definite changeover time.

Until your reply, I was happy to accept the following from one of my
CM-user friends, whom I'd also asked about that spike:
"The spike is caused by the Cjo capacitance of the zener which is 92
pF. This would have a time constant with the 10 k output resistor of
0.92 us. The horizontal resolution of the waveforms shown is too long
to see the wave shape of the spike, but if you expand the spike you
should see a RC discharge shape with a time constant of around 1 us.

The rest of the waveform looks good and is what would be expected from
the circuit given, except for the ringing after the main RC pulse.
There is nothing in the circuit that would account for the ringing so
it is probably just a simulation artifact."

FWIW, this is another simulation I've been playing with since seeing
your post:
http://www.terrypin.dial.pipex.com/Images/ToggleVCS1.gif
 
E

ehsjr

Terry said:
Terry said:
Terry Pinnell wrote:



I use a PC-based 'scope. It's an ADC-200/50 from Pico Technology
http://www.picotech.com/
Wouldn't like to have to manage with only my Hameg analog scope. On
the other hand, it is good to get away from a PC for a while!

I take a screen capture (various ways; I use Snagit), and paste it
into PaintShop Pro 7. Occasionally I might edit it there, adding some
explanatory text etc.




I'm using different values to get the whole
picture on the display - I can't see 5 seconds.


Was there meant to be a link here to your display?


No. The only way I can capture scope waveforms by taking a picture
of them. :-(


That was major motive for buying the PC-based scope. A digicam is OK
at a pinch, but not in the same league.



Some observations:
I missed the time scale on your 5 second waveforms and the voltage
scale on the right. My scope doesn't do that! :) Took me a
while to catch on to how to read them.


Yes, I'd begun to suspect that you weren't reading the red scale <g>.




Your comment about Vout = Vcc-Vz is correct. Henry also
pointed that out. I saw your first waveform showing a 14 volt
Vcc with a 12 volt zener yielding an "8" volt output, which
makes no sense either way - but now that I understand how to
read the waveform, that "8" volts is actually 2 volts, which
does make sense. So toss the zener from the circuit.


I'd go further. To mis-quote an old Python sketch: That circuit is
deceased, no longer with us, kicked the bucket... <g>.

Nope. The circuit works sans zener for devices that accept momentary
swicthes as input and have a built in debounce.


OK, agreed.



During the switch noisy time, I get some beautiful
transitions on the bounces like you have in the first
transition in Ed-11, but I view it at .1 ms per div.
How wide is your first transition? Mine varies from
.1 to .2 mS.


Not exactly sure what you mean. As shown by the X-axis timescale, in
Ed-11 I was using 20 ms per division, and 100 ms in Ed-10.

Right. What I'm calling the first transition starts at 0 mS,
goes up to 2 V then down to 1V, where the greatest amoubt of noise
starts. I'm wondering what is going on during that period.
I get about the same waveform, and the period for the
first transition varies from ~ .1 mS to ~.2 mS - I'm using
a Tek 485, & get the same thing on a Tek 475.


OK, I see what you mean. But, if they do indeed follow that sort of
pattern no idea why. Switch bounce is something of a black art <g>.
Several toggles I tried were exceptionally low on noise. That
particular one exceptionally high. Presumably, if pole and both
contacts are connected to +Vcc and 0V respectively, swings must always
be across full supply, with no intermediate values possible. Maybe if
I'd set my timescale down to say 5 us I'd see even shorter pulses?



The former


was with a 5 uF cap, and the latter with 1 uF. In both cases I was
starting with toggle open, and then quickly closing and re-opening it
(about 300 ms), and then not repeating for several seconds.

BTW, that particular switch is one I reserve when I want to be sure of
seeing the effects of *lots* of noise.

But it's all rather academic now!

Yup. But it got me to wonder if anyone else uses toggle
switches in place of momentary. I'd never considered or heard
of doing that until the OP made his post. I did make a
relay "one-shot" once - OP needed a relay to energize for
one pulse at shut down. The supply energized a relay when power
was on. The open point charged a cap. When power was turned
off, the relay dropped out and transfered the charged cap to
a second relay:

+Vcc ---+---[RY1]---+-----+--- Gnd
| | |
o NO [C1] |
\ | |
RY1-1 o---------+ |
|
o NC |
| |
+-----[RY2]-------+

I never did learn why he wanted that circuit.



Did you also see my later follow-up yesterday?

Yes. If both VCS1 and VCS2 are simultaneously energized,
D1 input "sees" the input to VCS1 normally open point -
not a good thing. The 14v spike might be that condition?

Good point, I'll have to think about that. I vaguely thought I'd be OK
by ensuring both VCSs (identical) had a non-zero threshold. I
arbitrarily used a VCS I'd previously set at 10 mV. Their full specs
are:
VT: Threshold voltage 10.000m
VH: Hysteresis voltage 0.000
RON: On resistance 1.000
ROFF: Off resistance 1.000t

But I didn't think it through, and I think you may be right. Maybe
some hysteresis would fix it? Or maybe I need to design a simulation
with a definite changeover time.

Until your reply, I was happy to accept the following from one of my
CM-user friends, whom I'd also asked about that spike:
"The spike is caused by the Cjo capacitance of the zener which is 92
pF. This would have a time constant with the 10 k output resistor of
0.92 us. The horizontal resolution of the waveforms shown is too long
to see the wave shape of the spike, but if you expand the spike you
should see a RC discharge shape with a time constant of around 1 us.

The trouble here is that we don't know how the sim program models
the zener. Your friend may be right - I have no clue what the program
does. On the real waveforms you posted, I don't see the spike.
On my breadboard, with a 6v zener, 1uF, 15K load and 17V Vcc, I see
a triangular spike something like this:

7.5 |\
7.0 | \
6.5 | \
6.0 | \_______________
<3us>
<--------10us------->
That's a far cry from the 14 volt spike. The actual circuit,
however, would be something like this:

/
+---o o---+
| |
Vcc---||---+---||----+-----||<---10K---gnd
1Uf Cs Zener

Cs is the capacitance of the switch contacts. It changes as
the distance between them changes. I'm clueless as to the
impact on the simulator.

The rest of the waveform looks good and is what would be expected from
the circuit given, except for the ringing after the main RC pulse.
There is nothing in the circuit that would account for the ringing so
it is probably just a simulation artifact."

FWIW, this is another simulation I've been playing with since seeing
your post:
http://www.terrypin.dial.pipex.com/Images/ToggleVCS1.gif

On the sim, why not do something like this to
guarantee an offset between R2 and R3 energized time:
+
|
-----VCS1 /
| |
Gnd | +
| |
VCS3 /
| |
| R2
| |
+---+
Gnd

Your sim shows the voltage drop at C during
the voltage rise at D, and I'm wondering if
it will delay things to account for VCS3 transfer
time.

Ed
 
T

Terry Pinnell

ehsjr said:
Terry said:
Terry Pinnell wrote:




Terry Pinnell wrote:



I use a PC-based 'scope. It's an ADC-200/50 from Pico Technology
http://www.picotech.com/
Wouldn't like to have to manage with only my Hameg analog scope. On
the other hand, it is good to get away from a PC for a while!

I take a screen capture (various ways; I use Snagit), and paste it
into PaintShop Pro 7. Occasionally I might edit it there, adding some
explanatory text etc.




I'm using different values to get the whole
picture on the display - I can't see 5 seconds.


Was there meant to be a link here to your display?


No. The only way I can capture scope waveforms by taking a picture
of them. :-(


That was major motive for buying the PC-based scope. A digicam is OK
at a pinch, but not in the same league.



Some observations:
I missed the time scale on your 5 second waveforms and the voltage
scale on the right. My scope doesn't do that! :) Took me a
while to catch on to how to read them.


Yes, I'd begun to suspect that you weren't reading the red scale <g>.




Your comment about Vout = Vcc-Vz is correct. Henry also
pointed that out. I saw your first waveform showing a 14 volt
Vcc with a 12 volt zener yielding an "8" volt output, which
makes no sense either way - but now that I understand how to
read the waveform, that "8" volts is actually 2 volts, which
does make sense. So toss the zener from the circuit.


I'd go further. To mis-quote an old Python sketch: That circuit is
deceased, no longer with us, kicked the bucket... <g>.

Nope. The circuit works sans zener for devices that accept momentary
swicthes as input and have a built in debounce.


OK, agreed.



During the switch noisy time, I get some beautiful
transitions on the bounces like you have in the first
transition in Ed-11, but I view it at .1 ms per div.
How wide is your first transition? Mine varies from
.1 to .2 mS.


Not exactly sure what you mean. As shown by the X-axis timescale, in
Ed-11 I was using 20 ms per division, and 100 ms in Ed-10.

Right. What I'm calling the first transition starts at 0 mS,
goes up to 2 V then down to 1V, where the greatest amoubt of noise
starts. I'm wondering what is going on during that period.
I get about the same waveform, and the period for the
first transition varies from ~ .1 mS to ~.2 mS - I'm using
a Tek 485, & get the same thing on a Tek 475.


OK, I see what you mean. But, if they do indeed follow that sort of
pattern no idea why. Switch bounce is something of a black art <g>.
Several toggles I tried were exceptionally low on noise. That
particular one exceptionally high. Presumably, if pole and both
contacts are connected to +Vcc and 0V respectively, swings must always
be across full supply, with no intermediate values possible. Maybe if
I'd set my timescale down to say 5 us I'd see even shorter pulses?



The former


was with a 5 uF cap, and the latter with 1 uF. In both cases I was
starting with toggle open, and then quickly closing and re-opening it
(about 300 ms), and then not repeating for several seconds.

BTW, that particular switch is one I reserve when I want to be sure of
seeing the effects of *lots* of noise.

But it's all rather academic now!

Yup. But it got me to wonder if anyone else uses toggle
switches in place of momentary. I'd never considered or heard
of doing that until the OP made his post. I did make a
relay "one-shot" once - OP needed a relay to energize for
one pulse at shut down. The supply energized a relay when power
was on. The open point charged a cap. When power was turned
off, the relay dropped out and transfered the charged cap to
a second relay:

+Vcc ---+---[RY1]---+-----+--- Gnd
| | |
o NO [C1] |
\ | |
RY1-1 o---------+ |
|
o NC |
| |
+-----[RY2]-------+

I never did learn why he wanted that circuit.



Did you also see my later follow-up yesterday?


Yes. If both VCS1 and VCS2 are simultaneously energized,
D1 input "sees" the input to VCS1 normally open point -
not a good thing. The 14v spike might be that condition?

Good point, I'll have to think about that. I vaguely thought I'd be OK
by ensuring both VCSs (identical) had a non-zero threshold. I
arbitrarily used a VCS I'd previously set at 10 mV. Their full specs
are:
VT: Threshold voltage 10.000m
VH: Hysteresis voltage 0.000
RON: On resistance 1.000
ROFF: Off resistance 1.000t

But I didn't think it through, and I think you may be right. Maybe
some hysteresis would fix it? Or maybe I need to design a simulation
with a definite changeover time.

Until your reply, I was happy to accept the following from one of my
CM-user friends, whom I'd also asked about that spike:
"The spike is caused by the Cjo capacitance of the zener which is 92
pF. This would have a time constant with the 10 k output resistor of
0.92 us. The horizontal resolution of the waveforms shown is too long
to see the wave shape of the spike, but if you expand the spike you
should see a RC discharge shape with a time constant of around 1 us.

The trouble here is that we don't know how the sim program models
the zener. Your friend may be right - I have no clue what the program
does. On the real waveforms you posted, I don't see the spike.
On my breadboard, with a 6v zener, 1uF, 15K load and 17V Vcc, I see
a triangular spike something like this:

7.5 |\
7.0 | \
6.5 | \
6.0 | \_______________
<3us>
<--------10us------->
That's a far cry from the 14 volt spike. The actual circuit,
however, would be something like this:

/
+---o o---+
| |
Vcc---||---+---||----+-----||<---10K---gnd
1Uf Cs Zener

Cs is the capacitance of the switch contacts. It changes as
the distance between them changes. I'm clueless as to the
impact on the simulator.

The rest of the waveform looks good and is what would be expected from
the circuit given, except for the ringing after the main RC pulse.
There is nothing in the circuit that would account for the ringing so
it is probably just a simulation artifact."

FWIW, this is another simulation I've been playing with since seeing
your post:
http://www.terrypin.dial.pipex.com/Images/ToggleVCS1.gif

On the sim, why not do something like this to
guarantee an offset between R2 and R3 energized time:
+
|
-----VCS1 /
| |
Gnd | +
| |
VCS3 /
| |
| R2
| |
+---+
Gnd

Your sim shows the voltage drop at C during
the voltage rise at D, and I'm wondering if
it will delay things to account for VCS3 transfer
time.
Thanks, I'll experiment further. I am close to a better SPDT
simulation, but I've digressed into trying to generalise it for future
use. Reckon I'll pass on simulating varying contact switch capacitance
though! Presumably, for the SPDT used here, we'd include *two* such,
Cs1 and Cs2. Although their values must be infinitesimal (ignorable?)
until contact is extremely close on either side?

FWIW, here's the CM model of 1N4742 12V Zener

IS: Saturation current 9.67e-15
RS: Ohmic resistance [0,] 4.260
N: Emission coefficient 1.000 *
TT: Transit-time [0,] 50.10n
CJO: Zero-bias junction capacitance [0,] 94.20p
VM: Grading coefficient 330.0m
EG: Activation energy 1.110 *
XTI: Saturation-current temperature exponent 3.000 *
KF: Flicker-noise coefficient 0.000 *
AF: Flicker-noise exponent 1.000 *
FC: Foward-bias depletion coefficient 500.0m *
BV: Reverse breakdown voltage 11.91
IBV: Current at breakdown voltage 21.00m
TNOM: Paramameter measurement temperature 27.00 *

* ==> default values
 
J

John Woodgate

I read in sci.electronics.design that Terry Pinnell
Thanks, I'll experiment further.

Would you also please consider snipping you very long articles in this
thread now.
 
T

Terry Pinnell

John Woodgate said:
I read in sci.electronics.design that Terry Pinnell


Would you also please consider snipping you very long articles in this
thread now.

I'll certainly try, as I'm a snipping fan. But it's sometimes quite
difficult when the quotes are in-line sections.

FWIW, I did initially try composing my last reply with some heavy
snipping, but got into such a mess I regressed to the easier option
<g>.

Any thoughts on the substance of the post?
 
T

Terry Pinnell

ehsjr said:
The trouble here is that we don't know how the sim program models
the zener. Your friend may be right - I have no clue what the program
does. On the real waveforms you posted, I don't see the spike.
On my breadboard, with a 6v zener, 1uF, 15K load and 17V Vcc, I see
a triangular spike something like this:

7.5 |\
7.0 | \
6.5 | \
6.0 | \_______________
<3us>
<--------10us------->

Assuming we're still discussing the same circuit configuration, then I
get this result now that I've corrected my SPDT design:

http://www.terrypin.dial.pipex.com/Images/MomentarySIM2.gif

The output is about 40mS, with an amplitude of about 11 V (Vcc-Vz).

If I throw in some capacitance, and increase the timing resolution,
then I get this:

http://www.terrypin.dial.pipex.com/Images/MomentarySIM3.gif
 
J

John Woodgate

I read in sci.electronics.design that Terry Pinnell
If I throw in some capacitance, and increase the timing resolution,
then I get this:

What is unexpected? The 100 pF will transfer the 17 V to the output
until it charges up. Time constant is 1.5 us, so after 5 us most (96.4%)
of the spike will be gone.
 
T

Terry Pinnell

John Woodgate said:
I read in sci.electronics.design that Terry Pinnell


What is unexpected? The 100 pF will transfer the 17 V to the output
until it charges up. Time constant is 1.5 us, so after 5 us most (96.4%)
of the spike will be gone.

Thanks. Nothing unexpected with that one as far as I'm concerned! But
it differs from what Ed is apparently seeing.

My earlier reply was asking whether you had any comments about the
points in my previous post. For example, how significant would contact
capacitance be in simulating a SPDT toggle switch?
 
J

John Woodgate

I read in sci.electronics.design that Terry Pinnell
My earlier reply was asking whether you had any comments about the
points in my previous post. For example, how significant would contact
capacitance be in simulating a SPDT toggle switch?

It isn't something you can generalise about. A switch with 3 pF
capacitance may be disastrous in one circuit, while another with 30 pF
may be quite OK in another circuit. It's just the same with contact
resistance, but that also involves 'wetting current'. Some mains toggle
switches are open-circuit in all positions when tried in low-voltage,
low-current circuits.
 
E

ehsjr

Terry said:
Thanks. Nothing unexpected with that one as far as I'm concerned! But
it differs from what Ed is apparently seeing.

Right. I should be seeing ~11 volts, not 6, after the triangular
spike. The 17 volts is unregulated - but I can't see 15K knocking
it down. I'll test that - just connect the 15K directly between
ground and 17V and measure with the DMM.

Ed
 
T

Terry Pinnell

ehsjr said:
Right. I should be seeing ~11 volts, not 6, after the triangular
spike. The 17 volts is unregulated - but I can't see 15K knocking
it down. I'll test that - just connect the 15K directly between
ground and 17V and measure with the DMM.

Here are my latest and probably last test results:
http://www.terrypin.dial.pipex.com/Images/Toggle-Latest1.gif
http://www.terrypin.dial.pipex.com/Images/Toggle-Latest2.gif

BTW, it's possible that on some of my earlier tests, I had
accidentally set my home-made power supply to its lowest current limit
(about 25 mA).
 
T

Terry Pinnell

ehsjr said:
Right. I should be seeing ~11 volts, not 6, after the triangular
spike. The 17 volts is unregulated - but I can't see 15K knocking
it down. I'll test that - just connect the 15K directly between
ground and 17V and measure with the DMM.
Here are my latest and probably last test results:
http://www.terrypin.dial.pipex.com/Images/Toggle-Latest1.gif
http://www.terrypin.dial.pipex.com/Images/Toggle-Latest2.gif

BTW, it's possible that on some of my earlier tests, I had
accidentally set my home-made power supply to its lowest current limit
(about 25 mA).
 
E

ehsjr

Terry said:
Here are my latest and probably last test results:
http://www.terrypin.dial.pipex.com/Images/Toggle-Latest1.gif
http://www.terrypin.dial.pipex.com/Images/Toggle-Latest2.gif

BTW, it's possible that on some of my earlier tests, I had
accidentally set my home-made power supply to its lowest current limit
(about 25 mA).

The zener I was using is no good and now resides in the trash can.
With a properly working 6 volt zener, I get the same waveforms as
you. The expected ~11 volt level is there, the spike is there,
and the mystery is solved. Damn thing tested good in series
with 1K at 9 volts.

Ed
 
Top