Voltage Controlled Volume / Amplifier

Go To Last Post
20 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey Freaks!

 

Does anyone know of a simple VCA (Voltage Controlled Amplifier) hack that would use an LM358 op amp instead of a transconductance op amp?

 

I want to control the volume level on an audio signal using a voltage.

The voltage is coming from an 8 bit R2R resistor DAC, and so is the audio signal itself.

One constraint is that when the controlling voltage is zero, the audio signal must also be zero (totally mute).

I want to use an LM358 because I have them available in my circuit.

 

Found this already, and have not tested it yet, but all input welcomed as always!

 

http://hackmeopen.com/2011/04/voltage-controlled-amplifier/

 

Cheers!

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Mon. Nov 23, 2015 - 09:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Essentially, your want to multiply an 8 bit waveform by an 8 bit volume, producing a 16 bit output.

 

I suspect that you can save component count, PCB real estate, and coding headaches, and thus costs: and have better audio by ditching all that for a device like the MAX5217, a 16 bit DAC .

 

If you are otherwise committed to the resistors and op amps... it is generally more efficient to use the 'volume' DAC set the reference voltage for the 'signal' DAC. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The jfet is the classical method. The lm358 is just a buffer in this instance. If you use a multiplying dac like a dac08, you can feed the audio into the reference pin.
You might find some inspiration looking at the schematics of old analog synths. There's some analog magic in a mini moog. The later 70's vintage stuff tended to use application specific ics for the filters and vca. Units like the prophet5 and ppg wave used these. The ppg wave was interesting for its time as it used digital generation, but analog processing which is probably what you're doing.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DAC08: showing ones age there!

 

It is still available though, and has been a workhorse DAC for... ever.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the input.

I should have mentioned... I am restricted to only LM358 or 74HC parts. No exceptions.

 

Brad
 

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TDA7052A (the A-suffix is a must for VCA use) is my favorite for this task.

 

But with the restrictions 74HC and LM358 I had to think about it for a few minutes :)

 

How about using a 74HC4051 analog multiplexer as 8 steps attenuator ?

Use more 74HC4051's for better performance.

 

By smart choosing the value of the resistors that connect to A7 ~ A0 you can achieve logaritmic performance. I think .....

(It's 01:18 AM over here so thinking is a challenge)

 

Cheers Brad ! I love your project.

 

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dac08 predates hc series by a decade! Use 4052 as the switches to drive your r2r dac. The 4052 switches between 0V and your reference (audio) thus mimicing the dac08.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The answer is in here somewhere

http://www.analog.com/media/en/n...

 

and here:

http://www.ti.com/lit/ds/symlink...

Imagecraft compiler user

Last Edited: Wed. Nov 25, 2015 - 01:19 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brad,

 

why not take the control backinto the digital level?

You could use an R2R network that is fed on the positive side by a variable voltage.

Take a HC595 with different resistors in the positive side and let that feed the R2R network.

Then use the LM358 as a fixed gain amplifier to change from high impedance to low impedance. Keep in mind though that this is not a rail to rail amp and that IIRC the max output voltage is 3V with 5V in.

 

the 595 only needs a couple of digital IO lines for control so that will save on that part to. and you can have 255 volume steps. Or you can use 1 R2R on the high side low impedance feeding the low side high impedance R2R, but that would require a decent amount of calculation to get things right.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the digital domain, you can use a 64k eprom as a 8*8 multiplier.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:

In the digital domain, you can use a 64k eprom as a 8*8 multiplier.

yes Smart, Russell smiley

 

Another option could be: LED - LDR combo in a black tubing. Pwm the LED. Did that several times. The (relative) slow response of the LDR (a real one, based on CdS, which is not ROHS) combined with 31kHz pwm (16MHz clock, 8 bit timer, mode1 = phase correct pwm), make a decent volumecontrol.

 

Nard

 

PS Marcel, I am puzzled on your suggestion: the outputs of the 595's are totem-pole so I don't understand the mechanism.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Last Edited: Tue. Nov 24, 2015 - 10:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Some great ideas here, thanks!

Yes, I do want 256 steps.

 

I tried feeding the output from my 8 bit volume level R2R into a transistor, basically powering it from the DAC output voltage.

This kind of worked, and will need some hacking.

 

I might try using the volume level DAC as a "level killer" instead, basically shorting the audio output from the actual sample output DAC.

lower values would essentially short out the audio DACs output. In theory, this seems logical.

 

Cheers,

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Thu. Nov 26, 2015 - 06:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The multiplying digital to analog converters in msg 8 use R-2R ladders inside.

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:

The multiplying digital to analog converters in msg 8 use R-2R ladders inside.

 

 

Thanks, but I am restricted to using LM358 and any combination of 74HC logic that is still available as DIP from multiple sources.

I am allowed to use a transistor or any passive component as well.

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Chalk drum amplifier?

 

Just found out the proper name for this - Johnsen-Rahbek effect.

Maybe a little too retro, even for Brad.

 

Four legs good, two legs bad, three legs stable.

Last Edited: Fri. Nov 27, 2015 - 08:44 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I assume that this is for sound.

So have in mind that you get more mileage out of your bits if you make a log. circuit.  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

+1

 

Attached sketch: output from R-2R, buffer 358, then a 4051 mux-demux with resistor values 2.5dB per step apart, another 358 with half a 4052 in the feedback. Those resistors are for the course volume and are 20dB apart (so f.i. 1k 10k 100k 1M)

You now have 5 bits logarithmic volume control with a mute bit, being the Enable of the 4051

 

The other half of the 4052 can be used for the other channel. (oh, and it is useless to do 8 steps in the feedback .  Log you know )

 

 

 

angry This time this forum SW couldn't trick me: I saved my text before uploading the picture

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the suggestion!

I had something similar, using chained 4051s for 16 step, but did not consider a configuration like you have shown.

Might try this using 8 into 8 for 64 steps, as that would probably work well enough.

I wanted 8 bit resolution for volume so that simple waveforms (C64 style) could also be made, using generated volume ramps (attack, sustain, decay).

16 steps was not enough.

 

Thanks, many good options now!

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brad,

 

What are your constraints on supply voltages?

It has been half a year ago I wanted to use the 358 in a design and found out it did not do rail to rail IIRC I could get it close to 0V but on the high side using 5V it would only go just above 3V.

 

I double messed up on the previous message. it was not the 595 but the 295. It has 3 lines in for setting what line should be high or low. But is also push-pull output. so you would need 8 diodes in series with the outputs to get the high side only.

indeed an interesting sketch from you Nard.

Will be an interesting thing to calculate the resistors at first glance. might be simple, but first impression is that it will be a lot of work to get the steps right.

but it is early and still need to get my first mug of coffee for the day.