Author Topic: DiSCO - Dirty compressor and overdrive  (Read 24677 times)

samhay

DiSCO - Dirty compressor and overdrive
« on: March 13, 2015, 12:57:06 PM »
The recent 'Tube power amp simulation' thread got me thinking about phase splitters, output transformer-like diffamps and envelope-controlled clipping threasholds.
http://www.diystompboxes.com/smfforum/index.php?topic=110269.0

Eventually, I found a place for all this on my breadboard.
It is a work in progress, but works as expected and gives quite a nice mild-to-moderate overdrive, with the option of some fairly substantial not-too-distorted compression. Not sure that it sounds like a power amp, so I figured I would start a new thread. Will make a recording over the weekend and can provide an explanation of what is going on if it is not obvious.





I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

tca

Re: DiSCO - Dirty compressor and overdrive
« Reply #1 on: March 13, 2015, 01:03:44 PM »
Looks nice.

Is there any sims? Any pics of the output wave form?
« Last Edit: March 13, 2015, 06:54:39 PM by tca »
"The future is here, it's just not evenly distributed yet." -- William Gibson

samhay

Re: DiSCO - Dirty compressor and overdrive
« Reply #2 on: March 13, 2015, 01:23:38 PM »
Yes, I have an LTspice sim, but not at hand - will post some oscilloscope traces when I get the chance.
It shows fairly soft clipping with predominantly odd order harmonics if the symmetry pot is maxed. As the symmetry
 pot is wound back, the clipping becomes more pronounced and asymmetric and even order harmonics grow in.
« Last Edit: March 13, 2015, 01:25:56 PM by samhay »
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

deadastronaut

Re: DiSCO - Dirty compressor and overdrive
« Reply #3 on: March 13, 2015, 01:33:25 PM »
cool...look forward to hearing it.. 8)
http://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

tca

Re: DiSCO - Dirty compressor and overdrive
« Reply #4 on: March 13, 2015, 06:32:49 PM »
The recent 'Tube power amp simulation' thread got me thinking about phase splitters, output transformer-like diffamps and envelope-controlled clipping threasholds.
I always think about these  'Tube power amps simulation' using 3 legged devices (BJTs or Mosfets) not ampops... the difficult part for me is how to dynamically control the bias point as a function of the input amplitude signal...

P.S.
Going to try and do some sims...
« Last Edit: March 13, 2015, 07:19:07 PM by tca »
"The future is here, it's just not evenly distributed yet." -- William Gibson

ashcat_lt

Re: DiSCO - Dirty compressor and overdrive
« Reply #5 on: March 13, 2015, 07:42:38 PM »
I'd imagine you could run the output of the envelope detector (IC1B) to one or more of the VB points instead of the junction between the diodes to accomplish a floating bias point.  I think it would do much the same thing as it's doing now, but I haven't looked that far into it.

I personally think this looks pretty cool.  I would put D6 in series with V+ so that it actually protects against reverse polarity rather than fighting to the death with power supply, and  leaving the circuit unprotected after it loses.  I can't imagine that diode drop will make much difference in a dirt box like this, but you could use a shottky to keep that minimal.

sajy_ho

Re: DiSCO - Dirty compressor and overdrive
« Reply #6 on: March 14, 2015, 03:48:41 AM »
Looks nice, I always loved opamps over JFETs because they are way more predictable, Can't wait for a sound demo with all different settings :icon_lol:
Also, how about asymmetrical set of diodes for the feedback loop of the first opamp, that will sound more tube-ish, am I right?
« Last Edit: March 14, 2015, 03:53:20 AM by sajy_ho »
Life is too short for being regretful about it.

samhay

Re: DiSCO - Dirty compressor and overdrive
« Reply #7 on: March 14, 2015, 06:47:44 AM »
I always think about these  'Tube power amps simulation' using 3 legged devices (BJTs or Mosfets) not ampops... the difficult part for me is how to dynamically control the bias point as a function of the input amplitude signal...

P.S.
Going to try and do some sims...

Perhaps the easiest way would be to use a BJT phase splitter feeding 2 MOSFETS (they are suposed to be pentode-like) with their gate bias tied to an envelope detector. I have thought about getting this to work, but it is a little fiddly as you can't have much swing in the bias voltage before it is either off or on, and you also need to match 2 MOSFETS...
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

samhay

Re: DiSCO - Dirty compressor and overdrive
« Reply #8 on: March 14, 2015, 06:52:39 AM »
I'd imagine you could run the output of the envelope detector (IC1B) to one or more of the VB points instead of the junction between the diodes to accomplish a floating bias point.  I think it would do much the same thing as it's doing now, but I haven't looked that far into it.

I personally think this looks pretty cool.  I would put D6 in series with V+ so that it actually protects against reverse polarity rather than fighting to the death with power supply, and  leaving the circuit unprotected after it loses.  I can't imagine that diode drop will make much difference in a dirt box like this, but you could use a shottky to keep that minimal.

Thanks. The issue I have with playing with the op-amp bias is that you can quite quickly run out of headroom - the envelope can swing 1-2 V below Vb in this circuit - and end up clipping the rails. This is a good approach if you are playing with a Rat, but not so much if you don't care for op-amp clipping.

The schematic is a bit of a cut and paste job. If I build it, I will use a 1N5817 in series with V+. I will update the schematic at some point to show this, and to also add an LED to monitor the envelope voltage (i.e. sag).
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

samhay

Re: DiSCO - Dirty compressor and overdrive
« Reply #9 on: March 14, 2015, 06:57:46 AM »
Looks nice, I always loved opamps over JFETs because they are way more predictable, Can't wait for a sound demo with all different settings :icon_lol:
Also, how about asymmetrical set of diodes for the feedback loop of the first opamp, that will sound more tube-ish, am I right?

Thanks. Designing with op-amps can certainly be a lot more predictable than with FETS, and there is usually less issue with other people trying to get it to work too. I also like the simplicity in the biasing of op-amps vs discrete transistors - you can save a lot of coupling caps using op-amps.

You could certainly add just about any combination of diodes you like to the the first op-amp, and the usual switchable options can be had. I kept it symmetrical because I was thinking about power amp distortion at the time and because I wanted the focus to be on the clipping from D3 and D4. Also, the symmetry pot lets you adjust the symmetry of the overall clipping from very asymmetric (min symmetry) to very symmetrical (max symmetry).
« Last Edit: March 14, 2015, 07:01:00 AM by samhay »
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

ashcat_lt

Re: DiSCO - Dirty compressor and overdrive
« Reply #10 on: March 14, 2015, 11:29:06 AM »
Thanks. The issue I have with playing with the op-amp bias is that you can quite quickly run out of headroom - the envelope can swing 1-2 V below Vb in this circuit - and end up clipping the rails. This is a good approach if you are playing with a Rat, but not so much if you don't care for op-amp clipping.
Which almost leads me back to the comment I didn't actually post about using an lm324 here.  With that many components hanging off the opamps, it could get ugly trying to use a quad opamp, but the lm324 will allow you to swing quite a bit closer to the bottom rail than the tl07x and might be just enough.  I tend to think that if the signal is loud enough to slam into the rails even with the diodes in the feedback path, any opamp clipping is likely to be pretty well lost in all the other distortion coming out of it, especially if it's asymmetrical from hitting the bottom rail and not the top, but I know that many people just won't tolerate it.  Higher rail voltage would obviate the issue, of course, but...

Ripdivot

Re: DiSCO - Dirty compressor and overdrive
« Reply #11 on: March 14, 2015, 11:31:21 AM »
Looks very interesting, can't wait to hear it!

ashcat_lt

Re: DiSCO - Dirty compressor and overdrive
« Reply #12 on: March 14, 2015, 12:01:50 PM »
K.  Quick question.  I know you said it's not tested or verified or anything, but I'm wondering about the time constants that you've chosen in the detector circuit.  Best I can tell, most of the integration there comes from the Attack pot (in series with R5) and C5.  By my calcs, that will give a range of cutoffs from about 0.7 to around 30Hz.  Pretty sure the 10n is too big to touch anything that passes that, just there for RF rejection etc.  My question is, is that range based on some real-world numbers for actual rectifier sag, or just eyeball numbers to be tuned by ear?  Is there someplace or some way of figuring the approximate time constants for typical amps?  Tubes are pretty opaque to me ATM.  Ironic I suppose, since they're usually a lot easier to see through than an opamp.   :icon_wink:

Edit - I guess while we're on it, what about the magnitude of the sag?  How far (maybe in terms of ratio or percentage of total power supply voltage) do the real amps actually droop when they really get cranking? 
« Last Edit: March 14, 2015, 02:33:22 PM by ashcat_lt »

sajy_ho

Re: DiSCO - Dirty compressor and overdrive
« Reply #13 on: March 14, 2015, 03:43:35 PM »
You could certainly add just about any combination of diodes you like to the the first op-amp, and the usual switchable options can be had. I kept it symmetrical because I was thinking about power amp distortion at the time and because I wanted the focus to be on the clipping from D3 and D4. Also, the symmetry pot lets you adjust the symmetry of the overall clipping from very asymmetric (min symmetry) to very symmetrical (max symmetry).
Ohhh sorry for my stupidity, there is a symmetry control right there :icon_mrgreen:
How about running the circuit on higher voltages to get more dynamic range?
Life is too short for being regretful about it.

samhay

Re: DiSCO - Dirty compressor and overdrive
« Reply #14 on: March 14, 2015, 05:08:02 PM »
Some oscilloscope traces measured with a 200 Hz sine wave of ~ 100 mV (top) and 1V (bottom) peak-to-peak amplitude.
All measured with gain and comp at max and symmetry either max (left) or min (right).

With the comp turned at least part way, it can take at least 2V peak-to-peak before you can see any obvious clipping from the op-amps, so I don't think there is any need for a larger voltage supply and/or rail-to-rail op-amps.  

'View image' for a larger version.

« Last Edit: March 14, 2015, 05:21:55 PM by samhay »
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

samhay

Re: DiSCO - Dirty compressor and overdrive
« Reply #15 on: March 14, 2015, 05:37:01 PM »
K.  Quick question.  I know you said it's not tested or verified or anything, but I'm wondering about the time constants that you've chosen in the detector circuit.  Best I can tell, most of the integration there comes from the Attack pot (in series with R5) and C5.  By my calcs, that will give a range of cutoffs from about 0.7 to around 30Hz.  Pretty sure the 10n is too big to touch anything that passes that, just there for RF rejection etc.  My question is, is that range based on some real-world numbers for actual rectifier sag, or just eyeball numbers to be tuned by ear?  Is there someplace or some way of figuring the approximate time constants for typical amps?  Tubes are pretty opaque to me ATM.  Ironic I suppose, since they're usually a lot easier to see through than an opamp.   :icon_wink:

Edit - I guess while we're on it, what about the magnitude of the sag?  How far (maybe in terms of ratio or percentage of total power supply voltage) do the real amps actually droop when they really get cranking? 

It's tested in the sense that it is sitting on my breadboard and works as drawn.

The envelope attack and decay setting are largely set, as you said, by C5 and the attack pot + 2k2 resistor (attack) and R8 (decay). The 10n cap across the comp pot does smooth the envelope significantly too. I was thinking of using an NE5532 for IC2, so might drop the 2k2 resistor to get faster attack settings, but having tried this, I can't hear much difference. These values are not set in stone, but I wouldn't want to make R8 much bigger as this will start to cause issues with how much comp one can dial in.
It's a good question about typical amp sag behaviour. I have no idea, and just chose time constants based on slower compressors and then fiddled until it sounded ok.

With a bridge humbucker and the gain, comp and symmetry set to max, the sag can swing from 4.5V down to about 2.1V, at which point it is probably hitting the op-amp rail. I don't think this is too much of an issue (hitting the rail) as you certainly don't need any more squish at this stage. It does do some funky stuff to the clipping, giving rise to crossover-like distortion, but this doesn't sound too bad.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

tca

Re: DiSCO - Dirty compressor and overdrive
« Reply #16 on: March 14, 2015, 08:00:05 PM »
Perhaps the easiest way would be to use a BJT phase splitter feeding 2 MOSFETS (they are suposed to be pentode-like)...
You can simply turn it into triode-like ;) using a Schade bias (by adding a resistor). This will not work, of course, for all mosfets for reasonable values of current. It depends on the characteristics of a given device.

... gate bias tied to an envelope detector. I have thought about getting this to work, but it is a little fiddly as you can't have much swing in the bias voltage before it is either off or on, and you also need to match 2 MOSFETS...
Yes, setting the bias voltage is tricky but if you have a way of tackling the symmetry of the positive/negative  part of the signal the matching is not needed. Setting the bias with a peak detector sounds feasible, but I always take this as a artificial way of doing it -- unelegantly way, I mean.

My approach to this puzzle has always been to build an real class AB amplifier where sag naturally occurs. Power source sag will also introduce varying bias and crossover distortion.

For mosfets this is a challenging puzzle, you need current to get the the device working in a "good  distortion region" but also not to much of it because you need a class AB amp not class A. Still tinkering...
« Last Edit: March 14, 2015, 08:06:39 PM by tca »
"The future is here, it's just not evenly distributed yet." -- William Gibson

ashcat_lt

Re: DiSCO - Dirty compressor and overdrive
« Reply #17 on: March 14, 2015, 08:44:44 PM »
This pretty much has to produce all crossover distortion.  The TS-style clipper at the front is basically the kind of distortion you get when it overlaps at the crossover region, and the other thing must be creating gaps in the crossover.  Theoretically you could dial it in to where they undo each other, but where's the fun in that?

Is this where the sag is on real tube amp?  I mean, does the dropping supply voltage not start to clip off the top of the waveform?

Edit - cause I thought about it a bit more and nobody has replied yet -
Correct me if I'm wrong, but what I see this thing doing when the envelope starts actually moving is basically just shifting soft-clipped waveform up and down with respect to the gap at the "zero crossings".  That will probably change the harmonic content, but it won't change the dynamic range unless it manages to slam the bottom of the wave into the rail of the differential amp.

Like I said, IDK about real amps, but I always thought sag was more of a "walls closing in" type thing, maybe more like a dying battery on fuzz box.
« Last Edit: March 14, 2015, 08:59:07 PM by ashcat_lt »

samhay

Re: DiSCO - Dirty compressor and overdrive
« Reply #18 on: March 15, 2015, 10:45:12 AM »
This is a LTspice sim of the circuit with the gain and comp at max and the attack pot set to 10k. The input is 100mV at 200 Hz. I have taken the output from IC2B and the envelope detector, hence they are swinging around 4.5V.

I think you can see that there is some compression happening?

In any case, this circuit was not designed to emulate a tube power amp - we'll leave that to the other thread. This is a dirty (i.e mildly distorting) compressor and overdrive that might just sound a little bit like a power amp somewhere.



« Last Edit: March 15, 2015, 10:47:24 AM by samhay »
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

ashcat_lt

Re: DiSCO - Dirty compressor and overdrive
« Reply #19 on: March 15, 2015, 11:20:49 AM »
It certainly is compressing quite nicely.  I think I know where I was wrong last night, but is there any way you can zoom in on that last shot so we can see a few individual cycles when it's squished?