Motor Stepper Example


Closed Thread
Results 1 to 40 of 135

Hybrid View

  1. #1
    mslaney's Avatar
    mslaney Guest


    Did you find this post helpful? Yes | No

    Default On and Off topic - Stepper Motor

    Get it?
    On and off.... :-)

    I'm having a problem...
    In it's simplest form, would the following be a brute force method of driving a bi-polar motor?

    (PIC 16F876)
    (defines, includes, and OSC set....)
    (tris a, b, and c set to 0)

    speed var word
    speed = 100 'just an arbitrary number - will eventually ramp up to max

    Spin:
    porta = %00000001
    pause speed
    porta = %00000100
    pause speed
    porta = %00000010
    pause speed
    porta = %00001000
    pause speed
    goto Spin


    When testing this with LEDs, this seems to work fine - the LEDs flash separately. However, when I attach the motor, nothing moves and the LED's flash in pairs.

    Pinout:
    porta.0 -> IRL510 -> LED/CoilA
    porta.1 -> IRL510 -> LED/CoilB
    porta.2 -> IRL510 -> LED/CoilC
    porta.3 -> IRL510 -> LED/CoilD

    If it matters, it's a work project that is behind schedule. A quick answer would be truly appreciated. I might even send you a check for $5 USD!!! :-)
    Is there a single IC like the UCN5804 but for bi-polar motors instead of unipolar?

  2. #2
    mslaney's Avatar
    mslaney Guest


    Did you find this post helpful? Yes | No

    Default

    I guess what I 'm asking is....Do I need an H bridge or is it a function of the program?

  3. #3
    hansknec's Avatar
    hansknec Guest


    Did you find this post helpful? Yes | No

    Default

    If you are driving a bipolar motor you will need a dual H-bridge circuit. (2 coils each need dual driving polarity). The code presented earlier in the thread appears to me to be for driving a unipolar motor. Since you appear to be familiar with the allegro driver chips you should see that they would only require two outputs from a PIC to drive the motor. One is a direction bit and the other is toggled the amount of steps you want. I prefer using unipolar motors myself because they are easier to build a drive circuit using only 4 FETs.

    John

Members who have read this thread : 5

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