Need Audio Compression Circuit

Thread Starter

rasa73

Joined Apr 25, 2014
7
Hello All,

First off I am new here so I would like to say hello, and thanks for the great forum. A little about me: I have worked in the electrical industry for 20 years and hold a Master Electricians License. I have extensive experience in controls systems; such as building automation, production automation, fire alarm and suppression systems, and many other areas. I am also a recent graduate and now hold a Bachelor of Science Software Engineering degree. I am currently looking for an entry level software engineering position, so if you have one I am interested.

As the title suggests I am looking for information on downward compression for audio circuits. You may be wondering why. Well I am currently out of work, cheap, and board. I was looking for some electronics projects to occupy my time (when not looking for a job). I found a simple audio amp circuit for head phones and built one. The thought then occurred to me that I could use an amp to build my own amplified hearing protection. After some research I learned that a downward compression circuit is what I am looking for. This series of event brought me to this wonderful place.

My goal is to build hearing protection for when I go shooting and to wear on construction sites when working as an electrician. My research indicates that I need to build an amp with a control circuit. When the control circuit detects voltage above a certain level it shuts the amp off. My problem is I do not know how to build the control circuit or how to calculate what voltage should be the threshold for shut off.

If possible I would like the amp and control circuit to run on 6vdc. this way the power source will not be so large that it is cumbersome to wear all day. I plan on wearing the power source and circuitry around my neck, like a necklace. The electret mics and speakers will be contained in the ear covers of the hearing protection.

What I think I need:

a formula to convert decibels to volts.

a control circuit diagram

information on how to size the resistors and capacitors in both the amp and control circuit (basically a beginners guide to audio circuitry).

any other information you believe I need.

Thanks for taking the time to read my first post and for any help you may offer.

rasa73
 
Last edited:

ScottWang

Joined Aug 23, 2012
7,400
It seems you don't need the Audio Compression Circuit, and you will need an amplifier and signal converter, and a voltage detector and D flip-flop to lock the trigger signal, and the signal will strobe the bjt to drive the relay, and the relay will cut off the amp.

If that is what you want, then you will need as below:

Amp → AC to DC Trigger signal → Voltage Comparator → D Flip-Flop → Bjt → Relay → Amplifier control.

You also need a push switch to reset the D Flip-Flop to stop the relay, and bring the amplifier back to normal.
 

Thread Starter

rasa73

Joined Apr 25, 2014
7
Thanks for the reply Scott,

Your solution is way over by beginners head. I was under the impression that a downward compression circuit would do the trick. This would also eliminate the need for a reset switch.

My understanding of a downward compression circuit is as follows. Normal level sounds will go through the circuit as normal. If a loud noise is received, resulting in a voltage above a preset threshold the amplification is attenuated, allowing the sound to be heard but not at a dB above the threshold voltage. To me this means that a 140 dB sound would be heard as a 60 dB sound.

Here is a Wiki article describing what I am looking for http://en.wikipedia.org/wiki/Dynamic_range_compression

I will begin to look into what you have suggested. Thanks for the help.
 

THE_RB

Joined Feb 11, 2008
5,438
A limiter will work just as well for your application, or a combined compressor/limiter.

You can google for a "audio limiter schematic". :)
 

Thread Starter

rasa73

Joined Apr 25, 2014
7
#12,

The NE570DG is an impressive IC. If I understand the datasheet It will either compress a signal or expand one. It is also possible to alter the gain by adding external resistance. If I understand what I am reading (not sure I do) this one IC will do everything I want. Or I could just copy the internal compression circuit of the NE570DG and use my own op amp. Thanks for the link #12
 

ScottWang

Joined Aug 23, 2012
7,400
When the control circuit detects voltage above a certain level it shuts the amp off.
The IC function of NE570 including two parts as what I described "AC to DC Trigger signal → Voltage Comparator", the function of AC to DC Trigger signal that it just using diode and capacitor, I added the D Flip-Flop as CD4013, because you want the function of shuts the amp off, using D Flip-Flop to lock the trigger signal, if you don't want that function is ok, the output of voltage comparator can be connecting to bjt and relay or mosfet, whatever you want to shuts the amp off or just want to reducing the output amplitude, it's easy to reaching those functions.

Which way is better, that's your decision, if you think NE570 suitable for you then you just buy it to try.
 

#12

Joined Nov 30, 2010
18,224
I'm surprised some of the other old farts didn't think of that one. You can spend all day finding out how many aspects you can control. Attack, release, quiescent gain, etc. Still, that's better than spending all day trying to design the whole thing from scratch, and the next few days working the bugs out.
 

ian field

Joined Oct 27, 2012
6,536
Hello All,

First off I am new here so I would like to say hello, and thanks for the great forum. A little about me: I have worked in the electrical industry for 20 years and hold a Master Electricians License. I have extensive experience in controls systems; such as building automation, production automation, fire alarm and suppression systems, and many other areas. I am also a recent graduate and now hold a Bachelor of Science Software Engineering degree. I am currently looking for an entry level software engineering position, so if you have one I am interested.

As the title suggests I am looking for information on downward compression for audio circuits. You may be wondering why. Well I am currently out of work, cheap, and board. I was looking for some electronics projects to occupy my time (when not looking for a job). I found a simple audio amp circuit for head phones and built one. The thought then occurred to me that I could use an amp to build my own amplified hearing protection. After some research I learned that a downward compression circuit is what I am looking for. This series of event brought me to this wonderful place.

My goal is to build hearing protection for when I go shooting and to wear on construction sites when working as an electrician. My research indicates that I need to build an amp with a control circuit. When the control circuit detects voltage above a certain level it shuts the amp off. My problem is I do not know how to build the control circuit or how to calculate what voltage should be the threshold for shut off.

If possible I would like the amp and control circuit to run on 6vdc. this way the power source will not be so large that it is cumbersome to wear all day. I plan on wearing the power source and circuitry around my neck, like a necklace. The electret mics and speakers will be contained in the ear covers of the hearing protection.

What I think I need:

a formula to convert decibels to volts.

a control circuit diagram

information on how to size the resistors and capacitors in both the amp and control circuit (basically a beginners guide to audio circuitry).

any other information you believe I need.

Thanks for taking the time to read my first post and for any help you may offer.

rasa73
The minimalist approach would be a limiting amplifier - or one with such small dynamic range, it can't hurt your ears.

There's an amplifier circuit been floating around the web for years that runs off a single 1.5V cell.

It uses 3 (or an uneven number of) transistors, each stage is the simplest it can be with no emitter resistor, each output effectively shunts the bias to the next stage - the operating point is established by nfb via a feedback resistor from the final output back to the input.

Actually, the feedback resistor is split into 2 unequal parts for a tapping point where a capacitor shorts AC nfb to GND so you actually get some gain.
 

AnalogKid

Joined Aug 1, 2013
11,045
Going back to the original question...

1. It sounds like what you are doing is reinventing noise-cancelling headphones. Note that you will never be able to duplicate the performance of even cheap ones for the price of cheap ones. Still, I understand bored, so...

2. A compressor will work against you, not for you. If all you want to do is cut off the headphone amp when the audio gets above a fixed level, a compressor makes it more difficult to detect that level because it reduces the voltage amplitude range of the audio, making it more difficlut to detect a specific voltage.

3. All compressor or AGC circuits have a delay. They do not track the instantaneous audio amplitude. Rather, they track the average value (or RMS value in expensive commercial units), and that requires an averaging filter or integrator or something to smooth out minor gain variations. Without such a filter the output amplitude moves up and down rapidly, especially with speech, an effect called "pumping". This is not a problem when levelling out audio for broadcast or sound reinforcement, but the delay guarantees that your circuit will not turn off the amp in time to have any effect on audio transients. And a gunshot is pretty much the definition of an audio transient. You want the fastest possible response time, and a compressor by definition is not that. A compressor might be the right thing for the audio signal path, but pick off the audio before the compressor for the shutoff level detector.

4. I play the drums, and Santa brought me expensive noise-cancelling headphones (not related incidents). After some trials, I can say with great confidence that noise cancelling headphones do not work on fast-attack transients.

ak
 

ian field

Joined Oct 27, 2012
6,536
Going back to the original question...

1. It sounds like what you are doing is reinventing noise-cancelling headphones. Note that you will never be able to duplicate the performance of even cheap ones for the price of cheap ones. Still, I understand bored, so...

2. A compressor will work against you, not for you. If all you want to do is cut off the headphone amp when the audio gets above a fixed level, a compressor makes it more difficult to detect that level because it reduces the voltage amplitude range of the audio, making it more difficlut to detect a specific voltage.

3. All compressor or AGC circuits have a delay. They do not track the instantaneous audio amplitude. Rather, they track the average value (or RMS value in expensive commercial units), and that requires an averaging filter or integrator or something to smooth out minor gain variations. Without such a filter the output amplitude moves up and down rapidly, especially with speech, an effect called "pumping". This is not a problem when levelling out audio for broadcast or sound reinforcement, but the delay guarantees that your circuit will not turn off the amp in time to have any effect on audio transients. And a gunshot is pretty much the definition of an audio transient. You want the fastest possible response time, and a compressor by definition is not that. A compressor might be the right thing for the audio signal path, but pick off the audio before the compressor for the shutoff level detector.

4. I play the drums, and Santa brought me expensive noise-cancelling headphones (not related incidents). After some trials, I can say with great confidence that noise cancelling headphones do not work on fast-attack transients.

ak
For cheap and simple, Walkman style ear buds are quite good at excluding a fair bit of external noise - especially the "super bass" variety with soft compliant rubber insert fittings.

If you play music through them, they drown out most of what's left. But if you're in a hazardous environment where you may need to hear shouted warnings, a MIC and attenuated amplifier is a better idea.
 

Thread Starter

rasa73

Joined Apr 25, 2014
7
AnalogKid,

I am not trying to reinvent noise-cancelling tech, I am trying to copy the the tech used in electronic hearing protection. I am probably wrong but from my research, the most modern electronic hearing protection use feed-forward compression circuits. Basically, the input voltage is run through a detection circuit, if the input signal is above a preset threshold voltage, the output is compressed. Otherwise the signal passes through the amp normally.

I appreciate your input, especially about attack times and how noise-cancelling circuits have an attack time that is to slow. For my project I want an attack time that is as fast as possible. I am not concerned with a fast release time.

ian Field,

The type of head phone you describe are what I was originally thinking of using. But I do not believe they would provide enough hearing protection in extreme cases; such as gun fire. So I have moved on to incorporating in ear plugs. Right now I am brain storming ways to attach silicon in ear plus with headphone, and a mic. I plan on using a mic on each ear to maintain stereo hearing.

Right now I am just learning about how different amps work. So far I am leaning toward a low gain amp with a limiter. Keeping everything simple for my first try seems like a good way to learn, and allows me to use the material I have on hand. However the IC #12 linked me to, is enticing. The only draw back to the NE570DG is that it would make it so easy for me that I would not learn that much about circuit design.
 

Thread Starter

rasa73

Joined Apr 25, 2014
7
#12,

Thanks for another circuit. I might mock this one up tonight and experiment with it. Unfortunately the only op-amps I have on hand are fairly noisy. I have to wait until the end of May for my order of TL072 s to show up.

How do you think a TL072 will work in an audio amp? I now know there are better options, but am hoping the TL072 s will work well enough.
 

#12

Joined Nov 30, 2010
18,224
I love the TL07x series. Been there, done that, and the audio nutcase never figured out his tube amp even HAD transistors in it. :D
 

AnalogKid

Joined Aug 1, 2013
11,045
With your expanded explanation, it sounds like you can get by with a switched-gain amplifier or a simple diode-based limiter rather than a full-blown AGC or compressor. The diode-based version isn't as accurate in changing the gain at some exact instantaneous voltage, but nothing can be faster because it doesn't have a separate detector stage.

The tradeoff is amplitude reduction range. With a diode limiter, the signal can be attenuated only as much as the opamp has gain. So if it is a gain stage with a gain of 10, the output can be attenuated only 20 dB below its non-limited value. With a comparator and a switched attenuator, you can turn down things almost to zero signal. Its basically a one-step volume control.

ak
 

SgtWookie

Joined Jul 17, 2007
22,230
The TL07x series are pretty nice considering that they are >30 years old; fairly low noise and decent bandwidth. However, there are drawbacks to them; they are not RRI nor RRO (Rail-to-Rail Input, Rail-to-Rail Output) which means you can't use all of your battery voltage. For example, a TL07x has a common mode input range of Vee/V- +3v to Vcc/V+ -1.5v. That means the negative supply voltage plus 3v to the positive supply voltage minus 1.5v. You say you want to use a 6v supply, and the TL07x series will need 4.5v of that (3v+1.5v) leaving only a 1.5v window to get audio through - that's not much at all.

The MC33078 dual and MC33079 quad opamps are basically drop-in replacements for TL072 and TL074 respectively, yet are much faster (9MHz BW vs 4MHz), 1/4 the noise, and although not RRIO, they can get within a volt of Vcc/V+ and Vee/V-.
Datasheet:
http://www.ti.com/lit/ds/symlink/mc33078.pdf

The OPA2134 has much lower distortion than even the MC3307x opamps, but are more expensive. Datasheet:
http://www.ti.com/lit/ds/symlink/opa134.pdf

Then there's the LMC6462 and LMC6464; these are slower but RRIO and use far less power. Datasheet:
http://www.ti.com/lit/gpn/lmc6462

Another:
http://www.ti.com/lit/gpn/lm8272

Not trying to make the decision difficult; just pointing out that there are alternatives to the "good old standby" of the TL07x series. For an amp that you would operate with a ±15v supply, they still work very well. For battery powered items in particular, there are better choices.
 

#12

Joined Nov 30, 2010
18,224
Yeah...I am used to working with +/- 15 supplies. Didn't even think about battery limitations.

Mybad.:(
 
Top