Stepper motor controller


Closed Thread
Results 1 to 23 of 23

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    I am posting two more drawings to better illustrate the profile geometry produced by the controller.

    Al.

    P.S. I wish the EDIT function could be restored soon.
    Attached Images Attached Images   
    All progress began with an idea

  2. #2
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    I understand your chart, but what you are missing is that the chart units are shown in Steps Per Second, not in Time Delay Between Steps. While they are related, the former is the inversion of the latter.

    I've attached a quick chart I put together for you to see it. DelayTime starts out at 100mS, and then I subtract 5ms for each step until I get to a target of 5ms/step. This is linear, as you have used in your code, and yes, your "Time Delays" are linear...see the lower graph.

    However, to have linear acceleration, you need to chart Steps/Sec, and make THAT linear.To demonstrate it, I also graphed "1/DelayTime". Look at how non-linear the graph is!

    Think about it this way. When you go from a 100ms delay to a 95ms Delay, the "acceleration" is about 5% of the overall speed. BUT, with the last step going from 10ms to our target of 5ms per step, using your method, we are DOUBLING our speed in the last step--that is a 100% accel rate. There is nothing linear about this, in terms of acceleration.

    That's why, for true linear acceleration, you have to look at the inverse of the time delay-- the steps per second. It's a long formula requiring division to approximate an integral, because if you want linear, and start out with your 5% in the beginning, then you also need to have 5% at the end... so using that rate, your final accel step would take you from 5.25ms to the target of 5ms. Come up with a quick & easy formula for THAT (to run on PBP w/o interrupts), and I'll be impressed. (I guess it could be done if you start a timer before doing the math, then adjust the time delay to compensate for the math execution time...)

    That's not to say your program doesn't work--it obviously does! It's just that I had to point out that you were using your definition out of context. It makes a HUGE difference, if you are trying to syncronize multiple motors.
    Attached Images Attached Images  

  3. #3
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    By the way, to really observe the difference, set one of your motors to go to a high speed, and you can HEAR it! It starts out accelerating very slowly... then part way through, it will take off (like in the non-linear chart I attached), and IF it doesn't stall, the last bit will accelerate so fast it's difficult to discern.

    BTW, I graphed acceleration in the chart above intentionally... notice how the "Time Between Steps" chart is dropping... it is approaching 0. The graphs you attached start at 0, then accelerate away from it. That's because they were generated with "Steps per Second" in mind--your motor reaches max speed when it reaches your steps/sec target.

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


    Did you find this post helpful? Yes | No

    Default bread

    There are no points to continue!

    Al.
    All progress began with an idea

Similar Threads

  1. 18f4431; driving a stepper IN HARDWARE mode
    By DDDvvv in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st January 2010, 17:49
  2. Replies: 11
    Last Post: - 6th November 2008, 11:27
  3. Controlling stepper motor with PIC
    By The Master in forum Off Topic
    Replies: 3
    Last Post: - 1st July 2008, 11:21
  4. Driving Stepper Motor with PBL3717
    By crhomberg in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th November 2007, 21:59
  5. problem with stepper!!
    By ibra in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th August 2007, 17:41

Members who have read this thread : 1

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