Farily simple AGC for sound-to-light - Page 1
Forum section: electronics / projects

author: Buriedcode
author_rank: Super Contributor
timestamp: July 22, 2018, 02:04:59 pm
content: Hi there,I've been googling for AGC circuits, or perhaps, "constant volume" circuits. Input comes from a guitar so will be ~800mV p-p, dropping to ~30mV and I would like to get a constant 1V out from this, or at least a significantly reduced dynamic range, say 0.5V to 1V.It is for a DIY strobe tuner that I've been meaning to build for a long time, so the signal won't be heard or further amplified for sound, so distortion isn't really a problem. It will be used to drive LED's via a V/I converter. Some filtering would be required as I'm hoping to get mostly the fundamental and perhaps the second harmonic (used for setting intonation on guitars), but this can be done before the AGC, or after.I'm thinking a low gain preamp to bring the signal up from the @30mV minimum to say 100mV. This brings the range to ~100mV to ~2500mV. I've mostly come across circuits using LED/LDR combos (I can make my own with hollow standoffs and heat-shrink) or JFET's. I only have some N channel JFETs in stock, where-as most AGC's seem to use P-channel as a "variable attenuator". So before I start tinkering and make an order I thought I'd post here to see if anyone has something they've used before.Cheers!

author: Benta
author_rank: Super Contributor
timestamp: July 22, 2018, 03:23:14 pm
content: An idea would be to use a compandor. This is not an AGC per se, but will compress your signal so you still have some amplitude variation, but much less than in the original signal. An example is the NE570.http://www.onsemi.com/PowerSolutions/product.do?id=NE570

author: JS
author_rank: Frequent Contributor
timestamp: July 22, 2018, 05:51:52 pm
content: You should be a bit more accurate with your output needs, there areany ways already developed for compressing audio sigbals and you have a dynamic range of about 30dB that many of them can work with.Other than jfet and ldr you could use some transconductance amplifiers like lm3080 or 13700, or just diodes, one is to clip your signal as you only need to drive some LEDs from it distortion isn't a problem. Then there are dynamic controlled cells using diodes, theres a "passive" compressor using just diodes online that you might like to check.JS

author: Buriedcode
author_rank: Super Contributor
timestamp: July 22, 2018, 07:07:02 pm
content: Thanks for the replies,I'm keenly aware that tend to over engineer things and this both allows many more options, but also makes decisions harder.As this will just be driving LED's I first thought of a comparator with a dynamic threshold at say 60% of the peak value. But I would prefer an "analogue" signal to drive the LED so its brightest during the initial attack (hitting the strings, signal anywhere between 150 and 900mv p-p) but still remains lit down to 30mV. A comparator would of course just be on/off (only on for the peaks though, so it is modulated by the input).I vaguely remember using an NE571 a couple of decades ago for a sound effects unit kit (one of my first kits!) and I have seen transconductance amps in guitar effects, but never used them. One of the first links I found was this:http://sound.whsites.net/articles/vca-techniques.html..which discusses the various options, although all geared for audio compression for listening. I'm more interested in having an almost constant output (extremely compressed) without much regard for quality, mostly interested in the the lowest frequency (root note of the string) and a few harmonics. This does make life easier and certainly doesn't require any expensive THAT parts, but also means I'm not sure where to begin.I guess I shall start off simple, with diodes, LTspice simulations, then on my next parts order, add on some P-channel JFETS, LDR's and An LM13700. And of course, its all moot without actually knocking up a breadboard circuit and trying it out with an actual guitar!

author: JS
author_rank: Frequent Contributor
timestamp: July 23, 2018, 11:37:58 am
content: What you want sounds like a compressor with slow time constants, feeding a VI amp which drives the LEDs, current should be limited to a maximum peak, attack and rrleasr of the compressor should be slooow and maybe some hysteresis to make it faster if changes are big, for this is likely using a sidechain made from a big resistor with a couple of diodes in parallel charging and discharging a cap, all this fed from a rectified signal with some smoothing just to not go back to zero in each crossing.That should behave more or less as you described, you could start testing with a conpressed signal using a plugin and feed that to the LED driver so you build in blocks and you know each block works.JS

author: Buriedcode
author_rank: Super Contributor
timestamp: July 23, 2018, 03:52:25 pm
content: Quote from: JS on July 23, 2018, 11:37:58 amgood call! I could use the PC (I have some music software with VST's) or.. what I should have tried first - my guitar multieffects unit (which has a few compressor models) and a scope. Real guitar signal, real compressor etc..Whilst my first thought was a "guitar compressor" I dismissed it because I thought it would be more complicated as it is designed to be heard, but I found a few compressors - along with graphs for Vout vs Vin - that show great promise - some of them on extreme settings almost flat through-out most of the guitar signal decay amplitude. That would sound pretty ugly and noisy for guitar but ideal for this project. One of them was the infamous "dynacomp" but alsohttp://www.valvewizard.co.uk/engineersthumb2.htmlMany compressors use the LM13700 and building a DIY compressor has been on my to-do list for years. So looks like that kills two birds with one stone - if it doesn't work out for the strobe tuner - the parts aren't wasted. It was your mention of the LM13700 that got me searching! so cheers

author: JS
author_rank: Frequent Contributor
timestamp: July 24, 2018, 01:38:37 pm
content: I totally missed it was for a strobe tuner, clipping the signal should do well enough, or maybe even better, use a comparator with some hysteresis and signal will be always to the rails of the comparator.JS