|
Re: Equation for converting potentiometer voltage into angle?
We are looking at doing something like the illustration attached. The fixed resistor is there for the zero resistance case of the pot. Points 1 and 2 are the analog inputs, with 1 being the difference from the high side of the pot to the wiper and 2 being the full drop of the pot. Using these two measurements, you can divide #1 by #2 to get a percentage (assuming a linear pot). If you know the full available angle of the pot, multiply the full angle by the percentage and (voila!) you have your angle from zero.
Of course, if there's an offset, you need to add that to get angle versus gravity or robot direction or whatever... 
__________________
----------------------------------------------
With 1370 --
2012 Rutgers District Event Champions with 1676/56
2012 Lenape District Event Finalists with 2191/1691
2013 TCNJ District Event QuarterFinalists with 1143/4750, Gracious Professionalism Award
2013 Bridgewater-Raritan District Event Semi-Finalists with 4285/223
2013 MAR Championship Finalists (Backup) with 222/11/1403; Gracious Professionalism Award
|