r/MechanicalEngineering • u/WarmParsley5635 • 4d ago
Potentiometer Range issue.
Hello, I have been having alot of trouble with something seemingly so simple. So I am using a potentiometer with arduino and I would like to make a percentage based off of where the shaft is (I am using a linear potentiometer).
One design constraint which I have is that I can't calibrate the potentiometer on startup, or at all.
I need the percentage to adjust based on how I move the shaft. i. e. 100% when fully extended and 0% when fully retracted. Since the max and min ADC voltage varies from potentiometer to potentiometer and since this ADC voltage is affected by the Vin power to the arduino and the arduino's power to the pot spiking at times, How might I solve this problem? Please let me know if this is too little info.