Simplest OpAmp optocompressor

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

NovaPA

Well-known member
Joined
Apr 21, 2013
Messages
106
Location
Klaipeda, Lithuania
A little preface: back in 2017 (8 years ago, hard to believe!), I designed this circuit. Well—"designed" might be a stretch, as it was based on the well-known and popular "optical compressor" structure using an op-amp and a photoresistor.
Essentially, what I developed back then was a variation featuring a transistor buffer and an ultra-bright LED to exert more "influence" on the photoresistor.
Recently, I saw someone publish a very similar circuit (most likely based on the same source), and it inspired me to finally refine my own design.
And so, after 8 years, I finally built and tested it—and it worked right away!
The circuit is very simple. It uses a dual operational amplifier, which can be a TL072, NE5532, or any other op-amp with the same pinout. Power - bilopar +-15V

optocomp scheme.GIF

The first op-amp acts as a controlled amplifier. A photoresistor (VR1) is placed in its feedback loop—its resistance decreases as the light shining on it becomes brighter. In series with it is a potentiometer (R7), which will be mounted on the front panel and will determine the "compression" level: at high resistance, the op-amp's gain will be at its maximum. When R7 is set to 0 resistance, the gain will be entirely dependent on the signal amplitude.

The trimmer resistor (R5) is optional (that's why it's marked in blue), but if installed, it can be used to limit the maximum gain.

Additionally, you can see the input diodes marked in blue—they are also optional and primarily serve a protective function against excessive signal overload.

The second operational amplifier further amplifies the signal for the LED. After it, there is a buffer on a complementary transistor pair—this is necessary to allow the use of an ultra-bright LED. Following that, there is a diode bridge.

You may have noticed that the transistors are connected without biasing, meaning they operate in pure Class B. This is intentional. Unlike an amplifier output stage, where such a configuration would cause distortion at low amplitudes, here it establishes a threshold. In other words, until the signal reaches a certain amplitude (0.6V voltage drop across the transistor's PN junction + 0.6V drop across the diode bridge, totaling 1.2V), the compressor will not "intervene" in the signal.

After the diode bridge, there is a single smoothing capacitor (1µF). There is no dedicated soft release time control, but an additional 10µF capacitor can be connected if needed.
optocomp board view.png

A few words about the optocoupler construction. It’s quite simple: take a piece of heat shrink tubing, insert an ultra-bright LED on one side and a photoresistor on the other. Then, fill it with glue—and that’s it!
The PCB has a designated spot for this component.
The tubing is essential; otherwise, ambient light will interfere with the operation!

IMG_5658.JPGIMG_5659.JPG

Colleagues, let’s discuss!


If anyone is interested in replicating the design, I’ll prepare and share the Gerber files a bit later.
Boards avialable on BlackMarket.
And of course, if you like it, we can refine and improve it in the future!
 

Attachments

  • optocomp scheme.GIF
    optocomp scheme.GIF
    16.4 KB
Last edited:
Thanks for posting your design! I like simple opto-compressor designs as even I am able to understand them (mostly ;-) I have experimented with similar designs (LA-light, Flatline), the results were surprisingly good for a few components.

Which LDR, with which data do you use?
 
Thanks for posting your design! I like simple opto-compressor designs as even I am able to understand them (mostly ;-) I have experimented with similar designs (LA-light, Flatline), the results were surprisingly good for a few components.

Which LDR, with which data do you use?
Honestly - I've took the first I found. I don't know it's model, sorry. I'll take a pitcure later.
Maybe You will assemble it and try.

I've just tried some recordings, will share it soon.
 
Honestly - I've took the first I found. I don't know it's model, sorry. I'll take a pitcure later.
This is how I usually do it as well ;)...more important than the specific (dark/light) resistances is the time component, how long the LDR resistor takes to regenerate (edit: and attack time, too!). That's audible.
I've just tried some recordings, will share it soon
👍👍
 
So, colleagues! I did a test. I took several "raw" vocal recordings (without processing). I connected everything as described below: I fed the signal from the player to the compressor's input.
One channel of the audio interface was connected to the player’s output/compressor input - this gave me the "dry" signal.
The other channel of the audio interface was connected to the compressor's output - this gave me the "processed" signal.
I normalized both channels to the maximum level so that the difference in the waveforms would be visually noticeable.
nelavy ch1 dry ch2 wet.pngshabat shalom 1.pngshabat shalom 2.pngspasibo 1.pngspasibo 2.pngspasibo 3.pngspasibo 4.png


As you can see, the compressor works very "softly" and almost imperceptibly! It doesn't turn the wave into a typical "brick." Its intervention is also inaudible.
 
It would be useful to have a graph (or table) of output level against input level for steady signals, to get an idea of the compression ratio (or shape of the 'knee') and to understand what sort of signal levels are needed to drive it.
 
It would be useful to have a graph (or table) of output level against input level for steady signals, to get an idea of the compression ratio (or shape of the 'knee') and to understand what sort of signal levels are needed to drive it.
If I'll gift You one board (You just cover shipping) - will You do?

Nice. Does it look a bit like the polarity is flipped ? Or positive and negative are processed unevenly ?
I think capacitor on iput makes phase shift
 
Last edited:
A couple of points about your schematic.

With no signal, most opto-resistors will have a resistance approaching 1Meg. With R2 at 1K and no R56 the gain would be far too great. Therefore R5 is not optional

With R2 at 1K and C1 at 1uF, the lower turnover frequency is about 160Hz. Presumably this was not intentional. As you have split supplies you don't need C1.

I think the circuit around OP2 has an error. I think R6 is meant to connect to the op amp - input rather than ground.

Cheers

Ian
 
An LED in series with the optocoupler LED could serve as simple GR indicator.

Also wondering whether some bias voltage to overcome the transistor and diode bridge step of 1.2V would be beneficial
 
I think the circuit around OP2 has an error. I think R6 is meant to connect to the op amp - input rather than ground.
You're right, thank You! Corrected

With no signal, most opto-resistors will have a resistance approaching 1Meg. With R2 at 1K and no R56 the gain would be far too great. Therefore R5 is not optional
The photoresistor I use has about 70kOhm in dark mode and about 5-6kOhm in full bright mode...

Also wondering whether some bias voltage to overcome the transistor and diode bridge step of 1.2V would be beneficial
No need, I said about it in main post: this bias means threshold.
 

Latest posts

Back
Top