Introduction: Smooth Potentiometer Input

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=1/(2πRC)

Fc- cutoff frequency

R-resistance

C-capacitance

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.

http://www.arduino-hacks.com/smooth-potentiometer-input/

Comments

author
PedroHenriqueGuida made it!(author)2016-07-29

Nice showing that kind of filter. When I started with arduino, I had a lot of problems working with leds, but I used to solve it in code instead. In the code I stored the last pot value in a variable witch I used to compare with the actual value, if this value is smaller than 2, it's considered as a jitter and then descarted.

About This Instructable

10,290views

39favorites

License:

Bio: I am an electrical engineer and an Arduino and electronics enthusiasts. I believe working with electricity should be fun as well as beneficial to engineers ... More »
More by yhtomitsy:RFduino - Sending and Receiving Data Via BLE Arduino redback simple serverConfiguring xBee in API mode
Add instructable to: