Okay. I’m trying to program for autonomous, and we’re using the encoders. I don’t understand how to find out how to get how many inches one rotation of the wheel is. The diameter of the wheel is 3.75 inches. can anyone help me with this?
So, if you look at this problem geometrically, one revolution of the wheel means moving a distance equal to its circumference. Therefore, on a 3.75 inch diameter wheel, the distance it travels in one rotation is equal to its circumference, 3.75*pi which is approximately 11.781 inches.
We’re going to assume a perfect world for this. Assume the wheel does not slip at all. It’s a simple geometic equation. The distance the when will travel is equal to the circumference of the wheel (Pi times the diameter)
The way we determine that ratio was to run the robot for a 5 or 10 seconds in a straight line and measure the distance traveled. Then we divide the distance by the number of “encoder ticks” for that run.
Wow thanks guys ^^
I feel stupid now hehe
thanks for the help
peace
Don’t robotics competitions take place in the same “perfect” environment that basic physics equations take place in. :rolleyes:
Additional input.
Take the distance per revolution, divide it by the number of ticks from the encoder per revolution of the wheel and you will get your distance per tick. With that information, you should be able to per determine how far to travel based on the number of ticks you desire.
Considering what time of year it is, make sure you use the correct value for “pi”
Here is an alternate value for “pi”. All of these yield the same result.
Tell that to you robot who think’s its moving forward but is spinning its wheels and being pushed backwards…
Remember: In theory, theory and practice are identical; in practice they are not!
That’s why I like off-wheel encoders and gyros. They don’t lie near as often.
Hey, That Pi R Square’d
Now I am hungry.
Thanks guys…
You don’t want square pies. You’re looking for circumference!
Stop it!!! Your making me hungry!!!:yikes:
I think you meant more pieces. Yes?
Which brings up this old joke. A hillbilly finally sent his son into town to go to school, rather than relying on the old McGuffie Reader at home. In math they were studying geometry, the area of circles. But the boy didn’t understand something. The teacher kept saying, “Pi R squared.” The boy said, “Pie are round. Cornbread are square.”
Well it’s quite simple actually.
So we have the well known mathematical fact that the number of inches that a wheel turns is proportional to the square of it’s radius (denoted r). This factor is \pi.
If you have a wheel of diameter 2n, r = n.
We thus have:
turning distance = \pi * r^2.
It’s quite simple really. I think this is covered in the first few weeks of AP CALCULUS BC.