PWM for CV: is it really that simple?

for a while I’ve been looking into options for making multiple CV signals without using more than one DAC, as they’re a bit expensive.

the option that I became set on was using the old polysynth style of multiplexing the output signal of a DAC. This would require a sample and hold circuit for each output from the mux with a precisely calculated capacitor to drain until the next cycle. a lot of math I’ve never done before.

while browsing this forum I came across a thread where this method was suggested and it seems like a much more sensible approach for my purposes.

before getting started and possibly lost, I just wanted to see how well it works if I wanted to use it for ADSR envelope type CV. asking because previous topics I’ve seen that are dedicated to PWM CV describe a very complex op-amp filter setup to smooth out the PWM signal. Curious to know if using two PWM outputs somehow eliminates the need for additional complexity in the circuit.

Otherwise I’m still willing to go the DAC>mux>S&H route. Thanks in advance for any advice!

3 Likes

I keep meaning to look into PWM for CV, but haven’t got around to it yet.
I did use a DAC driving multiple S&H circuits on this ADSR that I built.
Instead of muxing the DAC I just wired all the S&H inputs together and then fired the sample signal sequentially - seems to work okay…

Cheers

2 Likes

A bunch of @HAGIWO designs use that style of PWM, including for audio. I’m no expert but as I understand it, whether you can use a simple passive RC filter or need something more elaborate depends on what kind of accuracy you need; I recall there’s a quantizer by Kassutronics that uses something like a fourth order active filter to get V/Oct CV accurate to a few cents, but presumably for an envelope generator the requirements would be much less severe.

4 Likes

This is very interesting, oh and I can see that each s&h IC uses a digital out from the MCU to determine which one is active at the time. those s&h chips look pretty handy actually, will look into these a bit more thank you!

Definitely going to sit down with a few of @HAGIWO’s designs. Saw the end-of-the-year wrap up video and those modules all seemed quite solid. I’m needing to wrap my head around the resolution-to-frequency thing that I’m seeing on the Teensy page which is where my overcomplication began. Trying to wrap my head around the default frequency vs. ideal frequency as it pertains to this project.

The default frequency is an easy enough guess, but the ideal frequency seems to be the frequency to use in order for PWM to appear the smoothest? Either way, shouldn’t stop me from doing a little experimentation.

2 Likes

I haven’t yet experimented with using it for cv specifically, but I had good success using a r2r resistor ladder to dac the output pins of an Arduino to form a dang smooth sine wave.

3 Likes

Did a little r2r oscillator myself (fixed frequency, just wanted to see if it worked). I was discouraged from going anywhere above 8 bits bbecause I guess anything greater requires very accurately matched resistors. 8 bits was good enough for the Shruthi though, so it should be good enough for this purpose!

3 Likes

Opinion: if its pretty much good for audio frequency levels, its probably fine for frequencies much slower.

5 Likes