1-Day Compressor Build Log

Started by Transmogrifox, February 21, 2015, 05:56:14 PM

Previous topic - Next topic

Transmogrifox

Decided I would brew up a compressor for fun today.  I did some simulations and listened and I'm ready to build.

The circuit was inspired by the EA tremolo -- you will see some similarity to the rEAgenerated tremolo.  The main thing was to get the gain up and make a useful envelope detector with minimal extra parts.  I don't know if I really did minimal, but it's pretty simple anyway.

Super simple:
Compress
Output Level volume control

Usually I set a compressor to one setting and don't mess with things like attack, release, threshold, etc.  I figure I'll tweak hard-wired values, stick it into a box with 2 knobs and bammo.

Here's the schematic in case anybody else wants to build or shuffle away for a rainy day when there's nothing better to do than build yet-another-compressor ;).

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.

Perrow

Good luck on your build, looks simplish enough :)
My stompbox wiki -> http://rumbust.net

Keep this site live and ad free, donate a dollar or twenty (and add this link to your sig)

Transmogrifox

Good news is she works.  Got all circuitry done with some minor "duh" moments (like forgetting to connect ground from jack to board).  Layout turned out ok for flying by the seat of my pants. 

It won't be a 1-day project due to work needed to complete the enclosure and of course the inevitable mods ;)

My first gripe is I was dumb biasing the transistor through a 250k pot.  Too much crackle -- maybe I can copy Zvex and label it "crackle ok".  I'm going to live with it, but this is something that could be improved if someone else shows interest in building this.

The other is subtle:   I really liked the sound in simulating a .wav file with the treble punch from the 4.7u value for C1, but in the real thing it's too much treble boost (1/[2*pi*R*C] gives a good indication how the initial attack sounds).  The idea was I did want a sharp attack, but this is a bit too sharp.  I think I will be experimenting with this to see if I can get it tuned in where I like.

Overall it makes a really nice booster with mild compression.  Seems to bring the sound forward, so this actually has some promise to fill a certain niche instead of being just another compressor.

I'll post pics and audio samples when I get there.  Fun little project.
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.

midwayfair

Use 22u for the 4.7 and you'll make it full range.

Don't forget that the 47k on the mosfet increases the attack. Right now it's 57ms and I'm not sure if you intended it to be 10mS from the 10k attack resistor.
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

Transmogrifox

#4
Actually neither components have a huge effect on attack time during lower-level "linear" operation.  Once the FET is being driven fully on, then the 10k begins to have a significant effect on attack time.

The main component controlling attack time is actually R14 (2.7k).  This sets the current gain on the rectification.  More gain means faster attack since there is higher magnitude current per volt at the FET gate.  Once the signal gets large enough to start fully turning on the FET, then the 10k resistor begins to play a heavier role in attack time.

As strange as it may sound, making the 47k smaller would actually slow the attack time because it would cause more of the current in the FET to be diverted away from the envelope detector.

I tweaked components R14 and the R11 in LTSpice until I saw an attack characteristic that compared somewhat close to a software compressor I coded a while back since I liked its attack and release characteristics a lot for guitar. 

An attack characteristic like this is hard to measure in ms according to a typical interpretation of attack time (10 dB / Atk ms).

I ended up changing the 4.7u to 47u and I think I like it better.  

The idea with the 4.7u is this is basically a variable cut-off high-pass filter.  As you play harder, compression sets in.  As compression sets in the effective AC impedance increases, bringing the pass-frequency range much lower, tending toward effective full range at max compression.

As a result it has a very percussive attack.  I simulated using a .wav demo file which was a little darker than my real setup, so I was trying to "liven" it up a bit and went overboard.  In reality this was too much.

47u still has a bit of bass cut at max gain (150 Hz), but it's effectively a short circuit at all frequencies of interest once compression sets in.  10u sets a starting cut-off of approximately 700 ish Hz for a much brighter attack, but 22u as you suggested might be a good balance between the two.

I'll probably tweak this value to something smaller if I end up wanting a little more bite.

Either way, that variable cut-off is one of the unique things about using this type of gain stage in a compressor.

Thanks for input.  
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.

Transmogrifox

#5
Maybe this belongs in the pictures forum, but here it is anyway.

The thing I think turned out the coolest is I used a bi-color Red/Green LED.  On-state turns green while compression gain reduction activates the red LED.  When I play, it glows between green through amber, orange and quite red at max attack.  This really completes the burning fuse illusion where I put the LED in the center of the bomb fuse spark. 

I'll have to admit I probably had more fun trying stuff with LED's and bypass switching circuitry than the compressor itself.  I'll post an "as-built" when I can scan it or otherwise organize/record it ;)






A few things left to tweak:
I got the Amp/Inst jacks wired backward.  Input is output and vice versa.

Compressor pot range doesn't seem to show any compression until about 70%.  Probably I should put a large-ish resistor to ground here to limit minimum input so compression control range is useful over the full turn of the pot.

Re-Connect DC power connector.  The connector type requires landing the wires after it is installed into the box.

I have some more refining to do on my "overlay" method.  The concept works pretty well but I need to put more time into prep.  Basically I printed the design onto paper, cut to size, then sprayed the box down with a white epoxy enamel.  Stuck the paper on the wet enamel and scooted it into place, let dry.

Afterward I gave it a few coats of epoxy clear coat.  At that point the paper wanted to lift -- I think the clear coat bled through and softened up the enamel on the backside.

My attempts to keep flattening the paper caused me to gum it up and make some parts of it a bit smudgy.  

It was a quick fun build anyway.  The lack of creativity in the graphic and the generic name "ACME COMPRESSOR" is a pretty quickly done choice just to test a construction method I haven't tried before.

More than 1-day, but that's the way these things go.

I'll try to get some audio stuff to show what it can do.  Compressors are pretty subtle so who knows what demos will do except demonstrate it doesn't sound like crap ;).
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.

midwayfair

What is Wiley pointing at me?!

Thanks for the breakdown on the attack. I'm used to calculating the attack as a time constant function and hadn't considered that the current gain affects it. (which is actually important in a compressor I designed that's not dissimilar to yours with the variable FET).

Re: not getting a lot of compression until the pot is way up, you can lower R10 (I actually go VERY low on that in the Bearhug) or make D2 a Schottky diode. You'll be able to get positively silly amounts of compression if you do that. Or just use a C taper pot if you have it. You might want the limiting resistor anyway, but if you ever decide to stick your compressor after a line level signal, a bass with hot pickups, or a boosted guitar signal, you might want the lower range, so limiting it to the 30% of the pot you found to be useful might make it only good for one instrument. Or maybe someone else who builds it might find that useful even if you won't. :)
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776effects.com!

Ben N

Quote from: midwayfair on February 23, 2015, 10:54:49 AM
What is Wiley pointing at me?!
Hey, Jon, you're an attractive enough guy, and there's probably a lot you don't know about Wiley. ;)
  • SUPPORTER

Transmogrifox

#8
Quote from: midwayfair on February 23, 2015, 10:54:49 AM
What is Wiley pointing at me?!

My wife gave me grief about that.  I feared the spatial relationship would be the cause of such comments. The big bomb was intended to obscure it enough there but I guess I thought wrong.  At least I didn't add two bombs side-by-side one on each side below the switch.  Really I didn't mean it that way (but I can't say I'm immune to the adolescent humor in it all the same).

@Jon -- BTW I really like what I see in the demos you have posted of the Bearhug compressor and the schematic shows a well-conceived design based on some good design references.  That's my way of saying I'm honored to have you offering comments in this thread :)

Based on your demos, the Bearhug hits the mark on the sound I'm going for, and I probably would have built that one if the end goal was only to have a compressor that suits my needs (would have avoided ~6 hours design and simulation effort).  The end goal was really to adapt the EA tremolo gain element into a compressor (at least the concept) :).  I'm also on a discrete components kick right now, so I'm exploring the possibilities for FX without IC's.   No particular reason, it's just fun.

As for the envelope detector, I started with what was in the Bearhug, but replaced the use of the op amp with a BJT.  Then it evolved to -- why am I AC decoupling and then pulling the JFET gain down negative to ground?  There are lots of parts I can eliminate.

So I referenced the JFET to +9V and also decided the BJT is already a rectifier.  The problem is when a BJT saturates it loads the driving stage with low impedance causing distortion, so I changed to to a MOSFET to isolate the rectification action from the audio signal path.

This is where the envelope detector design diverged fundamentally from the designs from which I inherited these ideas.  

Now I have a rectifier stage in which the attack time is set by the gain on the rectifier (MOSfET) stage.  Since there isn't much headroom here, the MOSFET will start clipping and then there is some further filtering wanted -- in comes the 10k.  This essentially limits the attack once the FET operation is no longer a current source.  When the MOSFET is totally on, then attack is set by the 2.7k which is too fast for me.  The 10k slows it down a bit in this state, but also marks a change in how attack time behaves making it something of a 2-stage attack.

The blocking diode is only to maintain isolation between the 47k resistor and the release time set by the 220k.  The 47k is set to divert current away from the envelope detector to somewhat reduce the gain (sort of like a ratio control).  

For example "X" volts at the gate translates to "Y" current at the drain, and this sets the attack time.  The gain, or "ratio" is set by the 47k parallel the 220k pullup. With a little clever work I could probably eliminate the 47k resistor and diode entirely just by rebalancing the R's and C's to get the right attack and release all within this area.  For a hard-set, hardwired effect this would be fine, but as designed there is not so much interdependence on release and ratio.  By eliminating 47k and diode, then release time and ratio become intimately related.

In LTSpice simulation I did some messing around with R10 and found below 100 ohms it doesn't make much difference to the gain of the circuit.  The BJT pretty much limits the max gain available.  You have the advantage of an op amp in the Bearhug, so that gives you this lever back for increasing compression.  Having some kind of resistor value there helps to guarantee a limit on the high-pass cuttoff between the blocking capacitor on FET drain.  There is so much variability in a FET I didn't want to depend on it, so I put in a resistor value that is material compared to on-state resistance on the JFET.

I think you have a good point about instruments with hotter outputs, or driving this from other pedals with hotter outputs.  I think I should still reign in a more useful range because setting the input to 100% attenuation is pretty meaningless.  I could set the max attenuation equal to the compression stage's max gain so with compression set to '0' and output volume set to max, you have a unity gain amplifier.  Then as you turn up "compression" you have a booster morphing into compressor as you approach 1/2 turn of the pot.

It seems the unity gain point is somewhere between 30% to 50% drive on the compression pot.  If I put a 100k in series to ground with the 250k input pot then it will probably be about where I want it.

The main inspiration was the EA Tremolo.  I have for a long time wanted to make a compressor out of the EA gain topology so I did and it sounds just fine ;).


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.

Transmogrifox

As for increasing gain on this thing, I just had an idea:
http://www.ti.com/lit/ds/symlink/tlv431.pdf

These TLV431x regulators are practically a "super transistor", as in, a 3-terminal device with much higher gain than one would get from any single transistor package.

I use these a lot in designs at work for things like switching power supply feedback error amplifiers, comparator applications, etc.  They're a handy tool, and I was just thinking there's no reason they would be bad in an audio application.  Noise performance isn't amazing, but the only way to find out if it's bad news in this application is to try it.

Initial thoughts are 200 nV /rootHz --> limit BW to 8 kHz, noise voltage = 18 uV
Then max gain will probably go to about 215, so output noise P-P = 3.8 mV

This seems perfectly acceptable if not serving a high gain device following it.  Resistor noise and noise from the bias network may be greater.  Maybe I'll try this.
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.

Jdansti

#10
Nice job!

Re: Overlays with epoxy on top, I've found that photo paper works great. You can glue it on or use self-adhesive photo paper. I've found that this glue works great:

http://m.homedepot.com/p/Loctite-1-75-fl-oz-Go2-Glue-1624417/203437879

I use an injet printer and give the overlay a coat of clear lacquer (let it dry) after I glue it and before applying the epoxy.

Edit: it sounds like you sprayed some type of epoxy on it. This pour on epoxy works great:

http://www.amazon.com/Environmental-Technology-16-Ounce-Pour-On-Finish/dp/B000LNS9CW
  • SUPPORTER
R.G. Keene: EXPECT there to be errors, and defeat them...

Transmogrifox

@Jdansti -- thanks for recommendation of materials.  I like that idea of using a pour-on epoxy.  Reduces the fumes and probably leaves a really durable finish.

Since it's cold here I sprayed it on outside, but had to bring it inside to dry, and the fumes are still pretty bad even though the spraying was outside.
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.

krister

Are any sound samples of this compressor build available yet?
Gear Reviews and Guitar Related Information > http://krispicks.com

Transmogrifox

No sound samples available yet.

I haven't had a chance to record anything yet.  This is something I want to do as soon as I carve out some time to get it done.
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.

Transmogrifox

#14
Here's a little noodling around with it.  I have another video recorded with the dirty channel but still need to upload it.

http://youtu.be/Yi3zn_xmVtM

http://youtu.be/Pa4DKzHJhHk

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.

duck_arse

#15
nothing
You hold the small basket while I strain the gnat.

Transmogrifox

#16
I think I got it figured out now.
...At least the video displays properly for me now...
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.

krister

Thanks for posting the clips! This pedal sounds more like a booster than a typical guitar compressor pedal to my ears. I liked the sound into the dirty channel. The clean channel not so much.
Gear Reviews and Guitar Related Information > http://krispicks.com

Jdansti

I wonder if the camera is providing its own audio compression making it difficult to discern the compression caused by the pedal.
  • SUPPORTER
R.G. Keene: EXPECT there to be errors, and defeat them...

Transmogrifox

Quote from: Jdansti on February 25, 2015, 03:04:15 PM
I wonder if the camera is providing its own audio compression making it difficult to discern the compression caused by the pedal.
This is exactly correct.  After playing it back, it all sounds basically compressed with the camera's built-in compression.  I'll try some clips when I have time recording direct into my PC to see if I can capture the A/B comparison better.

All the same, it certainly is a very mild compression, but it "sweetens" the tone and improves the sustain to a point where I definitely know it's there.  It probably is much better applied to situations where you would use a booster because it doesn't do the strong compression.

My circuit simulations show an open loop gain of approximately 30 to 40.  Compare this to many guitar compressors with open loop gain up to 200, max compression on this unit is comparable to 25% on the typical guitar effect compressor.
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.