Hello Guys,
I am working on a project where I am using a linear potentiometer to measure distance. I connect the output on the pot to the analog input on the arduino with a pull down resistor (2400 ohm, I just picked it randomly) so when the wiper is not touching the pot I would not get random jabber.
The thing that I am having is that there is linearity over the whole pot. On the first 10cm i have a relation between the raw value and reference value of y=a*x where a is increasing from 1.25 to 2. from 10cm to 20 cm a is 2, then from 20 to 30cm a is decreasing from 2 to 1.25.
Is there a way to have a linear function? maybe change the value of the pull down resistor or am I missing something.
The linear pot is 30cm with a resistance of 10Kohm.
Any thoughts?
I am working on a project where I am using a linear potentiometer to measure distance. I connect the output on the pot to the analog input on the arduino with a pull down resistor (2400 ohm, I just picked it randomly) so when the wiper is not touching the pot I would not get random jabber.
The thing that I am having is that there is linearity over the whole pot. On the first 10cm i have a relation between the raw value and reference value of y=a*x where a is increasing from 1.25 to 2. from 10cm to 20 cm a is 2, then from 20 to 30cm a is decreasing from 2 to 1.25.
Is there a way to have a linear function? maybe change the value of the pull down resistor or am I missing something.
The linear pot is 30cm with a resistance of 10Kohm.
Any thoughts?