Flatline compressor

Started by PBE6, January 31, 2016, 03:36:11 PM

Previous topic - Next topic

PBE6

I ordered a few light dependent resistors (LDR) a few months ago, and finally got around to building myself a John Hollis Flatline Compressor:

I used a red LED, an LDR and some duct tape to build the optocoupler. The build seems to be fine in most respects, no distortion or other weird artifacts, but I have to admit that the compassion is subtle - so subtle that I can't be 100% sure it's actually compressing or not! Is it supposed to be this subtle? Is there a common tuning procedure for using these homemade optocouplers?

I tried measuring the resistance between the -ve and output terminals of the first opamp, and although I was getting funny negative resistance readings (?!), the resistance quite obviously changed when I struck a note...so it seems to be doing something, just very subtly. Is there a simple way to make the effect more pronounced?

I had some questions about the general working of the circuit. Does the network of Ge diodes and the 100uF capacitor form a pair of half-wave envelope detectors? Or does it have some other function? And why does the network feedback to the signal output? Would running it to ground still allow the circuit to work, considering that the LED has already been lit at that point? Also, would placing a resistor in parallel with the 100uF cap allow you to control the release time by varying the cap discharge rate?

PRR

> diodes and the 100uF capacitor form a pair of half-wave envelope detectors?

Kinda.

> why does the network feedback to the signal output?

Not "feedback". (The upper opamp ideally ignores external stuff forced on its output.)

Think "push pull voltage doubler". Upper opamp makes a signal. Lower opamp makes an inverted signal. The difference "could" be *double* voltage. And we are short of voltage, with a bunch of diodes and just a 9V supply and lossy opamps.

However the lower opamp has gain of - 5. Since the LED voltage is higher than a happy "guitar level output", some gain is needed. However that means the push-pull action is not double, only 6/5 or 1.2

> Would running it to ground still allow the circuit to work

Yes, at 5/6 drive to the LED.

> measuring the resistance between the -ve and output terminals of the first opamp, and although I was getting funny negative resistance readings (?!), the resistance quite obviously changed when I struck a note...

Measuring in-circuit, especially around an opamp, is likely to read wrong.

Measuring "resistance" with large AC (audio) signals bopping around is likely to confuse your ohm-meter.

As a General Rule, when trying to read Ohms, your meter should be the ONLY power source in the circuit. No battery/wart, no signal.

In *this* case, there is a workaround. Disconnect the LDR side of the opto. Read that with ohm meter. Put a light-TIGHT cover over (or work in the dark). Should be way-high. (Over 100K, possibly so over 1meg that a DMM will read "---".) Run signal through. Heavy strums should drive the resistance down below 10K.
  • SUPPORTER

PBE6

Great! Thanks Paul. I'm going to have to take another look at that network and try some thought experiments, but this is a big help (as usual).

PBE6

#3
OK, finally got around to taking another look at this pedal..and it's broken. The LED was burned out, which is why it was so "subtle".

Just to make sure the original LED was connected properly, I tried connected a small red LED across the 100uF capacitor. It worked great for about a tenth of a second, then it blew up. That's ok, I never liked that one anyway.

I hooked up the circuit to the oscilloscope at the capacitor-diode junctions, and was surprised to find about 10V clipped on the positive swing and a small squiggly negative voltage on the negative swing. My only guess is that the positive swing sees the capacitor charge up to a high voltage while is discharges slowly on the negative swing, but I figured the capacitor should be charging in both directions just by following the path around the diodes given the polarity. Regardless, is there a current limiting resistor for the LED missing in this design? Am I missing something?

I am probably missing something obvious.

I'm also still confused about the interaction of the signals present at the diode junctions. Both the 10k and 330R resistors should be seeing a copy of the output of U1. U2 inverts and amplifies the signal so that the diodes connected to that output see about -5*U1. But what happens when those two signals meet somewhere in the middle of a capacitor-diode network? All the full-wave bridge rectifier examples I've seen are missing the 100uF capacitor connecting the two junctions, and the LED, but they also have one voltage source feeding one load. Why aren't the opamps fighting each other in the middle of the capacitor and/or LED?

PRR

These are exactly equivalent:



The one on the left IS the standard AC to DC power supply drawing (plus LED and odd AC voltages).

Note that there is NO ground at the LED or cap, or diodes or the 330 Ohm current limiting resistor. It is a tug-of-war (or see-saw) on a rope not tied to anything.

> figured the capacitor should be charging in both directions

No. Left end of cap is always positive.

> two signals meet somewhere in the middle of a capacitor-diode network?

Worst-case, here: assume the D+C stuff is dead-short (it will be near-short on initial transients). Then the two opposing opamps "see each other" through the 330 Ohm resistor. While this is heavy loading, and output precision is low, they will do the right thing as near as they can, and nothing should smoke. Because this and that, the initial accuracy should be <10%, which is more than good enough for a user-adjusted compressor. Once settled to quasi-steady-state the accuracy is better, really limited by diode and LED tolerances.

> it blew up

Yes. The current appraches (9V-2V) or 7V in 330 Ohms. 20mA. Hmmmm. That actually should not blow-up an LED unless it is very teeny. However IN circuit (LED shining on LDR), the optical feedback cuts-down the signal so the LED is not MAX bright, but part-bright. With any decent opto-resistor, the LED is not very bright at all.
  • SUPPORTER

PBE6

Thanks Paul! To the simulator..

PBE6

Ok, I simulated the circuit output and tried playing with the 330R value. I'm getting a better idea of how it works now.

Now, please forgive my brazen *insouciance*, but why is any of that stuff necessary? Wouldn't it be simpler to just get the signal from the output of the first opamp, filter and/or envelope filter that, adjust the gain and then send the result through the LED?

PRR

> why is any of that stuff necessary? Wouldn't it be simpler to....

Many ways to skin cats.

> first opamp, filter and/or envelope filter that, adjust the gain and then....

I suspect your path leads to a less-simple build but a more-stable/consistent and more-understandable design.

For ONE dual-opamp, this one isn't bad.

If you are looking for a guitar limiter, I think Merlin's Thumb is about as good as it gets without going to much greater complexity. I ferget how many opamps he uses, but they are very cheap now. (I remember $3 for a single opamp that everybody boos-at today, down from $230 a few years before.)
  • SUPPORTER

PBE6

I have to admit, I do tend to shy away from designs that I don't feel I understand fully - kids, that's not the way to go, you won't learn anything that way, and I know that. I'm going to give it another crack, although I'd better get it right soon as I'm running out of LEDs and reinforcements from eBay take a few weeks to arrive.

Speaking of learning, does the full-wave bridge rectifier offer any performance advantage over a simple envelope detector approach?

I have been meaning to try Merlin's Engineer's Thumb, I even bought a bunch of LM13700s in anticipation, but other simpler builds (and life) got in the way. Will be nice to finish both builds and compare head to head.

PRR

> does the full-wave bridge rectifier offer any performance advantage over a simple envelope detector approach?

Envelope detectors are not simple.

The diode bridge is a lot cheaper.

The classic opto-limiter LA-2a does it this way except they used a bi-directional light source (hi-volt phosphor panel) so didn't even need diodes. The tricky-bit is that LA-2a's photo-resistor is also the "timing elements", attack release. Photo-resistors always have speed-limit. (I bought an old German's book which explains this, didn't get much clue.) While "any" photo-R will be slow enough to damp the half-cycle pulsed light somewhat, and release non-instant, LA-2a really needs a specific un-common recipe and then careful selection from the lot to give "nice" limiting. This Flatline approximates this on faster photo-Rs with the fat cap across the LED.

It should be "working". Steal LEDs out of old PCs if need be, but when it controls its own input the LED will never be strained.
  • SUPPORTER

samhay

I never understood (and still don't) why the inverting op-amp has gain. As I see it, the bridge rectifier should work best when the 2 signals feeding it are of same absolute magnitude.
I guess the slow response of the LED and LDR smooth this out and the extra gain helps lower the threshold, but if this is the case, it makes an argument for not using this topology.
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

PRR

> why the inverting op-amp has gain

The LED voltage wants to be higher than the audio-output voltage.

If it was my cat, I wouldn't skin it this way. But it "should" work alright.
  • SUPPORTER

PBE6

Just for the sake of closure, I tried wrestling with this project again tonight. After careful review, I found that I had used a 330k resistor instead of a 330R.

I'll get my coat.

PRR

> a 330k resistor instead of a 330R.

The water-system blueprints called for a 32-inch main pipe.

Somehow a 1-inch main was installed. (Water resistance is a lot about pipe area, 1/32 diameter is 1/1000 area.)

Yeah, a disappointing trickle.

The grossly undersize water main would be noticed even before it got off the truck. Pipes have to "go somewhere", so they are long, thus expensive, so we need to buy just-enough physical size, and any fool would wonder if you could water a whole city with a fat garden hose. But the ecology of resistors is different. We can select from a 100,000,000:1 range of restriction (resistance), and they all look just alike. You have to read the code.

I'd say wrong-decade resistor is #4 or #5 on the top-mistakes list.

It does not help that color-codes are tough. And some resistor makers' paint-pots are drab. If I don't have natural light, I can be unsure about red versus orange stripe. Red/brown is very tough for some lots of resistors. Experience helps; age (and modern nasty lights) doesn't. Don't be shy about using the meter (AND re-verifying what range it is telling you; my meter's "K" is small and easy to miss).
  • SUPPORTER

rankot

Well, I have read this: http://stompville.co.uk/?p=50, and it is very similar to Flatline, so I built it that way. It works fine. They mentioned that attack time can be adjusted with what is C3 on link I provided, or 100u capacitor here on vero board. Does anybody have an idea how this capacity relates to attack time? I used VTL5C2 in my build and thus 100n capacitor instead of 100u used here.
  • SUPPORTER
60 pedals and counting!

rankot

There's a capacitor charge time calculator here http://mustcalculate.com/electronics/capacitorchargeanddischarge.php?vfrom=0&vto=7&vs=9&c=100n&r=330, but I am not sure which parameters to set for this compressor?
  • SUPPORTER
60 pedals and counting!

rankot

Quote from: PRR on February 08, 2016, 01:49:16 AM
These are exactly equivalent:



The one on the left IS the standard AC to DC power supply drawing (plus LED and odd AC voltages).

Note that there is NO ground at the LED or cap, or diodes or the 330 Ohm current limiting resistor. It is a tug-of-war (or see-saw) on a rope not tied to anything.

...

Yes. The current appraches (9V-2V) or 7V in 330 Ohms. 20mA. Hmmmm. That actually should not blow-up an LED unless it is very teeny. However IN circuit (LED shining on LDR), the optical feedback cuts-down the signal so the LED is not MAX bright, but part-bright. With any decent opto-resistor, the LED is not very bright at all.

Does it mean that if I want a compression indicator here, I just add another LED parallel with vactrol's LED and reduce this 330 ohm resistor to 150?



I ask for help because I am not 100% sure about this, and I don't want to fry now precious VTL5C2.  :(

  • SUPPORTER
60 pedals and counting!

PRR

Try two LEDs and two 330r resistors, so the current tends to divide equally.
  • SUPPORTER

rankot

OK, I have built this on a breadboard and simply paralleled two regular LEDs (to avoid damaging vactrol) with 150 ohm resistor. They light equally to the naked eye. I will try this option with two 330 ohm resistors, too. My logic was that if I have an amount of current available from U1.2 which is limited by 330 ohm resistor for one LED, that I need to half that resistor if I put 2 LEDs, because I want to have the same current, as it was in single one, in any of them, thus not to alter vactrol behaviour.
  • SUPPORTER
60 pedals and counting!

snk

Hello
I'm just posting to tell that i successfully built the Flatline using the Guitar FX Layout and a ready-made vactrol, as advised on the Madbean Afterline instructions.
I added a sensitivity and an attack knob.
The sensitivity mod is really great imho.

I have also tried adding an indicator led by plugging it into A3 and C3 (from the verobarod linked above) : the led blinks when the compression is stronger, but, judging it by ear, it doesn't seem very accurate, just a rough estimation but nothing to rely on.

Overall, it is a nice compressor, quite transparent and versatile. I enjoyed running a light overdrive after it, in order to give it more coloration (as by itself it is a very clean design).