Potentiometers come in handy when you want to control outputs with an arduino board or basic electronics. Recently, i embarked on a certain project that required me to adjust the brightness and speed of LED strip patterns. So, i used two potentiometers to control both parameters. I will show you how to do that in my next tutorial. However, right now, i want to tackle a challenge that i faced - getting a smooth potentiometer input.
Sometimes, actually in most cases, potentiometers produce a jittery signal. This can be due to low quality material used to make the potentiometers. The jittery signal can be very irritating, especially if you are using the pot to control a sensitive output. That is why you need to look for a way to make the input smooth.
Step 1: Low Pass Filter
To smooth out the pot input, you should use a low-pass filter. It removes all signals that have a frequency that is above the set cut-off frequency. You determine the cut-off frequency by adjusting the values of capacitance and resistance in the circuit.
The formula for getting the cut off frequency is:
Fc- cutoff frequency
Therefore, you can calculate the value of resistance and capacitance you need by substituting the value of your cutoff frequency on the formula.
Since i needed a cutoff frequency of 1, I used a 10µF capacitor and a 16kΩ resistor
Step 2: Connection
The signal from the potentiometer is fed to the resistor; the capacitor is connected in parallel with the resistor and then to the ground; the signal is tapped from between the resistor and capacitor and fed to the arduino analogue pin as shown in the pictures.
Thats how you smooth out your pot output. For more on this topic, visit the following page.