NAND trem/fuzz/ring mod - super simple

Started by Taylor, December 20, 2010, 06:15:14 PM

Previous topic - Next topic

Taylor

Here's another CMOS idea. As with the other stuff I've posted lately, this is currently just an idea and needs tweaking to actually work right.



The upper portion is an oscillator. Shown it covers LFO and audio territory. I'll probably tweak it go lower in frequency when the rest of the idea is fleshed out. But that portion works as expected.

The bottom left is supposed to be configured to generate a square wave from the audio input. That NAND is wired as an inverter. This square wave then goes to the last stage, which is where the trem should happen. Basically, when the oscillator is low, the output will be high no matter what the audio is doing (silence, with DC offset). When the oscillator is high, the output flips with each audio cycle, so we get a buzzy on/off trem. When the oscillator is in the audio range, it's a nasty ring modulator.


Now, the problem I'm having is that I can't get the lower left inverter to work like it should. It works in the sim, but I'm aware that the Falstad simulator is pretty basic and doesn't realistically emulate the analog function of digital gates. Still, I actually don't want to use the NAND as a linear amp, I want it to be in digital mode. I've tried all kinds of different ways to bias it, feedback resistors, tying one input high and tying them together, etc. I can get a linear amp easily, but never the full square wave, even with no feedback resistor. And the "trem" part doesn't work unless both signals are logic signals.

I'm using a 4011, which although it doesn't say the input is buffered, there sure are a lot of transistors inside there, so I would expect it to act buffered, which I thought meant that it would flip state even with a small signal that just barely passes 4.5v.

I must be doing something stupid, but I can't figure it out. Any thoughts?


Taylor

#1
I didn't think the data sheet would have transfer characteristics for a NAND wired as an inverter, but, it does! Looking at the curve, it's much sharper than 4049 inverters, so that's good, but it looks like the switching point is not in the center. It's something like 3/5 of the supply voltage.

Maybe the trick will be biasing it off-center...

Edit: although, tying one input to ground (the one config I didn't try) brings the switching point (probably not the right term for that) closer to center. Will try that.

Taylor

#2
Nope, tying to ground did not work.

So then I made a simulation of the internal schematic of a 4011 using discrete complimentary MOSFETs. It works the way it should:

http://tinyurl.com/28xluvb

So why doesn't it work in real life?  :-\

Edit: D'oh - it's because my test signal is 5vpp instead of a realistic .3vpp. Corrected this and it does not work.

So I guess the conclusion to draw here is that it needs more gain. But the whole idea here was to make this with only a single active component. I could slam it with a booster, but that kind of defeats the purpose of this thought experiment.

Top Top

A 386 configured like in the PWM is your friend when trying to slam CMOS chips.

Only one extra 50ยข active component.

Taylor

#4
Yeah - I'm just thinking that this circuit might not be very good for one with 2 chips. ;D For a 9-part circuit, it would be sweet, but once you add a second chip, the quirks start looking like problems...

Edit: I did the 386 in front. It works! The bad news is that, as expected, it ticks pretty loudly, and it does work as a ring modulator, but the oscillator is the same volume as the instrument signal. I could try to silence it with various techniques, but you know what they say about polishing...

Top Top

Why does the oscillator require two of the nand gates? I'm not really understanding that part

Why not the typical 4093 type oscillator (also a two input nand gate)? Just one cap, one resistor/pot on one gate input, and if you want it on all the time, tie the other gate input high?

caress

Quote from: Taylor on December 20, 2010, 08:27:46 PM
Yeah - I'm just thinking that this circuit might not be very good for one with 2 chips. ;D For a 9-part circuit, it would be sweet, but once you add a second chip, the quirks start looking like problems...

Edit: I did the 386 in front. It works! The bad news is that, as expected, it ticks pretty loudly, and it does work as a ring modulator, but the oscillator is the same volume as the instrument signal. I could try to silence it with various techniques, but you know what they say about polishing...

there's a few little tweaks to the bugbrand samplerate reducer that basically make the exact sounds you're identifying.  ring mod/trem with a loud carrier that can be suppressed with yet more tweaks.  too many tweaks, indeed!

Taylor

Quote from: Top Top on December 21, 2010, 12:35:41 AM
Why does the oscillator require two of the nand gates? I'm not really understanding that part

Why not the typical 4093 type oscillator (also a two input nand gate)? Just one cap, one resistor/pot on one gate input, and if you want it on all the time, tie the other gate input high?

Well, there are 2 answers to that. The literal one is that the 4011 I was using is not a schmitt trigger NAND, and the kind of osc. you're talking about requires a schmitt trigger.

The second answer is "oh damn! I can use a 4093 and free up a gate." I don't know why I didn't think of that. Thanks. Now, I could use the extra gate to get the gain, but the bleed is too loud so this circuit is basically not usable (but still a fun thought experiment). Instead, I can use the extra gate to figure out some way to shut the oscillator up when not playing.

PRR

The switch-voltage for standard CMOS is offset, unpredictably, by misbalance between N and P type.

The switch-voltage for simple NAND CMOS is further offset by two N type against one P type (or vice-versa, I forget).

Tying one input high may center better, but not 50.000%. You may NEED to tie one input high, and it may matter which one. As I read the guts, pin 1 should be held high to make the other input work as a symmetric inverter. I could be wrong.

On bench, a trim pot "should" work. Feed small signal, trim for maximum breakout.

That "may" work in real life, but not for-sure. As supply voltage and temperature drift, the CMOS will tend to drift like a divider, but not quite. If the adjustment is very touchy, then it is pretty sure to punk-out on stage some day.

Without knowing your "all kinds of different ways to bias it, feedback resistors...", you may get suggestions you already tried. Here's my guess.



I can not get either of my sims to swallow this. Linear CMOS is not their forte.

The idea is that a DC self-bias will eventually settle through the R-C-R network, but audio NFB is nil due to the heavy C. The 1Meg 0.1uFd 1Meg values are more-real-world than the others. The audio input impedance is 1Meg and you would select C2 to roll some bass: 0.1u for overmuch bass and 1nFd to dump the mud. C1 MUST be film, not electrolytic (at least to get it working). Electros are likely to leak too much against the large resistors.

You know you can build the oscillaor with two inverters, and two more inverters will give "infinite" audio gain. A low performance (sub-10MHz) AND gate is trivial, two diodes and a pull-down resistor. I realize this spoils your elegance, but maybe no more so than tricky bias networks.

> it does work as a ring modulator

A digital ring modulator should be an XOR gate. There may not be a real difference for this application.

> but the oscillator is the same volume as the instrument signal.

Carrier rejection is tough with simple gates.
  • SUPPORTER

edvard

QuoteThe switch-voltage for simple NAND CMOS is further offset by two N type against one P type (or vice-versa, I forget).
It's two N in series and two P in parallel.
See http://www.onsemi.com/pub_link/Collateral/MC14001UB-D.PDF page 5:


(I prefer the unbuffered models for audio)

QuoteTying one input high may center better, but not 50.000%. You may NEED to tie one input high, and it may matter which one. As I read the guts, pin 1 should be held high to make the other input work as a symmetric inverter. I could be wrong.
Nope, you're right.
Either one held high should do it, although for some reason it only works on my breadboard if I tie up pin 1.
With a NOR gate, you need to tie one pin to ground to get the same effect.

If your sim allows for custom parts, just plug in some MOSFET models in the configuration above to get a linear approximation.
Works for LTSpice.
All children left unattended will be given a mocha and a puppy

Taylor

Awesome, thanks for the ideas, fellas.

My next plan of attack is to rectify/filter to obtain an envelope, and use a NAND to kill the sound completely when the input drops below a threshold.

earthtonesaudio

Try adding some feedback from the output of the "mixing" NAND to its oscillator input.  This alone might help tame the oscillator level, but if it's still too high you can then add series resistance between the oscillator and the mixer.  Maybe also try a more triangular oscillator waveform.