Shop OBEX P1 Docs P2 Docs Learn Events
Woodward PWM filter — Parallax Forums

Woodward PWM filter

We are all using PWM to create analog outputs.
These need filters to smooth them and remove ripple. But the simple RC filters are either slow or no very effective.
Here is a clever solution from Winfield Hill (of AoE fame) based on an idea from Stephen Woodward. It mere adds another RC to gain much better ripple rejection without increasing the settling time.

https://dropbox.com/s/xvwjvlun1rg1vca/4x.25_PWM_ripple.pdf?dl=0

Comments

  • Hey I used to know Steve Woodward. He's also an airgun hobbyist. We had plans to develop an electronic airgun, some years ago

    :cool:
  • JonnyMacJonnyMac Posts: 9,102
    edited 2019-10-17 14:24
    Mickster wrote: »
    Hey I used to know Steve Woodward. He's also an airgun hobbyist. We had plans to develop an electronic airgun, some years ago

    :cool:

    My friend, Rick Galinson, has built three or four of these Propeller-powered paintball miniguns. This video was shot at a Parallax event.

    https://youtube.com/watch?v=lOkw1lMGsfw
  • Fun, fun, fun...I want/need one :lol:

    Is it pure coincidence that Galinson is similar to Gatlin gun? :cool:
  • There's a lot of interest in less-than-lethal home defense...I'd strap one to the foot of the bed :cool:
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2019-10-18 00:06
    Great little filter, insightful. I found Stephen Woodward's short and sweet publication in EDN here...
    Cancel-PWM-DAC-ripple-with-analog-subtraction
  • Yeah thats neat

    With P1's counters providing an optional complementary output, all thats needed are one or two extra passive components (assuming enough pins are available)

  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2019-10-18 03:54
    That filter does some other interesting things if you just put a sine wave, triangle wave, or saw wave to it.
  • jmgjmg Posts: 15,173
    rbehm wrote: »
    We are all using PWM to create analog outputs.
    These need filters to smooth them and remove ripple. But the simple RC filters are either slow or no very effective.
    Here is a clever solution from Winfield Hill (of AoE fame) based on an idea from Stephen Woodward. It mere adds another RC to gain much better ripple rejection without increasing the settling time.

    Interesting that Spice shows the waveform of his dual polarity lead/lag 2R/2C filter, to be an exact clone of a 2nd order LPF, using R/C/R/C
    - The traces literally sit on top of each other.

    ie he can throw away the Analog Switch, and get exactly the same response result :)
    Tubular wrote: »
    With P1's counters providing an optional complementary output, all thats needed are one or two extra passive components (assuming enough pins are available)

    See above, all you need the the extra passives, no need to use another pin ...

  • Tracy AllenTracy Allen Posts: 6,664
    edited 2019-10-18 18:11
    Reinhardt,
    Incidentally, thanks for the heads' up about the forthcoming sequel, Art of Electronics -- The x-Chapters. Who would not want to taste the frosting on the best electronics book ever written?

    Where did you find the link to that specific snippet? A quick search found this on EEblog, Winfield Hill himself participating, with links to other draft snippets in Dropbox.

    Preorder expected sometime in 1Q20.

  • jmg wrote:
    See above, all you need the the extra passives, no need to use another pin ...
    I've looked "above" but don't find what you're referring to. Without an active inverter -- whether it be external or via a second pin -- where does the inversion signal come from?

    -Phil
  • We should note that this PWM filter references conventional PWM, constant period, variable duty cycle, like this one,
    fast-pwm-up-to-1-6-mhz
    not the duty mode of the cog counters.

    However, it should work with the duty mode at 50% duty cycle and quite a bit around that, so long as the joined periods do not stray too far from 1/clkfreq. Well, it could smoothing duty mode PWM -> analog at clkfreq=5MHz, for lower power operation.
  • jmgjmg Posts: 15,173
    jmg wrote:
    See above, all you need the the extra passives, no need to use another pin ...
    I've looked "above" but don't find what you're referring to. Without an active inverter -- whether it be external or via a second pin -- where does the inversion signal come from?
    There is no need for any inversion signal - it can be discarded entirely.
    'above' was my comment right above the 2nd quote.

    Spice says this `new filter` is actually identical to a standard 2nd order, simplest form of identical R,C,R,C
    As per attached : Compares 'woodward-pwm-filter' with a simpler 2nd order and says 0.0V difference.


  • Reinhardt,
    Incidentally, thanks for the heads' up about the forthcoming sequel, Art of Electronics -- The x-Chapters. Who would not want to taste the frosting on the best electronics book ever written?

    Where did you find the link to that specific snippet? A quick search found this on EEblog, Winfield Hill himself participating, with links to other draft snippets in Dropbox.

    Preorder expected sometime in 1Q20.

    Hi Tracy,

    Win Hill mentioned this in a thread on usenet sci.electronics.design.
  • jmg,
    Did you also run your Spice simulation for PWM step from x% to y%, that is, how does it compare with figure 4x.156 in Hill's analysis? Tradeoffs between ripple and response.
  • jmgjmg Posts: 15,173
    jmg,
    Did you also run your Spice simulation for PWM step from x% to y%, that is, how does it compare with figure 4x.156 in Hill's analysis? Tradeoffs between ripple and response.
    The Spice results I have are at 20% duty, and they track exactly, in both rise time and ripple. ie the Filters have precisely identical transfers.
    Seems there is no free lunch, and 2R and 2C give a second order response, no matter how wired.
Sign In or Register to comment.