So, I’ve been looking at the Electric Druid VCDO datasheet recently, and there is a resistor and capacitor connected to each control pot(variable voltage divider):
What are they for?
Taking a wild stab at it, I’m guessing that the resistor is to protect the microcontroller pin from direct shorts to ground/5v and the capacitor is to decouple noise?. The big question is are they necessary?
The circuit probably works fine without them – the analog inputs are high impedance and the potentiometers cannot produce voltages that the inputs cannot handle – but they provide a bit of extra safety and robustness.
The capacitor is there to make sampling more reliable; the analog input works by charging up a small internal sample-and-hold capacitor, and for that to work the external circuit must provide enough current to fully charge the capacitor during the very short sampling window. You can either make sure the source impedance is low enough (AVR recommends <10k, PIC I think is even lower), or use an external capacitor that’s charged also when the processor isn’t sampling the input, so it’s ready to dump enough current into the sampling capacitor when needed.
EDIT: Google says recommended PIC source impedance is 2.5k, which corresponds to a 10k potentiometer without any series resistor (max impedance of a voltage divider pot is half the pot in parallel with the other half, i.e. 10k/2/2 = 2.5k).
I did a stripboard module for this on my website and this oscillator is extremely sensitive to noise. Therefore everything must be shielded and I would think those capacitors will help a lot in noise suppresion. I’ve put them in on the print too (see article) because I detected spikes on the signals and the 100nF caps got rid of that.
Awesome, thanks! I didn’t see this on your site; good tips there. I’m making a PCB of this so it’s less susceptible to noise, but I’ll definitely be able to squeeze them onto the board.
Cool! Make sure you keep the inputs and outputs as far away from eachother on the print as possible (see my article for the quote from Tom Wiltshire about this).