[FONT=“Times New Roman”][/FONT] I’m new to the potentiometer and my coach wants me to find out how to program it and how it works. Though every website I go on only explains that it it senses how much resistance goes through it. Does it spin? Do you attach a motor to it? How do I program it?
It has a limited range of rotational motion, of about 0 to 250 degrees. The smaller steel shafts fit through its square hole. It can NOT do multiple rotations like an encoder can.
What programming language are you using?
- I’m assuming you are using the Cortex microcontroller, correct?
- What programming language are you using? (ROBOTC, easyC, or something else?)
A potentiometer (aka pot) measures rotation by sensing resistance. The way it senses resistance is quite interesting and will help you understand robotics more if you read about it, but that’s not necessary to know if you want to use a pot.
Each pot has a square(ish) hole for a shaft to go through; this square hole will rotate when something exerts a turning force on the shaft. So, a typical setup looks like:
(where the [p] is a potentiometer, the [m] is a motor, and the dashes are a shaft)
You can only rotate a shaft in a potentiometer about 270 degrees. The value the sensor returns is not in degrees, but rather a value scaled to fit the size of an analog sensor. It’s best to use the debugger windows to determine the ranges you want to use in your control statements.
I recommend reading this article by CMU, as well as looking at this video also by CMU. Even if you’re using easyC, it will still be informative.
I am using RobotC, thanks for the advice.
It has a fixed choice of rotational action, of approximately 0 in order to two hundred and fifty college diplomas. Small aluminum shafts suit as a result of it’s square pit. It might NOT REALLY perform many rotations like an encoder may.What exactly encoding vocabulary do you think you’re utilizing?