I’m experimenting with getting clean analog voltages using PWM with the goal of building a MIDI-to-CV converter for an analog synth.
With help from Secrets of Arduino PWM I managed to setup a ~63kHz phase correct PWM signal on pin 3.
(I want as high frequency as possible to easier achieve smooth signals with short setting time.)
While measuring with a scope I see spikes (as you can see on the first picture). That’s ok since I’m going to filter the signal anyway.
But, the spikes won’t completely go away even after filtering. (I experimented with an RC filter consisting of a 1Mohm resistor and 1uF capacitor and still the spikes were there.)
I’ve attached a picture of how it looks after filtering the signal with a Sallen Key filter (R-values 5.6k, C-values 0.01u). Sure, the spikes are smaller but I suspected them to be completely gone with this filter.
After googling, I learned that often these spikes are actually inside the scope but I didn’t learn whether they should still be visible after filtering or not.
It would really help if someone here could take a look at the pictures and say what they think? Is it something with my circuit I need to fix or should I just ignore the spikes?
Thanks in advance!