News:

SMF for DIYStompboxes.com!

Main Menu

Q & D compressor

Started by Mark Hammer, July 26, 2007, 03:51:33 PM

Previous topic - Next topic

Mark Hammer

As the chips get harder to find, I suppose this gets less and less relevant for people, but...

I went back to reading the datasheet/appnotes for the SSM2166 last night on the busride home, and realized a few things about it and the accompanying circuit at Jack Orman's site.  http://www.muzique.com/ssm2166.gif

1) Even though the appnotes indicate use for a guitar compressor AND it works in that fashion, the amount of gain in this thing is really and truly configured for microphones.  That has several implications I'll get to below, but one of them is the impact on the envelope detector.

2) I finally "got" the rotation point thing, and realized that the audible effects of adjusting compression amount may well be inadvertently negated by how this parameter (rotation point) is set.  There is fixed compression ratio (essentially hard limiting) above the rotation point.  The maximum rotation point (with the resistance between pins 11 and 14 at 1k) is around 500mv, which is high for a voice mic, but not for a guitar pickup.  Further adjustment of the rotation point (by increasing the resistance) is at amplitudes below that.  Your compression ratio adjustment only affects signal up to that rotation point value after which its all limiting.  So, if you have your rotation point set to 100mv (R=17k), it doesn't take much strumming to hit the hard limiting point.  Your compression amount will appear to have an influence, simply because upping compression ratio also appears to adjust gain upwards, but that change in compression ratio is actually influencing only a small part of the signal.  I suppose there is advantage to introducing some hard limiting, but if the circuit is being used exclusively with guitar, then you probably want to have as high a rotation point as feasible so that there is some dynamics when the compression ratio is set for subtler compression.

3) The gain is distributed throughout the chip.  As the appnotes say, you can get up to about 20db from the op-amp stage upfront in the chip, and up to an additional 60db after the envelope detection stage.  Pumping things up by 20db is a great idea when the source is a dynamic mic with a -58db output level.  When the signal source is a guitar putting out 100mv without any trouble, you can scale back the gain requirements...big time.  Perhaps more importantly, the envelope detection circuitry is not insensitive to absolute level, and if the input signal is hot, hot, hot, then chances are the degree of sensitivity to nuance that you want from the envelope detector isn't going to be there.

So...

Step 1: Make the pin 11 to pin 14 (V+) resistance 1k, or certainly no more than 2k2 or 3k3, so as to preserve adjustability of compression.  You could probably wire up a 1k and 10k resistor in series and use a SPST toggle to shunt or unshunt the 10k resistor for comp+limit vs comp-only modes.  Certainly, you don't need to be able to tweak the rotation point down to 50mv, so the need for a pot is minimal.  If you do opt for such a system, then consider the possibility of ganging Avg cap (pin 8) value to the switch via another set of contacts.  The principle is that if you're going to have hard limiting, you want a faster recovery time so that peak limiting gets out of the way quickly for greater "transparency".  So, bigger pin 11 to V+ resistance = smaller C4 value.

Step 2: Dump any and all gain up to the point of the envelope detector.  So, replace R1 with a wire link, and skip R2 and C2.  In tandem with raising the rotation point to max, this will permit a wider array of audible differences in compression amount to be achieved.

Step 3: The input impedance of the chip is more than high enough for a voice mic, but very iffy for a high-impedance signal source like a guitar.  Since you certainly don't want any gain to the signal, what you really want here is a simple FET buffer stage with no gain.  There are plenty of examples at geofex and www.muzique.com.

Step 4:  You'll need something like a 10k terminating resistor at the free end of C10.  What is shown in the schematic is predicated on it being integrated within a larger "control strip" for a mic, not a stompbox with a switch that would leave C10 just hanging there.

Step 5:  Based on the appnotes, the pin 10 (Rcomp) resistance doesn't really do much if it descends below 17k. but does appear to be amenable to audible differences in compression above the 25k shown.  Consequently, insert a 15k fixed resistor in series with a 50k pot, rather than the mere 25k pot shown.

Step 6: There can be an enormous and almost overabundant amount of gain in this thing (remember, it's boosting signals that may be as puny as 10mv).  As it happens, turning the compression up sets the default gain higher.  As it also happens, more compression involves one resistance to ground getting larger, while less gain involves another resistance to ground getting smaller.  You can probably see where I'm going with this.  It may be possible to use a single pot to simultaneously adjust gain and compression if you tie the wiper to ground and use one leg for the compression adjust and the other for gain adjust.  I suspect you might have to experiment and stick a fixed resistor in parallel with the gain-adjust leg, but in principle it could work nicely and let you make big adjustments in compression amount without having to futz around with gain adjustment too much.

There.  Opinions?

snoof

#1
very nicely done Mark.  I'm gonna be building this soon, and I'll def use this info!  Regarding step 3, would a source follower work here?

Mark Hammer

As long as its high-in/low-out and has a unity gain, you should be alright.  Bipolar inputs or op-amp buffer will work fine too.

caress

this is very useful information indeed!  i made up two q&d compressors and was blown away by the amount of gain and difficulty of finding an adequate compression setting.  this thing is noisy as hell, too!  simply from having such a ridiculous amount of gain...i hope.    :-\

i'm using this on keyboards too, which already have a hotter output than guitar anyways...i think i'm going to try these adjustments this weekend.  thanks mark!

Kleber AG

#4
Thank you Mark for writing it here.

I've done similar things based on the datasheet but a long time ago, and yes I did that mod on the input gain stage at the front of the circuit, then I thought that converting this gain stage to a "buffer" would do both things: lower the gain at input and rise the input Z to the circuit.

Is that correct? May we assume that just converting the first gain stage to a buffer also give it hi Z input?

Regards
(don't have the circuit or the datadsheet here in my job, and don't remember the values for that part of the circuit, how is the buffer biased?)

Kleber AG


Mark Hammer

Okay, I jumpered the op-amp pins (5 and 6) so that the first stage is a unity gain buffer.  I set the "rotation" resistance to 2k2 so that hard limiting would only begin at the top of peaks.  I installed a JFET buffer in front of pin 7 from Jack Orman's nice little paper on designing input buffers ( http://www.muzique.com/lab/buffers.htm ). 

How does it sound?  Sounds cleaner and brighter, and the compression control appears to have a bit greater influence, as predicted.  I also found that with the rotation point set higher, the switch-selectable Avg Cap that I have on mine (2.2uf vs 10uf) produced an audible difference in feel, which it didn't seem to previously.  But....it seems I need to have the downward expansion threshold set to max if I don't want to experience much quick fadeout. 

My sense is that maybe reducing the gain on the op-amp was counterproductive.  Why?  Here's my reasoning.  The envelope signal is tapped from the op-amp stage, and it is quite conceivable that the gain in that stage assists the trail of a sustained note in remaining above gating threshold long enough to have a lengthy decay before noise-gated cut-out.  The original intent of making that stage unity gain was to bring the overall gain of the pedal down to earth. Now I realize the gain needs to be not only reduced, but redistributed.

So, what's the solution?  Perhaps the solution is to:

a) Keep the gain in the first stage for max envelope signal.
b) Use a trimpot to set a fixed gain on pin 2  (e.g., 1k fixed resistor in series with 5k trimpot) instead of treating pin 2 as the volume pot..
c) Replace a fixed terminating resistor on the Pin 13 output with a true volume pot (e.g., a 10k log pot)

Now, what the "ideal" gain of the built-in op-amp ought to be is another matter.  All I know is that unity-gain did not seem to be sufficient to have a noise-gate threshold setting that did NOT result in audible gating/expansion.  When I had the op-amp set for a gain of 2, as in the stock circuit, there was a portion of the gate-threshold range where there was no audible downward expansion, just gate-free compression.  Personally, I would like that back.

The JFET buffer and the change in rotation point ARE good changes for guitar.  If I can nail the ideal amount of adjustability for downward expansion, and a realistic maximum output level, this'll be a great unit.