Author Topic: Problems using CD4051 analog multiplexer  (Read 31295 times)

0 Members and 1 Guest are viewing this topic.

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Problems using CD4051 analog multiplexer
« on: November 12, 2021, 11:35:56 pm »
Hello Forum,

I am utilizing a binary resistor ladder using two analog multiplexer ICs of the CD4051 type. It is basically 14 resistors (7x 1k5 and 7x12k) in series and the two ICs short out resistors according to their given binary value. The lower 4051 controls the 12k resistors (eg the "tens") and the higher 4051 controls the 1k5 resistors, eg the "ones". They are wired up correctly as far as I know, but somehow it seems that none of the channels is selected no matter which value I give the ICs. The Inhibit Pin is tied to GND, according to the datasheet. Power to the ICs is +/-5V. My circuit has multiple of these constellations and none of them seems to work as it should. Measuring between the common pin and the individual channel pins in resistance mode always reveals a value in the tens of kohms, which doesn´t make sense at all. What am I missing, I´m stuck... I did have a small prototype of that thing utilizing very old RCA 4051s, and it worked just fine. The ones I´m using now are new TIs. I´ll attach a picture of the circuit.

Thanks a lot in advance!
 

Offline shakalnokturn

  • Super Contributor
  • ***
  • Posts: 2197
  • Country: fr
Re: Problems using CD4051 analog multiplexer
« Reply #1 on: November 12, 2021, 11:57:22 pm »
Swapped Vss and Vee?
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #2 on: November 13, 2021, 12:03:49 am »
could this cause that problem? I mean, the board got printed according to my schematic, and in case I swapped them by accident there already, it could well be that they are all swapped around. Thanks for the hint!:)
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #3 on: November 13, 2021, 12:06:58 am »
I just checked the datasheet... You're right, I did swap those around...how embarassing... I just hope I didn't blow my ICs this way. Thank you so much for your help!
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 8366
  • Country: us
  • Retired, now restoring antique test equipment
Re: Problems using CD4051 analog multiplexer
« Reply #4 on: November 13, 2021, 12:07:55 am »
I had that problem (Vss and Vee swapped) in a design many years ago.  Vss is actually a signal reference input (common connection for the logic input, normally ground). 
If the (analog) switch input can go below ground, then the power supply voltage Vee must be sufficiently negative to avoid latch-up when the analog input goes one PN diode drop negative below Vee, which is the substrate. 
« Last Edit: November 13, 2021, 12:23:39 am by TimFox »
 

Offline shakalnokturn

  • Super Contributor
  • ***
  • Posts: 2197
  • Country: fr
Re: Problems using CD4051 analog multiplexer
« Reply #5 on: November 13, 2021, 12:42:53 am »
If you look up "transmission gate" schematics you should catch why it doesn't work.
Most schematics around i.e.: 4066 won't show Vee though, they're shown for positive only analog switching having the N-MOS tied to GND. (or Vss which will confuse you further...)

If your resistor string only sees positive voltages the quick fix would be to cut -5V supply from Vss and tie Vss pin to Vee (here GND).
« Last Edit: November 13, 2021, 12:45:14 am by shakalnokturn »
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #6 on: November 13, 2021, 07:31:38 pm »
Thanks for all the helpful information. This was indeed the problem! Unfortunately I have 20 of those ICs in my design:) I did bend up pins 7 and 8 of each IC and crossed them around using some short wire bridges. The 4053s I am also using had the same problem since they are the same power layout. It didn´t seem to damage the ICs though. I suspect because the digital level reference was shifted down to -5V, by permanently tieing the Inhibit- Pin to GND it recognized it as high, which could explain why no channel was active. But nevertheless, the analog signal is very nice now!
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14751
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #7 on: November 13, 2021, 08:01:15 pm »
There is anotgher problem with this circuit: The 4051 on resistance of the switches is quite high. This is at least a problem for the upper of the two chips.
One can improve this a little, by using 74HC4051, which have lower resitance. It is still no a good circuit.
 
The following users thanked this post: SiliconWizard

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Problems using CD4051 analog multiplexer
« Reply #8 on: November 13, 2021, 08:38:58 pm »
looks to me like a similar project I'm currently working on; at least I saw a valve, so I guess it's some kind of versatile guitar preamp.
indeed you're better off the 74HC for this purpose; I know about the convenience of the 405x, but during my experiments it turned out, that it's working better with 4066, so 74HC4066.

the same is also valid for the usage as QSE/QSD mixer, where bonding 4x 4066 switches gives better sideband rejection than the usage of a a single 4052
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #9 on: November 13, 2021, 09:18:52 pm »
Yes, it is indeed a programmable guitar amplifier. I was playing around with the 4016 and 4066 ICs before aswell, but they were missing the digital level shifter. the 405x ICs have that already built in. I know that circuit isn´t ideal, but in a guitar amplifier things don´t necessarily need to be crazily scientific anyway, meaning it doesn´t matter if it is for example set to volume 30 or volume 31. Considering tolerances it is still around the same area of volume.

You are creating a guitar amplifier aswell? What kind if I´m allowed to ask?
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Problems using CD4051 analog multiplexer
« Reply #10 on: November 13, 2021, 11:16:43 pm »
yea, channel separation won't be a big issue in this resistor ladder you have; I recently completed a stompbox router based on 74HC4066; it ran already for many years with 8 channels, now it has 16 mono channel; kind like the Rocktron Patchmate in the 90ies. Running the 74HC4066 from 9VDC seems to be well sufficent for the channel separation signal vs bypass.

well half way I'd like to follow the JMP-1 and the other half the analog part of the GSP-2101; by coincidence I could recently buy me a GSP-2101 for 100 swiss bucks; so now I kind of put the project on hold. So far I completed the 7 channel equalizer based on the GE-7, but with digital pots (MCP4451) and the compressor module based on the SSM2166, where I used a switched resistor ladder (noise gate side of the SSM2166) to replace an almost unobitanium 1Meg digital pot, but I used a different approach than you based on a MCP23017.
still missing is the overdrive/distortion part and the 'glue logic' to control the stuff; so far I just implemented the equalizer control on an STM32

after all I'm disappointed of the compressor part in both, the GSP-2101 and the homebrew SSM2166; they both just don't have the 'bite' of my Boss CS-3
« Last Edit: November 13, 2021, 11:20:39 pm by HB9EVI »
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #11 on: November 14, 2021, 08:35:20 am »
My project is a mixture between JMP1 and Piranha. I chose the 405x ICs mainly because they are widely available and also cheap.
What brings up another question I have at the moment... Is it a necessity to have a galvanic isolation on the anode voltage of the tubes? Because this could save me one transformer. All the amplifiers I've researched so far had the anode voltage winding in the main transformer. I was wondering if that is necessary at all. Since I live in a 230V country I might aswell use a fuse, bridge rectifier and some capacitors?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14751
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #12 on: November 14, 2021, 10:32:13 am »
The anode voltage should still be from a transformer and not directly from main.  Directly from main would mean that both sides of that supply would have potentially lethal voltage on it.  With the normal bridge rectifier boith sides would be away from N / PE.
If you have to ask, better don't do that.

Directly rectification from mains was done in some old tube radios and TVs, but this was not very safe and with not much external connections.
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Problems using CD4051 analog multiplexer
« Reply #13 on: November 14, 2021, 12:02:15 pm »
for sure the anode voltage should be isolated; since it's a preamp with ECC83 I guess, you could work with a simple boost converter; 10-20mA should be sufficent. On the downside you could introduce RF noise with the boost converter.
For my part I got a small (<10VA) transformer 230V->60V + plus HV cascade to supply the valve anode voltage
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #14 on: November 14, 2021, 12:17:03 pm »
I currently have a self built power supply with 3 standard transformers. It's not perfect at all but for testing it does its job at the moment. It puts out +-5, +-6.3 ( I know its overkill to regulate the heater voltage), +-15 and +HV. To produce the HV I have a small print transformer with 230/2x15 backwards after a bigger 230/2x18 transformer. The high voltage is still dropping to 120V which is too less for that circuit, but using bigger transformers would mean it grows even bigger. I had a thought about switching power supplies before but they introduce noise I imagine...
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14751
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #15 on: November 14, 2021, 12:57:35 pm »
If the 15 to 230 V transformer is very small, it could be hit by the difference between no load and nominal load voltage. With small transformers (e.g. < 3 VA) the difference can be quite large, like > 150% of no load voltage. When used in reverse the no load ouput voltage would be below some 70% and than with load could drop by another 30-50%.

I would avoid a transformer much below 5 VA - in the usual chaep transformer sereis the lowest no load loss is usually around 3 VA. So a smaller transformer is also worse with the power loss.
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Problems using CD4051 analog multiplexer
« Reply #16 on: November 14, 2021, 01:07:41 pm »
didn't make good experience with back-to-back transformers either. the load of 2 ECC83 might be rather small, but the voltage drop from such a setup could be too big in the end. Certainly a HV-cascade is rather high impedance too but it's not an unusual practice to do so for low drain valve circuits.

I'd not regulate the filament voltage, but pull it on a higher voltage level than just GND; it shifts the hum on a different place in the amplification curve of the valve where the hum is less critical than on GND level.
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #17 on: November 14, 2021, 01:45:50 pm »
I can totally agree to that, since this is what I experienced aswell. It is a 1.5VA transformer. With no load it has a 245V output, but with the tubes in the sockets it has 120V for both and with only a single one it has around 160V. So it is certainly overloaded.

I still want to use as few transformers as possible. The cascade sounds interesting, but I've never done this before. Maybe there is a good example of using one somewhere.
I know there are special tube transformers, even in print form but I don't want to use specialized parts if possible. I thought about using a small 12v transformer without any regulation for the heaters and untie it from the GND (the center point of the heaters is currently at GND).
I could even drive the Opamps with the +-5V rails, so I could exclude the +-15 aswell.
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #18 on: November 14, 2021, 01:47:30 pm »
And because the anode voltage is that low I get a really nasty clipping on the tube for the clean channel.
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Problems using CD4051 analog multiplexer
« Reply #19 on: November 14, 2021, 02:08:00 pm »
if you heat the ECC83 with 12,6V, so the middle of the two filaments is floating, you can shift the filament voltage there on about half of the anode voltage, so ~80-90V by a voltage divider which can serve at the same time as a bleeder for the HV rectifing caps.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2764
  • Country: ca
Re: Problems using CD4051 analog multiplexer
« Reply #20 on: November 14, 2021, 02:48:05 pm »
Hi Pferd and the group,

You might want to look at the circuit around U5.
If you analyze this circuit:





As you increase the value of R4, Rgain, the amplitude output will decrease.
The output will become zero when:

R3/R4 = R1/R2

If you increase R4 further, the amplitude will start to increase. The signal will change from being inverted to not inverted.

In your circuit R4 is programmable resistor.

Regards,
Jay_Diddy_B

 
The following users thanked this post: Pferd

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #21 on: November 14, 2021, 03:00:27 pm »
@Jay_Diddy_B, I am aware of that, and am even making use of that for the equalization stage. This way I can cut and boost the frequency bands utilizing this circuit. And for the volume for example it is as follows:
R4 total is 94,5k, R3 is 95k, so there is a bit of security headroom to avoid it flipping to inverted where I don't want it to
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19922
  • Country: gb
  • 0999
Re: Problems using CD4051 analog multiplexer
« Reply #22 on: November 14, 2021, 06:19:54 pm »
Hello Forum,

I am utilizing a binary resistor ladder using two analog multiplexer ICs of the CD4051 type. It is basically 14 resistors (7x 1k5 and 7x12k) in series and the two ICs short out resistors according to their given binary value. The lower 4051 controls the 12k resistors (eg the "tens") and the higher 4051 controls the 1k5 resistors, eg the "ones". They are wired up correctly as far as I know, but somehow it seems that none of the channels is selected no matter which value I give the ICs. The Inhibit Pin is tied to GND, according to the datasheet. Power to the ICs is +/-5V. My circuit has multiple of these constellations and none of them seems to work as it should. Measuring between the common pin and the individual channel pins in resistance mode always reveals a value in the tens of kohms, which doesn´t make sense at all. What am I missing, I´m stuck... I did have a small prototype of that thing utilizing very old RCA 4051s, and it worked just fine. The ones I´m using now are new TIs. I´ll attach a picture of the circuit.

Thanks a lot in advance!
Did you know you can take a screenshot, by pressing the print screen key, pasting it into MS Paint and saving it as a .png file. It saves having to take a picture with your phone, reduces the image size and makes it clearer.

Unfortunately it's likely you've damaged the IC, due to revering the supply voltage, but fortunately they're not expensive and are easy to get.

Why not use a digital potentiometer, rather than trying to make your own?
 
The following users thanked this post: Pferd

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #23 on: November 14, 2021, 06:42:49 pm »
I know, it was just easier for the moment to quickly take a picture:)

Well, they look like they are working still... VDD was at the right place so I just flipped VEE and VSS. I don't know exactly how the ICs deal with that. The only thing I know is that none of them got warm at all during that false condition.

Why I don't use Digital Pots? that's a question I can't even answer correctly... I don't know. I know that Microchip makes some affordable ones, but mostly for the 0-5V range. I would need more advanced ones suited for +-15V. They are not so easy to get and for example ones from Maxim can set you back like 5 Euros a piece.
For other channel switching operations in my circuit (quite a few) I am already using 4053 ICs so I thought why not making everything with cheap 40xx ICs. I know it is not perfect or time-adequate, but I just wanted to try it this way.
The original JMP1 for example was using toshiba TC9170 and TC9176 electronic volume ICs. They are specialized parts from the 90s and if one of them breaks tomorrow  I have a big problem. You might be able to get one old stock on ebay, but if you do find one its around 10 Euros.
I just don't want to include specialized parts not knowing how long a manufacturer keeps them alive. The 40xx ICs were made in the masses by several manufacturers and they are in production even today. It might be strange thinking, but I want to have my amplifier for a long time. Hope this makes sense.
It would be something else if I had a company making that thing, then I could go out and buy a whole lot of those digital pots not having to worry about money or running out of availability of parts so much.
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Problems using CD4051 analog multiplexer
« Reply #24 on: November 14, 2021, 07:01:46 pm »
there are ways to get the signal compatible with 5V devices like digital pots; I think I saw certain approaches in Douglas Selfs 'Self on Audio', I'll have to take look there by occasion. To avoid this problem, I used for my digitally control equalizer LMV722 opamps which have comparable parameters like a NE5532 or a LM833 but run from a single 5V supply
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf