Maker Pro
Maker Pro

Applying AGC to an amp made out of a CMOS inverter?

T

Tim Shoppa

Jan 1, 1970
0
We're all familiar with making analog amplifiers by using a
digital (e.g. 74C04, 74HCU04, CD4069, etc.) inverter and putting
feedback around it. Or you start with a "differential pair/inverter"
like the CD4007.

These amps are usually used in non-critical applications like
oscillators or limiters where they are happily run until they limit
near the supply rails, or where you know that signals will be small
enough to not hit the rails.

But say I wanted to use something like this in an application where
I wanted to use them over their fairly linear range (maybe 0.3Vdd to 0.7Vdd)
to preserve wave shape without going into limiting by applying AGC
to the amplifier. The input signal (kHz) only varies by a factor of 5
or so (0.1V P-P to 0.5V P-P) and what I want to do is make its amplitude
be constant despite changes in signal strength (which happen over a timescale
of seconds). I'm not too picky about the size of the output signal although
it'd be nice to have it be a volt or two P-P. Keeping THD under
10% would be great, I'm not picky about that either.

Now there aren't a lot of spare pins on an inverter to inject an AGC
voltage. Modulating Vdd probably tweaks the gain but doesn't do me a lot
of good because reducing Vdd also makes it more likely that the signal
will hit the limit, defeating the purpose.

If I use two transistors of a CD4007 for the amp, I've got a couple of
spare N and P channel transistors left to use. I can take one of the
spare transistors, make it part of the feedback loop, and vary the voltage
on the gate to change its transconductance.

Is this an "old trick" where someone can point me to existing designs?
I'll probably have to go to the bench and measure the individual MOS
transistor characteristics to get transconductance as a function of
gate voltage, because all the data sheets seem to treat the CD4007 as
a digital, not a linear device :)

Is there a better trick?

I was figuring on just using an external diode or two to develop the
AGC voltage and get an AC waveform out that was a couple diode drops
big. Is there some trick for turning the unused MOS transistors in the
CD4007 into diodes?

Tim.
 
S

Scott Stephens

Jan 1, 1970
0
Tim said:
We're all familiar with making analog amplifiers by using a
digital (e.g. 74C04, 74HCU04, CD4069, etc.) inverter and putting
feedback around it. Or you start with a "differential pair/inverter"
like the CD4007. ....
But say I wanted to use something like this in an application where
I wanted to use them over their fairly linear range (maybe 0.3Vdd to 0.7Vdd)
to preserve wave shape without going into limiting by applying AGC
to the amplifier. The input signal (kHz) only varies by a factor of 5
or so (0.1V P-P to 0.5V P-P) and what I want to do is make its amplitude
be constant despite changes in signal strength (which happen over a timescale
of seconds). I'm not too picky about the size of the output signal although
it'd be nice to have it be a volt or two P-P. Keeping THD under
10% would be great, I'm not picky about that either.

There are a couple ways you could do this, since your not demanding a
wide AGC range or precision.

1. Use one (4007) mosfet as a VVR. As long as the swing is under .5
volts, its pretty linear, especially with a resistor between gate and
source, as detailed in Art of Electronics.

2. Throttle the current to the chip. Make an amp (gain of 10) out of an
inverter, capacitively couple it. Put a capacitor across the chip's
supply, and put a separate bipolar transistor to throttle current to the
chip.

Or you can put a resistor (10-100 K for F's) to the chip to Vcc. And
connect several inverter outputs to ground. When these inverters are
activated, they rob current from the amplifying inverter, spoiling its
transconductance :) Similarly, if the current to the chip is limited.

3. Finally, you can AC couple to the amplifier, an put a DC bias signal
to it also. As the DC bias moves toward saturation, the small-signal
gain will go down, but the signal will become nonlinear in the
directions of the N or P channel device saturates. If you do this with
two devices and use a diff amp to sum them, you might cancel out and
improve the distortion.

Somewhere there's instructions to make an OTA type amp from a 4007, but
I don't know where. Never tried it, but I have tried the above which can
work, if you don't mind the transients as the DC bias changes.

BTW, you can use one inverter shunted by a diode as the level detector
for the AGC if you filter it.

But several companies make AGC op amps now, so it may not be worth it.


--
Scott

**********************************

DIY Piezo-Gyro, PCB Drill Bot & More Soon!

http://home.comcast.net/~scottxs/

Those who sow excuses shall reap excuses

**********************************
 
J

Jim Thompson

Jan 1, 1970
0
We're all familiar with making analog amplifiers by using a
digital (e.g. 74C04, 74HCU04, CD4069, etc.) inverter and putting
feedback around it. Or you start with a "differential pair/inverter"
like the CD4007.

These amps are usually used in non-critical applications like
oscillators or limiters where they are happily run until they limit
near the supply rails, or where you know that signals will be small
enough to not hit the rails.

But say I wanted to use something like this in an application where
I wanted to use them over their fairly linear range (maybe 0.3Vdd to 0.7Vdd)
to preserve wave shape without going into limiting by applying AGC
to the amplifier. The input signal (kHz) only varies by a factor of 5
or so (0.1V P-P to 0.5V P-P) and what I want to do is make its amplitude
be constant despite changes in signal strength (which happen over a timescale
of seconds). I'm not too picky about the size of the output signal although
it'd be nice to have it be a volt or two P-P. Keeping THD under
10% would be great, I'm not picky about that either.
[snip]

Tim.

Use a CdS cell as the feedback resistor, driven by an LED (or lamp)
that comes on at a preset output signal level.

(Or do it right and use the proper components :)

...Jim Thompson
 
D

Dave

Jan 1, 1970
0
Somewhere or other I saw a simple circuit which used a P-CHANNEL fet,
fed with a small amount of signal out of an opamp, and the output of the
fet was used to pull down the input signal and thus regulate the input.
Think they used a rc filter on the input to the fet for the time delay,
and of course the input signal had to have a series resistance before
feeding the amp. I breadboarded this a long while back, and it seemed
like it worked ok, but has been awhile.
- Dave
 
T

Tim Shoppa

Jan 1, 1970
0
Jim Thompson said:
Use a CdS cell as the feedback resistor, driven by an LED (or lamp)
that comes on at a preset output signal level.

Now I certainly see the advantage of a CdS cell. I spent some time
dinking around with a P-channel MOSFET from the CD4007 and while I could
tweak the gain by varying its transconductance, the transconductance itself
was a rather strong function of the signal. Others here have mentioned
a magic resistor ratio around a FET mentioned in AoE which may linearize
things better...
(Or do it right and use the proper components :)

A two- or four-quadrant multiplier? Seems like overkill... besides
this is the first time I've ever had a chance to play with "discrete"
MOSFETs in analog circuitry, it's interesting to learn the nonlinearities
involved. I'm quite used to bipolars by now but have somehow missed
all the FET stuff (bar some playing around with GaAsFETs that I did
last year at 1.5GHz, most of what I learned there was just biasing).

Tim.
 
J

Jim Thompson

Jan 1, 1970
0
Now I certainly see the advantage of a CdS cell.

I made up my own device using an LED and a CdS cell inside a piece of
ABS.
I spent some time
dinking around with a P-channel MOSFET from the CD4007 and while I could
tweak the gain by varying its transconductance, the transconductance itself
was a rather strong function of the signal. Others here have mentioned
a magic resistor ratio around a FET mentioned in AoE which may linearize
things better...

IIRC that only works with a JFET... it's been at least 20 years since
I last tried that.
A two- or four-quadrant multiplier? Seems like overkill... besides
this is the first time I've ever had a chance to play with "discrete"
MOSFETs in analog circuitry, it's interesting to learn the nonlinearities
involved. I'm quite used to bipolars by now but have somehow missed
all the FET stuff (bar some playing around with GaAsFETs that I did
last year at 1.5GHz, most of what I learned there was just biasing).

Tim.

There's ways of doing it quite linearly **without** going the full
4-quadrant route.

**Maybe** "qrk" (who lurks here) would authorize my discussing how I
designed their chip??

...Jim Thompson
 
K

Ken Smith

Jan 1, 1970
0
was a rather strong function of the signal. Others here have mentioned
a magic resistor ratio around a FET mentioned in AoE which may linearize
things better...

IIRC that only works with a JFET... it's been at least 20 years since
I last tried that.[/QUOTE]

I think you are wrong about that. With a small signal MOSFET as with a
JFET you want the signal to appear to the device as being on both the S/D1
and the S/D2 pins. This way, the even harmonics are greatly reduced.

Vac
!
!!--
Vac/2 ------!!---- Vac/2
!!--
!
GND

Looks like:

Vac/2
!
!!--
0Vac ------!!---- 0Vac
!!--
!
-Vac/2
 
M

Michael Black

Jan 1, 1970
0
Ken said:
IIRC that only works with a JFET... it's been at least 20 years since
I last tried that.

I think you are wrong about that. With a small signal MOSFET as with a
JFET you want the signal to appear to the device as being on both the S/D1
and the S/D2 pins. This way, the even harmonics are greatly reduced.

Vac
!
!!--
Vac/2 ------!!---- Vac/2
!!--
!
GND

Looks like:

Vac/2
!
!!--
0Vac ------!!---- 0Vac
!!--
!
-Vac/2
[/QUOTE]

Don Lancaster, when he was going through his electronic music phase
in the seventies, had a couple of articles in Popular Electronics
about gain elements, and he sure mentioned mosfets. If I'm remembering
properly, he even suggested using elements of the 4007 as the control
element.

Michael
 
K

Kevin Aylward

Jan 1, 1970
0
Ken said:
IIRC that only works with a JFET... it's been at least 20 years since
I last tried that.

I think you are wrong about that.[/QUOTE]

I agree. Jim is mistaken. However, this seems a demonstration of Jims
advanced age, rather than his electronics skill.

Kevin Aylward
[email protected]
http://www.anasoft.co.uk
SuperSpice, a very affordable Mixed-Mode
Windows Simulator with Schematic Capture,
Waveform Display, FFT's and Filter Design.
 
T

Tim Shoppa

Jan 1, 1970
0
Jim Thompson said:
IIRC that only works with a JFET... it's been at least 20 years since
I last tried that.

After I adjusted some resistor values it seems to not be so bad with the
P-channel MOSFET. I'm using it as a programmable shunt, and it
seems to behave well enough over a decade or so of attenuation.
There's ways of doing it quite linearly **without** going the full
4-quadrant route.

**Maybe** "qrk" (who lurks here) would authorize my discussing how I
designed their chip??

If I made some programmable current sources (again, using those
spare MOSFETs) to run some bipolar pairs, I think that'd be a multiplier.
Right?

Do you have some trick up your sleeves to make MOSFET pairs behave like
bipolar pairs with respect to analog multiplication?

I might dust off some CA3046's just for fun this weekend and add them to the
mix :)

And as long as I'm playing with inverters and AGC, maybe
a secondary goal is to make a 32.768kHz crystal oscillator which
makes really good sine waves (< 0.1% THD?). The traditional CMOS
inverter oscillator doesn't have good sine waves anywhere in it because
it runs until saturation, but maybe if I use AGC to keep the signal to
0.5 or 1V P-P maybe I can get a clean sine wave. Too bad those little
crystals don't support enough power to directly run a light bulb ala
Wien bridge :)

Tim.
 
J

Jim Thompson

Jan 1, 1970
0
I agree. Jim is mistaken. However, this seems a demonstration of Jims
advanced age, rather than his electronics skill.

Kevin Aylward
[snip

Poor Kevin, a dimwit, writes incompetent software, but would never
admit it

Damn! I'm a poet ;-)

...Jim Thompson
 
J

john jardine

Jan 1, 1970
0
Tim Shoppa said:
IIRC that only works with a JFET... it's been at least 20 years since
I last tried that.

After I adjusted some resistor values it seems to not be so bad with the
P-channel MOSFET. I'm using it as a programmable shunt, and it
seems to behave well enough over a decade or so of attenuation.
There's ways of doing it quite linearly **without** going the full
4-quadrant route.

**Maybe** "qrk" (who lurks here) would authorize my discussing how I
designed their chip??

If I made some programmable current sources (again, using those
spare MOSFETs) to run some bipolar pairs, I think that'd be a multiplier.
Right?

Do you have some trick up your sleeves to make MOSFET pairs behave like
bipolar pairs with respect to analog multiplication?

I might dust off some CA3046's just for fun this weekend and add them to the
mix :)

And as long as I'm playing with inverters and AGC, maybe
a secondary goal is to make a 32.768kHz crystal oscillator which
makes really good sine waves (< 0.1% THD?). The traditional CMOS
inverter oscillator doesn't have good sine waves anywhere in it because
it runs until saturation, but maybe if I use AGC to keep the signal to
0.5 or 1V P-P maybe I can get a clean sine wave. Too bad those little
crystals don't support enough power to directly run a light bulb ala
Wien bridge :)

Tim.[/QUOTE]

A thousand years ago I had a CD4007 'Wien bridge oscillator' circuit
published in Wireless World magazine. 2 of the fets were used as bridge
resistors, one of the N fets used as an ALC variable resistor. Best I ever
got was 5% distortion :-(
regards
john
 
Top