News:

SMF for DIYStompboxes.com!

Main Menu

CMOS Inverters

Started by raulgrell, April 29, 2007, 02:01:45 PM

Previous topic - Next topic

raulgrell

Hey guys,
I was looking at a design over at runoffgroove.com, and it said they were trying to use all the 6 inverters in an CMOS4049 chip (or something along those lines) in order to make full use of it. Then I thought about how the guy at Analog Alchemy made a discrete op-amp with a couple of transistors and I was wondering whether the same could be done for a CMOS inverter.

I'm still a rookie, so this may sound completely idiotic, but I was reading up on CMOS's on the net and from what I gathered, one could possibly make one using 2 MOSFET's...

Anyone got any idea where to go from here? Or am I completely off?

aron

Well you can search google for discrete cmos inverter. Here's a page.

http://engr.nmsu.edu/~etti/spring97/electronics/cmos/cmostran.html

But the question is why do you want to do this?

BTW: there's a discrete op amp circuit in the projects forum.

Cliff Schecht

I think what he's wanting to do is instead of using one of the bigger CD4049 chips, he's just wanting to use an N-channel and a P-channel MOSFET. Raul, it sounds like you are trying to make some sort of transistor version of the CMOS chips but it's not as easy as you would think. CMOS stands for complimentary metal oxide semiconductor, the complementary denotes the fact that there are P and N channel FETs used on each one of those inverters to make the magic happen, if you will. Unlucky for you, there's a lot of other junk that goes into the 4049's and it's not really worth it to build an approximation of one unless you have a specific reason (i.e. tweaking values for a specific sound or timbre inside the inverter section of the schematic).

Hope this helps.

gez

#3
Quote from: aron on April 29, 2007, 02:16:02 PM
But the question is why do you want to do this?


Same here, why do you want to do this?  The reason most people use inverters is because of their soft clipping characteristics.  Build an op-amp using them and it's likely you'll loose those characteristics (gain will be increased).

In a way, inverters already act as op-amps in that the standard configuration is no different from the inverting op-amp configuration (well, on the surface of things).

If you are dead set on doing this, the problem would be to build/wire up a differential pair.  You might be better using the individual devices within a 4007 as RG did in one of his octave up circuits (can't remember name, sorry).
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

slideman82

Ok, so, what happens with discrete JFET op amps? Will they have soft clipping and that remarkable compression?
Hey! Turk-&-J.D.! And J.D.!

gez

I've never built a discrete JFET op-amp, but I doubt it would have soft clipping. 
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

brett

Hi
"JFET" op-amps are usually JFETs at the input, followed by BJTs.  For many applications you want BJTs in the output section, because they have low output impedance, drive larger currents, etc.

What might be quite interesting would be a JFET input, CMOS output op-amp.  By then, a simple JFET booster in front of a CMOS inverter (e.g. 4049) will probably sound as good (or better because of less feedback, etc).
cheers
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

petemoore

  I built an opamp out of discretes once, put it in a DS-1 and a DIST+...worked.
  But was a heckuva lotta wiring and lower gain than an 'opamp'.
Convention creates following, following creates convention.

WGTP

http://www.aronnelson.com/gallery/v/WGTP/Complement.JPG.html?g2_imageViewsIndex=1

Not sure if this is it or not.  There was a thread awhile back about this.   :icon_cool:
Stomping Out Sparks & Flames

JDoyle

Opamps, discrete or integrated, aren't the route to go for smooth compression, the overall enormous gain and the use of feedback mean that when the input forces the output to either supply rail, it slams right into it and doesn't slow down on it's way. Remember that the op amp wants and demands that its inputs be the same voltage, and even if the power supply limits its ability to make that so, it doesn't give up trying.

As for the CMOS inverters, think of it like a MOSFET with an enormous drain resistor (which, though vastly simplified, is pretty accurate). Each transistor in the pair handles opposite polarity swings of the input signal, sort of like a push-pull amplifier, but when one is pushing/pulling the other is the load resistor.

Ok, so as the when a signal is applied, one of the transistors in the inverter starts to conduct and the other acts as it's load resistor, since this load resistor/MOSFET is essentially 'off' and very little current is flowing, it looks like an enormous value resistor, and that, in addition to no source resistor on the conducting MOSFET, means that the transistor that is conducting is operating at max gain. Thus it's use as a switch...

BUT, as the output signal nears the supply rail, in order to 'push' the signal towards that rail, the conducting transistor must shut off, raising ITS effective impedence. So as the transistor starts to conduct, a small change in it's channel conduction can bring the output from its starting state to near the power rail. But as the signal starts to approach the power rail it takes exponentially more change in the channel conduction to move the output signal the same 'distance' (amount of voltage) towards the supply rail.

Basically as it nears the rail it has to work a LOT harder to get a LOT less. Meaning: the gain of the stage decreases sharply as the output signal nears the rail. This is the compression you hear when using inverters as linear amplifiers, if you kept the input/output small, it would be a linear amplifier, but as the signal increases to the point that the output approaches the rail, compression sets in as the gain decreases.

You can also think of it as a voltage divider. Think of the 'load resistor' CMOS transistor as the 'top' resistor in a voltage divider and set it's resistance to a high value, let's say 1 Meg. Then we can think of the other CMOS transistor at the point it starts to conduct as, just tossing out a number here, 1K ohms. Ignoring any kind of practical bias for the time being, with a 9V battery the voltage at the connection of these two reisistors would be:

9V * (1K / 1k + 1 Meg) or .009 V, essentially ground. So let's increase the 'bottom' resistor by shutting off the conducting transistor, raising it's channel resistance:

At 10k the output voltage is: 0.89V
At 100k: 0.81 V
At 250k: 1.8 V
At 500k: 3 V
At 1 Meg: 4.5

So now we are at the half way point in the travel from ground to the power rail and to do that the 'bottom' resistor had to change from 1k to 1 Meg. To get to the supply rail:

2 Meg: 6 V
4 Meg: 7.2 V
5 Meg: 7.5
10 Meg: 8.18
100 Meg: 8.91

So the first half of the swing to the supply rail was accomplished by a change in the channel resistance of 1 Meg. But to get from that halfway point to the positive rail requires a change in the channel resistance of 100 Meg! A 100x difference in the 'work' the conducting transistor has to do...

Now, in the case of a CMOS inverter being used as a linear-ish amplifier, each transistor is the 'conducting' transistor for the different polarity swings above and below the bias point. So the N-channel transistor is the conducting transistor from Vbias to V+ and the load resistor from Vbias to Ground. The opposite case is true for the P-channel. AND the above example is all just theorhetical, and the numbers I have used here were simply pulled from the air to use as an example, they have no basis in experimental observation, or even reality to be honest, AND this is a vast oversimplification, but I hope the overall thought process helps,

Regards,

Jay Doyle

Mark Hammer

Quote from: slideman82 on January 30, 2008, 03:41:31 PM
Ok, so, what happens with discrete JFET op amps? Will they have soft clipping and that remarkable compression?
Quote from: gez on January 30, 2008, 05:43:11 PM
I've never built a discrete JFET op-amp, but I doubt it would have soft clipping. 
Check out the Boss RD-10, which houses a fistfull (well, 4 anyways) of discrete JFET op-amps used as clippers.  Note that the overdrive characteristics stem from the manner in which cascaded gain and diodes are creatively used. http://img.photobucket.com/albums/v474/mhammer/ROD-10.png
Also, note that the Boss BD-2 is essentially two cascaded discrete JFET opamps.

gez

Quote from: Mark Hammer on January 31, 2008, 01:11:10 PM
Quote from: slideman82 on January 30, 2008, 03:41:31 PM
Ok, so, what happens with discrete JFET op amps? Will they have soft clipping and that remarkable compression?
Quote from: gez on January 30, 2008, 05:43:11 PM
I've never built a discrete JFET op-amp, but I doubt it would have soft clipping. 
Check out the Boss RD-10, which houses a fistfull (well, 4 anyways) of discrete JFET op-amps used as clippers.  Note that the overdrive characteristics stem from the manner in which cascaded gain and diodes are creatively used. http://img.photobucket.com/albums/v474/mhammer/ROD-10.png
Also, note that the Boss BD-2 is essentially two cascaded discrete JFET opamps.

But, take away the clipping diodes and I doubt that the full gain of the differential pair plus the BJT(s) following it would provide soft compression.

As Jay pointed out, the reason CMOS inverters provide that nice compression that we all know and love (and those who don't know, what's wrong with you?  Get breadboarding!) is because they are such poor amplifiers.  Start notching up the transconductance and all that softness disappears.

As always, the credibility of my posts can go down as well as up.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

WGTP

Is that the anwer to the question "why do they sound better being overdriven than by overdriving themselves?"   :icon_cool:
Stomping Out Sparks & Flames

JDoyle

Quote from: WGTP on February 01, 2008, 09:32:15 AM
Is that the anwer to the question "why do they sound better being overdriven than by overdriving themselves?"   :icon_cool:

I think, in a way, yes. But I don't think it is that they are 'overdriving themselves' that is the problem, it's that they are acting more like they were intended to, as a switch, and we are trying to keep them from doing that...

Consider the biasing arrangement that you normally see: a resistor from the output to the input. The thing that may throw people is that the normal symbol is similar to an op amp in that it is a triangle, so what is actually happening gets lost in translation...

Remember that a CMOS inverter is two transistors stacked, the P-Channel is on top, the N-Channel is on the bottom. Now, because they are complementary, they are matched, so when at rest both are passing the same current which means that the junction of the two transistors sits at 1/2V+ at rest. If they are both passing the same current then you can think of them as equal value resistors, SO: if you connect a resistor from the output to the input, when the output is at rest (no input signal), no matter what the V+, the input and the output will always be at 1/2V+ (remember, the transistors are matched). This is a happy accident for us, because it is also perfect for digital, because of the high gain the inverter is a comparator: if the input is above 1/2V+ the output swings negative, if the input is below 1/2V+ the output swings positive.

Now, to jack up the gain of a CMOS stage (which makes it more like a switch), you raise the value of the feedback resistor, which still allows the input to be biased to 1/2V+, but when the inverter starts to conduct, with a higer value feedback resistor there is less negative feedback to keep the output under control. The less negative feedback, the more the inverter acts like a switch, which we DON'T want...

As we all know MOSFETs are really good amplifiers, they have a lot of gain on tap; couple that with the fact that the load resistor is another MOSFET simulating a large resistance, and that there is no source resistor, and you have about as much gain as you can squeeze out, which is why it is considered a switch. But again, we don't want a switch, we want the compression, so we need to turn DOWN this gain, and we do that by applying the negative feedback. This means that the stage fights against itself as it gets close to the rails, with the signal trying to get it to hit the rail and the negative feedback trying to keep it from nailing that rail... Which extends the area of 'compression'.

Basically the higher the gain of the CMOS stage, the more it resembles a switch and the 'compression window' at either extreme of the output swing is reduced.

I'll admit I haven't done a whole lot with CMOS stuff, but I do remember really liking the tones I got from Gus' NPN Boost (my go-to gain stage, if you haven't built it, do) driving four inverters running at low gain, I think I used 10k feedback resistors but I can't remember...

Hope that makes sense...

Jay Doyle

Ben N

I know it has been a while, but whenever I read a post like that I think, "Thank goodness someone like Jay Doyle is back."
  • SUPPORTER

WGTP

Certainly makes since to me.  Thanks.  So if we are using multiple stages of a 4049 for example, cranking the first stage to drive the 2nd and 3rd results in the hard clipping from the first stage coming thru the next 2 stages.   :icon_cool:
Stomping Out Sparks & Flames

R.G.

Hey, here's a thought.

Calculate the biggest signal you can get out of one inverter stage. Then build a resistor divider to divide that down to just barely overdrive the next inverter stage. Then do it again. And again. Oughta let you play around with being at the edge of hard clipping, right?

'course you accumulate noise and use a lot of power. But it's about the music, right?
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Sack Puppet

E.T.I. - an electronics publication long since gone once presented an overdrive using some sort of CMOS inverters, either a 4007 or a 4069 or something like that (see the hijack coming?)... I built this for a friend and would apreciate it if someone that has the schematic could post it.

I'd like to revisit it but it doesn't exist on the internet.  A bold thing to say I know but I've looked for it on and off for years.

S.