squarewave

Faster Signal Detector Circuit?
« on: May 22, 2020, 12:20:17 PM »
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:



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!


abbey road d enfer

Re: Faster Signal Detector Circuit?
« Reply #1 on: May 22, 2020, 12:54:18 PM »
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:



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.
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

squarewave

Re: Faster Signal Detector Circuit?
« Reply #2 on: May 22, 2020, 01:33:06 PM »
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.

JohnRoberts

Re: Faster Signal Detector Circuit?
« Reply #3 on: May 22, 2020, 02:05:09 PM »
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
Don't only half-ass tune your drums. Visit https://circularscience.com to hear what properly "cleared" drums sound like.

squarewave

Re: Faster Signal Detector Circuit?
« Reply #4 on: May 22, 2020, 03:24:17 PM »
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).

abbey road d enfer

Re: Faster Signal Detector Circuit?
« Reply #5 on: May 22, 2020, 05:51:00 PM »
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.

Quote
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.

Quote
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.
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

squarewave

Re: Faster Signal Detector Circuit?
« Reply #6 on: May 23, 2020, 02:02:57 AM »
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?

abbey road d enfer

Re: Faster Signal Detector Circuit?
« Reply #7 on: May 23, 2020, 02:49:35 AM »
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.
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

L´Andratté

Re: Faster Signal Detector Circuit?
« Reply #8 on: May 23, 2020, 05:48:18 AM »
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.
"Why not get an assistant to work the faders? Real vintage! And maybe cheaper... ;)"

squarewave

Re: Faster Signal Detector Circuit?
« Reply #9 on: May 23, 2020, 02:23:44 PM »
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):



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?


squarewave

Re: Faster Signal Detector Circuit?
« Reply #10 on: May 25, 2020, 01:13:44 AM »
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.

abbey road d enfer

Re: Faster Signal Detector Circuit?
« Reply #11 on: May 25, 2020, 02:46:01 AM »
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?
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

squarewave

Re: Faster Signal Detector Circuit?
« Reply #12 on: May 25, 2020, 10:45:40 AM »
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 ...

abbey road d enfer

Re: Faster Signal Detector Circuit?
« Reply #13 on: May 25, 2020, 01:11:27 PM »
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.
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

squarewave

Re: Faster Signal Detector Circuit?
« Reply #14 on: May 25, 2020, 03:27:21 PM »
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.

abbey road d enfer

Re: Faster Signal Detector Circuit?
« Reply #15 on: May 25, 2020, 02:31:08 PM »
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.
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

squarewave

Re: Faster Signal Detector Circuit?
« Reply #16 on: May 25, 2020, 09:19:13 PM »
Here's the latest circuit:



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.

squarewave

Re: Faster Signal Detector Circuit?
« Reply #17 on: May 28, 2020, 02:16:20 AM »
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:



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:



 

Related Topics

  Subject / Started by Replies Last post
7 Replies
2563 Views
Last post November 13, 2004, 12:40:46 PM
by SSLtech
3 Replies
1303 Views
Last post June 14, 2008, 04:06:33 PM
by rob_gould
11 Replies
2256 Views
Last post January 12, 2011, 10:36:15 PM
by schmidlin
1 Replies
2659 Views
Last post April 23, 2013, 08:01:10 PM
by ioplex