Motor Stepper Example


Closed Thread
Results 1 to 40 of 135

Hybrid View

  1. #1
    DougB's Avatar
    DougB Guest


    Did you find this post helpful? Yes | No

    Default Stepper Motor Continued Question

    I am using a microstepper from allmotion that microsteps at 1/256th step per step input

    I plan to use a 16F676 to provide step & direction signals to the motor controller

    I have a -5v to +5v input siggnal to the pic a/d

    How do I configure the pic to apply the hightest resolution on the input
    and calculate the steps & direction for the output.

    I am stumped right now.

    0v means the motor doesn't move.

    the input signal is derived from an electrolytic tilt sensor condtioning board

  2. #2
    hansknec's Avatar
    hansknec Guest


    Did you find this post helpful? Yes | No

    Default John

    Well first of all you need to get that - 5V off the PIC before you burn it up. I'm surprised you haven't seen smoke yet. The voltage references need to stay between the range of 0 to Vcc. You are going to have to get yourself an op-amp and offset that -5V up to a zero volt potential and then divide your signal down. The resolution is what it is. You will get 10 bit resolution as the signal at the input pin varies between vref- and vref+ potential. If you want higher resolution or the ability to use your -5V to +5V signal directly then you will need a separate ADC. Funny... I don't see PIC16F676 as a device offered by Microchip.

  3. #3
    mslaney's Avatar
    mslaney Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks for the help.
    I decided to get an L297 and L298 from ST. It'll drive a bipolar with a pulse from the PIC. However, there is WAY too much wiring to interface and use the L298. It works but it takes too much time.
    Is there a single chip solution for a bi-polar motor?

    I think DougB meant PIC16F876.

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by hansknec
    Funny... I don't see PIC16F676 as a device offered by Microchip.
    Funny...
    http://www.microchip.com/stellent/id...cName=en010213
    and worldwide available from Digikey and others
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Bipolar Stepper Motor Driver with Translator

    * * *
    L6228 (1.4 Arms)
    http://www.st.com/stonline/books/pdf/docs/9454.pdf

    * * *
    L6208 (2.8 Arms)
    http://www.st.com/stonline/books/pdf/docs/7514.pdf

    * * *
    APPLICATION NOTE AN1451
    L6208 FULLY INTEGRATED TWO PHASE STEPPER MOTOR DRIVER
    http://www.st.com/stonline/books/pdf/docs/8607.pdf

    Modern motion control applications need more flexibility that can be addressed only with specialized IC products. The L6208 is a fully integrated stepper motor driver IC specifically developed to drive a wide range of two phase (bipolar) stepper motors. This IC is a one-chip cost effective solution that includes several unique circuit design features. These features, including a decoding logic that can generate three different stepping sequences, allow the device to be used in many applications including microstepping. The principal aim of this development project was to produce an easy to use, fully protected power IC. In addition several key functions such as protection circuit and PWM current control drastically reduce external components count to meet requirements for many different applications.

    * * *
    APPLICATION NOTE AN1495
    MICROSTEPPING STEPPER MOTOR DRIVE USING PEAK DETECTING CURRENT CONTROL
    http://www.st.com/stonline/books/pdf/docs/8700.pdf

    * * *
    One project with L6208
    http://www.otocoup.com/CarteL6208_e.htm#Specif

    * * *

    Regards,

    Luciano
    Last edited by Luciano; - 22nd July 2005 at 11:24.

  6. #6
    DougB's Avatar
    DougB Guest


    Did you find this post helpful? Yes | No

    Red face 16f676

    Quote Originally Posted by mister_e
    Funny...
    http://www.microchip.com/stellent/id...cName=en010213
    and worldwide available from Digikey and others

    There is a 16F676 PIC, I have one on my desk.
    ww1.microchip.com/downloads/en/DeviceDoc/40039c.pdf

  7. #7
    mslaney's Avatar
    mslaney Guest


    Did you find this post helpful? Yes | No

    Default

    Hey Mister E!!!
    Thanks for the tips on the chips!

  8. #8
    mslaney's Avatar
    mslaney Guest


    Did you find this post helpful? Yes | No

    Default

    And you too Luciano. The drivers look like the right thing. I may continue hacking printer motors for my project.

    I truly hate the L297/298 arrangement!

  9. #9
    mslaney's Avatar
    mslaney Guest


    Did you find this post helpful? Yes | No

    Default

    How do I cycle through an array in reverse order?

    Ok, I ditched the bi-polar and I'm using a pic and mosfets to drive a uni motor. No translator.
    I can spin the motor both ways with the following code but there has to be a more elegant way....I'm thinking I could cut the code in half.

    Here's a clip of the program:

    'Array vars
    stepccw VAR BYTE(4) 'coils
    stepcw var byte(4)
    'Load Arrays
    stepcw[0] = %10100000
    stepcw[1] = %01100000
    stepcw[2] = %01010000
    stepcw[3] = %10010000

    stepccw[0] = %10010000
    stepccw[1] = %01010000
    stepccw[2] = %01100000
    stepccw[3] = %10100000

    CW:
    steps = 0
    for delaytime = 1 to 27
    steps = steps + 1
    portb = stepccw[steps //4]
    pause 10
    next

    pause 1000
    steps = 0
    CCW:
    for delaytime = 27 to 1 step -1
    steps = steps + 1
    portb = stepcw[steps //4]
    pause 10
    next

    pause 1000
    goto cw

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