Maker Pro
Maker Pro

debouncing a 4066 switch?

P

panfilero

I'm using an analog 4066 switch in an application where the input is an
audio signal being passed to a speaker, I'm going to be switching the
switch on and off the fastest.... maybe 5 times per second. My
question is, do I need to worry about debouncing this switch? Or is
debouncing solely for mechanical switches? I feel that I don't have to
worry about debouncing since the switch connection is being made by
nMOS and pMOS transistors hooked up in the transmission gate
configurations and there's nothing mechanical there to bounce? Would
this assumption be correct? (I'm getting crakling and popping sounds
at my audio output and am trying to decide on whether eliminating the
switch as the culprit)

Much Thanks
Joshua
 
A

Aviator

Debouncing is generally for electromechanical switches and and relay
contacts. With the 4066, if you have clean signals on the control
lines, there should not be an issue. However, depending on the nature
of the audio signal you're switching, and where you switch it on and
off, there may be some audible clicks coming from your speaker.
 
E

Eeyore

Aviator said:
Debouncing is generally for electromechanical switches and and relay
contacts. With the 4066, if you have clean signals on the control
lines, there should not be an issue. However, depending on the nature
of the audio signal you're switching, and where you switch it on and
off, there may be some audible clicks coming from your speaker.

Indeed there will.

So-called 'Fourier clicks'.

Graham
 
J

Jon Slaughter

panfilero said:
I'm using an analog 4066 switch in an application where the input is an
audio signal being passed to a speaker, I'm going to be switching the
switch on and off the fastest.... maybe 5 times per second. My
question is, do I need to worry about debouncing this switch? Or is
debouncing solely for mechanical switches? I feel that I don't have to
worry about debouncing since the switch connection is being made by
nMOS and pMOS transistors hooked up in the transmission gate
configurations and there's nothing mechanical there to bounce? Would
this assumption be correct? (I'm getting crakling and popping sounds
at my audio output and am trying to decide on whether eliminating the
switch as the culprit)


Probably what is happening is that the audio is changing from a non-zero
amplitude to a zero amplitude in a very quick time(much very easy for your
transistors to handle). So esentially what your getting is something like a
jump discontinuity when your switch changes. (if the clicks sound different
then this is probalby what is happening)

Now there are several cures for this and I don't remeber the names(something
like zero axis switching or something) but the concepts are pretty easy.

Basically only switch the audio when its amplitude has crossed/near 0 so
there is no jump(or very small as not to be heard)

or you could use some way to make the audio be critically damped so it ramps
down slowly instead of quickly. A sorta fade to 0 but fast enough so you
don't hear it.

Theres probably some other methods but I think the two above are easy to
implement and understand.

Jon
 
A

Adrian Jansen

Jon said:
Probably what is happening is that the audio is changing from a non-zero
amplitude to a zero amplitude in a very quick time(much very easy for your
transistors to handle). So esentially what your getting is something like a
jump discontinuity when your switch changes. (if the clicks sound different
then this is probalby what is happening)

Now there are several cures for this and I don't remeber the names(something
like zero axis switching or something) but the concepts are pretty easy.

Basically only switch the audio when its amplitude has crossed/near 0 so
there is no jump(or very small as not to be heard)

or you could use some way to make the audio be critically damped so it ramps
down slowly instead of quickly. A sorta fade to 0 but fast enough so you
don't hear it.

Theres probably some other methods but I think the two above are easy to
implement and understand.

Jon
This was about my first ever digital project, around 1975 or so...
And I learned then that 4066 are tricky things. Even when you switch at
the zero crossings, and remove the DC bias, and attempt to switch
'slowly' you will get clicks.
Part of the problem is that the 4066 already has significant gain on the
control lines, so switching the control input 'slowly' still switches
the output 'fast'. But the major problem is the charge you inject into
the switches from the control gates. No matter what you do, that still
introduces clicks.
Either use the other suggestion of controllable gain stages, or use some
of the newer switches designed specifically for this purpose.

--
Regards,

Adrian Jansen adrianjansen at internode dot on dot net
Design Engineer J & K Micro Systems
Microcomputer solutions for industrial control
Note reply address is invalid, convert address above to machine form.
 
G

Gerard Bok

I'm using an analog 4066 switch in an application where the input is an
audio signal being passed to a speaker,

If it is indeed a speaker-level signal you are going to switch,
the 4066 is not suitable at all (I think :)
 
B

Bob Masta

This was about my first ever digital project, around 1975 or so...
And I learned then that 4066 are tricky things. Even when you switch at
the zero crossings, and remove the DC bias, and attempt to switch
'slowly' you will get clicks.
Part of the problem is that the 4066 already has significant gain on the
control lines, so switching the control input 'slowly' still switches
the output 'fast'. But the major problem is the charge you inject into
the switches from the control gates. No matter what you do, that still
introduces clicks.
Either use the other suggestion of controllable gain stages, or use some
of the newer switches designed specifically for this purpose.

I usually had control feedthrough problems with the 4066,
and typically opted for the 4016 instead. The 4066 looks
better on paper, but the 4016 worked better for me.
True, the 4016 has higher resistance (and distortion),
but you can put it in a high-Z path where neither is a
problem. (The distortion specs are based upon the
device carrying a lot of current. Less current = lower
distortion.)

Worked for me!




Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Signal Generator
Science with your sound card!
 
M

Michael A. Terrell

Gerard said:
If it is indeed a speaker-level signal you are going to switch,
the 4066 is not suitable at all (I think :)


Not a problem, if you like flames and small explosions.


--
Service to my country? Been there, Done that, and I've got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
 
A

Aviator

One possible solution to the audible clicks would be to apply a
"window" to the signal, so that it doesn't switch from zero to full
amplitude and back instantaneously. This might take the form of a TVG
(Time Varying Gain) amplifier, or perhaps a simple R-C filter between
the switch and the amp that drives the speaker.
 
Top