Raw rotation units - encoder

I’m curious….

What are the raw rotation units for the optical shaft encoder?

The raw rotation units for the shaft encoders are ticks.

2 Likes

How many ticks are there in one revolution?

I believe the optical shaft encoder has 90 ticks per Revolution

I thought it was 90 too, but when I printed out the number of raw units for the optical shaft encoder, I was getting around 400 units for one revolution.

I have looked online but could not find the answer.

As for the “more info” section for the v5 motor, what configuration applies to the encoder?

If you are talking about the 3-wire optical shaft encoder, look here https://kb.vex.com/hc/en-us/articles/360039512851-Using-the-V5-3-Wire-Optical-Shaft-Encoder The article does indicate 90 ticks.

You can poke around the knowledge base for details on other sensors, etc.

1 Like

Make sure you account for any gear ratios you have if your encoder isn’t direct axle. May or may not help. Otherwise I would cross check with another encoder and see what values you get to make sure the encoder isn’t the problem.

I understand it indicates 90 ticks, but my tests don’t agree…that’s why I have asked this question.

When I printed the tot rotation in ticks, I got around 400 units for one revolution.

So it seems that ticks is not the raw unit.

1:1 ratio and all three encoders give the same value.

It seems to me if your getting ~400 per rotation that your encoders are giving values in degrees instead of ticks. If you’re looking for ticks you can specify it as a rotationType. I am very sure that ticks are the raw unit so I don’t know what’s up with that.

The encoder has 90 SLOTS, it does not have 90 TICKS.

Remember, it is a quadrature encoder. As a result, each slot gives 4 distinct states:

For 2 outputs (A and B):

A low, B low
A low, B high
A high, B high
A high, B low

Each of these states is probably considered 1 tick, leading to 4 ticks per slot.

I suspect you are seeing 360 ticks per revolution, but I would recommend experimentally verifying that result.

P.S. Since there are multiple ticks per slot, does that mean we are debating poly-ticks?

2 Likes

I printed in deg units and the values made sense—180 def for half a rotation, and 360 for a full one.

Update::
I think the encoder raw units are in gradians.
360 deg = 400 gradians

Hm, kb article is wrong.

90 slots is correct, but it’s a quadrature encoder and both edges of the slot create an interrupt into the 3wire sensor, with two outputs 90 deg out of phase we get 360 counts for one revolution.

There was at one time an encoder that only had a single connection and used with legacy hardware (pic v0.5) it only gave 90 counts per revolution with no directional information available.

7 Likes

Ran tests again. Got 360. Thank you, good that the error in kb was noticed.