PWM/HPWM Stepper Motor Controller


Closed Thread
Results 1 to 34 of 34

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113

    Default PWM/HPWM Stepper Motor Controller

    Hi, I'm just getting into a project that I want to control the speed/direction of a stepper motor using a stepper motor driver/controller which seems pretty straight forward. At least for controlling the direction and enable disabling the motor. I have the controller in the link above. It doesn't come with any instructions other than printing on it you can set the dip switch to the number of pulses it needs to receive for one revolution. It has me puzzled how to actually control the speed there I'm not getting it I look at 200 pulses and think that would be HZ. I'm kind of stuck has anyone used a PIC to feed one of these controllers?
    Thanks
    David

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: PWM/HPWM Stepper Motor Controller

    These type of controllers require a digital direction input, an digital enable input, and last but not least, a digital step input. The controller will advance the motor 1 step for every digital input pulse. Depending on the steps per rev. setting made thru the dip switches.
    Dave Purola,
    N8NTA
    EN82fn

  3. #3
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default Re: PWM/HPWM Stepper Motor Controller

    Quote Originally Posted by Dave View Post
    These type of controllers require a digital direction input, an digital enable input, and last but not least, a digital step input. The controller will advance the motor 1 step for every digital input pulse. Depending on the steps per rev. setting made thru the dip switches.
    Agreed..... I think I understood that what I am missing is if I am am going to send PWM/HPWM out on one of the pins (lets say as an example I set it up for 200 pules per revolution) is that 200 pulses per second or? How if I set it up for 200 pulses per revolution would you regulate the speed?
    Thanks

    David

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: PWM/HPWM Stepper Motor Controller

    This is a simple way to generate step pulses

    Code:
    Count = 1
    
    While count < 2000  ' Send 2000 pulses rotate motor 10 times
    
    Latx = 1 'Output 10us pulse to stepper drive
    pauseus 10
    Latx =0
    
    Count = Count +  1
    pause  10 ' use this delay to slow down or speed up the motor
     Wend

  5. #5
    Join Date
    Jan 2008
    Location
    Pennsylvania
    Posts
    113


    Did you find this post helpful? Yes | No

    Default Re: PWM/HPWM Stepper Motor Controller

    Thanks Mark_S that makes sense to me know
    David

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: PWM/HPWM Stepper Motor Controller

    David, at 200 steps per revelolution the motor will run rough. Once you get it running change the dip switches on the driver to 1/8th step or 1600 pulses/rev. It will run much smoother.

    Mark
    Last edited by mark_s; - 29th September 2020 at 01:05.

Similar Threads

  1. Motor Stepper Example
    By Melanie in forum Code Examples
    Replies: 134
    Last Post: - 3rd January 2015, 18:58
  2. Need guidance with DC motor controller - PWM & H-Bridge
    By rfetech in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th November 2010, 04:33
  3. Another Stepper motor controller
    By aratti in forum Code Examples
    Replies: 3
    Last Post: - 19th December 2009, 10:52
  4. Stepper motor controller
    By aratti in forum Schematics
    Replies: 22
    Last Post: - 24th April 2009, 17:43
  5. Stepper Motor Program
    By kiwipiper in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th November 2007, 03:56

Members who have read this thread : 2

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