Simple optical compressor

Started by soggybag, January 06, 2011, 10:13:38 PM

Previous topic - Next topic

soggybag

Here's an idea I came up with for a simple optical compressor. The idea is really a mix of two previous effects. The "Really simple compressor" (which was posted to the "other forum") and the Flatline. This takes the non-inverting input of the Flatline and uses the simpler LED driver of the "Really Simple".

The two LED's connected to R9 should shine on the LDR. I suspect you could get away with using a single LED.

I haven't built this yet. I suspect the LDR and the 220K resistor in the feed back loop need some more thought to get the right range of effect. Give me your critique, let me know if you see any obvious flaws.


phector2004

Cool design!

Is the sustain in any way dependent on the output volume? I'm probably missing something, cause I'm from a completely different background, but if you crank the volume up won't the signal be shunted away from the LED section?

ppaappoo


soggybag

C4 and C6 block DC.

My knowledge is limited, but here's my take on what is happening. The output of IC1A is AC coupled to IC1B through C6. Think of this as another op-amp stage that could be another output with two clipping diodes. Hey, it's a Dostortion +! This IC1B is an inverting amplifier with a variable gain of something like 1 to 10. The hotter the signal out of the this stage the more the LEDs light up.

IC1A is set up as a non-inverting amplifier with a gain of 22, ignoring the LDR. 22 is the maximum gain. As the LEDs light up the LDR it's resistance in parallel with R3 (220K) reduce the gain of the IC1A amp.

The sum of the system is that when the output of IC1A is high, IC1B also produces a stronger signal lighting up the LEDs. Which in turn lowers the resistance of the LDR reducing gain. As the signal from IC1A tapers off the LEDs dim and LDR resistance goes up increasing the gain of IC1A.

I've been trying to wrap my head around how the values of R3 and R4 effect the compression. Not sure if this is the right way to look at this problem or not. Imagine the LDR as a variable resistor with a range of 100K to 1M. This divided by the value of R4 is the gain of IC1A. Changing the R3 and R4 change the range and slope of the gain produced when the LDR resistance changes.

Here's an image graphing some possible values for R3 and R4.

Mark Hammer

Congrats.  You've just re-invented the Anderton EPFM compressor!

Nothing wrong with that, though.

A few things to consider, though.  The amount of compression will be a function of the changes in the LDR elicited by light landing on it.  Will The LEDs shown shine brightly enough to do that?

As well, if they do shine brightly enough, that can drop your IC1a gain down far enough that it is only producing a gain of <2x.  That's not a problem in itself, but where will your volume control be set to when that happens?  That's why many such compressors have an additional gain recovery stage.  Anderton's design uses two inverting sections: one where the compression/gain-reduction happens, and a second stage after it to restore the level to something better suited to the situation.  The result is in phase with the input.  You use a non-inverting gain stage, which accomplishes the same electronic objective, but as I say there may be an issue with being able to get good compression and workable volume settings.

All that is off the top of my head, though.  It may well not be a problem.  T'wer I, though, I'd either want to sick some sort of modest gain recovery before or after the volume pot, or maybe drop R4 a bit (6k8?).  Any added gain recovery doesn't have to be an op-amp.  It can be a simple single transistor stage.

Finally, why the need for two LEDs?  Is one for external visual monitoring of gain-reduction?

amptramp

The two LED's operate on opposite parts of the cycle, positive and negative.  This overcomes the problems with, say, an Orange Squeezer that only uses a half-wave rectifier to generate the control voltage.  Depending on the input polarity, an Orange Squeezer can be spoofed into letting the first alternation of a signal go through without compression.  This is an ingenious use of an AC amplifier to provide a control signal for both positive and negative signal sections.

ayayay!

#6
Oops, wrong thread.  Anyone else being randomly shot to other threads when you reply?
The people who work for a living are now outnumbered by those who vote for a living.

Mark Hammer

Quote from: amptramp on January 07, 2011, 12:34:29 PM
The two LED's operate on opposite parts of the cycle, positive and negative.  This overcomes the problems with, say, an Orange Squeezer that only uses a half-wave rectifier to generate the control voltage.  Depending on the input polarity, an Orange Squeezer can be spoofed into letting the first alternation of a signal go through without compression.  This is an ingenious use of an AC amplifier to provide a control signal for both positive and negative signal sections.

That's not really how it works.  And even if it were, the LDR does not respond so fast that the second opposite peak of a 1khz signal would have any discernible impact on the LDR's resistance.

Indeed, one of the advantages of LDRs is that they make half-wave rectification usable with minimum ripple.

soggybag

I was suggesting earlier that it might be possible to use only one of the LEDs for this reason. Figure the latency of the LDR might be enough to smooth the ripple.

Mark Hammer

You're right.  Works for Anderton, (see the Thomas Henry and Jack Orman "Whisper" compressor too) so it ought to work for you.  I've built both the EPFM1 and EPFM2 compressors and they sound fine, with no audible ripple.  they each use a CLM6000: one LED and one LDR.

brett

Hi
4 noob questions.
1 - why use separate LEDS and LDRs, with their variable characteristics and need for physically setting them up, when an optocoupler (e.g. 4N25) is all good from the start?
2 - even better, why not use a single mosfet?  It also gives voltage-dependent resistance?
3 - why are there 2 stages?  Can't it all be done with one?  (ie LEDs and LDR on the same op-amp)  Or does it mess with the input impedance too much?
4 - for the op-amp, would a 386 work? (or two if you must have two separate stages) They don't need biasing and have plenty of gain and drive low impedances.
Apologies if these are not sensible questions.
cheers
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

soggybag

You are hardly a noob.

I have been wondering if it would be possible to create a Tube Screamer type circuit using LEDs in the feedback look. Connect the LEDs to an LDR set up in the feedback loop to effect the gain and compression.

I like the idea of using a MOSFET. I'm just not sure how to set up and calculate the range of resistance it would represent. The LDR comes with numbers so it's easier to wrap my head around it.

A photo FET, is a great suggestion. I'm not familiar with 4N25, is it similar to H11F3? I wonder if you could run the output directly to the Gate with the Source Drain across the feedback path. I would guess the input has a high enough impedance to not really effect the signal.

Someone already designed a compressor using a 386 and MOSFET, I think it was you! If not you can look up Aussie Compressor.

PRR

That will work (obviously, since it re-invents many existing limiters).

There's two gains. IC1A has gain of 23 to unity (the LDR _will_ go to near 1K). The output limiting level is LED level (1.5V) divided by IC1B gain zero to 10.

Output level (before volume pot) is therefore from infinity to about 0.15V on peaks. That may be a good zone.

The minimum IC1A gain is unity. It can not compress a VERY large input. It will "break through". We usually like limiters to LIMIT, even if by clipping what they can't pad-down cleanly. However rigging a to-zero attenuator is difficult with impedance and noise factors.

R9 may not be essential. It does nothing for low levels, and at high reduction it allows the output to rise significantly. You may think it limits current so the LED won't melt; in fact TL072 and similar will not melt an LED.

You do need two LEDs because they are cap-coupled. One cap and one diode makes a DC rectifier. A few good peaks, the cap charges until the LED is off, no more limiting. Two diodes re-set the cap charge on every peak.

LED impedance may get low, you may need more than 1uFd feeding it. LED impedance could be as low as 10 ohms, which for full audio means 1,000uFd, but that's silly and it's only guitar. Try 10uFd and 47uFd here.

C6 0.1u may be small for driving 10K.... 160Hz won't pass guitar's lowest octave, which is sometimes what most needs a trim (and sometimes should be allowed to bloom-out and phatten the bottom). That's a by-ear trim.

I would suggest (from decades of pondering) that you consider R3=47K and R4=2K2. (And maybe C3 more like 50uFd just to be sure).  At 220K "ANY" light-leak will depress gain. Also an LDR may fall to 220K "too quick", takes longer to fall past 47K. You really want a selection of very different LDRs: they are made with various speeds, and the speed-spec is not a good guide to how it will work with music through gear to ear. Because it is a feedback limiter, you can swap LEDs without real re-tuning; just check that a bright desk-light will depress resistance near 1K.

The two stages "can" be combined. One opamp boosts guitar to past 1.5V. LEDs hang on this output and shine on LDR to reduce gain. Maximum output level is 1.5V on peaks, you will want a lot of attenutation on the way to a guitar amp input. Problems: TL07_ putting large current into LED will distort significantly. It may be hard to get enough clean gain to raise soft guitar to 1.5V level. Advantage: the LEDs can brute-force clip anything the LDR allows to get past. On balance, TL072 costs the same as TL071 and allows separation of functions, do 2-stage.

4N25 is NOT suitable (I wish it were). It is a photo-TRANSISTOR, not resistor. The linear range is only a few milliVolts and not real clean. Transistors can work as limiters on $13 cassette recorders and dynamic mikes, but not at guitar level, they also will be a hiss problem.

FETs (J- or MOS-) typically have small linear range and not really linear. It sure can be done; 1176 is a classic radio studio limiter with a JFET. The resistor and JFET network will need buffering from guitar impedance, and recovery gain. FETs have the advantage of near zero drive power. IMHO and IME, the LED/LDR thing is easier to get working.

A photo FET typically has even lower linear range than a plain switch JFET; I was unable to contrive a useful limiter from H11F3 types. And it needs far more drive power to its LED than a naked JFET's gate. And there is no major advantage to the opto-isolation (everything is on one power supply). And the signal must be rectified and filtered to provide control voltage.

Increased output of LM386 would need resistor to protect the LEDs from blow-out. The resistor raises the upper end of the limiting curve. This can work, even at FAR bigger scale: I have hung resisted LEDs off a 150 Watt rack-amp to shine an LDR before the amp as a $5 limiter. Since the Power amp was essential, the main pain was in estimating resistor values to give a suitable limiting curve and not blow-up the LEDs. It is a real advantage to use "weak" drivers like the TL072, which can't kill LEDs.

Mitchell's plan is generally excellent for a $5 limiter. There are many ways to skin this cat, but none much cheaper or simpler, and some FAR more complicated. Some values will want tweaking, but anything non-trivial so tightly integrated with performance chain always wants tweaking on test, and he'll figure it out.
  • SUPPORTER

soggybag

Thanks for the input Paul. You're analysis is always so enlightening, though I often have to read it several times before I can grasp it all.

I can't really take too much credit here. I just took to DIY designs and put them together. I took the simplified LED driver from one and grafted that onto to other.