VCA control with a PWM?

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Nickos

Well-known member
Joined
May 11, 2006
Messages
83
Location
Italy
Hi!
Do you think is possible to control a VCA (passing audio) with a Pulse Width Modulation wave?
I have a computer digital controlled output that simulate analog voltage using this...
Can be used (or adapted) to control an audio VCA?

Thank you,
Nickos
 
Very interesting Idea. But I think using a VCA might be missing the point of PWM, you might as well just be using the pure DC control voltage. With PWM it is usually meant to control a transistor that switches the audio from "Full on" to "Full off" that way the energy that is above the threshold in the signal is removed. Still interesting Idea....I wouldn't mind to see it implemented and study how it works.
 
What I have is a computer controlling a 0-5V PWM voltage.
I would like to use this voltage to control a VCA for audio automation purpose.

Will the VCA be influenced by the hi freq oscillation of the pwm? it need to be buffered and/or filtered?

Thank you.
Nickos
 
Yes, good filtering will be obligatory. What you actually want to have is a quasi DC voltage.
Take a look at this app note and decide then if it will be good enough for your application.
 
Nickos said:
Hi!
Do you think is possible to control a VCA (passing audio) with a Pulse Width Modulation wave?
I have a computer digital controlled output that simulate analog voltage using this...
Can be used (or adapted) to control an audio VCA?

Thank you,
Nickos

Yes, but. The VCA cannot use PWM directly, so you need to smooth the PWM output to an analog voltage with a RxC or active multi-pole LPF, then scale the voltage for the VCA control range. You want to filter this PWM signal well to keep clock noise out of your audio.

JR
 
JohnRoberts said:
Yes, but. The VCA cannot use PWM directly, so you need to smooth the PWM output to an analog voltage with a RxC or active multi-pole LPF, then scale the voltage for the VCA control range. You want to filter this PWM signal well to keep clock noise out of your audio.

JR
That was what I was thinking about...
Do you think that a RC filter is enough to smooth the signal?

Thank you
 
Nickos said:
JohnRoberts said:
Yes, but. The VCA cannot use PWM directly, so you need to smooth the PWM output to an analog voltage with a RxC or active multi-pole LPF, then scale the voltage for the VCA control range. You want to filter this PWM signal well to keep clock noise out of your audio.

JR
That was what I was thinking about...
Do you think that a RC filter is enough to smooth the signal?

Thank you

I sure wouldn't rely upon just that... There are several considerations, namely range and desired resolution of the CV, and specifics of the PWM output. Clearly if you keep the lowest frequency energy in the PWM at a high frequency that helps, but limits your PWM resolution. Also the CV typical VCAs use is mV range so padding down 5V to tens of mV will help but IMO you will need to keep a digital and analog ground separately. I would probably use a passive pole right at the PWM output, and follow that with at least a two pole active MFB LPF on analog side.

JR
 
I've seen CMOS 4016 (TG switches) used with PWM to duty cycle a resistor in a RxC filter to vary the effective R,  and make the filter cut off frequency controlled by the PWM duty cycle (100% Reff=R, 50% Reff=2R, 25% Reff=4R).

I cant read the mxr limiter schematic well enough to see what they are doing. The MXR pedal schematic looks like it is using a 3080 OTA as a gain element. 
------
The THAT app note is worth reading... they go to lengths to avoid digital noise using a DAC, the PWM output will obviously need more filtering than that.

JR
 
This is perhaps of academic interest but not likely to compete with a modern VCA. I though there was some merit (decades ago) in making a PWm based tracking anti-alias LP filters for say an old BBD delay, that was already delivering limited performance, but that is archaic technology so moot today.

As a gain element this will never be better then the 4016 switch used, and likely much worse, not to mention issues with clock speed needed, PWM resolution, etc.

JR

 
Rob Flinn said:
StephenGiles said:
Yes, MXR did this many years ago.

Not so sure.  Looking at the diagram they appear to use a 4016, which as far as I'm aware is an analog switch not a VCA ??
It looks like there's some misunderstanding here.
PWM can be used to generate a DC voltage that would be used to control a VCA after serious filtering and scaling.
OTOH, a Pulse-Width Modulator can be used to control audio, in other words replacing a VCA.
The most famous unit using this technique is probably the BSS DPR 402 compressor. When it was introduced, BSS made a point of claiming the virtues of their gain control element.
 
Abbey, can you shed any light on whats happening in the MXR ?  Are the 4016 not on/off devices, therefore it looks to me like it's modulating the audio rather than providing a control voltage surely ?  Just interested because I have an MXR 136.
 
There are two MXR schematics The 4016s in the guitar pedal are simple switches with a 3080 OTA doing the gain change.

The MXR 136 is using 4016s to chop a 4.7K resistor feeding an inverting opamp (U4) with 10k(?) feedback R.  At 100% on this should deliver +6db gain, at 50% roughly unity, at 25% -6 dB.  Note: the PWM period needs to be a much higher rate than audio bandpass.

Looks like lots of inductor based filters and perhaps trims to minimize HF noise.  I suspect (mainly guessing) these might have had some noise floor birdies with early digital products using low sampling rates and modest anti-alias filters. Modern oversampling convertors should be less affected.

JR

PS: While there appears to be some confusion I think I understand exactly where the OP is coming from. Many standard micro controllers offer multiple built in PWM outputs so they are commonly used as free (low cost) D/A outputs vs, adding a DAC and pushing serial data to it.   
 
I've seen this done in notebook PC's etc where the amplifier has a DC volume control input.

Typically - customers would just hook a pot to the DC control input, however, some smart guys decided to use a PWM with an RC filter. That provided a relatively smooth control.

cheers

/R
 
As long as we're on this academic veer, another way to make a VCA with a PWM is to convert the audio signal to a PWM waveform, then vary the power supplies establishing the Vp-p of the PWM waveform, before converting it back to analog again. While this would require driving the power supplies symmetrically to prevent feedthrough, etc.

JR

 
 

Latest posts

Back
Top