DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: PeterPan on September 03, 2014, 12:29:23 PM

Title: SIMPLE Limiter circuit reccomendations
Post by: PeterPan on September 03, 2014, 12:29:23 PM
I have a small 20 watt amplifier I've built for a guitar, which for simplicity I'll call a practice Amp. It is based on an inexpensive Class-D amplifier module and powered by a Lithium Polymere 12 volt pack. To me it sounds very nice, but if you've ever worked with Class D amps you know that they sound awful when they peak out. But guitars are very dynamic, and its tempting to set the volume near the highest it can go. So what I'd like to do is employ a smooth limiter circuit. Something that would allow me to set the amplifier for reasonable level, without worrying about horrendous Cass-D distortion if i switch from light picking to heavy strumming.

Now I'm just 'thinking out loud" here, so be kind. The easiest thing I can think of would be to use one of those analog opto isolators such as a VACTROL. The idea being, I could use the resistive element in an op-amp based pre-amp in a manner that would back off the gain as the resistance decreases. Then I could drive the internal LED with some of the power going to the speaker. The LED would only take a few milliAmps, so the hope is that with a blocking diode and the right resistor value, the gain will be reduced more as the amplifier reached maximum output, and the slow speed of the Vactrol's response (usually faster attack but slow decay) will serve as a kind of simple compression. Or, if I decide I don't want any limiting to occur until a certain level is reached, I can use another Op-Amp as a comparator, so that the vactrol's LED would not even get any current until a certain "danger Will Robinson" level is crossed. This would behave more like a limiter then a compressor.

I know there are tons of schemes for limiters and compressors, some that use FETs and others that use opto-isolators. But considering the end result I'm looking for, I'd appreciate any suggestions, as well as warnings of gotchas in the direction I'm going. I'm not looking for super precise control over attack and decay here, but I don't want to create a new problem that sounds almost as bad as the class-D distortion either.

Title: Re: SIMPLE Limiter circuit reccomendations
Post by: mth5044 on September 03, 2014, 12:37:25 PM
If I understand correctly, you want to look at the level coming out of the poweramp (going to speaker) by ways of lighting up an LED when the level gets higher, then using the corresponding LDR to turn down the gain in the preamp as the level increases.

I'm not totally sure about all the problems with powering and LED from the output of a poweramp, but by the time the LED is sensing the elevated levels, you are already clipping the poweramp. The ugly distortion comes from feeding the poweramp too high a voltage I would imagine, not from whatever the poweramp is feeding the speaker. You'd have to limit the signal going into the poweramp before it comes out of it!
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: PeterPan on September 03, 2014, 01:03:43 PM
Quote from: mth5044 on September 03, 2014, 12:37:25 PM
If I understand correctly, you want to look at the level coming out of the poweramp (going to speaker) by ways of lighting up an LED when the level gets higher, then using the corresponding LDR to turn down the gain in the preamp as the level increases.

I'm not totally sure about all the problems with powering and LED from the output of a poweramp, but by the time the LED is sensing the elevated levels, you are already clipping the poweramp. The ugly distortion comes from feeding the poweramp too high a voltage I would imagine, not from whatever the poweramp is feeding the speaker. You'd have to limit the signal going into the poweramp before it comes out of it!

Thanks, and this is quite true. To make it work at all, I would at least have to compromise some max level. If, for example, the circuit was known to start sounding terrible when the output reached 8 volts (peak), then the circuit would have to begin responding at maybe 5 volts. At best it would mean that on "average" I could play with a louder setting without peaking out, and the upside would be that the quieter playing would benefit from the boost. I'm sure its not a perfect scheme, but i do know that some Class D amplifiers incorporate some kind of limiting scheme for this same reason. But maybe your suggestion infers that to be most effective, the "attack" response time of the circuit would have to be fast, and maybe the Vacrols wouldn't do.
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: PeterPan on September 03, 2014, 01:18:13 PM
INTERESTING!!! I just found this link, to a circuit similar to what I'm describing...

http://sound.westhost.com/project53.htm

Its purpose is similar too, except in this case its being used to protect against damage to speakers, etc. At the very least it looks to be worth a try, right?
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: samhay on September 03, 2014, 02:52:43 PM
LED / LDR (vactrol or home-rolled) combo's can make for a nice compressor, but have a relatively slow response, so may not be the best choice for a peak limiter.
Simplest solution might be some arrangement of diodes clipping to ground prior to the power amp. You can use rubber diodes to set the clipping threshold to whatever level you desire.
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: Mark Hammer on September 03, 2014, 03:48:47 PM
The smaller Crate bass amps tend to use a vactrol-based limiter circuit, using feedback fro the power-amp chip output to a network ahead of the power stage.

Look for schematics for amps like the BX15A, BFX15A, BX25, BFX25A, BX50, or BFX50A.
Title: Re:
Post by: Johan on September 03, 2014, 04:11:56 PM
For an instant and simple limiter for that very problem, do a forum search for guitar power amp concept and my name about a year ago. I never finished that design but still intend to. ..a few resistors, two transistors and a pot for setting the level...You get the idea. ..
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: lion on September 04, 2014, 02:54:12 AM
What about the old Thomas Organ Vox limiter circuit (been discussed/mentioned here a few times - by R.G. and maybe others too)?
Unless I've missed something it was designed to do exactly what you describe - avoiding the SS power amp to clip.

lion
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: merlinb on September 04, 2014, 03:54:05 AM
Quote from: PeterPan on September 03, 2014, 12:29:23 PM
if you've ever worked with Class D amps you know that they sound awful when they peak out.
The easiest thing I can think of would be to use one of those analog opto isolators such as a VACTROL.
The easiest thing would be to add a diode clipper before the output stage. This would provide polite clipping just before the output stage peaks out. i.e. the output stage cannot be overdriven.
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: Seljer on September 04, 2014, 03:59:54 AM
^ and add appropriate gain/attenuation before and after the diodes to set that full clipping is just below what would clip the amp itself.
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: bool on September 04, 2014, 06:25:28 AM
I'd recommend something along these lines:

http://www.eeweb.com/electronics-quiz/design-this-clipper-circuit

Of course, you would have to "translate" the design and shoehorn it to fit with your project ...


Back-to-back low-voltage zeners could also be of interest if you're after cheap and simple.

Good luck..
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: bool on September 04, 2014, 06:31:42 AM
Quote from: Seljer on September 04, 2014, 03:59:54 AM
^ and add appropriate gain/attenuation before and after the diodes to set that full clipping is just below what would clip the amp itself.
I'd say that this would be probably the easiest to accomplish by using an inverting opamp stage and a diode limiter (with your desired response) within the NFB. IOW, most of the gain staging would be taken care of by use of a single opamp ...
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: GibsonGM on September 04, 2014, 08:03:09 AM
Quote from: merlinb on September 04, 2014, 03:54:05 AM
Quote from: PeterPan on September 03, 2014, 12:29:23 PM
if you've ever worked with Class D amps you know that they sound awful when they peak out.
The easiest thing I can think of would be to use one of those analog opto isolators such as a VACTROL.
The easiest thing would be to add a diode clipper before the output stage. This would provide polite clipping just before the output stage peaks out. i.e. the output stage cannot be overdriven.

Before we all started changing all the rules with our GUITAR stuff, it was standard and normal to use diodes to ground for just this purpose.  Many old ham radio texts discuss and show diodes to ground to clip noise pulses or sudden huge increases in signal.  They frequently had an adjustable bias voltage to control the clipping level (isolated by a cap of course).  This is probably where diode clipping CAME from!

The thing to look at would be that tubes will not make radical positive excursions (grid current limiting), so most of the time they only worried about negative excursions (one diode).  So to control the clipping, using bias might be out.....but of course, a pot can be used, just like we already do for distortions  ;) 

Like they're saying, this isn't a new problem, there are several answers right here!  I like what Bool is suggesting...   
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: composition4 on September 04, 2014, 10:24:52 AM
This limiter I've made works quite well at limiting peaks without much rudeness. I've put some graphs to show the behaviour with different input voltages.  It can be modified to different thresholds and different limiting strengths, by altering the number of diodes and resistor values.

Let me know if this seems like something you're after

(http://i.imgur.com/mUFthfL.gif)

Jonathan
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: StephenGiles on September 04, 2014, 10:35:17 AM
Have you considered current needs of this amp? I used 2 x 12v motor bike batteries to power a 50 watt amp for out door use - loud and no distortion!!
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: Johan on September 04, 2014, 11:15:50 AM
even if my "guitar poweramp concept" thread fell dead to the ground almost a year ago, I still think it has some merit...
blue trace is input, green trace is limiter input and red trace is output.
(http://www.aronnelson.com/gallery/main.php?g2_view=core.DownloadItem&g2_itemId=50220&g2_serialNumber=1)
.as you can see, the last opamp never clipps. and in my  plan, the last opamp was going to be a poweramp chip such as lm1885 or 3886 and R9 and R10 determins the output level(replace with pot)
J
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: kingswayguitar on September 04, 2014, 11:53:57 AM
Quote from: composition4 on September 04, 2014, 10:24:52 AM
This limiter I've made works quite well at limiting peaks without much rudeness. I've put some graphs to show the behaviour with different input voltages.  It can be modified to different thresholds and different limiting strengths, by altering the number of diodes and resistor values.

Let me know if this seems like something you're after

Jonathan

9v supply i'm assuming :)
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: composition4 on September 04, 2014, 12:02:51 PM
Well that example was +/-15V supply but soft limited to +/-8V or so, but it can be used with any supply voltage, it's not really relevant. With the resistor values chosen in that example, signal is largely unaffected up til about 6 volts, then is compressed more and more the higher the input voltage up until a limit of around 8V.

If you only had a 9v supply and you wanted to limit the peaks to, say, +/-3V, you would cut down on the number of diodes in the ladder and re-select resistor values
Title: Re:
Post by: Johan on September 04, 2014, 12:13:16 PM
The limiter start limit as soon as the bases sees 0.7 volt so basicly that's all you need. It would work just as well at 9 volt single supply
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: PeterPan on September 04, 2014, 12:15:05 PM
These are all very interesting and helpful possibilities, so first... THANKS everyone.

Now I appreciate that with any diode clipping scheme there is never any response (attack) time to worry about, so you won't EVER overload the output ever. I might add a stage like that, if only because clipping sounds much better than class D overload! But that alone would also add distortion if I continue to play louder, so I'm thinking I'd still need something a little more like the compression limiting I was considering with the LDR. Even though there is the risk of short term overloads (since the response time can't be zero). I just don't think I want ANY crunch in this situation (I probably should have mentioned that the guitar of interest is acoustic).

Of course I do appreciate the compound diode clip circuit "composition4" posted. In that case, the clipping is spread out over several points along the input waveform! Its too high a part count for my project, but its way cool anyway and  I definitely intend to try it just to see what it sounds like! It almost seems at though you are approximating the transfer curve of a triode vacuum tube there!

As another option, I also discovered this interesting (and pretty cheap) SA551 compander IC today, over at the ON Semiconductor site (https://www.onsemi.com/PowerSolutions/product.do?id=SA571 (https://www.onsemi.com/PowerSolutions/product.do?id=SA571)). The test circuit has a nice low parts count (always nice), but unfortunately the data sheet doesn't contain any complete circuit variations if, for example, I just wanted to use it for limiting.  

Well... lots of things to try!

Title: Re:
Post by: PeterPan on September 04, 2014, 12:19:48 PM
Quote from: Johan on September 03, 2014, 04:11:56 PM
For an instant and simple limiter for that very problem, do a forum search for guitar power amp concept and my name about a year ago. I never finished that design but still intend to. ..a few resistors, two transistors and a pot for setting the level...You get the idea. ..

I'd like to see that if you have a link. I note that in the LDR circuit I had found online, the author noted that a capacitor was later added to help eliminate distortion in the bass register, and apparently bass distortion is an issue requiring special attention in most compression/limiter circuits I've seen.
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: merlinb on September 04, 2014, 02:15:04 PM
So it sounds like you want a limiter followed by a clipper (just to be on the safe side), followed by the class-D amp.

In that case, choose your poison. The Dynacomp is an old favourite. This is also an ideal opportunity to pimp the Engineer's Thumb compressor/limiter!
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: bool on September 06, 2014, 05:27:23 AM
+1 "choose your poison"

You need to know what exactly you want to accomplish.

If you want a "hard" overload protection, IMHO the idea I suggested in my previous post is really tough to beat. Such principles were used in commercial broadcast processors after all.

I'm not so sure about LDR "limiting" - there is always some leeway with these, but to their credit, they will "sound" much more musical. You will have to "trim" these so they will not "allow" for the full amp's power when engaged (with a steady sine or square wave), because you will have to provide some safety headroom for their (too) slow attack time.

Imho the "power amps" that used LDRs as "power limiters" were designed as "soft-clipping" from the get-go (that's technically possible, some use baker clamping and some use different methods) and/or use current limiting on the output transistors (which is the norm).

So the LDR was there to act as an "fast" AGC to prevent gross distortion that would "happen" if a not-too-careful user cranked these too hard (which would happen fast with smaller amps) - or if the user was too "DUI" to begin with.
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: Hatredman on September 07, 2014, 08:00:28 AM
+1 for the Dynacomp. I have a multi-purpose PA amplifier wirh integrated mixer + graph eq + compressor that uses an enganced version of the Dynacomp. Simple and effective.
Title: Re: SIMPLE Limiter circuit reccomendations
Post by: PeterPan on September 11, 2014, 11:11:50 AM
Quote from: bool on September 06, 2014, 05:27:23 AM
+1 "choose your poison"

You need to know what exactly you want to accomplish.

If you want a "hard" overload protection, IMHO the idea I suggested in my previous post is really tough to beat. Such principles were used in commercial broadcast processors after all.

I'm not so sure about LDR "limiting" - there is always some leeway with these, but to their credit, they will "sound" much more musical. You will have to "trim" these so they will not "allow" for the full amp's power when engaged (with a steady sine or square wave), because you will have to provide some safety headroom for their (too) slow attack time.

Imho the "power amps" that used LDRs as "power limiters" were designed as "soft-clipping" from the get-go (that's technically possible, some use baker clamping and some use different methods) and/or use current limiting on the output transistors (which is the norm).

So the LDR was there to act as an "fast" AGC to prevent gross distortion that would "happen" if a not-too-careful user cranked these too hard (which would happen fast with smaller amps) - or if the user was too "DUI" to begin with.

I think you understand exactly what I need... Soft limiting followed by diode clipping, followed by the class D amp. Parts count and cost is always a concern, because this is to be part of a bigger project, so I'm anxious to try the LDR and the clip combination. Its a small practice amplifier after all, and the desired effect is just to (a) prevent class D overload, and (b) allow for a greater overall "apparent" volume during normal playing.

But the "pick your poison" is appropriate! Having a good mental picture now of what I BELIEVE needs to be done, i now need to do some bench playing to see how it actually SOUNDS. Its one of those cases where you truly can never know until you build it, and see what problems you solved, and what new ones have been created!
:icon_wink: