# PiicoDev Potentiometer Slide - Value Flickering

**URL:** <https://forum.core-electronics.com.au/t/piicodev-potentiometer-slide-value-flickering/20084>\
**Category:** Uncategorized\
**Created:** [29 May 2024 05:51 UTC](https://forum.core-electronics.com.au/t/piicodev-potentiometer-slide-value-flickering/20084 "2024-05-29T05:51:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kin271838](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/kin271838/32/10478_2.png) [@Kin271838](https://forum.core-electronics.com.au/u/Kin271838)\
**Post date:** [29 May 2024 05:51 UTC](https://forum.core-electronics.com.au/t/piicodev-potentiometer-slide-value-flickering/20084/1 "2024-05-29T05:51:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Samuel](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/samuel/32/11763_2.png) [@Samuel](https://forum.core-electronics.com.au/u/Samuel)\
**Post date:** [29 May 2024 06:32 UTC](https://forum.core-electronics.com.au/t/piicodev-potentiometer-slide-value-flickering/20084/2 "2024-05-29T06:32:40Z")

</div>

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:

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/7/7f529f3d3ec504b1991f52c55cf8fb38badd6a4f.jpeg)

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?

---

<div class="post-metadata">

**Author:** ![Ezra224017](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/ezra224017/32/8344_2.png) [@Ezra224017](https://forum.core-electronics.com.au/u/Ezra224017)\
**Post date:** [29 May 2024 06:40 UTC](https://forum.core-electronics.com.au/t/piicodev-potentiometer-slide-value-flickering/20084/3 "2024-05-29T06:40:10Z")

</div>

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

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

```

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

---

<div class="post-metadata">

**Author:** ![Kin271838](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/kin271838/32/10478_2.png) [@Kin271838](https://forum.core-electronics.com.au/u/Kin271838)\
**Post date:** [29 May 2024 07:05 UTC](https://forum.core-electronics.com.au/t/piicodev-potentiometer-slide-value-flickering/20084/4 "2024-05-29T07:05:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kin271838](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/kin271838/32/10478_2.png) [@Kin271838](https://forum.core-electronics.com.au/u/Kin271838)\
**Post date:** [29 May 2024 07:05 UTC](https://forum.core-electronics.com.au/t/piicodev-potentiometer-slide-value-flickering/20084/5 "2024-05-29T07:05:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jeff105671](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jeff105671/32/3729_2.png) [@Jeff105671](https://forum.core-electronics.com.au/u/Jeff105671)\
**Post date:** [29 May 2024 07:29 UTC](https://forum.core-electronics.com.au/t/piicodev-potentiometer-slide-value-flickering/20084/6 "2024-05-29T07:29:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Robert93820](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@Robert93820](https://forum.core-electronics.com.au/u/Robert93820)\
**Post date:** [29 May 2024 07:31 UTC](https://forum.core-electronics.com.au/t/piicodev-potentiometer-slide-value-flickering/20084/7 "2024-05-29T07:31:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kin271838](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/kin271838/32/10478_2.png) [@Kin271838](https://forum.core-electronics.com.au/u/Kin271838)\
**Post date:** [29 May 2024 08:12 UTC](https://forum.core-electronics.com.au/t/piicodev-potentiometer-slide-value-flickering/20084/8 "2024-05-29T08:12:28Z")

</div>

Hey Bob,

The maximum is 100.

---

<div class="post-metadata">

**Author:** ![Robert93820](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@Robert93820](https://forum.core-electronics.com.au/u/Robert93820)\
**Post date:** [29 May 2024 09:17 UTC](https://forum.core-electronics.com.au/t/piicodev-potentiometer-slide-value-flickering/20084/9 "2024-05-29T09:17:58Z")

</div>

Hi Kin

> [@Kin271838](#):
>
> The maximum is 100.

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
