Skip to content

Setting the pulse value to 640.00 and the acceleration value to 500 results in abnormal motion. #1039

Open

Description

@chenglianshu

Hello. Recently, while using the system, I’ve encountered an issue: I have set the pulse values ​​for all axes to 640 (i.e., $100=640.00, with the other axes set the same) and the acceleration parameters ($120, etc.) to 500. I’ve observed that the motors operate normally at feed rates (F-values) below 800, but they begin to lose steps at speeds higher than that. If I reduce the pulse or acceleration values—for instance, by reverting them to the default settings—the issue disappears. However, when I port an older version of GRBL to my hardware using the exact same configuration parameters, the motors run without any problems. I am using an STM32F407VET6 chip, which has a clock speed of 168 MHz; I believe it should be more than capable of handling these settings.

Activity

  1. terjeio commented on Oct 20, 2026

    @terjeio
    Contributor

    This sounds to me like the acceleration setting is too high. Or a bug has crept in?

    ... when I port an older version of GRBL to my hardware ...

    To the STM32 board or is it a different board? 8-bit Grbl?

    BTW I scoped the pulse distance at 800mm/min with 640 steps/mm and it is spot on, tested with a STM32F446.

  2. chenglianshu commented on Oct 21, 2026

    @chenglianshu
    Author
    1. This sounds to me like the acceleration setting is too high. Or a bug has crept in?

      ... when I port an older version of GRBL to my hardware ...

      To the STM32 board or is it a different board? 8-bit Grbl?
      BTW I scoped the pulse distance at 800mm/min with 640 steps/mm and it is spot on, tested with a STM32F446.

    Yes, the 8-bit GRBL has been ported to the STM32, and these configurations are perfectly fine. However, the system only functions correctly when the acceleration is set to 10—which is far too low.

  3. chenglianshu commented on Oct 21, 2026

    @chenglianshu
    Author
    1. This sounds to me like the acceleration setting is too high. Or a bug has crept in?

      ... when I port an older version of GRBL to my hardware ...

      To the STM32 board or is it a different board? 8-bit Grbl?
      BTW I scoped the pulse distance at 800mm/min with 640 steps/mm and it is spot on, tested with a STM32F446.

    Regarding the experimental tests you conducted here—did you set the acceleration to 500 (the same as I did), or was it left at the default value of 10?

  4. terjeio commented on Oct 22, 2026

    @terjeio
    Contributor

    I set acceleration to 1000. I ran the test without a motor connected though.

    What kind of machine do you have? Could it be that your drivers/motors is not up to the task of accelerating the mass?

  5. chenglianshu commented on Oct 23, 2026

    @chenglianshu
    Author

    4. I set acceleration to 1000. I ran the test without a motor connected though.
    What kind of machine do you have? Could it be that your drivers/motors is not up to the task of accelerating the mass?

    I am using TMC2209 stepper drivers with an MKS Robin Nano motherboard, which features an STM32F407VET6 chip. I have ported both 8-bit GRBL and grblHAL to this same hardware, using identical configuration parameters. On 8-bit GRBL, the stepper motors run very smoothly—even at a feed rate of 3000, there are no issues. With grblHAL, however, the motion is not smooth at a feed rate of around 900, and if I increase it further, the motors begin to lose steps.

  6. terjeio commented on Oct 23, 2026

    @terjeio
    Contributor

    The 8-bit version cannot have acceleration set > 10 mm/min?
    For grblHAL: if you reduce acceleration can you increase speed?

    E.g. for my small test machine with TMC2209 and Nema17 steppers I have set acceleration low to avoid stalling:
    Image

  7. chenglianshu commented on Oct 27, 2026

    @chenglianshu
    Author

    6. The 8-bit version cannot have acceleration set > 10 mm/min?
    For grblHAL: if you reduce acceleration can you increase speed?
    E.g. for my small test machine with TMC2209 and Nema17 steppers I have set acceleration low to avoid stalling:
    Image

    Image

    These are the configuration parameters I use for my 8-bit GRBL setup. On my hardware, the motors run very smoothly, which confirms that the hardware is capable of handling these settings. However, when using the same parameters with the grblHAL firmware, the motors seize up—or, in other words, lose steps—even at a speed setting of 800. To get it running stably, I either have to reduce the pulse-per-unit value (for example, setting $100 to 80 allows for stable operation at F2000) or lower the acceleration value (setting $120 to 10 mm/min also enables proper operation). If the acceleration is set above 50, the motion is no longer smooth.

  8. terjeio commented on Oct 28, 2026

    @terjeio
    Contributor

    Please post your complete settings, or at least the ones related to the steppers.

  9. chenglianshu commented on Oct 30, 2026

    @chenglianshu
    Author

    8. Please post your complete settings, or at least the ones related to the steppers.

    Sorry for the delay—I was held up by something. Here is the complete configuration I exported from the machine; this is the configuration for the grblHAL firmware.

    Configuration.txt

  10. terjeio commented on Nov 3, 2026

    @terjeio
    Contributor

    How do you set motor current and microstepping without the motor plugin?

  11. chenglianshu commented on Nov 5, 2026

    @chenglianshu
    Author

    10. How do you set motor current and microstepping without the motor plugin?

    I don’t think this has much to do with the motor drivers. I’ve tested with more than just the TMC series—I also tried the A4988, and the behavior remained the same. Most importantly, the hardware and configuration parameters used for testing both 8-bit GRBL and grblHAL were identical. Furthermore, when I ported grblHAL to other ARM-based chips (with M4 cores), the speed remained very slow. Interestingly, however, the same configuration achieves much higher speeds on an ESP32-S3.

  12. terjeio commented on Nov 7, 2026

    @terjeio
    Contributor

    I have now compared an Arduino Mega 2560 with Grbl and STM32F407 with grblHAL with your settings. Running G1X100F1000 behaves exactly the same. If I try G0 (max speed) Grbl crashes, grblHAL stalls the motor. This with exactly the same driver settings - DM420A @ 12V.
    The Grbl crash is likely due to too high step rate.

  13. chenglianshu commented on Nov 13, 2026

    @chenglianshu
    Author

    I have now compared an Arduino Mega 2560 with Grbl and STM32F407 with grblHAL with your settings. Running G1X100F1000 behaves exactly the same. If I try G0 (max speed) Grbl crashes, grblHAL stalls the motor. This with exactly the same driver settings - DM420A @ 12V. The Grbl crash is likely due to too high step rate.

    My 8-bit GRBL implementation is not running on an Arduino Mega 2560; instead, I have ported it to an STM32F407VET6-series microcontroller. With my current configuration, the system handles G0 (rapid) moves very smoothly. Since both the 8-bit GRBL and GRBLHAL are running on the exact same hardware, I can rule out any hardware-related issues. I suspect that GRBLHAL might not support such high travel speeds when the pulse-per-unit (steps-per-unit) and acceleration values ​​are set very high—settings that are often necessary for CNC machines with larger working envelopes. If the pulse-per-unit value is set too low (e.g., 100), the actual distance traveled per step becomes extremely short; conversely, if the acceleration is set too low, the motion feels unnatural, as it takes too long to reach the target speed. In any case, the pulse-per-unit and speed parameters defined in my configuration file result in a frequency that is well below the 300 kHz limit.

  14. terjeio commented on Nov 13, 2026

    @terjeio
    Contributor

    What does the scoped pulse output looks like with identical settings for your 8/32bit port and grblHAL for a G0 move?
    Acceleration phase and cruising phase please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions