Step motor control


Results 1 to 23 of 23

Threaded View

  1. #5
    Join Date
    May 2010
    Posts
    43


    Did you find this post helpful? Yes | No

    Default Re: Step motor control

    Thks for help HenrikOlsson,
    is work but is not precision,make mistake every 5-6 circle working.
    I use this step motor,ST-28 have 5 wire uni polar step motor,
    this is specification:

    Rated voltage: 12VDC
    Current: 32mA
    Resistance/phase: 280
    Fases: 4
    Angle/step: 5.625 deg
    Gear ratio: 1:64
    detent torque: 350gfcm (0.034Nm)
    pull-in torque: 6360g (0.059Nm)
    max. starting pulse rate:700pps
    max. slewing pulse rate:1400pps
    max. speed: 20.5 rpm
    steps/rev: 2048 (tested!!)
    connector order:

    B2: Blue
    B1: Pink
    A2: Yellow
    A1: Orange
    GND: Red

    And one more question in your code I will see you dont use this like in my code:
    Delay VAR BYTE
    i VAR WORD

    TRISB = 0 ' All outputs.

    Delay = 10 ' ~100steps / second

    For i = 1 to 1000 '1000 steps forward.
    PORTB = %00000001
    Pause Delay
    PORTB = %00000010
    Pause Delay
    PORTB = %00000100
    Pause Delay
    PORTB = %00001000
    Pause Delay
    NEXT here dont have i whay

    Pause 2500

    For i = 1 to 1000 '1000 steps reverse.
    PORTB = %00001000
    Pause Delay
    PORTB = %00000100
    Pause Delay
    PORTB = %00000010
    Pause Delay
    PORTB = %00000001
    Pause Delay
    NEXT
    and tell is when I change speed of motor maybe I must change some number of steps,of some else... I dont now!!!
    Last edited by dragan77; - 5th September 2011 at 19:02.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts