<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I'll second using PDM, which I've used since the 1980s on all sorts of products. not just synths. Better results from DC up to high audio frequencies.
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
The easiest way to get PDM is just to reverse the bits from the PWM counter to the PWM comparator, but not all MCUs support this mode.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Synth-diy <synth-diy-bounces@synth-diy.org> on behalf of Tom Wiltshire <tom@electricdruid.net><br>
<b>Sent:</b> 05 November 2022 11:04<br>
<b>To:</b> rburnett@richieburnett.co.uk Burnett <rburnett@richieburnett.co.uk><br>
<b>Cc:</b> synth-diy mailing list <synth-diy@synth-diy.org><br>
<b>Subject:</b> Re: [sdiy] Driving SSI2144 freq control with PWM from a microcontroller</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">I've fairly recently moved away from PWM in favour of PDM instead. The general idea is identical. The output waveform has a time period, and the relative amount of time spent in the high state and the low state gives the analogue output,
when averaged. PWM arranges that high time all together, followed by all the low time together. PDM breaks it up a lot more into little pulses. This generally makes the ripple filtering easier. It also has another side-effect, which is that the worst-case
ripple moves from the 50/50% case for PWM to the 99%/1% case for PDM. Since you can sometimes ignore the most extreme values but can very rarely ignore the centre value, this can also help limit the ripple.<br>
<br>
Another option is to use two PWM channels instead of a single high resolution one. The outputs are then added together with the correct weights to give a "high bits" and "low bits" scheme. You sometimes see this done with other styles of DAC, especially in
old synths before high-res DACs were cheaply available. Rather than using different rates or anti-phase, as Richie suggested, this is just a way of getting a higher output frequency. If the PWM resolution is lower, the PWM frequency is higher, so two channels
can give you better or equal resolution while making the output frequency far higher.<br>
<br>
Tom<br>
<br>
==================<br>
Electric Druid<br>
Synth & Stompbox DIY<br>
==================<br>
<br>
<br>
<br>
> On 5 Nov 2022, at 10:51, rburnett@richieburnett.co.uk wrote:<br>
> <br>
> It should work Aaron. Some thoughts..<br>
> <br>
> Get the PWM carrier frequency as high as you can (well above the audio range) so that you can heavily attenuate the switching frequency with a low-pass filter whilst still getting a sufficiently fast slew-rate for sounds that need a fast attack.<br>
> <br>
> If you get the switching frequency up into the low hundreds of kHz, then any intermodulation products produced in the VCF or VCA due to residual PWM carrier ripple should be well above the audio band.<br>
> <br>
> You might want to look at using a 2nd or 3rd order low-pass filter for the PWM carrier suppression because higher order can give you better suppression at the PWM carrier frequency (and its harmonics) for a given step-response setting time. With just 1st
order RC it might be a difficult tradeoff, that becomes easier if you move to 2nd order.<br>
> <br>
> If you've got lots of PWM channels available there are other fancy things you can do with multiple channels running at different switching rates, or in anti-phase to reduce the ripple at the switching frequency. Not sure how beneficial they are in practice.<br>
> <br>
> Sounds like a fun project!<br>
> <br>
> -Richie,<br>
> <br>
> <br>
> <br>
> On 2022-11-05 02:05, Lanterman, Aaron D via Synth-diy wrote:<br>
>> It’s been a while since I’ve done a synth design video:<br>
>> <a href="https://youtu.be/RYA_k1I47l8">https://youtu.be/RYA_k1I47l8</a><br>
>> I have a senior design team working on a hybrid synth (digital<br>
>> oscillators, analog VCFs and VCAs), which got me thinking about<br>
>> minimalist control schemes that wouldn’t need an op amp. Not sure if<br>
>> this is a good idea or not.<br>
>> Aaron Lanterman, Prof. of ECE, Georgia Tech<br>
>> My blog on Education and Innovation:<br>
>> <a href="https://edupocalypsenow.wordpress.com">https://edupocalypsenow.wordpress.com</a><br>
>> My blog on Electronics and Programming:<br>
>> <a href="https://lantertronics.blogspot.com">https://lantertronics.blogspot.com</a><br>
>> My YouTube channel on Electronics and Programming:<br>
>> <a href="https://www.youtube.com/c/lantertronics">https://www.youtube.com/c/lantertronics</a><br>
>> _______________________________________________<br>
>> Synth-diy mailing list<br>
>> Synth-diy@synth-diy.org<br>
>> <a href="http://synth-diy.org/mailman/listinfo/synth-diy">http://synth-diy.org/mailman/listinfo/synth-diy</a><br>
>> Selling or trading? Use marketplace@synth-diy.org<br>
> _______________________________________________<br>
> Synth-diy mailing list<br>
> Synth-diy@synth-diy.org<br>
> <a href="http://synth-diy.org/mailman/listinfo/synth-diy">http://synth-diy.org/mailman/listinfo/synth-diy</a><br>
> Selling or trading? Use marketplace@synth-diy.org<br>
<br>
<br>
_______________________________________________<br>
Synth-diy mailing list<br>
Synth-diy@synth-diy.org<br>
<a href="http://synth-diy.org/mailman/listinfo/synth-diy">http://synth-diy.org/mailman/listinfo/synth-diy</a><br>
Selling or trading? Use marketplace@synth-diy.org<br>
</div>
</span></font></div>
</body>
</html>