How to get startet with Magnetic Encoders

Hello, I bought the Magnetic Encoder Pair Kit for Micro Metal Gearmotors, 12 CPR, 2.7-18V (HPCB compatible).

There is a getting started guide for program the magnetic encoder kit?. Thank you.
(I want to use the kit to achieve a straight line movement of a two wheel robot.)

Hello.

We do not have a getting started guide for using those encoders. However, this Arduino encoder web page has many resources that would probably be helpful for getting started, even if you are not using an Arduino.

-Jon

Hi, thanks for your quick reply.
I have read the ticks of the encoder, now I need to calculate the speed of rotation.
Could you point me some reference to work with?
thanks

To calculate the rotational speed of the output shaft on your micro metal gearmotor, you will also need to use the gear ratio of your micro metal gearmotor, the resolution of your method for reading encoder ticks, and the length of time over which you counted the ticks. If you are reading ticks as both edges of both output channels, you would be getting the full resolution of the magnetic encoders: 12 counts per revolution.

If you want to know the speed of your micro metal gearmotor’s output shaft in RPM, you could use:

\omega = \frac{n}{rgt}

where:

\omega = rotational speed of gearmotor output shaft (revolutions per minute)
t = length of time that you counted all of your ticks (minutes)
n = number of ticks
r = resolution (ticks per revolution of the extended back shaft)
g = gear ratio (revolutions of the extended back shaft per revolution of the output shaft)

-Jon