electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software
switch popping using 4051/4052 mux - advice needed
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [20 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
heinzer



Joined: Aug 11, 2018
Posts: 12
Location: brooklyn
Audio files: 2

PostPosted: Thu Dec 16, 2021 11:22 pm    Post subject: switch popping using 4051/4052 mux - advice needed Reply with quote  Mark this post and the followings unread

Hey Folks

I am trying to build a simple circuit that has been used millions of times by (it seems) hundreds of people on this forum, but it WON'T WORK properly for me...

the idea: switching vco signals / audio / lfo signals with a mux (any 405*) - fast / slow ...whatever speed...whatever configuration I am using, there is an audible pop when switching (except for when switching ONLY lfo signals)...the strange thing is, it's not visible on the scope (no voltage spike)...

the setup: I build this on breadboard... cd4051 (or 4052) with or without input/output buffers (TLV272) + 2x/3x cd4046 as square LFO to control the switches...all running on 5V via voltage regulator (9V from wall adapter)...100u cap + 0.1u caps on voltage regulator + 0.1u decoupling caps on all ICs

here is what I tried so far:

1. adding simple opamp buffers (in/out)
2. adding 1u electro to inputs/output + adding dc offset (2.5V) to each input/output (via 100k resistors to +5V / GND)
3. using HC4051/52
4. using my +/-12V eurorack powersupply via 5V voltage regulator
5. using cd4051/52 with bipolar power
6. took off the 4046 (manually switching with a wire to v+ and 10k pulldown resistors)
7. used different breadboard
8. used various VCOs and audio sources as inputs
9. grounded some inputs

NO change, still popping...I am kind of at a loss...is it the breadboards? will it disappear if I just solder it all up on protoboard? what am I missing here? are the 4051/52 control inputs very sensitive? (I also tried putting resistors onto those)...will draw up a schematic soon...

any ideas?
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Sat Dec 18, 2021 6:26 am    Post subject: Re: switch popping using 4051/4052 mux - advice needed Reply with quote  Mark this post and the followings unread

heinzer wrote:

2. adding 1u electro to inputs/output + adding dc offset (2.5V) to each input/output (via 100k resistors to +5V / GND)

That would have been my first suggestion.

You'll never get it completely clean because you're switching at random points in the waveform so it can jump a bit (unless you
add some kind of level detection). It shouldn't be too bad though. Could you record some audio ?

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Sat Dec 18, 2021 6:51 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
...will draw up a schematic soon...


That will help a lot figuering out if a hardware error is in play…

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
heinzer



Joined: Aug 11, 2018
Posts: 12
Location: brooklyn
Audio files: 2

PostPosted: Sat Dec 18, 2021 8:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

I was just wondering how some people here in the forum managed to have pop-free recordings of similar circuits...

I attached some audio...it really becomes audible if I dampen the waveforms...full on saw/square is almost pop free

schematic coming soon


STE-011.mp3
 Description:

Download
 Filename:  STE-011.mp3
 Filesize:  1.05 MB
 Downloaded:  143 Time(s)


STE-010.mp3
 Description:

Download
 Filename:  STE-010.mp3
 Filesize:  737.14 KB
 Downloaded:  136 Time(s)

Back to top
View user's profile Send private message
heinzer



Joined: Aug 11, 2018
Posts: 12
Location: brooklyn
Audio files: 2

PostPosted: Sat Dec 18, 2021 9:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

oh, and I also tried the Rene Schmitz trick...lowering the input voltage via inverting op-amps - then switching those signals - and amplifying them the same way past the switch ...same result!
Back to top
View user's profile Send private message
heinzer



Joined: Aug 11, 2018
Posts: 12
Location: brooklyn
Audio files: 2

PostPosted: Sun Dec 19, 2021 6:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

here the 'schematics' ...obliterated are 0.1u bypass caps for power supply and all ICs...my goal is to have the circuit run on +5V...(+9V would be okay if it improves things...I originally thought this could help with the "headroom" of the switch, but it doesn't seem to)...I already tried to run everything on +9V and even the 4052 on +/-12V...

the 4 different input/output options are:

1. simple opamp buffer
2. inverting opamp
3. dc filter +bias voltage
4. NO buffer

all the same (so far)...thoughts?


post.jpg
 Description:
 Filesize:  1.01 MB
 Viewed:  125 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

post.jpg


Back to top
View user's profile Send private message
heinzer



Joined: Aug 11, 2018
Posts: 12
Location: brooklyn
Audio files: 2

PostPosted: Thu Jan 06, 2022 10:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hey folks...any thoughts on the posts above (holiday break is over now) and happy new year everyone!
Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Fri Jan 07, 2022 1:39 am    Post subject: Reply with quote  Mark this post and the followings unread

The datasheet says:
Quote:
Break-Before-Make Switching Eliminates Channel Overlap

So, depending what the circuit after the Y-output is, there will be a short moment that the output is high impedance, so say if the Y-output is connected to a resistor the output will go for a short moment from the chosen input voltage to "0".
What you could try is to have the Y-output connected to a capacitor to gnd and buffer it, you could try different cap values or even add a resistor of say 100k parallel to the capacitor so you will have a constant decay time of the output voltage.


multiplex out.jpg
 Description:
 Filesize:  61.04 KB
 Viewed:  123 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

multiplex out.jpg



_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
heinzer



Joined: Aug 11, 2018
Posts: 12
Location: brooklyn
Audio files: 2

PostPosted: Sat Jan 08, 2022 9:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hey grumble - thx for the suggestions...I tried all kinds of combination of cap / resistor values...unfortunately it has no effect on the popping...

what do you suggest for the inputs? my signals come straight from opamp outputs...should I put a resistor in series or any of the buffers from the drawing (previous posts)? shouldn't the inputs and the output have a similar buffer / no buffer? any other thoughts (I feel like I almost tried everything)

thx...
Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Sun Jan 09, 2022 1:22 am    Post subject: Reply with quote  Mark this post and the followings unread

Did you realised that my drawing concerns the OUTPUT of the multiplexer ?

For the input of the multiplexer channels I’d use the left schematics of drawing 3, so each input of the multiplexer is at the same potential, together with my suggestion that should take care of the switching click.

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
heinzer



Joined: Aug 11, 2018
Posts: 12
Location: brooklyn
Audio files: 2

PostPosted: Tue Jan 11, 2022 11:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

yes, I realized your drawing concerns the output...

I tried your suggestions for the inputs...absolutely no change...I am at a loss...I also tried some of my earlier attempts (running the mux on 9V...4.5V bias at the inputs / + biasing the output as well) ...my signals go between 0 and 5V...any more thoughts?
Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Thu Jan 13, 2022 3:45 am    Post subject: Reply with quote  Mark this post and the followings unread

I have built a setup with a 4516 (presettable binary up/down counter) and a 4051 (single 8-channel analog multiplexer)
The inputs of the 4051 were all connected via 8 resistors to 3.3 volt (to make sure all inputs are same for input voltage and impedance), the chips were powered from 5 volt.
When looking at the output voltage of the 4051 there was some ripple caused (i suppose) by the difference in switch impedance and some leakage from the supplied A, B and C inputs.
But not really serious.
Maybe I could have diminished this ripple by making a voltage divider which was trimmable by a trimpot..
But when I added a slow sine wave going from 0 volt to 5 volt, I could hear this switching noise from about 2.5 volt input voltage and getting louder when this voltage rises.
So what You can do is raising the supply voltage (this will lower the switch impedance) and/or lower the resistor value in drawing 3 (the lowest 100k resistor)


analog switching.PNG
 Description:
My test circuit
 Filesize:  22.28 KB
 Viewed:  119 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

analog switching.PNG



_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Thu Jan 13, 2022 4:00 am    Post subject: Reply with quote  Mark this post and the followings unread



Here you can hear and see the problem.
Lower trace is input (slow sinewave 0 - 5 volt), zero is bottom line.
Upper trace is output, zero is midscale.
You can see that the output does not reach 0 volt and you can see and hear where the distortion starts.

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Thu Jan 13, 2022 2:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

interesting.
To my knowledge (wherever that came from) it's best practise to keep analog signals biased at around half the supply voltage.
I did have a quick look at a datasheet and although there is some variation in internal resistance based on both the supply and
signal voltage it's not that major. It does seem to be worse for 5V than higher supply voltages though. Did you have any load
on it or straight into the oscilloscope ?

I am curious, if you still have the setup, how does it behave with say a 12V supply ?

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Thu Jan 13, 2022 3:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
how does it behave with say a 12V supply

I’ll try that tomorrow.

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Buck Starchaser



Joined: Jan 13, 2022
Posts: 6
Location: USA

PostPosted: Thu Jan 13, 2022 11:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

I don't think I have these chips on hand to test this anomaly, nor my solution, but here's what I'm thinking is going on here...

Because CMOS circuits are very sensitive to static electricity, it is standard for the silicon die to have diodes connected from the pads to both of the power rails. This is so that transients that exceed a power rail voltage will be shunted to that power rail, where circuit resistance inside and outside of the package is low enough to usually guide the offending current around the delicate FETs inside. This hidden benefit has become a source of surprise and wonderment among people who find that their arduinos sometimes boot up without an 'apparent' power source. There is enough energy on an I/O line to at least cause signs of life via the protection diodes in these cases. Fortunately, the diodes are stout enough to be more inspiring than frustrating in those cases, but here we have the other side of that coin.

Now, if you look at how those diodes are arranged, with that probably-long breadboarding wire, to what may be a low-impedance audio input (what are you feeding your circuit into, by the way?), it's the same circuit as a switch-mode power supply every time this chip switches internally. The speed it switches at is so high that it would put an automotive ignition system to shame, and so those protective diodes are both protecting those delicate chipperinos, and probably the cause of the unwanted popperonies.
My suggestion is to put a 470'ish Ohm resistor before and after the filter cap shown in the more complex schematic that was provided by Grumble. The values are based on the datasheet for the CD4051 claiming performance data that involved the output being grounded through 1K Ohm, and that much drag should be enough to stifle the inductive kick - if present - and clarify if that was the problem.


Antichargepump.gif
 Description:
Drawing of Standard CMOS internal protection diodes, and an output filter to prevent them from charge-pumping like a switch-mode power supply on the output.
 Filesize:  3.99 KB
 Viewed:  5094 Time(s)

Antichargepump.gif


Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Fri Jan 14, 2022 3:32 am    Post subject: Reply with quote  Mark this post and the followings unread

This morning I took a piece of perfboard because the solderless exp board proved to be useless...
So I soldered the below schematic to a piece of perfboard and had NO clock related noise as long as the DC voltages of the inputs are the same!
The only change I made was replacing the 4516 with a CD4520 and the 8 resistors (56k) were connected via 8 switches so I could test what happens if one of the inputs is floating and to connect a signal via the 56k to an input.

Of course if you switch while your input signal is NOT (in this case) 5 volt, you will hear a glitch like PHOBoS already pointed out, but that has nothing to do with leakage of the clock signal but the time when you switch.
And also, if your signal goes below 0 volt or above 12 volt you will hear the clock signal, but then you are using the CD4051 outside its working limits.

The output of the schematic I used is connected to a mixer with an input impedance of 100k.

Resuming: The circuit is solid! Just take care of the timing when you switch and of your input voltages.


analog switching.PNG
 Description:
 Filesize:  24.66 KB
 Viewed:  96 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

analog switching.PNG



_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Wed Jan 19, 2022 3:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Found this….
And looking at this circuit I realise that the output of the switch(es) should also be pullen up the same as the inputs, with this remark that concerning the 4051 always one input is connected to the output except a short while during switching.


4086A2E2-391D-4907-A0BA-97A8293902FA.gif
 Description:
 Filesize:  11 KB
 Viewed:  106 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

4086A2E2-391D-4907-A0BA-97A8293902FA.gif



_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Wed Jan 19, 2022 7:58 am    Post subject: Reply with quote  Mark this post and the followings unread

that's basically option 3 from this:
Posted Image, might have been reduced in size. Click Image to view fullscreen.
and what I am familiar with.

With the difference that they set the reference voltage once and connect every in-/output to it with a seperate resistor instead
of setting the reference voltage independently for each in-/output. Not sure how much difference that makes. I guess the reference
voltage wouldn't vary which could otherwise happen because of the tolerance in component values but having it connected through
a resistor might cause some more drifting. I would probably at least add an opamp to buffer the reference voltage and use some
lower value resistors (instead of the 510K).

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Wed Jan 19, 2022 3:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

There is no need for a Vref buffer because all inputs/outputs are on equilibrium due to the dc isolation by the capacitors.
_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [20 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use