New "Circuit Fun" video: Automatic audio leveling circuit - Page 1
Forum section: electronics / projects

author: w2aew
author_rank: Super Contributor
timestamp: June 27, 2014, 08:57:02 pm
content: I put this circuit and video together for a friend that was looking for a simple way to equalize the audio volume from the various stations he receives on his police/fire/emergency scanner.

author: Lukas
author_rank: Frequent Contributor
timestamp: June 27, 2014, 09:42:08 pm
content: Simple circuits like these continue to amaze me in terms of what's possible with a few jellybean transistors and diodes. When I heard of AGC, I first thought of something like a voltage controlled amplifier IC.

author: w2aew
author_rank: Super Contributor
timestamp: June 27, 2014, 10:25:06 pm
content: Quote from: Lukas on June 27, 2014, 09:42:08 pmWhen my friend asked me about doing this circuit - my first thought was doing some gain control with an op amp based peak detector and a JFET or MOSFET for gain control on a second op amp gain stage. The more I tinkered, the more I simplified things. I love when circuit development reduces complexity down to some simple but really cool little circuits like this. Analog rules!

author: apelly
author_rank: Unknown
timestamp: June 27, 2014, 11:13:39 pm
content: w2aew, I could watch your videos all day. Thanks for putting in the effort mate.

author: Legit-Design
author_rank: Frequent Contributor
timestamp: June 27, 2014, 11:45:16 pm
content: I had same problem, solved it by doing this:http://askubuntu.com/questions/31580/is-there-a-way-of-leveling-compressing-the-sound-system-wideShould work on every Gnu/Linux operating system, doesn't have to be ubuntu or debian based. Or maybe even on windows with proper binaries? Or pipe sound from windows to another machine running pulseaudio server?Code:load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12set-default-sink compressorcontrol=1,3.5,401,-30,20,5,12I switched the2. Attack time (ms): The attack time in milliseconds.to 3.5 because 1.5 did produce noticeable click whenever sound pumped too fast. The clicking only occured when someone had not bothered to clean their audio. Now I never have to worry about damaging my ears or my headphones.I arrived at this solution after having Gaming audio card on my windows pc. It has built in proper headphone amp that clicks a relay, and in driver side "smart volume" or automatic compressor that deals with quiet and loud sounds. It's meant so you can hear faint footsteps on some games. Works treat on every loud or quiet sound. Some idiot tries to break your head on youtube? Just have this and see all the people complaining about their blown ears. I can play audio from different sources, one audio will take over and it will automatically make the other more quiet if I want to do so. If both audios were equal they would continue to play at same volume, but with this it seems like the other audio will automatically become more quiet, and will come back to it's original volume when the other audio stops. Actually couldn't watch the avatar movie without this compression, because the sound was ear blowing high on some battle scenes with music, and dead quiet in some normal conversation pieces.Does it decrease "dynamic range"? Probably, that's what compression does.Do I have to be constantly fiddling with the volume knob? No, because this takes care of that.I like when things can be done with hardware, but sometimes things can be done even better with just existing stuff and some software.

author: SirNick
author_rank: Frequent Contributor
timestamp: June 28, 2014, 03:04:22 am
content: That's a really neat little circuit. This would be ideal to add in-line on a conference room phone system, for example. My gut tells me it wouldn't work very well for hi-fidelity compression, but for voice applications, I dunno if it could get any easier than this. Nice one.

author: w2aew
author_rank: Super Contributor
timestamp: June 29, 2014, 01:20:16 am
content: Quote from: SirNick on June 28, 2014, 03:04:22 amYes, you're probably right. Good for communication grade voice signals, but likely too much distortion for high fidelity audio.

author: w2aew
author_rank: Super Contributor
timestamp: July 31, 2014, 12:40:39 am
content: Bumping this old thread to add an update video. I had several requests to demonstrate how well this circuit works on an actual scanner. Here's a short video of the results:

author: dannyf
author_rank: Super Contributor
timestamp: July 31, 2014, 11:24:59 am
content: You are essentially using the diodes as a resistor whose (equivalent) resistance varies with the input signal (which is being rectified and applied to the lower npn's base to control the current, thus the resistance, of the diodes).Diodes being one directional, you likely will get a distorted waveform for the positive vs. negative halves of the input signal.One alternative may be to use the rectified signal to drive an led which changes the resistance of a photoresistor - to minimize distortion.

author: motocoder
author_rank: Unknown
timestamp: July 31, 2014, 12:20:07 pm
content: Quote from: w2aew on June 27, 2014, 08:57:02 pmYour videos are my absolute favorites. I didn't realize you were on the forum here, but glad I have the opportunity to say: Thank you for the videos, and please keep making them.

author: w2aew
author_rank: Super Contributor
timestamp: July 31, 2014, 12:58:52 pm
content: Quote from: dannyf on July 31, 2014, 11:24:59 amYes, absolutely right. There is a small amount of distortion due to the non-linearity of the diode, but the signal amplitude is quite small with respect to the bias on the diodes, so the distortion is really not too bad because the diode never gets anywhere near reverse biased. If you watch the first video, you'll see that the distortion is present, but really not bad at all. I certainly wouldn't use this circuit for anything high fidelity, but for the typical signals received on a scanner, it works quite well. I thought about building one with a photo-resistor, but didn't have any in my junkbox to play with, so I thought this was an interesting alternative approach.

author: w2aew
author_rank: Super Contributor
timestamp: July 31, 2014, 12:59:53 pm
content: Quote from: motocoder on July 31, 2014, 12:20:07 pmThanks! I've been on here for a few years - oooh, look at that, approaching 1000 posts....