Author Topic: control resistance with an audio signal?  (Read 4131 times)

0 Members and 1 Guest are viewing this topic.

Offline dentakuTopic starter

  • Frequent Contributor
  • **
  • Posts: 881
  • Country: ca
control resistance with an audio signal?
« on: July 07, 2013, 05:43:15 pm »
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 :)
« Last Edit: July 07, 2013, 05:47:39 pm by dentaku »
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: control resistance with an audio signal?
« Reply #1 on: July 07, 2013, 06:04:28 pm »
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'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.)

Quote
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 :)

You 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.
« Last Edit: July 07, 2013, 06:09:02 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17728
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: control resistance with an audio signal?
« Reply #2 on: July 07, 2013, 06:13:48 pm »
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.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: control resistance with an audio signal?
« Reply #3 on: July 07, 2013, 06:19:43 pm »
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... ::)
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: control resistance with an audio signal?
« Reply #4 on: July 07, 2013, 06:47:48 pm »
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.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline dentakuTopic starter

  • Frequent Contributor
  • **
  • Posts: 881
  • Country: ca
Re: control resistance with an audio signal?
« Reply #5 on: July 08, 2013, 01:44:38 pm »
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.

That 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.
 

Offline dentakuTopic starter

  • Frequent Contributor
  • **
  • Posts: 881
  • Country: ca
Re: control resistance with an audio signal?
« Reply #6 on: July 08, 2013, 01:52:23 pm »
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).

Yup, 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).
 

Offline dentakuTopic starter

  • Frequent Contributor
  • **
  • Posts: 881
  • Country: ca
Re: control resistance with an audio signal?
« Reply #7 on: July 08, 2013, 01:58:06 pm »
I'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.

That 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.
 

Offline ElectroIrradiator

  • Frequent Contributor
  • **
  • Posts: 614
  • Country: dk
  • More analog than digital.
Re: control resistance with an audio signal?
« Reply #8 on: July 08, 2013, 02:34:12 pm »
Just to correct my goof, here's an updated schematic for envelope detection. R6 in this case would need to be a trimmer.

Is 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...?  :D
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf