# Potentiometer and relationship to analog value

Hello all, i am working on a project using a potentiometer as an input. The POT I am using is a PDB18 series I purchased from Mouser. I have attached the data sheet below. Judging from the data sheet, it has 300 degrees of mechanical rotation +- 5. I am finding that I have a 19 degree dead zone at both ends where the analog read value stays at 0 and 1023 respectively. which puts me at 262 degrees of actual operation.

My question is to map the analog value to the potentiometer, should I use the 300 from the data sheet or the 262 degrees that I am actually seeing to divide 1023 by?

I would suggest using what you see, the 262 degrees. The pot will not get any better. Take this into account if you create a dial plate.

Could you elaborate of why the degree of movement is critical?

If you are mounting it in a box you could put a tab on the knob and some endstops on the box.

You will also find that nearly all pots will have the same problem to some extent.

Thank you for quick responses.
We do have the potentiometer in a case and we do have it indexed to eliminate the dead zones. (Great suggestion though). The angle is important because other calculations in the program rely on it to accurately show travel.

I did try to use 262° but, what we found by using Map()was we gained 1° every 20° so when the arduino was reading 20° we were actually measuring 19, at 40° we were measuring 38 and so on. Which was causing accuracy issues. Which was puzzling at first, but we knew had to be a scaling or rounding issue.

What we did was set the rotation of the potentiometer to specific angles. For example 15 ° and read what the value from analog read was. Then went to 30 and did the same. Then using m=(y2-y1)/(x1-x2) found how much the value increased per degree. Once we had that number we used it to find the angle by using <angle = value/m >. After some plotting and verifying we are very satisfied with the results.

Thank you again for your input