Stupid simple comparator fuzz

Started by PBE6, December 31, 2015, 03:32:35 PM

Previous topic - Next topic

PBE6

I'm not sure if this has been presented here before (probably has), but I just stumbled upon a very simple comparator fuzz design:

I honestly didn't think it would work, I was just trying to see if I had the concept right and the plan was to add some pre-gain, full wave rectification, envelope detection, tone shaping, etc... but I have to say it sounds pretty cool as is! Aggressive and nasty synthy-style tones with a bit of gating, sounds really cool on bass. I may still add some more bits and pieces, but it may turn out that simplest is bestest. :)

A few questions though:

1. There are no input or output capacitors. I don't think they're necessary, as the comparator isn't really biased, but are they recommended nonetheless?

2. The comparator output swings between the maximum and minimum voltage available, so I thought the easiest way to control the volume is to control the supply voltage with a potentiometer. Is this approach going to cause any problems?

3. Funny thing I noticed is that at low supply voltage settings there is a fair amount of hiss, but at reasonable levels the hiss disappears and the circuit is dead silent between notes. Anyone know why that would be?

anotherjim

It's simple, I'll give it that.
Is it actually a comparator chip or an opamp-as-comparator ?
Noise under low volts maybe due to high supply impedance due to the pot? I'm not certain of that.
AC coupling - does it crackle when you play with guitar controls? Depends if it's a bipolar chip or whatever, there could be input bias current heading for the guitar.


Keppy

I'm surprised it works.

1) If the (-) input is really tied to ground, then the output will be as low as it can go until a positive signal appears on the input. That means that stray voltage, like from a leaky output cap on another pedal, could hurt the operation. Coupling caps should be added. You can bias the (+) input with a resistor to ground.

2) Normally comparator fuzzes need some hysteresis or they respond to line noise. In other words, resistors are added to create a gating effect like you describe. In this case, though, since the (-) inputs are grounded, I suspect that the (+) input has to rise not just above the (-) input, but into the common mode input range of the opamp in order to have an effect. This will be different between models of opamp, so it's worth experimenting.

3) Most opamps can be damaged if the inputs get more than about 5v apart, which is possible in a design like this where the inputs aren't kept to the same voltage using feedback. Adding some back-to-back diodes at the inputs would be good protection against this. Also note that keeping the inputs ground referenced means an AC signal will cause momentary swings below the negative rail on the input. This may damage the opamp in some cases.

4) This design will suck current, though that's normal for opamp comparators and is minimized as you turn down the volume. However, doesn't the opamp just stop responding as the volume gets low? Most of the opamps we use don't function much below 9v (5v in some cases). I'm guessing this is the reason for your hiss, although I don't know the exact working explanation. You might be better served with a volume control on the output.


This looks like a cool, simple design, but I suspect its flaws will catch up to it at some point in the form of a bad opamp. I would add coupling caps, bias the inputs to 1/2 supply, add hysteresis, and put the volume control at the output. Still, it's pretty amazing that it works with just two parts.
"Electrons go where I tell them to go." - wavley

R.G.

Quote from: PBE6 on December 31, 2015, 03:32:35 PM
1. There are no input or output capacitors. I don't think they're necessary, as the comparator isn't really biased, but are they recommended nonetheless?
The capacitor is biased - it's (-) input is tied to ground. That means that all signals above ground make the output swing full positive, all below ground make the output swing full negative.
IF the actual comparator chip can operate without losing its mind in some way with its inputs having a common mode voltage of just about ground and below ground in the case of the (+) input. Some can, some can't.

Quote2. The comparator output swings between the maximum and minimum voltage available, so I thought the easiest way to control the volume is to control the supply voltage with a potentiometer. Is this approach going to cause any problems?
Depends on the specific comparator. For some comparator chips, the answer is a definite YES. Notice that you get exactly the same output this way as with a volume control between the output and ground and the + supply attached to some stable voltage, excepting that the chip doesn't go into funny oscillations with a high power supply impedance as some comparator chips can.

Quote3. Funny thing I noticed is that at low supply voltage settings there is a fair amount of hiss, but at reasonable levels the hiss disappears and the circuit is dead silent between notes. Anyone know why that would be?
And this is the funny oscillations with power supply impedances and odd power supply levels. It's doing ultrasonic or RF oscillation, which can be heterodyned down into audio and heard as an aggressive hiss.

The choice of a specific comparator chip is critical for this circuit. It's running solidly outside the comfort zone of most comparators, but some will work in spite of this. I would (1) select a chip that says it can operate with its inputs at or slightly below ground on its datasheet, (2) move the volume control to the output and put a 0.1uF ceramic cap from V+ to V- to help keep the oscillations at bay, (3) isolate the output with series capacitor. Notice that with zero signal the output is either full V+ or full V-, or oscillating; with signal, the output has a DC average level close to V+/2. A cap can help whatever follows it cope with the change in DC level. Things that follow it that happen to use electro input caps could plausibly be damaged by a constant V+ output from it in some bizarre situations.
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.

anotherjim

If it were a comparator chip wouldn't the output be an open collector? Without a pull-up you'd hear nothing?

PBE6

Awesome! Thanks all, very good information there.

I was using a TL072 set up as a comparator, and not a comparator-specific chip. Not sure if that made the chances of it working bigger or smaller, but sometimes you just get lucky.

I'll make some of the suggested mods for safety/operations sake, I'm expecting it'll be a fun nasty bass synth pedal to play with.

Cheers, and Happy New Year!

R.G.

Quote from: anotherjim on January 01, 2016, 06:44:27 AM
If it were a comparator chip wouldn't the output be an open collector? Without a pull-up you'd hear nothing?
Some comparators have open collector, some have active pullup, with the expected differences. Yep, with an OC output, no sound at all.

Quote from: PBE6 on January 01, 2016, 12:20:04 PM
I was using a TL072 set up as a comparator, and not a comparator-specific chip. Not sure if that made the chances of it working bigger or smaller, but sometimes you just get lucky.
That accounts for sound with no pullup. Also probably some of the other issues and results. It's a very mixed bag.

Opamps can be used as comparators in some circuits, but they're not in general the same thing. Comparators have become specialized off the ancestral differential amplifiers that both opamps and comparators share. Comparator inputs and outputs have been "hardened" to take the more brutal signals that they usually get. Opamps have been specialized for more accuracy when linear; some comparators can be run as low-bandwidth opamps by applying negative feedback, but they do not in general have the internal stability compensation that we often take for granted in opamps. Comparators are usually run with no internal limitations on frequency response at all so they can respond to signals FAST and not worry about those pesky Nyquist criteria special notes.

And the TL072 in particular has issues with the common mode voltage of its inputs. They do funny things when the inputs are near V- or V+.  It appears that one of the funny things is that they sometimes work.  :icon_lol: 
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.

anotherjim

How about the old CA3140 op-amp? IIRC, it's inputs can safely go a bit south of supply neg.
Or it could be the 07x type happens to be the one that gets away with working like that.

R.G.

There are a lot of more modern CMOS opamps that can do this, as well as a batch of "rail to rail input" opamps that do it.

And there are tricks that can make even intolerant opamps work with inputs below V-.

But what I saw in the original post was a general happiness in how few components were used. Every circuit trick usually adds parts.
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.

PBE6


Quote from: R.G. on January 02, 2016, 12:12:52 PM
But what I saw in the original post was a general happiness in how few components were used.

Very true! :D  I felt like I had stumbled into the pinkjimiphoton zen dojo, where a handful of simple parts arranged "just so" transform the ridiculous into the sublime.

PBE6

Made a few of the suggested changes, here's the revised schematic:

And a short demo with a Fender P-Bass:
https://vimeo.com/150542258

blackieNYC

It sounds great!
Those LEDs actually doing anything for you?
Did you happen to measure current draw?  Not inferring anything. Just curious.
  • SUPPORTER
http://29hourmusicpeople.bandcamp.com/
Tapflo filter, Gator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers

PRR

> output has a DC average level close to V+/2.

Note that in the specific but very common case of going into a classic Fender tube amp, +4.5V DC on the jack will slam the first tube hard-ON. Signal passage will be weak to none.

This relates to a large case of leaky pedals which work on some amps but shut-up other amps.

Later Fenders sometimes have blocking caps ahead of the first tube, self-defense against "DC-rude" pedals. That's generally Good Practice in all audio interconnects. However when a tube grid is OVER-driven, the sound is different with a cap than without a cap. Since all the masters 1950s-1980s played cap-less grid inputs, and often used that sound, being "forced" to add a cap at the input because accessory builders omit caps on outputs is trending a wrong way.

Always hang a 100K resistor across output jack and measure for DC Volts a minute after switch-on. (There is usually a surge at start-up, but we want the voltage while playing.) Much less than 0.1V (100mV) is fine. 1V is sure to upset a fair number of next-box inputs.
  • SUPPORTER

PBE6

Yeah, pretty gnarly no? The LEDs are there for protection only, they were Keppy's idea to make sure the inputs don't get too far apart. Forgot to indicate the type on the schematic but they are red LEDs.

PRR

> make sure the inputs don't get too far apart.

Actually-- the limit you will violate first is that an input more than 0.6V below the negative supply will forward-bias a substrate diode and conduct "infinite" current. Up to 10mA is legal (but does the chip no good). You are unlikely to have a lot more than 10mA available on a pedal board. I would not invest a lot of protection for a 19 cent TL07x.

However 1.7V-4.5V LEDs will not prevent this 0.6V breakdown. Even 1N914 Si diodes just split the overcurrent, may not protect the chip.

A 10K series resistor would protect to 10K*10mA= 100V over-voltage. This covers even high-power loudspeaker lines. (If you have 120V on 1/4" plugs, you are beyond help; but 33K will cover that insanity.)
  • SUPPORTER

Keppy

Quote from: PRR on January 02, 2016, 04:41:32 PM
> make sure the inputs don't get too far apart.

Actually-- the limit you will violate first is that an input more than 0.6V below the negative supply will forward-bias a substrate diode and conduct "infinite" current.

Even 1N914 Si diodes just split the overcurrent, may not protect the chip.

Would Schottkys work in this case for protection?
"Electrons go where I tell them to go." - wavley

stringsthings

Craig Anderton did a comparator based fuzz way back when:



A few more parts and it runs on a plus/minus 9V supply but it could be adapted to single supply.

anotherjim

I'd go with Paul's suggestion and add a 10k series in the input.
I think LED's chosen so a hot preceding stage (so long as it's under 3v pk-pk) won't be enough to make them turn on - that would seriously lower the load impedance on that stage if they did. Adding the series R would guard against that too I should think.


PBE6

#18
Just want to make sure I understand Anderton's square wave fuzz, so here's some analysis and a few questions. Please feel free to add corrections!

The signal path starts with a coupling capacitor that feeds into an inverting amplifier with a gain of -10x. The amplifier is biased at 0 V, halfway between V+ and V- in this dual supply circuit, and the power supply to the opamp is roughly V+ - 0.6 V (or about +8.4 V if using two 9V batteries).

From there, the signal is passed through another coupling cap and fed to an opamp wired as a comparator. The non-inverting input is biased at 0 V by the 100k resistor. The inverting input is attached to a pot that lets you set the reference voltage between about +0.6 V and -0.6 V. The 10k series resistor and the 100k bias resistor form a voltage divider that cuts the signal down to about 91% of its previous value, but that shouldn't adversely impact the "sensitivity" of the circuit provided by the gain stage.

Question here though, the power supply for this second opamp is set at about V- + 0.6 V (or about -8.4 V), which I thought might be a clever way to restrict the comparator swing to about 0.6 V peak to peak, but if that's correct wouldn't the supply be too small to let the opamp operate at all? Does the fact that the signal is inverted factor in at all? I'm definitely missing something obvious here.

EDIT: Aha! Found it. This is a dual opamp, not two singles, and the second opamp only shows the negative supply connection. The comparator will swing between a bit less than +8.4 V and a bit more than -8.4 V. Wow, that's loud! Lol :D

Whatever the case, the comparator will swing between full on and full off depending on the difference between the input and reference voltages. This signal is sent to a final coupling cap and volume pot to cut the signal down to a manageable level.

As far as I can tell, the main advantages of this design over my previous attempt are: (1) that the circuit will respond better (or at least more predictably) to smaller signals; and (2) that the opamp will not be subject to voltages below the negative supply limit which could end up damaging the opamp. Sound about right?

anotherjim

Sound right to me. Anderton has done a few things with the input.
Lowpass filter R8/C8 to improve fundamental tracking (presumably the missing *note invites adjustment of those values)
Inverting preamp so there isn't a x1 signal bypassing that filter.
Low(ish) input impedance  - again reduces the high end harmonics of a passive guitar.

Stupid Simple sounds fine without those precautions - I'm surprised the fundamental is so clear. I'd be curious to see the waveform - or I could get my finger out and breadboard it....