Forum Rule: Always post complete source code & details to reproduce any issue!
Page 5 of 5 FirstFirst ... 3 4 5
Results 101 to 110 of 110

Thread: New Stepper Motor Library

  1. #101
    Junior Member
    Join Date
    Jan 2020
    Posts
    2

    New Stepper Motor Library

    by reading this thread I did not really understand what Devs have done.

    Have they just added the 15min internal cooldown for using RDF which is blizzlike or they have made some custom change ?

  2. #102
    Junior Member
    Join Date
    Mar 2020
    Posts
    1
    Hello dear Luni!
    I use StepControl to move to the desired position. But I need the ability to change speed on the fly. How can i do this?

  3. #103
    Junior Member
    Join Date
    Feb 2020
    Posts
    17
    I did not want to wait for the Teensy 4 port to be done properly, and did not want to read any datasheets, so I made a hacky port (https://github.com/bondus/TeensyStep) to Teensy 4 using ChibiOS timers (https://github.com/greiman/ChRt)

    It might hang, crash and burn, and be very slow. I have only done some very basic testing.

    The pin manipulation of DIR/STEP pins did not work on Teensy 4, and the code did now allow for <Arduino.h> to be included, so you have to implement a little function somewhere:
    Code:
    void doPin(int pin, int state) {
        digitalWriteFast(pin, state);
    }
    A very hacky implementation indeed, but it works.

    I'll hook it up to my little 3-stepper robot and give it a better spin...

  4. #104
    I've used this library in the past with a Teensy 3.5 and had great success with the project. Any update on compatibility with Teensy 4.1? It would be great to have the additional processor speed combined with the on-board Ethernet functionality.

  5. #105
    O0ops. I posted in the wrong thread https://forum.pjrc.com/threads/59112...l=1#post269844

    @luni My problem is that is a custom PCB and all the pins I can use are on FTM0 :-(
    Is there no workaround for this timer shortage?

    J
    Last edited by jensa; 02-10-2021 at 04:52 PM.

  6. #106
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,423
    No, there are only two timer channels on FTM1/2 :-(

    However, if you don't need the controllers at the same time it should work. The controllers are supposed to release the timers after the movement. So, if you use one after the other, the two FTMs should be sufficient.

  7. #107
    Junior Member
    Join Date
    Nov 2020
    Posts
    3
    Works great. Love the library!
    Is it possible to set the motor deceleration different than the acceleration? I can't figure out how to do this, as a single number controls both.
    In my application, the motors are capable of decelerating much more quickly than they can accelerate, (as is the case in many applications.)

  8. #108
    Senior Member
    Join Date
    Jul 2020
    Posts
    901
    For steppers the acceleration and deceleration miss-step thresholds are similar as they depend on the inertial torque
    compared to the dynamic torque available. If you add a braking mechanism to a stepper system it may lose
    position whenever you brake. Normally this means brakes are only for emergency-stop, otherwise the steppers
    should have full control authority for reliable operation.

  9. #109
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,423
    Is it possible to set the motor deceleration different than the acceleration?
    I second MarkT's remarks above and the currently implemented accelerators do not provide this.

    However, if for some reasons you want to change the acceleration behavior, the library is prepared to use custom accelerators. With a custom accelerator you can implement whatever acceleration scheme you need. See here https://github.com/luni64/TeensyStep...c/accelerators for the standard accelerators. You can then simply typedef a custom controller which uses your custom accelerator. See here for the standard controllers https://github.com/luni64/TeensyStep...ensyStep.h#L38

    Please note that all of this can be done in your sketch without touching the library code.

  10. #110
    Junior Member
    Join Date
    Nov 2020
    Posts
    3
    Quote Originally Posted by luni View Post
    I second MarkT's remarks above and the currently implemented accelerators do not provide this.

    However, if for some reasons you want to change the acceleration behavior, the library is prepared to use custom accelerators.

    Please note that all of this can be done in your sketch without touching the library code.
    I am afraid that it is far beyond my "pay grade" to modify the library code. :-) I have no issue modifying my sketch, however.

    I am controlling the speed of a rather large spool that is winding up 3D printing filament, and gaining weight as it is doing so. The spool speed is controlled by a filament tension arm with a corresponding PID loop. The tension decreases, the arm moves up, the spool speed is increased to restore the arm position. The tension increases, the arm moves down.......

    I suppose I could add an acceleration override to alter the acceleration/deceleration depending on the sign of the derivative of the control loop output. An increasing (positive) control output change would select an appropriate acceleration, while a decreasing (negative) control output change would select a different deceleration.

    Is this what you suggest?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •