wokcz:
Imagine the big circle is something like a wooden 500mm diameter circle, and the small one is a 30mm knob with a 20ppr encoder on it. When we spin the big one, the small one spins too by friction or wtv.How can I know how many degrees the big circle has moved if the encoder moved 1 pulse?
I am talking about the maths, not the code.
There have been several other posts on the math, but for any of them (except possible reply #3) to be correct, the following have to be true:
- The shape and dimensions of the wheels are known exactly. The 30 mm knob is a mathematically perfect circle whose diameter is exactly 30 mm. Same goes for the 500 mm circle, except with "30" changed to "500".
- There is zero slippage between the wheels. Absolutely none whatsoever.
If your goal is to use the encoder on the small wheel to precisely determine the position of the large wheel, then your approach is almost certainly misguided. Any physical imperfection will introduce errors.
Even if the experimental approach (the one in reply #3) is used, again, any inconsistency (a slight wobble in either of the wheels, for example) will likely introduce errors.
To make a long story short, this is one of the reasons why gears exist.