Shop OBEX P1 Docs P2 Docs Learn Events
how to calculate the speed of stepper motor(Unipolr) in R.P.M?? — Parallax Forums

how to calculate the speed of stepper motor(Unipolr) in R.P.M??

ibrahim seleemibrahim seleem Posts: 2
edited 2014-01-11 22:36 in Propeller 1
Hellow,,

i need to calculate the speed of stepper motor(Unipolr) in R.P.M.there is optical encoder attached of stepper motor.
encoder give 45 steps per one revolution..

unipolar stepper motor: current=3.25 ampere
1.8 degree/step
operating voltage=12 volt

Thanks in advenced

Comments

  • Hal AlbachHal Albach Posts: 747
    edited 2014-01-11 12:55
    1.8 degrees per step will require 200 steps per revolution.
    A step rate of 200 per second will give you 60 RPM, provided the mechanical load does not cause slippage.
    If you require a particular RPM, such as 43, simply divide 43 by 60 then multiply by 200 to get 143.33 steps per second.
    Conversely, to know what RPM you would get with 250 steps per second divide 250 by 200 and multiply by 60 to get 75 RPM.
  • kwinnkwinn Posts: 8,697
    edited 2014-01-11 13:00
    Two ways to do it using the encoder pulses.

    1 - Using encoder count for a fixed time:

    RPM = (# of Encoder pulses) / (Time(in minutes) x 45)

    2 - Using time per encoder pulse:

    RPM = (60,000,000 / 45) / (time per motor step in uS)


    Method 2 gives better accuracy for all but the very highest speed motors and fast refresh times.
  • ibrahim seleemibrahim seleem Posts: 2
    edited 2014-01-11 17:05
    please, kwinn, explain two ways in simple steps..

    thanks in advanced
  • kwinnkwinn Posts: 8,697
    edited 2014-01-11 22:36
    Rather than trying to write your own you can use this object from the OBEX. http://obex.parallax.com/object/213

    The encoder speed in ticks per second can be converted to RPM by multiplying it by 60 and dividing the result by 45. The description is below.

    A dual quadrature encoder driver that runs in one cog. The code has been fully optimized with a super simple spin interface for maximum speed and is also fully commented.
    *
    Provides full support for:
    The current encoder position delta in encoder ticks.
    The current encoder speed in encoder ticks per second.
    *
    The encoder driver is written in assembly so that it can handle high RPM motors.
    *
    The sample period is about 4us. This allows a conservative 125,000 - (8us apart) encoder ticks per second per channel.
Sign In or Register to comment.