Yahoo Groups archive

Synth-diy-test

Index last updated: 2026-04-14 00:09 UTC

Message

Re: [sdiy] Linear response VCOs?

2026-03-20 by Tom Wiltshire

There's also differences in *where* the errors are worst between PWM and PDM.

Generally, you worry most about the fundamental and lowest harmonics of the pulse output frequency, since they're the hardest to filter. For PWM, you get the worst fundamental and 3rd harmonic at the midpoint value, when the output is a 50/50 square wave. You get the worst 2nd harmonic at the 25% and 75% values, since that's where that harmonic peaks for pulse waves. This is all fairly "central" and very likely to be values you're using all the time. In short, if your PWM output is at 100KHz, then 100KHz is what you'll get, and your filtering had better be able to deal with that.

For PDM, the central values are the best-case, rather than the worst. With PDM, the worst-case comes as you get to extreme values, so <5% or >95%. This happens because there's so few pulses going out that the effective output rate drops. Imagine we're using a 2MHz PDM output to create a 10-bit DAC. If we output our midpoint value of 512, we get a lovely squarewave at 1MHz - one period on, one period off. If we output a value of 1, we get one period on followed by 1023 periods off - a very narrow pulse wave at 2MHz/1024= 1953Hz. That's terrible! Of course, as you approach these extremes, the amount of fundamental and lower harmonics in such a narrow pulse drops off markedly, but still - you probably weren't thinking of a 2KHz output when you designed your 2MHz PDM DAC.
My view is that the secret with PDM is to discard the extremes and use the good bit in the middle!

Tom


> On 20 Mar 2026, at 09:30, Mike Bryant <mbryant@futurehorizons.com> wrote:
> 
> This is why you use PDM, not PWM.  The pulses are at much higher frequency and easier to filter to the correct DC level with less noise.
> 
> From: Synth-diy <synth-diy-bounces@synth-diy.org <mailto:synth-diy-bounces@synth-diy.org>> on behalf of brianw <brianw@audiobanshee.com <mailto:brianw@audiobanshee.com>>
> Sent: 20 March 2026 08:22
> To: synth-diy@synth-diy.org <mailto:synth-diy@synth-diy.org> <synth-diy@synth-diy.org <mailto:synth-diy@synth-diy.org>>
> Subject: Re: [sdiy] Linear response VCOs?
>  
> The challenge with PWM is that changing a rail-to-rail square wave into a steady DC value requires a lot of filtering. That filter must remove the sharp rise and fall of the raw PWM output, and thus the DC output value cannot sharply rise or fall either. The problem gets worse if a single channel needs to feed multiple unrelated CV values through a mux+S&H. The slew rate is horrible.
> 
> Brian
> 
> 
> ________________________________________________________
> This is the Synth-diy mailing list
> Submit email to: Synth-diy@synth-diy.org <mailto:Synth-diy@synth-diy.org>
> View archive at: https://synth-diy.org/pipermail/synth-diy/ <https://synth-diy.org/pipermail/synth-diy/>
> Check your settings at: https://synth-diy.org/mailman/listinfo/synth-diy <https://synth-diy.org/mailman/listinfo/synth-diy>
> Selling or trading? Use marketplace@synth-diy.org <mailto:marketplace@synth-diy.org>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.