Configuration
Main gear count
Left gear count
Right gear count
Left ratio: ????
Right ratio: ????
Encoder resolution (ticks per rotation)
Main gear count
Left gear count
Right gear count
Left ratio: ????
Right ratio: ????
Encoder resolution (ticks per rotation)
This section simulates the actual mechanism. Click and drag on the main gear to set the angle.
This section simulates the values that would be read by encoders on the left and right gears.
This includes both wrapping readings after a full revolution and discretizing the readings based on the encoder resolution.
The below shows the results of solving for the original mechanism angle, given the left and right encoder angles.
The solution is calculated by calculating for each encoder which possible mechanism position would cause that reading, then returning the only solution present for both encoders.
The effective range of the vernier encoder is determined by when both encoders simultaneously return to their starting point.
This can be determined by the lowest common multiple of the two encoder gear counts, divided by the main gear count.
The currently simulated vernier encoder can measure up to ????° of rotation.
Note that if the range is not a multiple of 360°, then exceeding the range and wrapping around will produce unexpected values from the vernier encoder. You probably want to avoid this.
Also note that the larger the range, the less precise your measurement. There's no free lunch here.