There is something I am working on that will need some type of angle sensor. I am going to use a potentiometer. First, who came up with that name? Isn’t this name the same as a voltmeter? Something is wrong with that name. How about we just call it a variable resistor or something like that?
These things are pretty easy to find if you have some old electronic stuff. Here is one I found in our “junk room”.
This one was used in a lab as a variable resistor with plugs built in. The normal potentiometer has three connections; one for each end and one for the variable position in the middle. For this device, only two are used (the middle one and one of the ends).
All I am going to do is see how the resistance changes with the angle. I really just wanted to see if this works, so I am just approximating the angle and look at the resistance at 0, 90, 180, and 270 degrees (measured with a multimeter). Here is the data that I get:
Looks pretty linear. This means that I can measure the resistance and get the angle by using the following function:
Simple enough. Hopefully, it will be useful also (to me). If you have your own potentiometer, I doubt it will have the same parameters as this one. You should probably do something similar if you want to use it.