Shop OBEX P1 Docs P2 Docs Learn Events
Stepper Motor Driver Suggestion — Parallax Forums

Stepper Motor Driver Suggestion

ispearispear Posts: 20
edited 2013-07-03 07:05 in General Discussion
Hello,

I am having a heck of a time with some GeckoDrive 251X Stepper motor drivers. These units take 2 inputs (step and direction), the direction is simply a High-Low pin and the Step pin is looking for a 0-200 kHz square wave. I am looking for some stepper motor drivers (2.4A per phase) that take an input of something other than a frequency or a PWM. I will need 8 of these so low cost is good. Any suggestions?

Regards,

-Isaac

Comments

  • kwinnkwinn Posts: 8,697
    edited 2013-07-01 18:27
    Take a look at Pololu.
  • idbruceidbruce Posts: 6,197
    edited 2013-07-01 19:05
    ispear

    What's the problem with the G251x's? I have numerous G251's drives and I am very happy with them. Just curious.

    Bruce
  • idbruceidbruce Posts: 6,197
    edited 2013-07-02 02:49
    ispear

    I apologize....

    In the past I tried to be more helpful, but lately I have had my hands quite full with another project.

    However, I do consider myself a member of this wonderful community and as a member, I offer help to you. The G251Xs are a wonderful drive for running stepper motors with a current of upto 2.4A per phase. If that is the current requirement, you have selected the correct drive for the job. Now it is simply a matter of getting them to run efficiently.

    In addition to the stepper motors and drives, there are a couple other things you will need, such as: Please let me know if I can be of assistance.

    Bruce
  • Alex.StanfieldAlex.Stanfield Posts: 198
    edited 2013-07-02 14:39
    ispear wrote: »
    Hello,

    ...
    I am looking for some stepper motor drivers (2.4A per phase) that take an input of something other than a frequency or a PWM.
    ...

    What are you expecting to have? What is the problem you need to solve?

    I have used Dir/Step drivers and found them very useful.

    Alex
  • ispearispear Posts: 20
    edited 2013-07-02 16:37
    Hi gentlemen,

    I really appreciate your input. The problem I am having is supplying the g251's with their 200 kHz square wave. I have a $9,000 NI DAQ board from a previous project that I thought would work with these but the hardware timing is not dynamically varriable while the program is running AND I can only support 4 motors, I need to accomodate 8. The only reason I wanted to use the DAQ board is becasue I have some insanely complicated math written into LabVIEW for the motor speeds, accelerations and positions. The math is a combination of six 6 order differential equations. Since I am limited to sofware timing and can only get 200 Hz consistanntly I was hoping to find some drives that would accept a serial communication and handle their own timing.

    Again, thanks for all your input.

    Best regards,

    -Isaac
  • idbruceidbruce Posts: 6,197
    edited 2013-07-02 16:57
    ispear

    How about using a Propeller Board as an intermediate device? Send your serial commands to a Propeller board from the NI board and have the Propeller board create the correct wave forms for the drives. I have never used an NI board, so I am not sure this is posssible... Just asking...
  • idbruceidbruce Posts: 6,197
    edited 2013-07-02 17:09
    ispear

    The following code has been rewritten to be more efficient and easier to understand, but I am suppling this code because it was easy to grab. This code allows to alter the wave form to the G251Xs, as well as having a variety of variables or constansts. As mentioned, I am not sure if this would work for you, but if it is possible, then I will supply you with the most recent code source.
    PUB PulseTheStepPin(TotalSteps, StepPin, RampingRange, SpeedRange, CycleOffset, RampSpeedAdjuster) | RampingSteps, RunningSteps, CompensationSteps, Counter
      IF TotalSteps > RampingRange
      
        RampingSteps := SpeedRange
        RunningSteps := TotalSteps - RampingRange
        
      ELSE
        RampingSteps := TotalSteps / 2
        RunningSteps := TotalSteps // 2    
      
      CTRA[30..26] := %00100
      CTRA[5..0] := StepPin
      FRQA := 1
      DIRA[StepPin]~~
      Counter := CNT
      CompensationSteps := 0
      
      REPEAT RampingSteps
      
        PHSA := -HIGH_PULSE_WIDTH
        IF CycleOffset => MIN_EXECUTION_TIME
        
          WAITCNT(Counter += CycleOffset -= RampSpeedAdjuster)
        ELSE
          WAITCNT(Counter += CycleOffset)
          CompensationSteps++  
        
      REPEAT RunningSteps += CompensationSteps
       
        PHSA := -HIGH_PULSE_WIDTH
        WAITCNT(Counter += CycleOffset)  
      REPEAT RampingSteps -= CompensationSteps
      
        PHSA := -HIGH_PULSE_WIDTH
        WAITCNT(Counter += CycleOffset += RampSpeedAdjuster)
    
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-07-03 07:05
    This kind of a long shot, but IF you want to use a prop intermediate device, and IF you can use forth, the propforth stepper driver included in the extension directory of the download (4step.f) is very fast and simple, and does acceleration etc. The demo is for a 4 wire stepper but you can change it.

    Also, if you understand the insanely complicated math, and you can convert it to scaled integer, you might be able to do it directly on the prop in propforth, as it is faster than spin, as spin is interpreter on execution, while propforth is only interpreted on input.

    A lot of if's, but might be an option.
Sign In or Register to comment.