Re: Simple PWM volume controller. Could it work?

From: Kevin Aylward (salesEXTRACT_at_anasoft.co.uk)
Date: 07/02/04


Date: Fri, 02 Jul 2004 06:21:49 GMT

John Larkin wrote:
> On Thu, 1 Jul 2004 23:35:53 +0300, "Stelian Ene" <me@privacy.net>
> wrote:
>
>> Hello
>> I have once read in a book (which of course I can't find anymore)
>> about a direct PWM volume controller.
>> The idea is that you simply take the audio and chop it with a high
>> frequency, variable duty cycle signal. Then you use some type of low
>> pass filter, to get rid of the high frequency component, and that's
>> it: the output signal equals the input signal (theoretically no
>> distortions), scaled by the PWM ratio.
>>
>> The schematic could be something like this:
>>
>> 4066 analog switch C
>> / ||
>> input *-----/ ------------||---+----* output
>> | || |
>> | \
>> | R /
>> 200khz | \
>> ---------------- |
>> | PWM generator| GND
>> ----------------
>> | | |
>> | V |
>> --\/\/\/-- Volume potentiometer
>>
>> The advantage is that you can add any number of channels on the
>> same PWM signal (I need 5), and they are completely synchronized.
>> I would like to implement such a volume controller, do you think
>> it could work? (if anyone knows a similar design, I would appreciate
>> it, no point in reinventing the wheel.)
>> I was thinking of using a 555 for the PWM generator, but I don't
>> think it's a good idea, because I don't have the full range 0-100%.
>> Especially the lower limit, there must be a setting on the
>> potentiometer that gives 0 V on the PWM output, no audio is getting
>> through, silence. Also, what do you think about the output
>> filter? Choosing for the simple RC filter values that give no more
>> than 3dB drop at 20 KHz, gives a 22 dB reduction of the 200 kHz
>> signal. Strictly speaking, the 200 KHz signal would be exactly 22 dB
>> below the audio signal. If the 200 KHz signal gets into amps and
>> speakers, is there any danger? Because then I would have to use a
>> more complex filter, and i want a low cost solution. Should I aply
>> any bias on the 4066, to get low distortions? Thank you.
>>
>
> The idea is fine, but that circuit is tricky as drawn. Eliminate the
> capacitor, and it's cleaner. Then of course add the lowpass filter
> downstream.
>
> Better, actually, would be a SPDT switch, switching the output between
> the input signal and ground. A better switch than the ancient 4066
> would be good, too. HC4053, or a higher-end Maxim mux maybe.
>
> This of course gives output that's linear on duty cycle, and audio
> prefers a log shape, which implies very low duty cycles on the low
> end.
>
> This trick has been used in precision analog multipliers and
> square-root circuits for ages.
>

And as an additional note, if the load is a cap, you have a switched
resister filter, i.e. a VCF.

Kevin Aylward
salesEXTRACT@anasoft.co.uk
http://www.anasoft.co.uk
SuperSpice, a very affordable Mixed-Mode
Windows Simulator with Schematic Capture,
Waveform Display, FFT's and Filter Design.



Relevant Pages

  • Re: PWM -> Audio
    ... using 8-bit audio data sampled at 8 kHz to ... Multiply the PWM rate by N, reusing the data N times (or perhaps ... Implement the "traditional" class-D LC filter output. ... We often use delta-sigma instead of pwm to make 1-bit dac outputs. ...
    (sci.electronics.design)
  • Re: PWM -> Audio Output
    ... The audio output works but the quality is not quite there. ... I've discovered that I can remove these artifacts by changing the PWM ... My PWM output feeds through a first order RC filter which is set to cut ... The poppiness is an absolutely sonically repeatable sound that can ...
    (comp.arch.embedded)
  • Re: Low-pass filter and amp design
    ... My application is portable, battery based. ... I'm looking to generate an audio signal from a PIC using ... I need to clean up the PWM signal and output it to a speaker at ... A filter cut off of 4.5kHz is not the right choice for a sampling rate of 9kHz. ...
    (sci.electronics.design)
  • Re: Simple PWM volume controller. Could it work?
    ... >> pass filter, to get rid of the high frequency component, and that's ... scaled by the PWM ratio. ... >> potentiometer that gives 0 V on the PWM output, no audio is getting ... A better switch than the ancient 4066 ...
    (sci.electronics.components)