[sdiy] Arpeggiator1 / Arduino UNO
Richie Burnett
rburnett at richieburnett.co.uk
Fri Apr 10 17:52:37 CEST 2015
One of the biggest problems with using PWM instead of a proper DAC is that
the reference voltage for the logic '1' (high) state is often a noisy and
poorly-regulated logic power supply rail, rather than a precision analogue
voltage source with a noise free output. (That is unless you actually use
the digital PWM signal to switch an output line between a precision analogue
reference and analogue ground.) There is obviously a trade-off between
response time and adequate suppression of the switching carrier, but you can
improve this situation significantly by using a high-order elliptic low-pass
filter that has a notch in it's frequency response right at the PWM carrier
frequency (and possibly again at some of the lower harmonics.)
Those tips make PWM okay for control purposes, but it still really sucks for
audio output purposes. A lot of people don't realise how much distortion is
introduced into audio by the asymmetric modulation (leading-edge or
trailing-edge only). You are actually phase-modulating the PWM carrier as
well as imparting the wanted amplitude modulation. This produces an FM-like
spectrum with lots of horrible side-bands. Not what you want for hi-fi
audio usage. If you can achieve symmetric modulation (leading & trailing
edge equally) then the distortion products go away, and there is only
harmonic of the switching frequency left to filter out. That's why
"Digital" Class-D audio power amps usually use a triangular waveform for the
PWM generation instead of a sawtooth/ramp.
PWM is well suited for achieving regulation in switching power supplies, and
for motor speed control, but caution is needed in places where it's trying
to replace a DAC.
Sorry for the rant, but the list was relatively quiet and hopefully some
helpful info for someone!?
-Richie,
-----Original Message-----
From: Jacob Watters
Sent: Friday, April 10, 2015 2:15 PM
To: Rick Jansen
Cc: synth-diy at dropmix.xs4all.nl
Subject: Re: [sdiy] Arpeggiator1 / Arduino UNO
You can increase the PWM frequency. That will help to remove ripple.
https://arduino-info.wikispaces.com/Arduino-PWM-Frequency
http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM
On Fri, Apr 10, 2015 at 7:07 AM, Rick Jansen <rick.jansen at xs4all.nl> wrote:
>
>> On 10 Apr 2015, at 11:49, Nantonos <nantonos at epona.net> wrote:
> ...
>>>> I would be surprised if the ENOB is even as high as 12; probably more
>>>> like 10. Which is fine if it suits the purpose, but describing this as
>>>> "16 bit" is misleading for anyone else thinking of building it.
>>
>>> That is why I labeled it "~16 bit DAC" :-)
>>
>> My point is that ~10 is more likely.
>>
>>> Even an 8-bit (ZN426) DAC would have been good enough, it will give
>>> you 256 discrete voltages.
>>
>> Yes, if an error of +/- 25 cents is ok then a theoretically perfect
>> 8bit DAC will suffice
>
> ok ok
>
>> Then you learn about INL, DNL, zero offset, gain error, thermal drift,
>> etc. At which point the wisdom of saving $5 comes into question and
>> you get a very good 12bit DAC or an okay 16bit one.
>
> If you settle for 64 discrete output CV values and an 8-bit DAC there are
> 4 bits per step and a smaller error? I'm after "good enough" here, not
> perfection.
>
> Even 32 discrete values would work, I think, for an arpeggiator.
>
> rick
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
_______________________________________________
Synth-diy mailing list
Synth-diy at dropmix.xs4all.nl
http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4800 / Virus Database: 4311/9502 - Release Date: 04/10/15
More information about the Synth-diy
mailing list