Analog input pot resistor/capacitor question

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).

4 Likes