Welcome to Our Community

Some features disabled for guests. Register Today.

Stepper Motor tuning test

Discussion in 'CNC Mills/Routers' started by Wendel Clement, Mar 15, 2024.

  1. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    91
    Likes Received:
    4
    Good Evening community,

    Although not new to CNCing I have not dabbled in tweaking and tuning before. I get the general gist but somehow cannot seem to not know how to correctly change and test the speed and acceleration.

    I am trying to tune in my stepper motors X Y and Z to be 20% off the stall rates as recommended. However I have looked at a few YouTube videos and searched high and low here for a good guide for doing this on the Lead 1515 running Controls software and can't see anything.

    I get the gist that the general concept is to change the Grbl params (below) until the respective motor stalls. But do I test it with a simple jog of the respective axis or do I have to write some form of test gcode script to do the test. If so, if there a function in Controls to do this or do I have to do it manually. If manually then where do I generate this? I have tried to enter G0 X15, G4 P2000, G0 X0 as a macro but this doesn't seem to work.

    Any info or direction to a forum thread discussing this?

    Thanks

    $110=2500.000 ; X-axis maximum rate, mm/min
    $111=2500.000 ; Y-axis maximum rate, mm/min
    $112=2500.000 ; Z-axis maximum rate, mm/min
    $120=150.000 ; X-axis acceleration, mm/sec^2
    $121=150.000 ; Y-axis acceleration, mm/sec^2
    $122=150.000 ; Z-axis acceleration, mm/sec^2
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,867
    Likes Received:
    4,283
    Jog all the way (max distance) using Continuous jog
     
  3. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    91
    Likes Received:
    4
    Thanks, will try
     
  4. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    91
    Likes Received:
    4
    I must be missing some fundamental step. I have focused on my x-axis and set $120=5000 mm/s2(from 350) but I do no see any change when jogging X axis continuously left or right. X max rate currently set to 3500 mm/min.
     
  5. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,867
    Likes Received:
    4,283
    Remember to reset for settings to take effect (Save button in Grbl Settings tab > pops up a prompt asking if you want to reset)
     
  6. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    91
    Likes Received:
    4
    I'm changing the Gbrl at the serial console prompt
     
  7. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    91
    Likes Received:
    4
    Here are my settings
     

    Attached Files:

  8. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,867
    Likes Received:
    4,283
    No, use the Grbl Settings tab
     
  9. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    91
    Likes Received:
    4
    That did work. However It was not all smooth sailing as after setting the 20% less stall points did produce unpredictable results such as only one of the Y-stepper motors moving during a test run of a real model and the Z-slipping during the run. I obviously scale it back much more but not as far as the conservative pre-set points. So there is some improvement in speed and acceleration but not as much as I had expected.

    Thank you
     
  10. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,867
    Likes Received:
    4,283
    Correct, room for improvement (depending how well the kit was built) but our settings aren't on the uselessly slow side either
     
  11. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    91
    Likes Received:
    4
    I'm guessing that you meant 'are on the uselessly slow side' rather than 'aren't'?
     
  12. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,430
    Likes Received:
    1,907
    I like to do a binary search:
    say the default is 400mm/min
    double it and try 800, works? double it to 1600, works? double it to 3200, fails! ok, go to (1600+3200)/2 = 2400, probably works ok. your numbers may vary.

    then do the same with acceleration.

    note that max rate and acceleration have a symbiotic relationship, you can have very high max rate with very low acceleration or the other way round, both will work, but each machine needs a balance of the 2 to suite the application. for routers like ours we want values in the 'reasonable' range, I tuned my own Ox up to 7500mm/m but decided to slow down to 4500mm/min because bad stuff happens faster than I can hit the Estop at 7500mm/min (-: I then also slowed the acceleration down because it was shaking the table and tools were falling off due to the vibration.
     
    Giarc likes this.
  13. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,002
    Likes Received:
    1,676
    I do a lot of 3D cutting with short moves up and down and side to side. I turned my max speed down and upped my acceleration. It is amazing how much faster as carve gets done. I rarely need to make a long fast cut. Even with max speed lowered I never cut at that speed.
     
  14. Nathan Reineke

    Builder

    Joined:
    Mar 18, 2024
    Messages:
    2
    Likes Received:
    0
    How would you go about tuning the feed rate and acceleration on the touch interface? I dont have access to a computer or wifi where I am working. Also how would I know I am stalling the motors with they whine? Or not move?
     
  15. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,867
    Likes Received:
    4,283
    Tools and Utils > Edit Grbl Profile menu


    High pitched whine. Read Grbl v1.1 Configuration and Grbl v1.1 Configuration

    If you are running our profiles, its conservative but solidly fast. Might not need to put in the effort, if its a custom machine - yes then do.
     
  16. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    91
    Likes Received:
    4
    Good advice and thanks for the reference figures.
     
  17. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    91
    Likes Received:
    4
    You will definitely know as they make a grinding/straining noise and they either barely move or not move at all.
     
  18. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    91
    Likes Received:
    4
    Peter the Lead 1515 was set to 350 for acceleration and 3500 for speed. Is that considered solidly fast?
     
  19. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,867
    Likes Received:
    4,283
    Yes.. The 1515 is a big heavy machine. Solidly (reliable) while fast enough for standard work. Always room for tuning, but i mean don't expect to double it. Say we're 80% there m, dialed back a little just to make it reliable for the odd bad build too
     
  20. Adam Jelinek

    Builder

    Joined:
    Jan 24, 2023
    Messages:
    46
    Likes Received:
    3
    Tell me if I'm right. To change my max speed I do it in grbl settings. Enter a new speed value, save and restart. Then use the jog direction on continuous to test speed. Then keep adjusting and testing until it pauses/skips steps and then back it down by 10 to 20%? And the same for acceleration?
     
  21. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,867
    Likes Received:
    4,283
    Correct, just like that
    Good old trial and error
     
  22. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,002
    Likes Received:
    1,676
    That is correct. However, they effect one another. So for example if you get your max speed up to 7000mm/min and it is at that point just below stalling and you increase acceleration it will probably stall. That is because acceleration rates are what get you to that high speed faster.

    If you do really long cuts with long rapid moves between cuts, and your machine has the rigidity to cut at that high of a speed then maybe speed is your friend with less acceleration. If you are like me and you do not cut many things larger than 24"x24" and you also do a lot of 3d carves, acceleration is your friend because the machine has to make a lot of small moves. I lowered my top end on both my lathe and router and increased acceleration and the jobs get done much faster.
     
  23. Adam Jelinek

    Builder

    Joined:
    Jan 24, 2023
    Messages:
    46
    Likes Received:
    3
    When you test your acceleration did you do it with the directional keys for short distance or for a long distance. I know your values may be different then mine end up but would you mind sharing you speed and acceleration? It would give me a good starting point.
     
  24. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    3,002
    Likes Received:
    1,676
    I believe I would type in a command to move like G0 X200. As for my settings, my current gantry weighs about 37 pounds. It is a custom build with two OpenBuilds high torque stepper motors on the Y and one on the X and Z.

    I am not able to access the machine right now, but I do know that I was able to get it up to about 7000mm/min before stalling. However, I will never cut anything that fast and I prefer higher acceleration so I actaully limited the travel speed to either 5000 or 5500 mm/min if I recall correctly. I then increased acceleration until it stalled and then backed it off 20%.
     
    Adam Jelinek likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice