Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Dynamic Range Compression

Status
Not open for further replies.

JebRadic

New Member
I am beginning to solder one of my first circuits, an amplifier for a parabolic microphone, and am trying to find a method to cull out loud sounds while leaving quieter sounds intact (because I don't want my eardrums to bleed when I have the gain turned up to hear faint sounds). If I were doing this on audio editing software, I would use dynamic range compression and I had hoped to find a good IC that could do that, but such isn't the case. A selective attenuator would be ideal because I could easily apply it to the projects I have in mind for radio when I have gotten enough experience to move onto them, but attenuators affect the whole amplitude spectrum while I am only interested in reducing loud sounds.

So, in summary, what can I use to cut out loud sounds while preserving (most of) the detail on quieter ones?

Thanks in advance.
 
I would use dynamic range compression and I had hoped to find a good IC that could do that, but such isn't the case.

Yes, it is. First, Maxim makes thee MAX9814, a single-chip electret microphone preamp with traditional volume limiting built-in, and Adafruit sells a module based on it.

But for true dynamic range compression, go here:
http://thatcorp.com/Analog_Engine_Dynamics_Processor_ICs.shtml

A simple volume limiter is very different from a true dynamic range compressor. A DRC delivers significantly better audio with way fewer compression artifacts and noise pumping, but it is a more complicated design. Look at the 4315. THAT has a ton of app notes that explain everything, and you can use their app circuits part for part as an excellent starting point.

Analog Devices makes the SSM2167, an equivalent all-in-one part. It is less configurable than a THAT design, but might be all you need to get started.

ak
THAT_Analog_Engine_Selector.gif
 

Attachments

  • THAT_Analog_Engine_Selector.pdf
    23.5 KB · Views: 203
Last edited:
My new hearing aids have excellent AGC. Dogs barking, motorcycles or clapping hands (like gun shots?) are cut down immediately without distortion, then the sound level is back to normal very quickly when the noises are gone.
They are very sensitive in most modes so they have "background noise reduction" which slowly reduces the gain when there is no speech to be picked up. Then any speech instantly brings up the gain to normal.
 
Don't the latest-gen high-techy hearing aids have DSP engines?

ak
 
This http://www.valvewizard.co.uk/engineersthumb.html seems like a rather nice and simple compressor.

That looks like a great diy compressor, definitely tempted to give wiring it up a try.

Yes, it is. First, Maxim makes thee MAX9814, a single-chip electret microphone preamp with traditional volume limiting built-in, and Adafruit sells a module based on it.

But for true dynamic range compression, go here:
http://thatcorp.com/Analog_Engine_Dynamics_Processor_ICs.shtml

A simple volume limiter is very different from a true dynamic range compressor. A DRC delivers significantly better audio with way fewer compression artifacts and noise pumping, but it is a more complicated design. Look at the 4315. THAT has a ton of app notes that explain everything, and you can use their app circuits part for part as an excellent starting point.

Analog Devices makes the SSM2167, an equivalent all-in-one part. It is less configurable than a THAT design, but might be all you need to get started.


Fantastic! That is what I was looking for. (BTW, I was talking about my finding a compressor in IC form when I said 'such wasn't the case'. I had no doubt they existed.) Anyway, I think I will try one of the THAT designs - they seem to be what I am looking for. A question concerning getting them, though, I am afraid I will end up frying it with my soldering iron when I try to tack it onto a breakout board. When you request a sample, do they give more than one? (It doesn't look like they sell in quantities less than 50-100, so I can't just buy 3 or 4 of them)

A relevant question, where would be a good place to go to learn things like you and kubeek suggested? Over the last sevral days, I spent the better part of four hours searching the internet for these very things but never got anything of interest. I wonder if I happened across an IC that was what I was looking for but the technical description was so thick that I didn't catch what it was supposed to do.
 
The THAT parts; The 4315 and 4320 and 4316 are single supply. Simple. I have seen some of these in wireless microphones.
THAT has good application notes!
I don't know if you want "compressor" mode or "limiter" mode. Real all you can from THAT.
 
The that chips seem rather costly at $17 for that4301, while the LM13700 costs roughly $1.50. Both circuits seem to do the same, so I would rather try first experimenting with the cheaper alternative.
 
A relevant question, where would be a good place to go to learn things like you and kubeek suggested? Over the last sevral days, I spent the better part of four hours searching the internet for these very things but never got anything of interest. I wonder if I happened across an IC that was what I was looking for but the technical description was so thick that I didn't catch what it was supposed to do.

THAT has demo parts already mounted on adapter boards for prototyping, but their business model is geared toward volume manufacturers like professional wireless microphone companies. The SSM part is on the shelf at Digikey for under #3 in ones. Yes the pins are small, but the eval board is $120 so you can burn up a few and still come out ahead. Are you doing this on a pc board? If not, search ebay for surface mount adapter boards for $2 or less. You still have to hand solder the part, but now it is to properly spaced pads that expand out to holes for normal parts.

These days, online forums are an excellent place to search for assistance. There are specialized ones for audio topics, and compression is a frequent topic. When I'm starting down a new path, I take some time to think of all of the possible terms that might form part of a description of what I want, then throw some word salad into Yahoo and see what comes up. If you are talking specifically about things that involve analog circuit design, then set up links to all of the major chip players and pound through their online app notes. Analog Devices and National Semiconductor (now TI) have decades of material that still is considered golden.

Some things are not learnable without asking questions because a lot of past information is not online. You have to be of a certain age to remember the dBx audio processing system, the chip designs that came out of it, and the evolutions of those companies. I and others around here lived through times like that for all kinds of technologies, and sit around waiting for someone to ask a new question about the old tech.

ak
 
The that chips seem rather costly at $17 for that4301, while the LM13700 costs roughly $1.50. Both circuits seem to do the same, so I would rather try first experimenting with the cheaper alternative.

THAT is expensive, but the gold standard. SSM from Analog Devices is much less ($2.85), and easier to implement. Both are a pain to hand solder. The LM13700 is just a voltage controlled amp, and needs a fair amount of external stuff to turn it into a complete compressor.

And to Ron's comment - "limiter" and "compressor" usually are used interchangeably to mean a relatively simple peak detector driving a variable attenuator, usually in an opamp feedback loop. Better versions use something like the 13700 with a true multiplier cell, but they still are peak limiters. Separate from those, a true dynamic range compressor is based on RMS signal conversion rather than peak detection, a logarithmic transfer curve rather than a brick-wall comparator, and produces a very different output and listening experience.

ak
 
The LM13700 is just the variable gain amp. No level detector.
Most of the THAT parts include everything.

Look at the SSM2167. It includes everything for $1.34 at DigiKey.com
 
Don't the latest-gen high-techy hearing aids have DSP engines?

ak
Probably, because everything (EQ, gain, compressor threshold and anti-feedback) is wirelessly programmable and the hearing aids "think" about how to perform each moment. They even wirelessly "talk" to each other to stay in sync with the mode I select.
 
Thanks for all the help. The SSM series looks like a good cheep start, and I can branch out into the more expensive ones if I think I need the additional quality. (Anyway, it will be good knowing they exist when I start doing other projects.) I've found adapter/breakout boards for the different chips I want to experiment with, so I am ready to start buying components and finding out just how bad I am at soldering.
 
Hi Jeb,
Pushing you back to a basic analog DIY, not for super quality but for basic idea and for fun http://techlib.com/electronics/audio.htm#AGC
A dynamic microphone Automatic Gain Controller (AGC) designed by pretty intelligent engineer.

Anyway I also had searched lot more about compressor once. So hope you will post every experiment in the thread.
 
The photocell circuit is too slow to compress audio. It lets fast peaks get through and cause extreme distortion.

My first job was with Philips. When they invented the Compact Cassette tape player/recorder they were desperate to reduce tape hiss so they bought Signetics who designed a pretty good compressor/expander IC called the NE570, 571 and 572. Signetics also invented the NE555 timer IC. The audio was compressed and recorded then it was played back using the expander so the dynamic range was restored but without tape hiss.
Here are applications of the compressor/expander IC:
 

Attachments

  • Compandor applications.pdf
    118.6 KB · Views: 239
The photocell circuit is too slow to compress audio. It lets fast peaks get through and cause extreme distortion.
Could we use IR LED vs phototransistor for fast attack and relese? Or could we use IR LED based optocoupler for audio compressor? (not for super quality but for experiment)
 
The circuit in post #16 isn't slow because of the photocell, it is slow because the cell is driven by an integrator with a 1 second time constant. Granted CDS cells are not quick-responding, but this circuit is unusually slow. It is meant to mimic the actions of a human person riding gain, someone trained not to overreact to peak transients and move the slider slowly to make the gain riding less noticeable to listeners. This can be better than fast-attack or brick wall limiters, but as AG points out it also can create peak clipped distortion. A forward compressor described starting in post #3 is highly regarded as a better way to go if you must compress things.

ak
 
Could we use IR LED vs phototransistor
Well.....the photo cell looks like a variable resistor and thus makes a good variable gain amplifier. Much like a "pot" makes a good variable gain stage.
A photo transistor is not linear and .......well don't. lol
Granted CDS cells are not quick-responding
My first "limiter" used a photo cell. The cell was too slow for what I wanted to do. That was 40+ years ago.
I have used most of the ICs talked about above.
>THAT is high end and very good distortion. More that what you need!
>Use any of the options that has low parts count.
>Do not use the LM13700. It is only part of the project. There are missing pieces.
> There are many limiters using transistors and FETs. There are too may parts. Some don't work that well.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top