CMOS Inverters: Lowering the voltage does not increase the gain

Started by edvard, January 12, 2025, 02:57:46 AM

Previous topic - Next topic

edvard

All children left unattended will be given a mocha and a puppy

FiveseveN

Quote from: R.G. on July 31, 2018, 10:34:30 PMDoes the circuit sound better when oriented to magnetic north under a pyramid?

PRR

  • SUPPORTER

edvard

Quote from: FiveseveN on January 12, 2025, 04:29:03 AM

Admittedly, I just did a few off-the-cuff simulations in LTspice, two lines of standard CMOS inverter (pmos/nmos totem pole like in the datasheets) wired for linear via 10k/100k for 10x (ha!) gain, and both powered by their own voltage supply.  I made the supply voltages 7.5V and 15V, and set the sine wave generators at 0.1V so I could get clean sine waves on the output. The traces were almost exactly the same. 

OK, the lower supply voltage one read ~63.9mv more on the peak, so maybe everyone is right, but not enough to make an audible difference when overdriving the things, which is what people usually mean when they say "gain" on a dirt box.
All children left unattended will be given a mocha and a puppy

edvard

Quote from: PRR on January 12, 2025, 04:45:32 PM
Quote from: edvard on January 12, 2025, 02:57:46 AMdoes not increase the gain... it lowers the headrooom.

What is the difference?




Good question.  Increase gain to collide with the headroom, or lower the headroom until you crash into the signal, it's all going to sound the same in the end, just one will have a higher amplitude to deal with at the back door.

This all started because I've heard more than one experimenter proclaim it as established fact that running a 4069 at lower voltage would produce more gain, and therefore more distortion, therefore more rock 'n roll.  I couldn't help but think "but isn't it possible that the distortion you're hearing is actually due to reduced headroom?"
So I got curious.   
My next thought was that with the gain going up as the supply voltage came down, there's gotta be a "sweet spot" somewhere in there where the noise floor/clipped signal ratio would be minimal.  Then, clipping the signal further (rock and rooooollll!!) would simply be a matter of pre-amplification into the inverter, reducing noise floor concerns, which you definitely have when working with high gains in CMOS circuits. 

In the end, my experiments with LTspice in regards to headroom clipping proved me mostly right, so I still say the clipping effects from reduced headroom are FAR more effective at producing distortion than any intrinsic gain induced from lowered supply voltage, but I'm still chasing noise floor nirvana.
All children left unattended will be given a mocha and a puppy

FiveseveN

Quote from: edvard on January 12, 2025, 09:50:38 PMwhich is what people usually mean when they say "gain" on a dirt box.
The fact that it's popular among the uninformed does not make it correct.

QuoteIn the end, my experiments with LTspice in regards to headroom clipping proved me mostly right
Your experiment is based on a false premise. We're talking about open loop gain here. x10 is not going to show you anything significant:



If you want to get to the bottom of this, put an actual 4049 on a breadboard, set it for open loop, feed it a ramping signal and observe the slope and headroom at different VCC.
Quote from: R.G. on July 31, 2018, 10:34:30 PMDoes the circuit sound better when oriented to magnetic north under a pyramid?

Fancy Lime

Some misconception detected. The gain that changes with supply voltege is the "open loop gain", which is what you get with no negative feedback. In your test, you set the gain to 10x via a negative feedback loop. In this setup, the gain is not affected by the supply voltage because your set gain is lower than the open loop gain of the device. So in your case and some actual CMOS designs the lowering of the headroom by decreased supply voltage is indeed all that mattes. It may be enlightening to repeat your test with the gain set to 100x and 1000x.

Andy


p.s. Damn, I should not reply to posts without first refreshing the page to see if the someone has given the same answer already. So, yeah, what 57 said.
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Nasse

I thought 50 is typical value. Sure once I tried a trick from british electronic magazine, took voltage for 4049 from viper of potentiometer, was soo long ago, but was useful if I remeber
  • SUPPORTER

Nasse

  • SUPPORTER

Fancy Lime

Quote from: Nasse on January 13, 2025, 11:55:46 AM

Oh my god, I did not know the Tonnin Seteli sketch until just now. That is absolutely glorious. Watched it inbetween coverage of the devastation in LA. Necessary to give your brain a brief escape from shitty reality regularly.
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

edvard

Sorry folks, had a busy and emotionally grueling week.  OK, where were we?

Aha... I see.  Open loop gain.  Got it.  It's a fact.  No disputes there, and thanks for the curves.

Here's the counterpoint that I was trying to make, but didn't have the phraseology to bloviate correctly on the subject until you wonderful folks schooled me on what the deal really was (much appreciated, really):

Open Loop Gain apparently doesn't matter a whole heck of a lot when "Gain" is what most folks call the knob on their dirt box that actuates an increase in the amplitude of a driving signal into a device whose supporting circuitry is designed to force said device to operate past its linear operation capabilities.  The resulting Rock & Roll is now burned into the cognition of a vast swath of the populace as that noise that occurs as a result of turning said knob clockwise (as engineeringly incorrect as that may be).  Precious few of said "dirt boxes" operate with Open Loop Gain in mind, unless of course it's a kinda sorta fuzz that operates via triggering square waves or some such, like Craig Anderton's "Ultra Fuzz" or Tim Escobedo's "PWM Fuzz".

Now, there's an idea; make a gated fuzz out of CMOS inverters, but the "Volume" control actually varies the power supply to the inverter chip. That'll prove the point better than your average Josephus splicing a resistor into the power supply line to "increase the gain" of some variety of CMOS-inverter-based dirt box circuit (which happens far more often, in my humble observation).

TL;DR: Decreasing the voltage supply of a CMOS inverter will increase the Open Loop Gain, not the Linear Amplifier Operation gain, which is set by a resistor network.  I feel I had to make this point because I have observed more than one stompboxian, while experimenting with CMOS inverters-as-amps, state the opinion that the former affects the latter in a meaningful way.  It does not; it simply reduces the linear "headroom" (which, conversely, DOES apparently increase the Rock & Roll.)

There, I said it.
All children left unattended will be given a mocha and a puppy

edvard

Hey now, actually you said something I found very useful to prognosticate on, so take all the credit due.  I bold-ed the good part:

Quote from: Fancy Lime on January 13, 2025, 06:00:15 AMSome misconception detected. The gain that changes with supply voltege is the "open loop gain", which is what you get with no negative feedback. In your test, you set the gain to 10x via a negative feedback loop. In this setup, the gain is not affected by the supply voltage because your set gain is lower than the open loop gain of the device. So in your case and some actual CMOS designs the lowering of the headroom by decreased supply voltage is indeed all that matters. It may be enlightening to repeat your test with the gain set to 100x and 1000x.

Andy


p.s. Damn, I should not reply to posts without first refreshing the page to see if the someone has given the same answer already. So, yeah, what 57 said.

Well said.  I was just trying to clear up some misconceptions I thought I had discovered, but was missing some info.  Well, some very KEY info, but you get it.
All children left unattended will be given a mocha and a puppy

FiveseveN

Quote from: edvard on January 21, 2025, 10:40:31 PMPrecious few of said "dirt boxes" operate with Open Loop Gain in mind, unless of course it's a kinda sorta fuzz that operates via triggering square waves or some such
One of the flavors in my Infinity uses no feedback for the last stage of a 4-stage CMOS drive:

(1:33—1:40)
Doesn't sound fuzzy to me, that's more of a matter of filtering.
There also happens to be an open loop op amp flavor in there that can also be set for chug or fuzz depending on one's choice of input filtering.
If you want a gated fuzz, positive feedback for hysteresis will get you there. See Parasit Studio Arcadiator and others.
Quote from: R.G. on July 31, 2018, 10:34:30 PMDoes the circuit sound better when oriented to magnetic north under a pyramid?

PRR

Note that at 3V the DC gain is high but drops above 300Hz, so is a boomy muffled "gain", not a soprano-solo "gain".
  • SUPPORTER

Nasse

Used to have a paper from 70s I found in dumpster that said around 10 volts is "best" for hifi use and near data sheet upper value chip get too hot. Perhaps something about thermal noise and magig smoke coming out and batteries were expensive then like today. Around 5 volts was the peak but so does output impedance up nastily and gain/bandwith gets hit by inflation. No supply noise rejection there in inverter, but opposite, you could use supply as other input or take feedback there
  • SUPPORTER

BJF

Hi

Back in 1980 there was this Swedish amplifier called U66 and the design of it was outlined in a Swedish electronics magazine.
The preamp was built almost entirely with Hex Inverter CD4069 used as linear amplifier. This article included a discussion of which gates could be used as linear amplifiers, eg NAND gates by connecting their inputs to one and its amplification expression for open loop gain and closed loop gain hence the marginal as well as gain dependence on power supply voltage. The designers had then chosen 12V based on the bandwidth needed for marginal.
There was also a graph that showed that when the chip was powered by 5V it had high open loop gain but only at low frequencies.
Open Loop Bandwidth increased as supply voltage was raised at 12V Open Loop Bandwidth was sufficient for some marginal for linear application and because of the the low Open Loop Gain the gain equation became very complicated ( somewhat similar to making voltage feedback with triodes) but the argument was that large marginal like in an OP wasn't needed and that instead lower order distortion was preferred. Of course at 7KHz and above the marginal was low but it was tolerated because of the more gradual onset of distortion. U66 had a power amp of about 60Ws made with discrete BJTs, The sounds it produced was more what the elder musicians at the time wanted; smooth


Have fun
Bjorn Juhl
BJF Electronics
Sweden

fryingpan

From what I remember, there is a different characteristic curve (waveshaping) at higher voltages. The higher the voltage, the "smoother" the curve. At low voltages CMOS inverters clip hard.

fryingpan

Anyway, CMOS inverters are kinda noisy. They are quick and easy to use, as well as predictable, but they do come with a lot of drawbacks. IIRC, the upper threshold for voltage supply at linear operation is basically 9-10V, so headroom is what it is anyway.

BJF

Hi

Somewhat historically
At the time of U66 the CD4xxx series was fairly new. I think the magazine article was from 1979 but I met an elder musician in the subway that
let me listen to a recording from his rehearsal as he was very excited that someone as young as I knew some technical aspects of his fine amp and he was also so excited how smooth his amp sounded.
Sound of tubes was very much the thing at the time but there were plethora of solutions advocated.
CD 4069 at the time was internally each inverter just two transistors in totem pole fashion. It follows that if you made feedback with a resistor input and output would rest at half Udd.
Later CD 4XXX series got several protection systems that would make the above statement invalid as some DC biasing would be required with more modern chips to make them rest at half UDD.
Compared to OP amps that have extreme gain at low frequencies typically falling at a rate of 6dB per octave and then negative feedback  trades gain for larger bandwidth and lowered distortion, higher IZ and lower Oz and other qualities this could be done to some extent with inverters at the time but more interestingly if you set the UDD ( supply voltage) you could directly control the Open Loop Bandwidth Gain and you could set it so that OLBG would be fairly low ( compared to an OP amp) but extend flat through audio bandwidth and have corner frequency above 10Khz. This would be similar to behaviour of a triode. The low Open Loop Gain would of course not let you trade much and especially if you drew close to max closed loop gain but the simplicity of the internal structure would give rise to far fewer distortion mechanisms than in an OP amp again more like a triode. So what you would get be a linear amplifier with low closed loop gain ( about 20dB maximum ) and low open loop gain. This makes closed loop amplification expression a rather complicated computation which is a slight drawback further complicated by source impedance entering the gain equation , but the simplicity of internal structure and the fact that open loop bandwidth would be a straight line would primarily make low order distortion. At overload by a sine wave input output wave form would be that of a square wave with gently rounded corners; slew rate limiting but special case indicating low order distortion mainly. This looked very much like the in Guitar Player Magazine of 1979 presented article of desired wave form by musicians from a measurement taken on a tube amp running at power amp distortion.There were competing solutions using germanium diodes, transformers, germanium transistors to name a few
As a side note there is a tech in Florida that collects waveforms of amps owned and used by famous guitarists and very common waveforms specifically on Marshalls was rather a square with a leading edge as you would see on scope highness filtering a square wave.
I suppose to this day is the question of the most desired waveforms the output of guitar amplifiers is a lost cause since there almost could be as many as there are guitarists while there are some fairly universally however contradicting answers.

Let ´s proceed on whatever sounds good ;)

Have fun
Bjorn Juhl
BJF electronics
Sweden

PRR

Quote from: BJF on January 24, 2025, 07:07:54 AMAt the time of U66 the CD4xxx series was fairly new. I think the magazine article was from 1979

Trying to organize my bad memory:

"CMOS was commercialised by RCA in the late 1960s. RCA adopted CMOS for the design of integrated circuits (ICs), developing CMOS circuits for an Air Force computer in 1965 and then a 288-bit CMOS SRAM memory chip in 1968. RCA also used CMOS for its 4000-series integrated circuits in 1968,...."

"By the late 1970s, NMOS microprocessors had overtaken PMOS processors. CMOS microprocessors were introduced in 1975, with the Intersil 6100, and RCA CDP 1801. However, CMOS processors did not become dominant until the 1980s." {8080, in 1974, was NMOS.)
https://en.wikipedia.org/wiki/CMOS#History

There is a much re-printed (under different names) RCA paper 'CMOS Linear Applications'. The National re-brand of the RCA paper (is OK, RCA sold-off a lot of CMOS IP), National Semiconductor Application Note 88, says July 1973; I dunno if that date is RCA or National.
https://shrubbery.net/~heas/willem/PDF/NSC/AN/AN-88.pdf


  • SUPPORTER