Maker Pro
Maker Pro

How to find RPM of motor using KY-040 Rotary Decoder Encoder

Akshath Varugeese

Jan 31, 2017
1
Joined
Jan 31, 2017
Messages
1
I tried many online tutorials but I couldn't get any program that is working for calculating rpm using KY-040 Rotary Decoder Encoder. Some one can please tell me the formula for it. I am using Beaglebone and Python Adafruit library for coding.
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
Seems like a simple quadrature encoder, I have used plenty of encoders but not the libraries you refer to.
It also looks like alot of examples out there on the web i would think you could adapt.
M.
 

Pyramid

Jan 17, 2017
24
Joined
Jan 17, 2017
Messages
24
You will need to count the pulses from the encoder over a fixed period of time. If I recall correctly, the KY-040 produces 20 pulses per revolution, so assuming the encoder shaft is directly connected to the motor shaft, and you count pulses for 1 second, then RPM= count/20 * 60 = count*3. You will only need to count pulses from one output of the encoder.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
A rotary encoder seems like overkill just to count pulses and convert them to RPM.

Chris
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
In most instances a simple opto slot detector will work with one or two P/rev.
Usually quadrature encoders are used where precise positioning is required.
M.
 
Top