Since the last update, I have been working on the CV module. Its firmware is starting to become functional, the menu can now edit the configuration and it reacts correctly to most MIDI messages. But, it still needs a lot of refining. The support for paraphonic configurations has given me some challenges as I want the module to auto-detect which outputs are shared.
I changed the LEDs because I thought they were too dim, now they are super bright green ones. When they were first installed the LEDs were all shining, likely these LEDs require less current to turn on so they shine from the leakage when transistors are turned off. So I had to change the firmware to skip disabled LEDs, which give varying brightness and flicker depending on the number of LEDs that are on. It still bleeds a bit at max brightness, but it is good enough.
When testing the outputs I found that they had an unintended vibrato/frequency modulation. Investigating further I found that the output had 1V of ripple, resulting in an octave change in the VCO. It also showed that the multiplexer was switching a lot faster than intended.
This is what it first looked like, a single spike in the sampling period. It also seems to settle on a random voltage, since it sometimes dips by half a volt. This can also be heard when it is used. Fixing the MUX rate gave the following:
It still has the same amount of ripple, and the voltage it settles on is still random.
This is what a 0.5Hz triangle wave currently looks like from this module.
Reducing the PWM resolution from 16 bits to 12 bits improves the results. This increases the PWM frequency so it is more attenuated by the filter. Alternate solutions could be lowering the filter cutoff, which also reduces how fast the voltage can change. Another option is using a higher-order filter, but this would increase the circuit complexity.
The ripple is now 160mV or so.
The triangle wave looks cleaner as well, but there is some non-linearity.
I recorded a clip so you can hear what it sounds like, in the video below. You can hear that the VCO goes out of tune in the last test, which is probably caused by the non-linearity seen above. But there is also an amplification stage which likely is inaccurate. I believe I intended to fix that in the firmware.
To conclude, using a multiplexer as a sample and hold works great, the voltage is really stable in the hold period. Using filtered PWM does not work as well, it naturally gives some ripple no matter how well it's filtered. And better filtering will either need higher complexity circuits, lower resolution, or slower output signals. Problem is that whenever it is used to control pitch it will be very noticeable. Changing to DACs might be a good idea for this. The only issue with that is they're expensive and currently hard to acquire, so I will keep the multiplexing to reduce the number needed.
My current goal is to record a demonstration video, but I'm having problems with notes getting stuck. This can be caused by many things: lost messages, a bug in the CV module firmware, or maybe a problem with the program used to play the MIDI file. I will likely try to fix that next.