PiicoDev Potentiometer Slide - Value Flickering

My potentiometer constantly flickers between the value set and a number higher or lower. For example, I’ve set the potentiometer to a value of 34 but it keeps jumping between 34 and 35. Would this be because of its small size, high sensitivity or something else?

Is there a way to potentially fix this?

Hey @Kin271838,

I have grabbed this product from our stock and done some testing for you.

When I try running some code on this sensor with a value range of 0 to 100 I get this output:

It looks like the value is sitting close to the tipping point between two numbers and the reading is fluctuating just enough to trigger a change in value for you.

The jump between ~35.87 and ~35.97 happens when I smack the table next to the sensor so its probably just general interference. Some of this is always expected with any resistance based sensor.

What kind of project are you using this in?

Is this fluctuation enough to cause problems for you?

2 Likes

If the flickering is causing an issue within a conditional system, you could always add

pot-rounded = round(pot.value, 0)

to get a whole number every reading, which would prevent the general interference botching the reading.

1 Like

Hey Samuel,

I’m not sure about mine cause it stays stationary but randomly flicks for a few seconds and then might stop, even at 100 or 0.

Im attempting to create a small MIDI controller for DMX lighting. Doesn’t sound cool and I know I can buy controllers like that, but I whist wanted to do it myself.

I’m unsure if it will be a problem, but most likely since the fader in the software activates at 1%.

2 Likes

Hey Ezra,

I’ve done this but there’s still random jumps. If needed I can send a photo or video of the values jumping.

1 Like

The ADC uses a comparison against a reference voltage to calculate the digital value. The voltage returned from the pot can vary as a result of jitter, but the reference voltage can also vary, depending on its source. And both can vary if there are any currents induced in the ground returns. You are dealing with low voltages at very low currents and there are many things that can disturb them, especially if there is lengthy wiring and/or multiple connections involved. The behaviour you mention seems like it might be in the reference voltage or ground. Does the flicker timing correlate to anything happening on the MCU?

2 Likes

Hi Kin
To get an idea of what this 34 and 35 mean what is the maximum. Is the pot scaled to 0 to 100 or is it reporting something like 0 to 1023. Knowing this will put into scale exactly what this “jumping” means.

The slider is like a single rotation 270º pot and probably is a carbon resistive element. Notoriously “noisy” if DC current is flowing. That is why for audio use this type of pot has a capacitor each side of it (most of the time) to remove any DC component and prevent “scratchy” noises caused by the DC arcing at the slider contacts.

Also a pot of this type is very difficult to set at a given point, particularly if you need repeatability. My solution to that when I want some fine control is to use a 10 turn pot which are usually wire wound so not as “noisy” as the carbon types.
Cheers Bob

2 Likes

Hey Bob,

The maximum is 100.

Hi Kin

That means the flicker from 34 to 35 is 1% of full scale. That is not a big deal. How does this affect you?
If this is controlling LED brightness you might just see a slight flicker. If incandescent lighting you would have to look very close to see any change. I would guess that you would not see any change at all with the persistence of incandescent lighting.
Cheers Bob