# Potentiometer callibration

**URL:** <https://forum.xod.io/t/potentiometer-callibration/6148>\
**Category:** Hardware Interfacing Questions\
**Created:** [June 30, 2022, 8:39am UTC](https://forum.xod.io/t/potentiometer-callibration/6148 "2022-06-30T08:39:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacob-wiqvist](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@jacob-wiqvist](https://forum.xod.io/u/jacob-wiqvist)\
**Post date:** [June 30, 2022, 8:39am UTC](https://forum.xod.io/t/potentiometer-callibration/6148/1 "2022-06-30T08:39:05Z")

</div>

Hi all!

I use this min max node to set maximum brightness output on my dimmer construction.  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/8/878201a8dc8602fa9a052e81afa7890c8023bf4c.jpeg)

I can also change the min value or starting value if you will.

But because potentiometer is not perfect I can’t get 0 light when I increase pwm output resolution to 12-14 bit.

How can I do so that under a sirten threshold of pot valu the the output is 0?

---

<div class="post-metadata">

**Author:** ![jacob-wiqvist](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@jacob-wiqvist](https://forum.xod.io/u/jacob-wiqvist)\
**Post date:** [June 30, 2022, 1:33pm UTC](https://forum.xod.io/t/potentiometer-callibration/6148/2 "2022-06-30T13:33:30Z")

</div>

I don’t know if this is the best way to do it but I got some kind of results with this:

It filters the input signal so it is stable and don’t flicker.

It also sets 0 to PWM output if the value is below 0.0023.

The issue is that the value 0.0023 change if I change Tmax on the “map” node.

 ![Skärmbild 2022-06-30 152727](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/2/2844e177712239c84f035fabcb7ac0e0e4e42ef2.png)

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [June 30, 2022, 7:29pm UTC](https://forum.xod.io/t/potentiometer-callibration/6148/3 "2022-06-30T19:29:05Z")

</div>

To get zero output using map, you just need to know the min/max values output by your POT. Set those as Smin/Smax in map, then use 0/1 (or 0/\_smaller\_than\_one to limit max brightness) for Tmin/Tmax

---

<div class="post-metadata">

**Author:** ![jacob-wiqvist](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@jacob-wiqvist](https://forum.xod.io/u/jacob-wiqvist)\
**Post date:** [June 30, 2022, 8:35pm UTC](https://forum.xod.io/t/potentiometer-callibration/6148/4 "2022-06-30T20:35:53Z")

</div>

Thank you, it works.

If you have any Ide how to fix the led nod with 14-bit pwm, pleas help.

[possible-to-increase-the-pwm-resolution](https://forum.xod.io/t/possible-to-increase-the-pwm-resolution/6124/31)

edit:

Led node works.

I started a new project, I dont eaven need a filter.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [July 30, 2022, 8:36pm UTC](https://forum.xod.io/t/potentiometer-callibration/6148/5 "2022-07-30T20:36:12Z")

</div>

Closed on July 30, 2022, 8:36pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
