The Ultimate Homebrew Limiter!
-
- proppa neck!
- Posts: 2830
- Joined: Tue Apr 05, 2016 1:23 am
The Ultimate Homebrew Limiter!
Most commercial audio processors for FM (and AM) broadcast use include some kind of clipper. If you're Robert Orban, you split the audio into lots of small bands of frequencies, using insanely over-engineered filters, clip the hell out of each channel, filter again, and then mix the resulting mess back together again as "loud audio".
In the world of electric guitar, most distortion effects do much the same thing - clip the hell out of the signal.....
Call me peculiar, but I don't want my audio to go through a Fuzz Box, no matter how insanely over-engineered the audio processor is. Distortion is distortion, and once it's added to the path, you can't really remove it.
Conventional limiters use FETs, opto-couplers, transistors, transconductance amplifiers, diodes even variable mu pentodes, and all manner of other means of attenuating audio controlled by a DC voltage. This DC voltage is derived from the instantaneous level of the audio passing through the limiter, usually by means of some kind of rectifier in a sub-circuit called the "Sidechain". There's usually some kind of time constant circuit involved to prevent the DC Control Voltage from pumping up and down, slowing the recovery after over-level input, to make the resultant changes in level less obvious to the ear. Here's where the problems start. The response of the DC Control Voltage will have a finite "attack time", so sudden changes in level cause the limiter to allow peaks to sneak through. Attempting to make the Sidechain Attack time constant as fast as possible also introduces the problem of "overshoot", where the gain is reduced too much, leading to "holes" in the audio after peaks. The peaks will cause over-modulation at the transmitter, giving rise to nasty-sounding audio at the receiver and the risk of interference to adjacent stations. Commercial equipment generally includes a clipper to clobber these fast peaks - leading to the Fuzz Box problem.....
Back in my youth, when I was employed (and educated) by a Big Broadcasting Concern, we had "delay-line" limiters that were used to prevent over-modulation of Medium Wave transmitters. They were also pressed into service for levelling telephone calls in News programmes. The delay line (a board full of inductors and capacitors) was a set of "all-pass" filters set at staggered frequencies in an effort to get a reasonably flat frequency response. The delay was measured in the µs, but was enough - the Sidechain looked at the incoming audio in the usual way, but the audio was delayed before it got to the gain control element, so the "Attack Time" of the limiter was effectively zero! The limiter was effectively "seeing the peaks coming" and all the nastiness vanished. There were stereo, 15kHz-wide versions of this built too, but they proved to be horribly expensive, and messed up the stereo imaging because of the variable phase shifts in the delay line....
There were some digital delay lines built - using analogue to digital converters at the input, a shift register (or memory IC) to delay the stream of digits, then D to A converters to recover the audio. Whilst these worked extremely well and gave great results not only for broadcasting, but for disc cutting too, they were incredibly complicated and dreadfully expensive.
Now I'm an old-fashioned kind of chap, and doing the digital conversion, limiting processing and audio recovery in a computer seems a bit like cheating! It can be easily done, and there's even a plug-in for "Audacity" that gives delay-line based limiting.
I set myself the task of building a better mousetrap. In the mid-80s, I worked at Panasonic in Japan. They had a series of "bucket-brigade" delay-line chips for audio. These worked by taking an instantaneous sample of the audio as a voltage across a capacitor, then on each clock pulse passing this voltage to the next capacitor in line, until it gets to the end where a simple lowpass filter recovers clean - but delayed - audio. These ICs were used for time-based guitar (and vocal) effects, such as reverberation, echo, flanging, chorus and phasing.
Most people dismissed the idea of using these ICs for broadcast limiting since they were seen as a gimmick, but Garrard made a "scratch remover" that would "de-click" scratched records. It worked by "seeing the peaks coming" (a large, rapid, common-mode spike is going to be caused by a scratch), and inserting a fraction of second of silence in place of the click. It worked really well, and I've used this method to recover some treasured old records that would otherwise be unplayable.....
The delay only needs to be µs.... The MN3007 is still widely available. It's a bit longer than I'd ideally like (has too many "bucket" stages), but it's the one that we can easily get hold of at a reasonable price. The specification says that the upper clock frequency is ~250kHz giving a delay of ~2ms. In reality, if you don't use the original Panasonic MN3101 clock chip, and buffer the clock lines, you can get it to go at around 1MHz, giving us around 500µs. That's just about perfect.
My prototype used a crystal oscillator module at 4MHz, driving both halves of a dual bistable (4013) to give 1MHz, then a 4049 with the gates paralleled in two lots of three to drive the MN3007 with the bi-phase clock that it requires.
The Sidechain is simple, using op-amps as "ideal diodes" to do the rectification. The attack time of the Sidechain is very slightly shorter than the delay, but this compensates for the time taken for the gain control circuit to respond. I used an LM13700 in the feedback loop of a good quality op-amp. To reduce the op-amp gain, I increase the transconductance amplifier gain, increasing the negative feedback and thereby reducing the output level. The prototype sounds superb - or rather it doesn't. You just can't hear it working! There's no "pumping" or "breathing" and the delay is imperceptible to the ear - it's just as if you're sitting about 20cm further from the loudspeaker!
When I've got all the bugs out of the design, I'll put the circuit up on here. I'm going to reduce the clock frequency to the delay-line chips a bit (1MHz really is thrashing them), and I'll use a cheap standard crystal. There won't be any need to distort your audio to control your modulation level any more!
In the world of electric guitar, most distortion effects do much the same thing - clip the hell out of the signal.....
Call me peculiar, but I don't want my audio to go through a Fuzz Box, no matter how insanely over-engineered the audio processor is. Distortion is distortion, and once it's added to the path, you can't really remove it.
Conventional limiters use FETs, opto-couplers, transistors, transconductance amplifiers, diodes even variable mu pentodes, and all manner of other means of attenuating audio controlled by a DC voltage. This DC voltage is derived from the instantaneous level of the audio passing through the limiter, usually by means of some kind of rectifier in a sub-circuit called the "Sidechain". There's usually some kind of time constant circuit involved to prevent the DC Control Voltage from pumping up and down, slowing the recovery after over-level input, to make the resultant changes in level less obvious to the ear. Here's where the problems start. The response of the DC Control Voltage will have a finite "attack time", so sudden changes in level cause the limiter to allow peaks to sneak through. Attempting to make the Sidechain Attack time constant as fast as possible also introduces the problem of "overshoot", where the gain is reduced too much, leading to "holes" in the audio after peaks. The peaks will cause over-modulation at the transmitter, giving rise to nasty-sounding audio at the receiver and the risk of interference to adjacent stations. Commercial equipment generally includes a clipper to clobber these fast peaks - leading to the Fuzz Box problem.....
Back in my youth, when I was employed (and educated) by a Big Broadcasting Concern, we had "delay-line" limiters that were used to prevent over-modulation of Medium Wave transmitters. They were also pressed into service for levelling telephone calls in News programmes. The delay line (a board full of inductors and capacitors) was a set of "all-pass" filters set at staggered frequencies in an effort to get a reasonably flat frequency response. The delay was measured in the µs, but was enough - the Sidechain looked at the incoming audio in the usual way, but the audio was delayed before it got to the gain control element, so the "Attack Time" of the limiter was effectively zero! The limiter was effectively "seeing the peaks coming" and all the nastiness vanished. There were stereo, 15kHz-wide versions of this built too, but they proved to be horribly expensive, and messed up the stereo imaging because of the variable phase shifts in the delay line....
There were some digital delay lines built - using analogue to digital converters at the input, a shift register (or memory IC) to delay the stream of digits, then D to A converters to recover the audio. Whilst these worked extremely well and gave great results not only for broadcasting, but for disc cutting too, they were incredibly complicated and dreadfully expensive.
Now I'm an old-fashioned kind of chap, and doing the digital conversion, limiting processing and audio recovery in a computer seems a bit like cheating! It can be easily done, and there's even a plug-in for "Audacity" that gives delay-line based limiting.
I set myself the task of building a better mousetrap. In the mid-80s, I worked at Panasonic in Japan. They had a series of "bucket-brigade" delay-line chips for audio. These worked by taking an instantaneous sample of the audio as a voltage across a capacitor, then on each clock pulse passing this voltage to the next capacitor in line, until it gets to the end where a simple lowpass filter recovers clean - but delayed - audio. These ICs were used for time-based guitar (and vocal) effects, such as reverberation, echo, flanging, chorus and phasing.
Most people dismissed the idea of using these ICs for broadcast limiting since they were seen as a gimmick, but Garrard made a "scratch remover" that would "de-click" scratched records. It worked by "seeing the peaks coming" (a large, rapid, common-mode spike is going to be caused by a scratch), and inserting a fraction of second of silence in place of the click. It worked really well, and I've used this method to recover some treasured old records that would otherwise be unplayable.....
The delay only needs to be µs.... The MN3007 is still widely available. It's a bit longer than I'd ideally like (has too many "bucket" stages), but it's the one that we can easily get hold of at a reasonable price. The specification says that the upper clock frequency is ~250kHz giving a delay of ~2ms. In reality, if you don't use the original Panasonic MN3101 clock chip, and buffer the clock lines, you can get it to go at around 1MHz, giving us around 500µs. That's just about perfect.
My prototype used a crystal oscillator module at 4MHz, driving both halves of a dual bistable (4013) to give 1MHz, then a 4049 with the gates paralleled in two lots of three to drive the MN3007 with the bi-phase clock that it requires.
The Sidechain is simple, using op-amps as "ideal diodes" to do the rectification. The attack time of the Sidechain is very slightly shorter than the delay, but this compensates for the time taken for the gain control circuit to respond. I used an LM13700 in the feedback loop of a good quality op-amp. To reduce the op-amp gain, I increase the transconductance amplifier gain, increasing the negative feedback and thereby reducing the output level. The prototype sounds superb - or rather it doesn't. You just can't hear it working! There's no "pumping" or "breathing" and the delay is imperceptible to the ear - it's just as if you're sitting about 20cm further from the loudspeaker!
When I've got all the bugs out of the design, I'll put the circuit up on here. I'm going to reduce the clock frequency to the delay-line chips a bit (1MHz really is thrashing them), and I'll use a cheap standard crystal. There won't be any need to distort your audio to control your modulation level any more!
"Why is my rig humming?"
"Because it doesn't know the words!"
"Because it doesn't know the words!"
- sinus trouble
- proppa neck!
- Posts: 1410
- Joined: Fri Aug 22, 2014 11:34 pm
Re: The Ultimate Homebrew Limiter!
I suspect 'Homebrew' might be a slight understatement here?
But I am intrigued to see the concept you have come up with Mr Albert!
But I am intrigued to see the concept you have come up with Mr Albert!
I am as stupid as I look!
-
- proppa neck!
- Posts: 2830
- Joined: Tue Apr 05, 2016 1:23 am
Re: The Ultimate Homebrew Limiter!
If you can build stuff on Veroboard, you can put one of these together. The current version uses 11 ICs (including the regulators), is powered from a 12V AC wall wart, and has LED indication for gain reduction, limiting and power. The only (slightly difficult ICs to get are the pair of MN3007s, but I was considering multiplexing the audio through a single delay line IC, and thereby including stereo coding and RDS on the board.... This will then be a serious piece of kit, good enough for commercial, legal radio!
"Why is my rig humming?"
"Because it doesn't know the words!"
"Because it doesn't know the words!"
- 3metrejim
- no manz can test innit
- Posts: 147
- Joined: Wed Feb 22, 2017 3:00 pm
Re: The Ultimate Homebrew Limiter!
How about using a sigma-delta A to D (1 bit) and some SRAM to hold the (digitised ) audio, with a counter and some logic to create a circular buffer (read address being write address+1) ? .
I know you said using a computer was sort of cheating (It's not far different from the oversampling scheme of the NRG pro IV stero coder though), but this scheme, if you could clock it fast enough (8MHz?) and have the right sized memory space (16Kb *8), may well work to produce a small audio delay (512uS) - it's not a full computer as contains no microprocessor. It's a little wasteful in terms of memory storing just one bit, but it means that the memory (if you use an 8 bit parallel type) can hold both channels simultaneously (and up to 8 at once) and can be clocked from a single source - the clock might also be used for running the sigma delta A/D converter for both channels (op-amp and flip-flop) keeping everything well synchronised.
There is actually an IC that works with a memory buffer and 1 bit A/D along the same lines - the PT2399, the earlier PT2395 worked with external memory.
I know you said using a computer was sort of cheating (It's not far different from the oversampling scheme of the NRG pro IV stero coder though), but this scheme, if you could clock it fast enough (8MHz?) and have the right sized memory space (16Kb *8), may well work to produce a small audio delay (512uS) - it's not a full computer as contains no microprocessor. It's a little wasteful in terms of memory storing just one bit, but it means that the memory (if you use an 8 bit parallel type) can hold both channels simultaneously (and up to 8 at once) and can be clocked from a single source - the clock might also be used for running the sigma delta A/D converter for both channels (op-amp and flip-flop) keeping everything well synchronised.
There is actually an IC that works with a memory buffer and 1 bit A/D along the same lines - the PT2399, the earlier PT2395 worked with external memory.
-
- proppa neck!
- Posts: 2830
- Joined: Tue Apr 05, 2016 1:23 am
Re: The Ultimate Homebrew Limiter!
The PT2399 is a Karaoke Echo chip. I've got one here in a toy echo effect box. The minimum delay from it seems to be about 25ms and the maximum - before it gets horribly distorted - is about 300ms. If you increase the delay beyond that, the bandwidth and the distortion both really suffer. It's a noisy little blighter too - the S/N is only about 45dB. It's probably OK for its intended use, but for high quality audio, we'll have to look elsewhere.
I've found a reliable source of genuine MN3007s, but they're almost a Fiver each. Clocking them at 1.25MHz seems to work reliably - I've tried eighteen of them in the prototype board just to see if there was any problem with them. I've ordered 200 of them, and the other chips to go around them.
I've redesigned the gain control cells - the THAT2180 far outperforms my design for about £6 per channel and uses fewer external components. Using this VCA chip reduced the distortion by around 12dB and improved the noise floor significantly.
I've also changed the op-amps in the audio path: I was using TL072 and 074 because they're low noise and cheap, but I've upgraded to LM833 or NE5532 since they don't cost much more, are more robust and have a better distortion specification (though similar noise floor) than the TL07X-series.
The sidechain still uses 4558, LM324, and CA3240 since they're not in the audio path and they're perfectly good for the precision rectifier, DC level shifting and time constant circuits.
The unit now has electronically balanced inputs and output, using the "Superbal" configuration at the input and a "Howland Current Pump" for the outputs. The common-mode noise is low, and cable noise rejection is superb - it just doesn't hum! It is possible to use inputs or outputs in unbalanced mode, so grounding the unused input or output automatically increases the gain of the used side to compensate - just like an old-fashioned balancing transformer would. This offers a "best of both worlds" solution, though I favour the use of balanced audio wherever possible (I even have balanced gram pick-ups for improved hum and noise performance!).
When I'm fully happy with the design, I'll make it available. I'm toying with the idea of an RMS detector option for the sidechain, but this may be going a bit too far. I'm going to get a bunch of PCBs manufactured and may make kits available via Ebay. They won't be cheap, but if correctly assembled, you'll have a broadcast limiter that's better than anything else on the market!
I've found a reliable source of genuine MN3007s, but they're almost a Fiver each. Clocking them at 1.25MHz seems to work reliably - I've tried eighteen of them in the prototype board just to see if there was any problem with them. I've ordered 200 of them, and the other chips to go around them.
I've redesigned the gain control cells - the THAT2180 far outperforms my design for about £6 per channel and uses fewer external components. Using this VCA chip reduced the distortion by around 12dB and improved the noise floor significantly.
I've also changed the op-amps in the audio path: I was using TL072 and 074 because they're low noise and cheap, but I've upgraded to LM833 or NE5532 since they don't cost much more, are more robust and have a better distortion specification (though similar noise floor) than the TL07X-series.
The sidechain still uses 4558, LM324, and CA3240 since they're not in the audio path and they're perfectly good for the precision rectifier, DC level shifting and time constant circuits.
The unit now has electronically balanced inputs and output, using the "Superbal" configuration at the input and a "Howland Current Pump" for the outputs. The common-mode noise is low, and cable noise rejection is superb - it just doesn't hum! It is possible to use inputs or outputs in unbalanced mode, so grounding the unused input or output automatically increases the gain of the used side to compensate - just like an old-fashioned balancing transformer would. This offers a "best of both worlds" solution, though I favour the use of balanced audio wherever possible (I even have balanced gram pick-ups for improved hum and noise performance!).
When I'm fully happy with the design, I'll make it available. I'm toying with the idea of an RMS detector option for the sidechain, but this may be going a bit too far. I'm going to get a bunch of PCBs manufactured and may make kits available via Ebay. They won't be cheap, but if correctly assembled, you'll have a broadcast limiter that's better than anything else on the market!
"Why is my rig humming?"
"Because it doesn't know the words!"
"Because it doesn't know the words!"
- 3metrejim
- no manz can test innit
- Posts: 147
- Joined: Wed Feb 22, 2017 3:00 pm
Re: The Ultimate Homebrew Limiter!
Any comment on the use of a sigma-delta modulator and clocked memory? An 8 bit wide by 32k SRAM memory chip costs less than £1. Not sure how easy the read/write counter logic would be, or what noise performance there would be, but surely worth looking into. After all, CD players use the 1 bit system and they seem to have a decent dynamic range and noise level, but seeing as you've already bought 200 of the MN3007...
- 3metrejim
- no manz can test innit
- Posts: 147
- Joined: Wed Feb 22, 2017 3:00 pm
Re: The Ultimate Homebrew Limiter!
On the counter logic: There is no need for an "add 1", you just have to read first, then write, then increment the counter. Would have the same effect as writing, incrementing and the counter by 1 followed by reading. Might be a divide by two in there somewhere, or triggering on alternate clock edges. If you clock the sigma-delta modulator at 6.144MHz then somewhere there could be a 12.288MHz crystal - sounding familiar? BTW, it needs to be what is termed a 2nd order sigma-delta modulator...
- 3metrejim
- no manz can test innit
- Posts: 147
- Joined: Wed Feb 22, 2017 3:00 pm
Re: The Ultimate Homebrew Limiter!
Also if you amplitude modulate the bitstream coming out of the sigma delta modulator before feeding it into a reconstruction filter, you will probably achieve a gain control - a little like the pro IV limiter you posted on the old forum - goodbye to most expensive parts: the MN3007 x 2 and THAT2180 x2, but you need some wide bandwidth op-amps for the sigma-delta modulator...
Your thoughts Albert? Would it work?
Your thoughts Albert? Would it work?
-
- proppa neck!
- Posts: 2830
- Joined: Tue Apr 05, 2016 1:23 am
Re: The Ultimate Homebrew Limiter!
Jim - thinking (carefully) about it, it would probably work quite well. Unfortunately, I have an antipathy against digital processing (have you heard a Broadcast Warehouse DSPX? - it's HORRIBLE ). I designed a couple of pretty well received broadcast processors (for an American company that manufactures in South Korea), and I've always stayed in the analogue domain. A friend of mine invented a software way of broadcast processing, and it sounds really good, but I like to have proper control of all the parameters, using real components that I can tweak, change and add to easily!
The only reason that I want to introduce delay into the new limiter is to give the sidechain time to react and to avoid overshoots. The prototype completely obviates the need for clipping, giving much lower distortion and noise. I was concerned about introducing delay into the signal path until I realised that it's just the same as moving the studio monitor speakers back a bit!
I'm going to spend a day or two next week building a "finished" version of the limiter, and will house it in a 1U 19" box. I'll probably add some blinking lights to give the uninitiated idiots something to look at. All the controls will be internal presets - possibly multi-turn trimpots accessible through a locking front flap. The idea is that it'll be a "set and forget" final processor to protect the modulation depth and bandwidth of what's being sent to the transmitter.
I've decided to include 15 kHz filtering as a board option - I have a gyrator-based circuit that works astonishingly well. A "full" version could include a stereo coder, RDS generator, pre-emphasis, lowpass filters and limiter, for a one-stop-shop for a great sounding stereo station. This would probably have to go into a 2U 19" box with extra LEDs and possibly some switchable options to persuade the uninitiated that there's a lot more technology in there!
This could be a great product!
The only reason that I want to introduce delay into the new limiter is to give the sidechain time to react and to avoid overshoots. The prototype completely obviates the need for clipping, giving much lower distortion and noise. I was concerned about introducing delay into the signal path until I realised that it's just the same as moving the studio monitor speakers back a bit!
I'm going to spend a day or two next week building a "finished" version of the limiter, and will house it in a 1U 19" box. I'll probably add some blinking lights to give the uninitiated idiots something to look at. All the controls will be internal presets - possibly multi-turn trimpots accessible through a locking front flap. The idea is that it'll be a "set and forget" final processor to protect the modulation depth and bandwidth of what's being sent to the transmitter.
I've decided to include 15 kHz filtering as a board option - I have a gyrator-based circuit that works astonishingly well. A "full" version could include a stereo coder, RDS generator, pre-emphasis, lowpass filters and limiter, for a one-stop-shop for a great sounding stereo station. This would probably have to go into a 2U 19" box with extra LEDs and possibly some switchable options to persuade the uninitiated that there's a lot more technology in there!
This could be a great product!
"Why is my rig humming?"
"Because it doesn't know the words!"
"Because it doesn't know the words!"
-
- who u callin ne guy bruv
- Posts: 24
- Joined: Mon Jul 20, 2020 7:08 am
Re: The Ultimate Homebrew Limiter!
Hi Albert, seems like a very smart solution.
Did you manage to complete this limiter?
Did you manage to complete this limiter?
-
- proppa neck!
- Posts: 2830
- Joined: Tue Apr 05, 2016 1:23 am
Re: The Ultimate Homebrew Limiter!
I've been abroad (for work). I'll be back at my bench in the next few days.
"Why is my rig humming?"
"Because it doesn't know the words!"
"Because it doesn't know the words!"
-
- big in da game.. trust
- Posts: 74
- Joined: Tue Jun 30, 2020 9:10 pm
Re: The Ultimate Homebrew Limiter!
How about now? Are you back, you last post was 14 day ago
-
- proppa neck!
- Posts: 2830
- Joined: Tue Apr 05, 2016 1:23 am
Re: The Ultimate Homebrew Limiter!
I've done a little more work on it, but have had a bit of a family crisis to deal with overseas. I'm back in the UK now (for a few days) and will spend some serious bench time working at the project.
"Why is my rig humming?"
"Because it doesn't know the words!"
"Because it doesn't know the words!"
-
- big in da game.. trust
- Posts: 74
- Joined: Tue Jun 30, 2020 9:10 pm
Re: The Ultimate Homebrew Limiter!
How about now, must have made good progress in a year…?
-
- proppa neck!
- Posts: 939
- Joined: Fri Aug 26, 2016 7:01 pm
Re: The Ultimate Homebrew Limiter!
hahahahaha @tvtv i think you may have to wait a bit more , as i did before ......
-
- proppa neck!
- Posts: 2830
- Joined: Tue Apr 05, 2016 1:23 am
Re: The Ultimate Homebrew Limiter!
Please wait a bit more. I'll put pencil to paper shortly.
I've reconsidered the 1-bit delay idea, and have a breadboarded version here at the moment. This could make for a great solution, stay (mostly) analogue, and be built of generic components. More bench time needed....
I've reconsidered the 1-bit delay idea, and have a breadboarded version here at the moment. This could make for a great solution, stay (mostly) analogue, and be built of generic components. More bench time needed....
"Why is my rig humming?"
"Because it doesn't know the words!"
"Because it doesn't know the words!"
-
- proppa neck!
- Posts: 939
- Joined: Fri Aug 26, 2016 7:01 pm
Re: The Ultimate Homebrew Limiter!
You do not have the required permissions to view the files attached to this post.
- rigmo
- tower block dreamin
- Posts: 490
- Joined: Wed Jan 30, 2019 9:35 pm
Re: The Ultimate Homebrew Limiter!
thank you AlbertH