Schmitt trigger inverters doing linear work?

Started by Taylor, December 26, 2010, 07:56:06 PM

Previous topic - Next topic

Taylor

I think the answer to this will be "no, not possible, ya big dummy", but I'm curious if it's possible to bias a schmitt trigger inverter like the ones in the 40106 to do linear amplification. I've become really interested in the idea of single-chip CMOS circuits, and it's always useful to know ways to repurpose CMOS gates beyond their typical usage.

Since the negative-going and positive-going threshold voltages are different in a schmitt trigger inverter, I'm guessing that it will be necessary to bias right around one of these thresholds in order to get linear operation. But, since I've found no info on this on the web, I'm wondering if it's just plain impossible. Any thoughts?

amptramp

#1
Typically, a CMOS Schmitt trigger element has a fairly large hysteresis.  For the 40106 hex Schmitt inverter that you mentioned, at 5 volt Vcc, the positive threshold is 2.2 volts and the negative is 0.9 volts.  At 10 volts Vcc, the positive threshold is 4.6 volts and the negative is 2.5 volts.  At 15 volts Vcc, the positive threshold is 6.8 volts and the negative is 4 volts.  For the output to respond going high, you have to pass the positive threshold and for any change on the way down, you have to pass the negative threshold.  This allows the device to become an oscillator (although it is not a precision oscillator) by charging a capacitor from input to output, but there is no voltage at which it operates in a linear region.  If you try to operate it as a linear amplifier, the middle level of signal may disappear which makes for an acoustic effect, but not a very useful one.

CMOS non-Schmitt inverters operated in the linear mode generally run hot and pull a fair bit of current - I have seen 8 mA.  In many cases, it saves current to use an op amp.  (I have done some weird things at work like run CMOS as a linear amplifier submerged in liquid nitrogen.  It works, but you get occasional bursts coming out in the signal that sound like ice cracking.)

PRR

> "no, not possible, ya big dummy"

I would not use those exact words. So.... it's the thought that counts?

> negative-going and positive-going threshold voltages are different ... ... bias right around one of these thresholds

BOTH. At the same time. How can you be in two places at once?

There IS a poor alternative. Let the Schmitt oscillate. Shove audio at it. Low-pass the output. Stuff gets through. Probably pretty mangled. Not sure what the gain equation looks like. May be hard to get useful gain.

> the idea of single-chip

There's an old-old BASIC programmer's game: the One-Liner. Many dialects of BASIC allow multiple statements on one line (it saved punch-cards); however line-length was limited (80, 132, 256 characters). It is astonishing what CAN be done. The "best" are quite unintelligible. It is good lesson why NOT to cram your code. I dunno if this applies to one-chip designs.
  • SUPPORTER

earthtonesaudio

QuoteThere IS a poor alternative. Let the Schmitt oscillate. Shove audio at it. Low-pass the output. Stuff gets through. Probably pretty mangled. Not sure what the gain equation looks like. May be hard to get useful gain.

All true.
Here's an example of most of what Paul said:

The input buffer provides a current boost for "shoving" the audio into a Schmitt oscillator, the output of which is a rough PWM.  Not only the pulse width but the frequency varies, making a more complicated equation.  Low-pass on the output of the Schmitt trigger does indeed sound like the input, but the gain is (indeed) poor.

There are better ways.

Transmogrifox

The PWM idea is probably your best bet.  I think trying to make it operate in a true linear mode would make it hard to keep it stable, if possible.  The best case would be that of a class B amplifier with really high gate-source turn-on voltages on MOSFETs. 

I would like to take the liberty of emphasizing that earthtonesaudio's schematic is conceptual only, and needs more attention to actually work.  For example, he shows a D flip-flop symbol & calls it a "Toggle Flip-Flop".  If you know about this stuff, then you know the Q' output needs to be wired to the D input.  Also a DC blocking capacitor is needed on the output of the circuit, and a resistor to bleed off the capacitor at a set discharge rate.

In reality, you can eliminate the flip-flop completely.  If you have a signal that varies in frequency, then you can put a high-pass filter (series capacitor) on the output side of the CMOS schmitt trigger set to a cut-off where the oscillator's lowest fundamental frequency is well within the slope of the filter cut-off.  After that you put it through a rectifier & low-pass capacitor filter to smooth it out. 

I would not expect to see much gain from such a configuration.

A true PWM approach is the best way to get gain, but the design & components count is high enough you may as well just use a BJT for an amplifier stage, that is, if your reason is to minimize circuit board real estate...
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

earthtonesaudio

Quote from: Transmogrifox on December 27, 2010, 02:21:36 PM
I would like to take the liberty of emphasizing that earthtonesaudio's schematic is conceptual only...

Quite right!

PRR

> Here's an example

Thanks!

> to actually work.

Yeah. Seems to me the flipflop is supposed to give a 50/50 duty cycle output. Then the averaged output is just half the supply, and the peak-detected output is 99+% of supply for all inputs. Amplitude has been lost.

However the output of the Schmitt _will_ average (not peak) to roughly the input amplitude. When biased to oscillate mostly-low, 10% duty, output is 0.5V; when mostly-high 4.5V.

And a proper choice of Schmitt resistors would allow a guitar to go right in without the buffer. 100K and 100pFd is just inside the top of the audio band. 1Meg and stray capacitance might be just beyond the audio band. There would be large thermal hiss in large resistor, and CMOS is not low-noise. But Taylor's spec says chip-count, not noise-figure.

For envelope following, I'm not sure what this adds to a simple buffer/amplifier into a diode and cap. Maybe just extra parts and heterodyne whines.

OK, I'm ready to attempt the gain formula for audio injected to a Schmitt oscillator then averaged (low-passed). It is supply voltage divided by Schmitt hysteresis.

AN-140 shows MM74C14 at 10V tripping at 3V and 7V. So 4v in gives nearly 10V out, gain of 2.5. Fine print says this will never be less than 0.2*Vcc or 2V, gain of 5. Band-graph suggests it could be over 7V, gain of 1.4.

When you "need gain", 1.4 even 2.5 is usually not enough. You could try to find a barely-not-rejected 0.2*Vcc part, but I bet that rarely happens, and gain of 5 is no big thrill.
  • SUPPORTER

StephenGiles

#7
There was a basic guitar synth that used a 40106 to generate square wave and trigger - which one was it? I'll try to remember.

Yes - this one:

http://www.4shared.com/photo/fLG10wsM/CClark_synth1.html

http://www.4shared.com/photo/no54-iZi/CClark_synth2.html

never quite figured out 4shared, best to download circuits before viewing.
"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

R.G.

One process that has to cope with hysteresis is analog tape recording. The process is inherently hysteretic. That's what the bias oscillator is for. A high frequency oscillator signal is added to the signal being impressed onto the tape to force all of the audio signal to be on both edges of the hysteresis band at the same time, at least as regards audio frequencies. I suspect that something similar could be done with Schmitt trigger gates, too. Maybe. That leaves you with the problem of what the "gain" is when the hysteresis can be ignored. Schmitt trigger gates are uniformly buffered, which in CMOS terms means "extra gain stages are added after the input and logic to be sure the output saturates".

It might be simpler to use an unbuffered gate like the CD4069 which is known to do the analog portion right, and construct the switching portions of the circuit by using the remaining gates - if any - to construct Schmitt trigger gates by using two sections (invert+invert = noninvert) and resistor feedback around it to construct the hysteresis. Not too difficult to do that.

But "easy" and "practical" weren't in the initial goals...  :icon_biggrin:
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.