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

0 Members and 1 Guest are viewing this topic.

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19933
  • Country: gb
  • 0999
Re: Problems using CD4051 analog multiplexer
« Reply #25 on: November 15, 2021, 11:14:48 am »
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.

I found the MCP45HV31-104 on Mouser and it's not that expensive.
https://www.mouser.co.uk/datasheet/2/268/20005304A-347268.pdf
https://www.mouser.co.uk/ProductDetail/Microchip/MCP45HV31-104E-ST?qs=sGAEpiMZZMsX%252BY3VKDPZyDmk%2F7K7pp5vGOCPiD6M3Qtywf8IqRh4%252Bw%3D%3D

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.

You need the 74HC4316, which has a built-in level shifter.
https://www.farnell.com/datasheets/308789.pdf
https://uk.farnell.com/nexperia/74hc4316d-652/analogue-switch-quad-spst-soic/dp/2445219

If you're set on making your own digital variable resistor, use two 74HC4316, and eight resistors: 400R, 800R, 1k6, 3k2, 6k4, 12k8, 25k6 and 51k2 (you might want to use the nearest E24, or E96 value for convenience), each bypassed by an analogue switch, to give a value ranging from 0, (in theory, but it will be more like 480R, due to the resistance of the switches) to 102k.
https://en.wikipedia.org/wiki/E_series_of_preferred_numbers#Lists

I don't know why you'd do that, as it will probably work out more expensive than the MCP45HV31-104.

Also note that it's the signal level that matters. The op-amps in your circuit can be powered off +/-15V, with the analogue switches run off +/-5V and it will work, so long as the signal through the analogue switches doesn't exceed +/-5V.

It's also possible to use a 5V digital potentiometer, in a +/-15V circuit, by running it off 5V and biasing it at 2.5V, so long as the signal doesn't swing beyond +/-2.5V.

The example below will work, as long as the input voltage doesn't exceed +/-2.5V. The output of the op-amp, can be much higher, as it's the voltage swing across U1 which matters. R1 and R2 bias it at 2.5V, so if the signal swings from -2.5V, to +2.5V, the voltage on U1 will range from 0V to 5V. It's also possible to do a similar thing with analogue switches run off 5V.

« Last Edit: November 15, 2021, 01:15:21 pm by Zero999 »
 
The following users thanked this post: HB9EVI

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Problems using CD4051 analog multiplexer
« Reply #26 on: November 15, 2021, 12:33:11 pm »
Yup, that's a charming approach; spares a lot of headache
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #27 on: November 15, 2021, 05:01:42 pm »
Thanks for the messages. And yes, the MCP...HV31/51 pots could work aswell. It's just a lot of options here. In fact I spent the last half year choosing back and forth between the various solutions till it nearly drove me crazy. The agony of choice...

The 4316 is a pretty modern chip, right? It's like a better version of the old 4016 plus a level shifter.

I get the idea of referencing the signal to 2.5V to get the swing from 0 to 5V, but doesn't that introduce some other problems? For example when fitting this into the rest of the circuit that's all referenced to GND?
I have been thinking about running my opamps from the +-5V aswell, so I don't risk overloading my 4051s.
Some of the old 4053 datasheets even state that the analog level on the switches is not limited to the supply voltage. Correct me if I'm wrong, but I think I do remember reading about 20Vpp in one of those old datasheets. There are for example no measurable clamping diodes on those switch pins, at least on the ones I tested so far.
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14767
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #28 on: November 15, 2021, 05:21:38 pm »
The old 405x are still limited to the supply. They can however use a supply up to +-10 V (20 V total with some types). For even higher voltages there are the DG408/9. In normal times they were also relatively affordable and available from multiple sources (though the cheap ones mainly Vishay).
There is also the option to use an multiplying DAC (DAC08 , AD7523, TLC7528 or similar). One can also build the corresponding circuit with HC4053 switches. So a similar effor as the shown circuit, but less sensitive to the on resistance and working also for a higher signal voltage as the switches are current steering.

Audio Levels may want a more log scale for the gain. A linear adjustment may not really use all steps. and still have a limtied range.
 
The following users thanked this post: Pferd

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15324
  • Country: fr
Re: Problems using CD4051 analog multiplexer
« Reply #29 on: November 15, 2021, 05:39:15 pm »
Audio Levels may want a more log scale for the gain. A linear adjustment may not really use all steps. and still have a limtied range.

That's a good point here.
If you're using a digital pot for adjusting audio levels, a log scale is the way to go. If you're implementing your own digital pot, you can do that. If you're gonna use an off-the-shelf one, it will limit your options.

You can read this: https://www.maximintegrated.com/en/design/technical-documents/tutorials/1/1828.html

There are dedicated volume control ICs too. TI has a few PGAxxx chips that are pretty good, but definitely not cheap. Cirrus also have some. There's an 8-channel version that could be used if you need a number of channels, in a single package. It IS expensive.

 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19933
  • Country: gb
  • 0999
Re: Problems using CD4051 analog multiplexer
« Reply #30 on: November 15, 2021, 05:39:46 pm »
Thanks for the messages. And yes, the MCP...HV31/51 pots could work aswell. It's just a lot of options here. In fact I spent the last half year choosing back and forth between the various solutions till it nearly drove me crazy. The agony of choice...

The 4316 is a pretty modern chip, right? It's like a better version of the old 4016 plus a level shifter.
Yes, it's a more modern part, but as far as I'm aware, it's only available in 74HC, which is limited to +/-5V maximum.

Quote
I get the idea of referencing the signal to 2.5V to get the swing from 0 to 5V, but doesn't that introduce some other problems? For example when fitting this into the rest of the circuit that's all referenced to GND?
That's not a problem, if the potentiometer is connected to the rest of the circuit via capacitors, which block DC. The op-amp inputs in the schematic attached to my previous post, swing between -2.5V and +2.5V.
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Problems using CD4051 analog multiplexer
« Reply #31 on: November 15, 2021, 06:54:06 pm »
from my experience so far with guitar related circuits, there's enough headroom running signals through 5VDC devices; in the end it even happened, that I had to reduce the signal level before giving them on the amps.

Considering the fact, that stompboxes run from 9V with opamps like a TL074, biased to vcc/2 and an opamp which is far away from being rail to rail, you have about +/-2V maximally +/-2,5V headroom for the signal, while on the other hand many of those audio devices running on 5V are RRIO, it's not really a problem.
« Last Edit: November 15, 2021, 06:55:52 pm by HB9EVI »
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #32 on: November 15, 2021, 08:38:55 pm »
Oh, ok, I get it, so the older ones had a overall higher voltage rating. But since I don´t need 20Vpp, I´m fine with the newer ones:)

For my project I was studying various digitally controlled preamps from the 90s era, to see how the individual ones accomplish the digital control of the analog circuit. For example the Rocktron piranha was using 4 dual MDACs, Maxim type MX7528. The positive point here is that they did various different configurations to control various different circuits with the same DAC, eg levels and frequency selection.

What are those HC4053s you are mentioning? Are they a special kind of the 4053, or do you mean the 74HC4053? I heard the 74 series is better when it comes to the on-resistance.

That´s a very good point here. I know that for volume often a log pot is used. My self built ones are all linear, because they are switching up in binary. I had various different approaches using switches to bridge or connect or short resistors, but due to the binary control, which is kind of essential to keep the part count down, I can´t get my head around how I could make one logarithmic one. With those "custom" various resistors utilizing switches it is indeed possible to create a very custom one, but logarithmic is difficult... Using a DAC with for example 8-bit and utilizing an array of the attenuation steps could create a pseudo-logarithmic scale. Would be more than good enough in my case aswell. But I´ll test the amplifier the way it is and then I can start complaining about what I don´t like and improve it. theoretically I can just swap out the attenuation stages I used with more modern ones like DACs or volume control ICs if I need to. It wouldn´t require much except than getting some new boards made. I have to anyway because of the partly embarassing mistakes I made on the first one. I guess working on it during late night hours does show the things I missed in the end:D

Yes, I do think a headroom of 2V is good enough. Most of the signals in my circuit don´t really exceed 1Vpp.
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #33 on: November 15, 2021, 10:01:45 pm »
I just have to ask again about the cascade for the tube supply real quick... I found this circuit on wikipedia on high voltage cascade. Is something like that what you recommended?
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Problems using CD4051 analog multiplexer
« Reply #34 on: November 15, 2021, 10:18:07 pm »
there are no digital log pots; if logarithmic curve is needed, it has to be done in software, what is no big thing.
one of the advantages of the way you took (resistor cascade and the 4053) is the possibility of modelling a logarithmic curve, so you could consider it as a feature and not as a bug.

the villard cascade is one possible way to create HV, but keep in mind that with every element (diode + cap) more, the internal impedance increases, so it still might make sense using a small (10VA) 230V->60V transformer and only few cascade elements to keep the impedance in an acceptable range.
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 8414
  • Country: us
  • Retired, now restoring antique test equipment
Re: Problems using CD4051 analog multiplexer
« Reply #35 on: November 15, 2021, 10:25:14 pm »
there are no digital log pots; if logarithmic curve is needed, it has to be done in software, what is no big thing.
one of the advantages of the way you took (resistor cascade and the 4053) is the possibility of modelling a logarithmic curve, so you could consider it as a feature and not as a bug.

There is a method for digital switching logarithmic voltage dividers:  the standard switched attenuator with a binary sequence of attenuation values (in dB).  Normally, each cell requires a DPDT (2-C) switch, but I believe that there are less complex switch forms.  I remember an article from almost 50 years ago about a switched attenuator network like this for use in a non-linear successive-approximation ADC:  I believe it appeared in Review of Scientific Instruments sometime around 1975, but I don't have the citation.  Of course, such an attenuator is subject to serious "major carry" glitches if the high-value attenuators are not sufficiently accurate.
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #36 on: November 15, 2021, 10:35:05 pm »
If anybody knows where I can find that article, it would be really interesting for future use maybe, in case I get annoyed by my linear attenuation.

And yes, that's what I had in mind, to take the highest voltage standard transformer I can find (230/2x30V I think) and use only a few cascade steps after it. It will at least be in every way better than the two transformers back to back.
The circuit in the original amplifier, which was utilizing two ECC83 tubes aswell, drew around 1.7mA at 250V. So I guess I should create a powersupply that is suitable in that range. I'll just try that villard cascade and some extra filter caps.
 

Offline shakalnokturn

  • Super Contributor
  • ***
  • Posts: 2202
  • Country: fr
Re: Problems using CD4051 analog multiplexer
« Reply #37 on: November 15, 2021, 11:44:36 pm »
there are no digital log pots

Here a quick search on Mouser shows 109 logarithmic digital potentiometers.
 
The following users thanked this post: HB9EVI

Online TimFox

  • Super Contributor
  • ***
  • Posts: 8414
  • Country: us
  • Retired, now restoring antique test equipment
Re: Problems using CD4051 analog multiplexer
« Reply #38 on: November 16, 2021, 12:36:31 am »
With rotary pots, a cheap quasi-log control can be made by loading the output of a linear pot with a suitable resistance.  For example, a “slugging” resistor equal to half the pot value is somewhat “loggish” down to -20 dB.
That’s not great for an accurate attenuator, but linear pots are more repeatable than log pots, so this trick is used for mixers, etc., to obtain equal results on multiple channels.
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #39 on: November 16, 2021, 05:57:38 am »
I've seen that before I think. And even while I was simulating my circuit in LtSpice I noticed it is a little bit exponential by itself, so I connected it accordingly already to use that bit of logarithm
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19933
  • Country: gb
  • 0999
Re: Problems using CD4051 analog multiplexer
« Reply #40 on: November 16, 2021, 08:52:18 am »
I just have to ask again about the cascade for the tube supply real quick... I found this circuit on wikipedia on high voltage cascade. Is something like that what you recommended?
I thought you didn't need a higher voltage? The problem with a charge pump is an oscillator is required to drive it, assuming there isn't an AC power supply available, giving ripple on the output.

Oh, ok, I get it, so the older ones had a overall higher voltage rating. But since I don´t need 20Vpp, I´m fine with the newer ones:)

For my project I was studying various digitally controlled preamps from the 90s era, to see how the individual ones accomplish the digital control of the analog circuit. For example the Rocktron piranha was using 4 dual MDACs, Maxim type MX7528. The positive point here is that they did various different configurations to control various different circuits with the same DAC, eg levels and frequency selection.

What are those HC4053s you are mentioning? Are they a special kind of the 4053, or do you mean the 74HC4053? I heard the 74 series is better when it comes to the on-resistance.

That´s a very good point here. I know that for volume often a log pot is used. My self built ones are all linear, because they are switching up in binary. I had various different approaches using switches to bridge or connect or short resistors, but due to the binary control, which is kind of essential to keep the part count down, I can´t get my head around how I could make one logarithmic one. With those "custom" various resistors utilizing switches it is indeed possible to create a very custom one, but logarithmic is difficult... Using a DAC with for example 8-bit and utilizing an array of the attenuation steps could create a pseudo-logarithmic scale. Would be more than good enough in my case aswell. But I´ll test the amplifier the way it is and then I can start complaining about what I don´t like and improve it. theoretically I can just swap out the attenuation stages I used with more modern ones like DACs or volume control ICs if I need to. It wouldn´t require much except than getting some new boards made. I have to anyway because of the partly embarassing mistakes I made on the first one. I guess working on it during late night hours does show the things I missed in the end:D

Yes, I do think a headroom of 2V is good enough. Most of the signals in my circuit don´t really exceed 1Vpp.

How about using a digital volume control IC? The PGA2311 has a programmable gain/attenuation from +31.5 dB to −95.5 dB, in 0.5 dB steps. Fair enough, it isn't cheap, but it saves a lot of bother. The only downside is it has fairly stringent power supply requirements of +/-5V, so if you want to run it off batteries, you'll need two 9V batteries and a couple of low drop-out regulators, or a switched mode power supply.
https://www.ti.com/lit/ds/symlink/pga2311.pdf

 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #41 on: November 16, 2021, 11:34:50 am »
I plan on running it off 230V mains anyway, so after the 60V transformer I would have an AC source that can feed my villard cascade. It's 50Hz only, but I think by choosing the right caps it should work.
I have to keep my power supply rather small, hence why I willalso try to run the Opamps from sym 5V like the switches rather than sym 15V.
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Problems using CD4051 analog multiplexer
« Reply #42 on: November 16, 2021, 03:02:07 pm »
yup, found some log pots too; likely passed my mind when I was in need for one the last time i searched; problem remains, that the selection is not too big.

with a 60VAC transformer you should reach stable reliable ~180VDC with a triple cascade; I used 22u/350V electrolytes for the cascade; it requires though always double checking on which end of the cascade is which polarity
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19933
  • Country: gb
  • 0999
Re: Problems using CD4051 analog multiplexer
« Reply #43 on: November 16, 2021, 03:08:35 pm »
yup, found some log pots too; likely passed my mind when I was in need for one the last time i searched; problem remains, that the selection is not too big.

with a 60VAC transformer you should reach stable reliable ~180VDC with a triple cascade; I used 22u/350V electrolytes for the cascade; it requires though always double checking on which end of the cascade is which polarity
The peak voltage of 60VAC RMS is nearly 85V, so you'll get over 180VDC, from a 60V transformer, with a voltage doubler. Unfortunately there will be some ripple. Whether it's acceptable or not, depends on the circuit.
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Problems using CD4051 analog multiplexer
« Reply #44 on: November 16, 2021, 03:16:15 pm »
sure, but I said 'stable' - that includes RC filtering and the actual anode current drain; those were at least the results from my tests with this kind of setup feeding twice time 2 ECC83 triodes.
 

Offline PferdTopic starter

  • Contributor
  • Posts: 38
  • Country: de
Re: Problems using CD4051 analog multiplexer
« Reply #45 on: November 16, 2021, 08:44:31 pm »
I´ve done some more testing this evening and solved a few issues I had.
At this point I do think against my first assumption that at least some of my 4051s have suffered some damage from the wrong polarity on VEE and VSS. Some of them began losing their channel contact randomly, meaning they jumped into the inhibit state. Maybe this has something to do with the current running backwards out of the INH-pin/module, assumingly. When I touch the resistor ladder at a specific place, which is always different, it starts making contact again. It´s not a loose connection, I checked that many times.
But at least while it is making contact it produces a very good and non-noisy sound, exactly what I wantd it to sound like, so it is a good day today anyway. It´s almost entirely silent when turing the guitar volume to zero (at the guitar). The next step would be swapping out the chips to see if that solves the problem.

Then I just have to deal with an oscillating op-amp and the power supply. I bridged the oscillating one for now, because it was getting really warm and created nasty loud sqeak-sounds.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf