[sdiy] Driving SSI2144 freq control with PWM from a microcontroller

Benjamin Tremblay btremblay at me.com
Sun Nov 6 15:47:19 CET 2022


PWM is cheap, cheap, cheap, so it goes up there with the Twin T filter in the list of top lunetta hacks. Making it more deterministic is probably not cost effective. It’s not like engineers from other disciplines have mastered PWM and rely upon it for mission critical control. LED lighting and robotics engineers don’t see PWM as the best way either.
I’m amazed at how well it works but I am easy to impress.

I remember an auto-wah pedal in the eighties (mxr?) that used PWM to attenuate a 2 pole resonant filter. 

Benjamin Tremblay

> On Nov 6, 2022, at 9:28 AM, rburnett at richieburnett.co.uk wrote:
> 
> Yes, it is not a magic bullet.
> 
> To be honest something like a well-designed elliptic filter can be quite effective at suppressing switching noise from a single PWM output if the notch in the frequency response is placed at the switching frequency.
> 
> And if you've got a couple of PWM output pins available (and can invert the logic sense of one of those outputs) then "unipolar PWM" is an effective way of achieving ripple cancellation at the quiescent operating point.  This is often used in PWM (switching) "Class-D" audio amplifiers where it is very effective at reducing ripple current at the switching frequency, losses, and radio frequency interference.
> 
> I won't go into the details, but you can see the typical waveforms by googling for phrases like "bipolar vs unipolar PWM" if interested.  Unipolar PWM is often implemented using an H-bridge to drive a loudspeaker that is tied between the outputs of the two bridge legs, where each bridge leg is driven from its own PWM signal.  This generates the classic 3-level Unipolar waveform across the speaker.  But a similar improvement in ripple can be realised by directly combining two digital PWM outputs through resistors into a common filter capacitor.  At 50% duty ratio you get complete cancellation, and the degree of cancellation deteriorates as you move away from 50% with ripple falling to zero again by the time you get out to 0% or 100% duty ratio.
> 
> It's even possible to combine more PWM outputs to reduce the ripple further and force it to zero at more duty ratios.  Google polyphase or multi-phase PWM if interested in the gory details!
> 
> -Richie,
> 
> 
>> On 2022-11-06 13:50, Ashlyn Black wrote:
>> Oh gosh I've definitely joined the right mailing list.
>> I saw that article a while ago, thought I'd stumbled on a great bit of
>> secret sauce and had been planning to use it in future projects.
>> However after watching that video, I did a little further
>> investigation and found that the outputs of the active ripple
>> cancellation topology and a passive two pole topology are not only
>> comparable, they are in fact identical (at least in the idealized
>> conditions of a simulator.)
>> Attached is two screenshots, both with 30kHz, 0% to 50% duty cycle
>> transitions. The top graphs are the outputs of the active topology,
>> middle is passive topology, bottom is an overlay.
>> ...
>> Sort of feels like I've been duped, ha ha. At least it never made it
>> into production and now I have spare microcontroller pins that would
>> have otherwise been used as complementary PWM outputs.
>> Thank you so much for the discussion. :3
>> - Ashlyn
>>> On 6/11/22 19:37, René Schmitz wrote:
>>> On 06.11.2022 01:03, Ben Gebhardt via Synth-diy wrote:
>>>> Interesting discussion!
>>>> I ran across this EDN article and want to try it out when I get a chance.  Seems like a good compromise between and RC and full blown active filter.  Has anyone done this before for synths?  I wonder if it’s practical for this application.
>>>> https://www.edn.com/cancel-pwm-dac-ripple-with-analog-subtraction/
>>> There is a video about this from Prof. Sam Ben-Yaakov: https://www.youtube.com/watch?v=eJNuHtzOKzY
>>> TL;DW: It turns out it's not adding a real advantage when compared to a passive 2-pole filter. Which doesn't need the inverter, and uses the same number of passives.
>>> BTW, check out that channel if you're interested in power electronics, SMPS and the like.
>>> Cheers,
>>>  René
>>> -- synth at schmitzbits.de
>>> http://schmitzbits.de
>>> _______________________________________________
>>> Synth-diy mailing list
>>> Synth-diy at synth-diy.org
>>> http://synth-diy.org/mailman/listinfo/synth-diy
>>> Selling or trading? Use marketplace at synth-diy.org
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at synth-diy.org
>> http://synth-diy.org/mailman/listinfo/synth-diy
>> Selling or trading? Use marketplace at synth-diy.org
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
> Selling or trading? Use marketplace at synth-diy.org



More information about the Synth-diy mailing list