# Anderton Guitar Compressor

Discussion in 'The Projects Forum' started by blah2222, Jan 23, 2013.

1. ### blah2222 Thread Starter Distinguished Member

May 3, 2010
581
38
Hi all,

I've been reading through Craig Anderton's Electronic Projects for Musicians and for the past while I've been focussing on the compressor/limiter.

My two main questions:

1) Shouldn't there be two LEDs in parallel back-to-back to illuminate the negative input cycle?

2) Using the equations solved for below as well as the datasheet for the CLM6000, I have two transcendental equations for the LED current and the resistance of the photocell as they affect each other. I am trying to achieve the Vout vs. Vin that Craig has displayed but it seems that using an iterative calculation to find a steady-state value for a set of given inputs. Iterating til steady-state, I am seeing the output as a function of the square root of the input. Calculations below. Is my methodology overboard for the operation of this circuit or am I missing something/on the right track?

Thanks,
JP

I have attached it's Vout vs. Vin plot and schematic below.

I understand the premise of what the circuit is doing but I would like to check that my understanding of its mechanism is correct.

Disregarding the output opamp (OA1b) and frequency response (important but for ease of calculations, assuming flat response for audio) I have worked out the gain equations for each stage:

$R_{ph} = photocell\ resistance$
$x = %\ turn\ of\ 100K\ compression\ pot$
$V_{wiper} = voltage\ at\ compression\ pot\ wiper$

------------------------------------------------------------------------------------------

$\frac{V_{OA1a}}{V_{in}}= [\frac{-R_{ph}220K}{220K(R_{ph} + 220K)}] = [\frac{-1}{1 + \frac{220K}{R_{ph}}}]$

------------------------------------------------------------------------------------------

$\frac{V_{OA1a} - V_{wiper}}{(1-x)100K} = \frac{V_{wiper}}{x100K} + \frac{V_{wiper}}{47K}$

$\frac{V_{OA1a} - V_{wiper}}{1-x} = \frac{47V_{wiper}+x100V_{wiper}}{x47}$

$x47V_{OA1a} - x47V_{wiper} = 47V_{wiper}-x47V_{wiper}+x100V_{wiper}-x^{2}100V_{wiper}$

$x47V_{OA1a} = 47V_{wiper}+x100V_{wiper}-x^{2}100V_{wiper}$

$x47V_{OA1a} = (47+x100-x^{2}100)V_{wiper}$

$\frac{V_{wiper}}{V_{OA1a}} = [\frac{47}{100}][\frac{x}{0.47 + x -x^{2}}]$

------------------------------------------------------------------------------------------

$\frac{V_{OA2}}{V_{wiper}} = [\frac{-1M}{47K}] = [\frac{-1000}{47}]$

------------------------------------------------------------------------------------------

$I_{led} = \frac{V_{OA2} - V_{led}}{1.5K} = \frac{V_{in}[\frac{-1}{1 + \frac{220K}{R_{ph}}}][\frac{47}{100}][\frac{x}{0.47 + x -x^{2}}][\frac{-1000}{47}] - V_{led}}{1.5K} = \frac{[10][\frac{1}{1 + \frac{220K}{R_{ph}}}][\frac{x}{0.47 + x -x^{2}}]V_{in} - V_{led}}{1.5K}$

File size:
47.5 KB
Views:
181
• ###### Vout vs. Vin.png
File size:
61.3 KB
Views:
18
Last edited: Jan 23, 2013
2. ### GopherT AAC Fanatic!

Nov 23, 2012
8,025
6,785
Have you accounted for brightness of LED vs. current? Definately not linear and greatly deminishing returns of photons as current increases beyond some magical point unique to each LED.

Also, What is the response curve of your LDR to light intensity vs. resistance.

Then you have to understand that the output of compressor circuits actually ampiifies low amplitude signals and attenuates high amplitude signals. Hence the output jumps very fast at the low end (to the new baseline) and then, to use the phrase again, diminishing returns are found from more and more input signal strength.

Your math is impressive but it all comes down to response of hte two optoelectronic components and how that power is transmitted from LED to LDR (parabolic lens with narrow distribution, or point source with wide angle of distribution, ...) and the corresponding energy dispersion equation to go with the transmission.

Historically, dynamic range compressors were used to get more signal though a telephone or radio communications line, the signals were decompressed on the other side to restore fidelity. The original chips were called "Companders" (Compressor expander) where the same chip had both functionalities. They are now used to store (Digitize) analog signals with minimum of bandwidth. Allowing very small intensity signals to be amplified and high volume signals compressed to allow a larger dynamic range to be realized with fewer Analog-to-digital conversion bits. That is, a companded signal with 8 bit ADC can sound as good as a 24 bit ADC without - as long as the compander doesn't add noise to the output after expansion (which is rare).

Metalmann and blah2222 like this.
3. ### blah2222 Thread Starter Distinguished Member

May 3, 2010
581
38

I am strictly going by the CLM6000 octocoupler datasheet of resistance vs. LED current (attached). Pretty non-linear curve. I am assuming that takes into account illumination and power.

I have an iterative calculator in Excel where I have the led current equation (above) and an equation somewhat accurately describing the attached curve and I run it about a thousand times to reach a steady-state value for both resistance and current.

JP

File size:
96.4 KB
Views:
16
4. ### THE_RB AAC Fanatic!

Feb 11, 2008
5,432
1,312

In the age of FETs making a voltage controlled gain amp is very easy, or you could just buy one in an IC.

5. ### blah2222 Thread Starter Distinguished Member

May 3, 2010
581
38
Completely understandable question. I just wanted to try it out.

6. ### GopherT AAC Fanatic!

Nov 23, 2012
8,025
6,785
Guitar effects is a sub-culture of its own and digital chips with any sort of memory or logic chips are all considered taboo. Additionally, the culture believes discrete transistors are better (perceived to sound better/ perform better) than op amps and compressor chips. Also, vintage chips and transistors are more desirable than newer, ultra low distortion or high speed chips. Most favored seem to be the old germanium transistors with gain around 100 to recreate various distortion, wah, fuzz or oscillator effects first designed in the mid-60s and early 1970s.

The logic to this phenomenon makes no sense to engineers but is perfectly normal to musicians trying to create their own unique sound.

7. ### Audioguru Expert

Dec 20, 2007
10,493
1,162
The circuit produces the awful response of the early 70's.
The very slow reaction time of the LDR and the distortion and poor high frequency response of the extremely old opamps.

8. ### blah2222 Thread Starter Distinguished Member

May 3, 2010
581
38
Seems that his Vout vs. Vin produces an exponential form of:

$V_{out} = K[1 - e^{\frac{V_{in}}{\tau}}]$ (much flatter)

$V_{out} = K\sqrt{V_{in}}$

Can anyone figure out how this works?

9. ### THE_RB AAC Fanatic!

Feb 11, 2008
5,432
1,312
Yeah, but the slow reaction time allows the "attack" of the guitar signal to come through before compression hits and might sound really good. Commercial compressor circuits usually have a knob to set the desired attack delay.

To GopherT- thanks, I play guitar too and understand that some old stuff sounds better.

But, a FET acts like a variable resistor D-S depending on what it's gate voltage is. If you use a FET in the bottom of a resistor divider you get a voltage controlled resistor divider, and at audio frequencies it will not change the audio at all apart from the adjustable attenuation.

Basically, the FET as an "adjustable resistor" would take the place of the CdS sensor which is a "light controlled adjustable resistor".

Then the circuit is much simpler, and the FET response is very fast so your other circuitry could dial in the desired attack/decay delays etc without being stuck with the limitations of the slow delays caused by the CdS chemistry.

blah2222 likes this.
10. ### Audioguru Expert

Dec 20, 2007
10,493
1,162
A slow attack causes a guitar or voice to sound like a gun. My local TV station does that to the voices from the anchors who read the news. The first syllable of each paragraph sounds like an explosion which is VERY UN-NATURAL! Maybe you have heard it so many times that you think it is normal.

FM radio stations compress the dynamics of songs a lot but some of them have the song level modulated by the bass level that sounds bad.

11. ### blah2222 Thread Starter Distinguished Member

May 3, 2010
581
38
I have been looking into FET VCAs and will eventually build one, but for now I am trying to work out this opto-compressor.

Can anyone help me explain how Anderton's Vout vs. Vin comes to be so flat? Seems like the analysis has to be iterative...

Thanks,
JP

12. ### Audioguru Expert

Dec 20, 2007
10,493
1,162
A higher input level causes the output of the first opamp to be higher.
When the LED is brighter then the opto-resistor (LDR) resistance is lower which reduces the gain of opamp IC1A since it is its negative feedback. When the level of the input signal drops then the LED is dimmer and the LDR resistance is higher which increases the voltage gain to the signal.

13. ### blah2222 Thread Starter Distinguished Member

May 3, 2010
581
38
Thank you, I understand this on a concept level, but what I am trying to understand is how the all math checks out.

Like, why he chose the max gain to be 220K/220K = 1 for the first opamp and why he chose a gain of 1M/47K for the gain in Ic2 for the LED current. How the LED works when the input is in its negative cycle (shouldn't it be off?)

I am trying to get a grasp for how he designed this, and hoping somehow could shed some light.

14. ### Audioguru Expert

Dec 20, 2007
10,493
1,162
YIKES!
Today is oldies day at the local drug store. I am an oldie so I get 20% off the price of things that are not on sale.
I am going there NOW!

15. ### blah2222 Thread Starter Distinguished Member

May 3, 2010
581
38
haha I'm guessing there was some implied reference in there that I am not getting...

I understand the mechanism by which this circuit works, but the internal intricacies derail me.

16. ### Audioguru Expert

Dec 20, 2007
10,493
1,162
Today IS NOT oldies day so I did not get an oldies discount.
Instead next thursday is oldies day but then the things I want are on sale so I will not get the oldies discount on them. The oldies discount applies only to the things at the normal ripoff price.

What circuit?

17. ### blah2222 Thread Starter Distinguished Member

May 3, 2010
581
38
Funny how they have specific discount days. Shouldn't matter.

This circuit:

18. ### Audioguru Expert

Dec 20, 2007
10,493
1,162
I saw the 45 years old circuit which reminded me about oldies day at the local drug store.

A more modern circuit will sound much better:
1) A modern audio opamp with a much wider frequency response, much lower hiss and much lower distortion. The opamp with the 20pF capacitor between pin 1 and pin 8 in your circuit shows its age because opamps have had that frequency compensation capacitor built-in for at least 40 years. You probably cannot buy that very old opamp anymore.
2) A fast Jfet replacing the LED and very slow opto resistor.
3) A new circuit will not be in a fuzzy Jpeg file type like yours, instead it will be in a very clear PNG file type.

blah2222 likes this.
19. ### thatoneguy AAC Fanatic!

Feb 19, 2009
6,357
727
The LED being off half the time doesn't matter, approach it as a PWM dimmer, the photoresistor takes longer to change resistance than the times the LED isn't lit. The level is determined by the photoresistor "integrating" light over time.

#12 and blah2222 like this.
20. ### blah2222 Thread Starter Distinguished Member

May 3, 2010
581
38
haha I get the oldies reference now. I understand this is an old build but I am still going to put it together because I have the means and it's relatively cheap with a homebrew optocoupler. I will also try the JFET modification as well. I only have modern op-amps so...yeah...

Thanks!

Ah, I see now. Dang, timing is a big player as well. I am just wondering how he decided on the gain resistors for Ic1a and Ic2. Maybe Ic2 gave enough of a boost to give a decent current to the LED...

Thanks,
JP