Motor Stepper Example


Closed Thread
Results 1 to 40 of 135

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Motor Stepper Example

    hey!!! im using a simple bipolar stepper motor with L297 and L298N and want a degree resolution of 1 degree, both in CCW and CW directions. but im clueless about the coding.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: Motor Stepper Example

    The resolution depends on the motor and the type of stepping sequence you do.
    Most step-motors from have 200 "natural" steps per revolution - or a step angle of 1.8° per step.
    The L297 can do either full- or half-step depending on the state of pin 9. So if your motor has a step angle of 1.8° you get either that or 0.9°
    If you need better than that you need to change the motor to one with a more steps/rev (motors with 400 steps/rev are available but not very common) or change the driver to one capable of microstepping.

    The L297 is pretty easy to drive. You set the CW/CCW pin high or low depending on which direction you want the motor to move and then give it a pulse on CLOCK pin for each step. Want to move one rev, send a total of 400 pulses (if you're halfstepping with a 1.8°/step motor).

    /Henrik.

  3. #3
    Join Date
    Feb 2013
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Motor Stepper Example

    ok!!so the stepper i intend to use is
    http://www.geeetech.com/wiki/index.p...rd_for_Arduino
    so basically to get a resolution if 1 degree i need to use 0.9 is it? and half and full steps isnt an issue?

    would you be able to provide me with the required coding? as im VERY new to C language as well!!!! and thanku soo much for ur reply

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: Motor Stepper Example

    Hi,
    First off all, that motor is an unipolar motor with a single common connection for both windings, it can not be driven by a L298.
    The documentation for that motor isn't really that great. It looks like there's a gearbox on the motor but I can't figure out if the stated step angle of 5.625° includes the gearbox, if there is one. If 5.625° includes the gearbox then you won't be able to get 1° resolution. Fullstep would give you 5.625°, halfstep 2.8125°.

    Finally this is a forum for PBP, most of us don't do C so if you're looking for that you're in the wrong place basically.

  5. #5
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Motor Stepper Example

    Hi all,

    long time no see, because i'm o the business trip and really didnt have a time to meet you.

    I have a question.

    First of all i havent open a new thread because it is already one here.

    Now let me explain you what i would like to do.

    I have the following parts in my lab and would like to do some experiments. Simple not very difficult in the begining.

    1) Big Easy Driver
    2) Stepper Motor with Cable

    Then to control the easy driver i have a pic16f88. I hope that is enough or do i need a bigger microcontroller with 4 different ports?

    I understand that i need to connect from the controller to the Big Easy Driver 3 pins.

    The GND, the STEP, and the DIR.

    My question is: The step has to be a PWM signal? The direction pin is only high or low?

    It is would be nice if anyone has a similar questions and will discuss several options.

    i just want to give to the stepper motor a simple directions and basic step rotation....not microstep. I know that i can do with the Big easy driver, but i would like to start from the very basics.

    thanks a lot for any help in advance.

    regards,

  6. #6
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: Motor Stepper Example

    Hi astanapane, pic16f88 is more then you need to make your motor turn CW and CCW. Just connect two digital outputs plus the ground to your big easy driver and you are done. Have the pin connected to step toggling with a pause in between shorter is the delay faster the motor will run. Pull high direction pin when you want invert the rotation.

    That is all.

    Cheers

    Al.
    All progress began with an idea

  7. #7
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Motor Stepper Example

    Thanks a lot for the reply. i will give it a little bit more time for searching what i need To do.
    Actually i would like to see how i can give a single Step at a time by using pwm.
    Appreciate your time.

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