Faster Signal Detector Circuit?

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

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

Bo Deadly

Well-known member
Joined
Dec 22, 2015
Messages
3,266
Location
New Jersey, USA
As usual I'm goofing around in LTSpice again.

I got a little battery powered mic pre that has an LDR limiter in it. I was thinking the circuit that turns on the LED in the LDR is a little slow so just for kicks I thought I would try to make a circuit that turns it on a little faster. Here's what I came up with:

FasterSignalDetector.png


The plot is of current through the LEDs of the LDRs in the stock circuit and then the circuit on the right which is supposed to be faster, better, stronger, ... At 10dBu the 650uA is about where the LDR would kick it if it were not for the feedback mech of the limiter which is of course not modeled here so the level would have to be quite a bit higher to actually get to 650. But the model is good enough to compare.

Improvements, criticism, comments and general musing is welcome and appreciated. If you know of a better way, now is the time to share your secrets!
 
squarewave said:
As usual I'm goofing around in LTSpice again.

I got a little battery powered mic pre that has an LDR limiter in it. I was thinking the circuit that turns on the LED in the LDR is a little slow so just for kicks I thought I would try to make a circuit that turns it on a little faster. Here's what I came up with:

FasterSignalDetector.png


The plot is of current through the LEDs of the LDRs in the stock circuit and then the circuit on the right which is supposed to be faster, better, stronger, ... At 10dBu the 650uA is about where the LDR would kick it if it were not for the feedback mech of the limiter which is of course not modeled here so the level would have to be quite a bit higher to actually get to 650. But the model is good enough to compare.

Improvements, criticism, comments and general musing is welcome and appreciated. If you know of a better way, now is the time to share your secrets!
  I would think the main reason for slow detection is the 33uF in the passive circuit. You probably know there are many simple LDR limiters that have no timing capacitor, relying only in the inherent TC's of the LDR.
Can you compare your active circuit with the passive on ewithout capacitor?
Now if you think increasing the release time is important, without increasing correlatively the attack, there is no other way than going active.
 
True. I could jump the diode and remove the 33u and leave just the resistor in series with LED to ground.

However, one thing that is not shown in my circuit is that, in the RTS 1400 unit (schematic here), the circuit is connected directly to the output op amp. In this case, is there no merit to smoothing? Without the cap, the current just follows the positive excursion of the op amp output and sinks several mA on the peaks. Would that cause distortion in the output? In my circuit, the load is 1K and there is no LED current on the signal line at all (which creates an opportunity to add another LED in series as a front panel indicator).

I've never messed with LDR circuits at all. What is an example of one without a timing cap? I think that's what I'm trying to do here. The Clairex 6000 has a 3.5ms rise and 500ms decay. Sounds good to me.
 
Not to always be the "debbie downer of design".... but that seems to be my role these days.

A LDR is inherently a slow attack device, probably not the best approach if you desire fast attack.

JR
 
Yeah, I'm just playing around with what I have. I can imagine the real problem will be the slow release since fast attack doesn't do anything if the level takes 100x longer to get back to the thresh.  But 2ms plus 3 for the LDR is a lot shorter than 70. If that doesn't give me an "effect" then it will still be doing it's job as a clean limiter just faster (which it seems to me is what a limiter should do).
 
squarewave said:
True. I could jump the diode and remove the 33u and leave just the resistor in series with LED to ground.

However, one thing that is not shown in my circuit is that, in the RTS 1400 unit (schematic here), the circuit is connected directly to the output op amp. In this case, is there no merit to smoothing?
No, because there'll always be the non linearities of the LED.

Would that cause distortion in the output?
Yes, but what's worse, distortion due to the limiter or clipping due to the absence of limiter? RTS made their choice.

I've never messed with LDR circuits at all. What is an example of one without a timing cap?
UREI LA4.
They have a full-wave rectifier but no timing cap. There are many other examples, particularly in app notes from Vactrol/Silonex; many compressor pedals also.
 
Well I got the unit and I've been playing around with the scope and tone pulses and studying the dynamics of the thing.

It actually attenuates fairly quickly within ~5ms or so because, unlike in my simulation, the 33u (C1 in the ltspice screen grab) spends much of it's life at ~1V because it has nothing to drain it other than the LED which is pretty high Z at 1V. So the LED is almost always on the threshold of being on already.

But ... it still clips anyway. Just barking "test" into an SM57 will clip before the LDR kicks on. It just ain't fast enough and I get the feeling it never will be a proper "limiter". IMO a limiter should never let the signal clip. Maybe if it had more headroom but as it is, it clips at ~+-5.8V.

The release is not quite what I expected either. It only takes ~50ms for the LED voltage to drop 50%. So the release is too fast to make it to the next note / transient and it clips. I have a DIY LA3A and it has reeaaaaaly long release by comparison (I specifically bought a slow T4B cell).

So what's the path-of-least-resistance to stop this thing from clipping? Maybe a combination of reducing the threshold of attenuation to compensate for the low headroom and making the release slower so that it is still attenuating before the next transient?
 
squarewave said:
IMO a limiter should never let the signal clip.
As you know, it is just an impossibility, unless you apply dealy to the signal, or you add an instant clipper (dbx's PeakStop).

So what's the path-of-least-resistance to stop this thing from clipping?
[/quote] You have to redesign the detector, make it active. You may take inspiration from the attached schemo.
It's a clip detector, but it serves the same function, lighting an LED.
 

Attachments

  • detector.jpg
    detector.jpg
    64.2 KB · Views: 36
Just my usual jack-in-the-box appearence here, I have made very good experience with
the Steve Dove mic-pre/limiter design. It uses VTL5C1, fastest Vactrol I know of, ass-kicked
by a twin pair of opamp comparators, reducing a resistive element in the micpre itself, so optimal
from gain/noise perspective.
 

Attachments

  • sspre.jpg
    sspre.jpg
    208.1 KB · Views: 49
Thanks for the circuit ideas. I wasn't able to get the one to simulate in spice. I'm guessing it's supposed to be a schmitt trigger and an integrator? The other is comparators and a LPF. I'm seeing the pattern. But this is a long-lasting battery powered device so I need something discrete that only consumes as much power as it needs.

So with the objective of reducing the threshold, faster attack and slower release, here's my latest circuit (on the right - circuit on the left is the stock RTS1400 for comparison):

FastButSlowSignalDetector.png


The plot is of current through the LED for increasing signal levels from 1.1-1.7Vp. This lowers the threshold by a lot kicking in at around 1.55Vp instead of with the diode+LED which was well over 2Vp.

Clearly this is more of a compressor than a limiter with standard RC attack and release defined by R6, C3 and R9 thanks to the mosfet. The release can really be stretched out if that's desirable. The mosfet is no comparator or schmitt trigger though so that's not consistent with theme of your circuits. LED gain is pretty much linear with signal level. From looking at the plot you can see that the LDR will be pretty much slightly on with even a low signal level unlike with a high gain bipolar circuit where the LED snaps on above the threshold. Is this good or bad? Will it cause undesirable distortion?
 
Well this last circuit doesn't work that well. If I mic a speaker playing some music, when it reaches the threshold (which is a little over 2Vp), the LDR kicks in hard in only ~5ms and the level drops sharply 6-10dB more or less depending on how hot / sudden the input is and then recovers over 40ms or so. So the lag between the control voltage going up and the LDR attenuating causes a hard drop in level that is fast enough that it's almost like a thump.

Contrary to my previous declaration, clearly the LDR can react fast enough to stop the output from clipping. The problem is how to compensate for the lag of the LDR. So slowing down the attack is not quite the right solution. It should be possible for the attack to be fast. But it should not be fast over large swings upward. Unfortunately that is a fairly sophisticated behavior for a simple discrete circuit.
 
squarewave said:
Well this last circuit doesn't work that well. If I mic a speaker playing some music, when it reaches the threshold (which is a little over 2Vp), the LDR kicks in hard in only ~5ms and the level drops sharply 6-10dB more or less depending on how hot / sudden the input is and then recovers over 40ms or so. So the lag between the control voltage going up and the LDR attenuating causes a hard drop in level that is fast enough that it's almost like a thump.

Contrary to my previous declaration, clearly the LDR can react fast enough to stop the output from clipping. The problem is how to compensate for the lag of the LDR. So slowing down the attack is not quite the right solution. It should be possible for the attack to be fast. But it should not be fast over large swings upward. Unfortunately that is a fairly sophisticated behavior for a simple discrete circuit.
Perhaps the release time governed by C3/R9 is too long; what about decreasing C3 significantly, I mean divide by 10 or more?
 
It seems like the LDR and circuit are causing "ripple" at ~50Hz or so. So the attack that needs to be "damped" properly. I think what I need is some form of the circuit you posted actually. A Schmitt trigger and an integrator would yield a much better behavior as long as it's still fast enough to stop the "overshoot" (clipping). So maybe something that is half way between the simple RC I have now and a proper integrator. I need to get into LTSpice for a bit ...
 
squarewave said:
It seems like the LDR and circuit are causing "ripple" at ~50Hz or so.
It's a frequent issue with limiters. A "basic" NFB stability condition. Unfortunately you can't really control the lag introduced by the LDR, which, in addition is non-linear. Limiter stability analysis has been studied by the BBC, for the more predictable "vari-Mu" types, but the absence of a simple mathematical model for the LDR makes it almost impossible.
 
squarewave said:
So then maybe what I need is a circuit that has two reactive components, a gyrator to create overshoot and then a capacitor to shunt so that it converts the pulse into a ringing pulse that is the opposite of the ringing of the LDR.

Imagine a square pulse through a series inductor and capacitor to ground. If the reactance is matched, you get a critically damped low pass filter. But if we deliberately make the inductor ractance large and capacitor small, we get a ringing.

If the first trough of the ringing matches the timing of the LDR (seems to be ~20ms), that could result in a more even output level.

And it seems to me that it should be effective at varying amplitudes. Meaning a sharper burst of signal generates a larger ringing but the timing of the ringing does change.
I think Ted Fletcher went to the bottom of this approach by implementing full PID in one of his products.
 
So then maybe what I need is a circuit that has two reactive components, a gyrator to create overshoot and then a capacitor to shunt so that it converts the pulse into a ringing pulse that is the opposite of the ringing of the LDR.

Imagine a square pulse through a series inductor and capacitor to ground. If the reactance is matched, you get a critically damped low pass filter. But if we deliberately make the inductor ractance large and capacitor small, we get a ringing.

If the first trough of the ringing matches the timing of the LDR (seems to be ~20ms), that could result in a more even output level.

And it seems to me that it should be effective at varying amplitudes. Meaning a sharper burst of signal generates a larger ringing but the timing of the ringing does change.
 
Here's the latest circuit:

ResonOpto1.png


The grey plot is the stimulus signal, green is the output of the first op amp and red is the current through the LED. Looks like it should work to me.

I don't think I'm going to try to switch to discrete for this though. I suppose I could cough up 1.4mA for a TL082 but ditch the first OA for a follower. Still a little too much for a protoboard. I'll just breadboard it, see it work, study the dynamics of it, adjust the caps and then go straight to OSHPark.
 
This "OptoGyro" limiter / compressor circuit works very well. I'm a little stunned at how well it works actually. The following graphic is with the limiter out and then in:

GyroOptoScope1.png


There's no dip in the level at all (note that the leading ramp is just part of the impulse response stimulus from the QA400 analyzer). Values shown in the last schematic are spot on. Adjusting R2 changes time and depth of the trough together (aka frequency and Q). Below a couple hundred ohms the dip in level is just gone and it's flat from there down to 100 ohms (value used in graphic).

I guess maybe the attenuation feedback mechanism is working. It just needed a little assist.

Here's an animated GIF of a "SLO-MO" video I made of the LED behavior. You can clearly see the LED dips for what is actually an instant:

OptoGyroLed.gif
 
Back
Top