Connect with us

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

Discussion in 'Microcontrollers, Programming and IoT' started by Akshath Varugeese, Jan 31, 2017.

Scroll to continue with content
  1. Akshath Varugeese

    Akshath Varugeese

    1
    0
    Jan 31, 2017
    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.
     
  2. Minder

    Minder

    3,178
    689
    Apr 24, 2015
    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.
     
  3. Pyramid

    Pyramid

    24
    5
    Jan 17, 2017
    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.
     
  4. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    652
    May 8, 2012
    A rotary encoder seems like overkill just to count pulses and convert them to RPM.

    Chris
     
  5. Minder

    Minder

    3,178
    689
    Apr 24, 2015
    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.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-