control resistance with an audio signal? - Page 1
Forum section: electronics / beginners

author: dentaku
author_rank: Frequent Contributor
timestamp: July 07, 2013, 05:43:15 pm
content: I'm doing this simply out of curiosity and my interest in old synthesizers....Question one:I recently put together a yellow LED and an LDR from a dollar store light to make a simple little Resistive opto-isolator (Vactrol) that in turn controls the frequency of an oscillator.I'm using the audio output of my computer to control it. I just used a plain old 2N2222 to make the LED blink with the sound like anyone would when first starting to mess with transistors and LEDs.What would be the best way do this and make sure I get the full range of the LED from all the way bright to fully off?I used a square wave from a software synth and adjusted the PWM to make the LED get brighter and dimmer (as you'd expect) and I found that even simply changing the volume of the softsynth fades the LED better than I was expecting. It's more finicky than PWM because it only works over a very small range of volumes but at least it's not flickery. I found that an LDR will pick up even the fastest flickering when you're in the relatively low frequency world of audio. A lowpass filter smooths out the flicker but it also changes how fast it reacts.Question 2:Is there a better way to make a controllable resistance with an audio signal without using a vactrol type device? LDRs are very slow

author: c4757p
author_rank: Super Contributor
timestamp: July 07, 2013, 06:04:28 pm
content: Quote from: dentaku on July 07, 2013, 05:43:15 pmI'd use a transistor as a voltage-controlled current source. Schematic attached - R2 senses the current through the LED, and D2 and D3 limit the peak so the transistor doesn't slam the hell out of the LED if the signal level is too high (probably not necessary, though, unless VCC is large). Make R3 a trimmer so you can set the zero point. If you don't understand how it works, look up "emitter follower" and keep in mind Ohm's law.If you want to follow the envelope of the signal instead (overall loudness rather than instantaneous amplitude), add a diode in series with C1 and a small capacitor in parallel with R3. (EDIT: Whoops, got ahead of myself a bit there. It's not quite that simple.)QuoteYou can use a JFET, but it's tricky to do anything precise. My suggestion is to redesign your circuit so you don't need to.

author: Simon
author_rank: Unknown
timestamp: July 07, 2013, 06:13:48 pm
content: I think another way is to get a mosfet with low full on resistance, put a 1M resistor in series with the gate and a 1M resistor from gate to drain, put your voltage into the resistor in series with the gate and you should get a linear V/R response.

author: c4757p
author_rank: Super Contributor
timestamp: July 07, 2013, 06:19:43 pm
content: Just to correct my goof, here's an updated schematic for envelope detection. R6 in this case would need to be a trimmer.May be a bit excessive considering you didn't ask for it, but since I mentioned it...

author: fcb
author_rank: Super Contributor
timestamp: July 07, 2013, 06:47:48 pm
content: Vactrols tend to be used only in gear that wants that 'vactrol' sound - mainly people like the sluggish asymmetric response of CdS cells (very slow to turn off).I've designed stuff with vactrols before and they are great, but you can't use them in production as Cadmium is not RoHS compliant. So you tend to end up slugging VCA's to emulate it - and a number of small companies just ignore the RoHS issue...You can roll your own VCA's easily and cheaply - or use something like the LM13700 (my favourite) if you don't fancy all the alignment/tracking issues. Sad to say there is no LDR substitute when you want a vactrol.

author: dentaku
author_rank: Frequent Contributor
timestamp: July 08, 2013, 01:44:38 pm
content: Quote from: Simon on July 07, 2013, 06:13:48 pmThat does seem like an interesting and maybe less "cobbled together" than using an LED and an LDR.I was just reading a bit about this method and it might be useful to know.

author: dentaku
author_rank: Frequent Contributor
timestamp: July 08, 2013, 01:52:23 pm
content: Quote from: fcb on July 07, 2013, 06:47:48 pmYup, it does make for an interesting effect.I'm just testing this out by connecting the LDR to pins 6 and 7 of a basic 555 multivibrator so I can hear what's happening when I send different audio signals into the circuit (varying the volume, frequency, wave type and doing PWM).

author: dentaku
author_rank: Frequent Contributor
timestamp: July 08, 2013, 01:58:06 pm
content: Quote from: c4757p on July 07, 2013, 06:04:28 pmThat looks interesting. I'm going to see if I can simulate that circuit myself and hopefully learn something from it considering I'm very new to this, then I'll build one for real.

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 08, 2013, 02:34:12 pm
content: Quote from: c4757p on July 07, 2013, 06:19:43 pmIs my thinking cap not properly seated, or should D1+D2 not be connected to the base of Q2, not the emitter, thus acting as a peak current limiter for the CCS? Add a current limiting resistor in series with the basis of Q2 (from Q1 emitter) to limit the current through Q1 when D1+D2 begin to conduct.Or do I just need another cup of tea...?