Jerk/accel settings not working for me

  • Hi all!

    I received my duet wifi about two weeks ago and have been working with it ever since. I have upgraded from marlin on a Rambo. I must admit, I’m having a lot of trouble tuning the settings for my printer now. I do have the configuration file all setup and working well with my makergear m2’s hardware and a BLtouch.

    What I can’t seem to get working now is the jerk/acceleration settings. Honestly the past week, I have focused on tuning the accel and jerk with no success. If I want to print an oval without any jerky motion, my XY jerk (instantaneous change)must be set to over 3000mm which is silly. If I go any lower than that, it looks like my printer is hesitating to print it. At a setting that high, it ruins my corners on other prints that aren’t just circular/oval. Along with that, my acceleration is set to between 1000-2000 which seems to work the best with the high jerk setting.
    Regardless of the settings changes I make with the jerk/accel, it seems as if my print head is never moving smoothly like it did with my Rambo running marlin. On average I print around 3000/min. I’m not an expert with the math behind the accel/jerk, but I would assume the calculations from marlins jerk/accel settings I had, would be somewhat transferable to the new duet firmware. My old values on marlin, transferred to the new g code are:
    M566 X240 Y240 Z24 E60
    M201 X3000 Y3000 Z30 E2000

    But the results from that are jagged movements around curved objects.

    Things I’ve tried:
    Nearly every possibly combination of jerk/accel.
    Changed microstepping from 16 all the way to 256.
    Reduced print speed.
    Tried version 1.20 and am currently on 1.21rc4

    I did also find this post that seems like he/she has had issues like mine, but hasn’t been active for two months now or come up with a viable solution:

    I hope I am doing something wrong and we can get this all sorted out. I am not new to 3d printing by any means and have tuned many printers running marlin and repetier, but I’m new to this firmware.
    If you’d like any more information, please do let me know and I would be happy to provide it!

    Any and every help would be much appreciated! Thanks!!!

    disregard the accel/jerk values placed here. I change them in my start up script or as I'm printing since I've been tuning
    ; Configuration file for Duet WiFi (firmware version 1.20 or newer)
    ; executed by the firmware on start-up
    ; generated by RepRapFirmware Configuration Tool on Mon Mar 12 2018 22:18:56 GMT-0400 (Eastern Daylight Time)

    ; General preferences
    G90 ; Send absolute coordinates…
    M83 ; ...but relative extruder moves
    ;M555 P1 ; Set firmware compatibility to look like RepRapFirmare
    M555 P2 ; Set firmware compatibility to look like marlin

    ; Network
    M550 PMakerGear M2 ; Set machine name
    M551 ; Set password ///removed for public viewing
    M552 S1 ; Enable network
    M587 ; Configure access point. You can delete this line once connected ///removed for public viewing
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    M569 P0 S0 ; Drive 0 goes backwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M350 X256 Y256 Z256 E256 I0 ; Configure microstepping without interpolation
    M92 X1420.8 Y1420.8 Z16123.2 E7536 ; Set steps per mm
    ;M350 X128 Y128 Z128 E128 I0 ; Configure microstepping without interpolation
    ;M92 X710.4 Y710.4 Z8061.6 E3768 ; Set steps per mm

    ;M350 X16 Y16 Z16 E16 I0 ; Configure microstepping without interpolation
    ;M92 X88.88 Y88.88 Z1007.7 E471.5 ; Set steps per mm

    ;M566 X900 Y900 Z12 E240 ; Set maximum instantaneous speed changes (mm/min)
    M566 X240 Y240 Z24 E60 ; Set maximum instantaneous speed changes (mm/min) 4.0XY, 0.4Z, 1.0E
    M203 X12000 Y12000 Z1500 E1500 ; Set maximum speeds (mm/min)
    ;M201 X80 Y80 Z250 E250 ; Set accelerations (mm/s^2)
    M201 X3000 Y3000 Z30 E2000 ; Set accelerations (mm/s^2)
    M906 X750 Y750 Z750 E750 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z-2 S1 ; Set axis minima
    M208 X203 Y254 Z203 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y1 S0 ; Set active low endstops
    M574 Z1 S2 ; Set endstops controlled by probe
    ;M558 P5 H5 F120 T5000 X0 Y0 Z1 ; Set Z probe type to switch and the dive height + speeds ////////////////////////////////////////////////////////////////////////////////////////////
    G31 P25 X35.25 Y0 Z1.25 ; Set Z probe trigger value, offset and trigger height
    M557 X15:188 Y15:239 S20 ; Define mesh grid

    ; Heaters

    M301 H0 S1.00 P10 I0.1 D200 T0.4 W180 B30 ; Use PID on bed heater (may require further tuning)
    M305 P0 T100000 B3988 C0 R4700 ; Set thermistor + ADC parameters for heater 0
    M143 H0 S120 ; Set temperature limit for heater 0 to 120C
    M305 P1 T100000 B4725 C7.060000e-8 R4700 ; Set thermistor + ADC parameters for heater 1
    M143 H1 S280 ; Set temperature limit for heater 1 to 280C
    M307 H0 A19.9 C110.1 D42.9 S1.00 V23.9 B0 ;////////////////////////////////////////////
    M307 H1 A415.6 C153.1 D5.4 S1.00 V24.0 B0 ;//////////////////////////////////////////////

    ; Fans
    M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H-1 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P2 S1 I0 F500 H-1 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned off

    ; Tools
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
    G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C

    ; Automatic saving after power loss is not enabled

    ; Custom settings
    ; Custom

    M307 H3 A-1 C-1 D-1

    M558 P5 X0 Y0 Z1 H5 F100 T2000
    M574 E0 S0
    G31 X0 Y0 Z0 P25

  • remember that is 3000 mm/ min not per second

  • I do understand that. Thank you though for ensuring I knew that! My old jerk values were 4.0XY, 0.4Z, 1.0Emm/s, so multiply times 60 and it gave me my new M566 X240 Y240 Z24 E60, which was awful. So for the jerky printing to go away i have to go to unrealistic values for jerk.

  • Might I suggest more normal settings to start with and move from that point.

    As I understand things a vary low E jerk will slow all other moves down, E30 Is vary low for extruder jerk.

    Here is what i have for my CoreXY with direct drive extruder.
    M566 X450 Y450 Z350 E2000 ;Jerk
    M203 X12000 Y12000 Z1500 E5000 ; max speed
    M201 X900 Y900 Z300 E5000 ;Acceleration

    My Z axis is faster then most at the moment as it's spectra line and spool driven.

  • Hi Kezat, thanks for the info!

    Along with the super high jerk on the XY, I have also increased the E jerk to 2000, same results. I just attempted a print with settings very similar to yours with poor results(all same settings except z). When it attempted to print a hole. my whole printer vibrates quite a bit. I do also have a geared stepper extruder with a 5:1, I believe. So maybe that's why the jerk was set so low in the first place.

  • If its not too hard could you post a short video clip of the issue?

    Why are you using the start Gcode to change settings? If you connect with a web browser you can set and confirm settings in real time as its printing.

  • Is that your full config.g? It looks like there are a few things missing. Like M667 for setting kinematics.

  • I like to use S3D's interface to control it. So I have the starting grounds of the accel/jerk set into my starting script, then I tweak it live through the serial communication box. I have confirmed it happens on both USB and SD card, so it isn't S3D. I will certainly add a video as soon as I can! I believe its going to be very hard to see/hear on camera, but will certainly try. However, the strange artifact on the print that are caused by the jerks are very easy to see

    That is my full configuration, generated by the builder they reccomend, then some parts added by me. By default, i beleive the firmware is set to Cartesian mode, so its unnecessary to add M667 S0, but I will do so and try again.

  • Try reducing microsteppimg from 256x to a more normal 16x with interpolation. Don't forget to change all your steps per mm to suit.

  • Here is a video of a small piece i was testing out today, didn't come out too pretty. It happens mostly around that arc and the hole it prints at the very end. Listening is going to be way more useful than watching it. I still cant seem to figure out why marlins jerk/accel settings have to differ so much from this new firmware. The jerk settings in the video are 480 and 1000 accel. Printing at about 35mm/sec.

    @deckingman, thanks for the reply! As stated in my original post, I've tried 16, all the way to 256 with the same results. I even have tried interpolation.

  • Do you have acceleration values specified in your slicer? Cura also has the ability to specify jerk values. That could be overriding your config values.

    In cases like this it's probably best to go back to something fairly basic and conservative and go from there.

    Ideally for the Duet steppers you're going to want to use 16 microsteps with interpolation. So start there.

    Then make sure your steps per mm for all axis are correct.

    Bellow are the speed, jerk, and accel settings I'm using. It's a CoreXY, but my values were adapted from my previous cartesian as a starting point.

    [c]; ############################
    ; 4 - DRIVES
    ; ############################

    M569 P0 S0 ; Drive 0 (x) goes backwards
    M569 P1 S0 ; Drive 1 (y) goes backwards
    M569 P2 S0 ; Drive 2 (z) goes backwards
    M569 P3 S1 ; Drive 3 (e) goes forwards
    M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
    M92 X200 Y200 Z3200 E837 ; Set steps per mm
    M906 X1000 Y1000 Z1200 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; ############################
    ; 5 - SPEEDS
    ; ############################

    M566 X700 Y700 Z20 E220 ; Set maximum instantaneous speed changes (mm/min)
    M203 X9000 Y9000 Z600 E6000 ; Set maximum speeds (mm/min)
    M201 X3500 Y3500 Z100 E9000 ; Set maximum accelerations (mm/s^2)
    M204 P2000 T3000 ; Set printing and travel accelerations

    ; 20mm/s = F1200
    ; 70mm/s = F4200
    ; 120mm/s = F7200[/c]

  • I manually change my settings during the print. Once I find it working the best I've seen it, I'll put that into the config file and work from there and repeat. My slicers is not overriding me at all, I'm using S3D with a basic start up script that homes and primes the nozzle now. After trying settings similar to yours and exactly yours, my prints turn out awful.

    I don't like to brag or be full of myself in any way, but I am known to have some of the best prints in town, and what I'm seeing is nowhere close to my standards. I have to raise to unbelievable jerk to complete oval or circular items, but then that ruins any and every corner or small detail of any other part.

    Also, with 16 interpolation, I notice significantly worse results, mostly in the Z

  • To be sure you could confirm your settings are active by running the acceleration/jerk commands without any variables, the bot will tell you whats live at the moment.

    I did not hear any abnormal sounds on the big arc, only part where i could hear a issue was the small bolt hole at the end of the clip. Are all the axis's moving freely, with a small round bolt hole and the axis's moving really slow stopping and changing direction any binding or axis stiction it might also cause issues like that as a axis catches then frees rapidly.

  • I'm leaning towards the impression that there is some underlying problem here that in itself is nothing to do with jerk and acceleration settings but more to do with the fact that setting them really low helps to mask this underlying problem. Thinking it through we know that the force to move an object = mass x acceleration. So logic dictates that by reducing the acceleration we reduce the force required. Therefore it would seem logical to deduce that one or more motors are not capable of supplying the torque required to accelerate the mass at anything like a reasonable rate.

    Things to check off the top of my head.

    I notice that the motor currents are set to 750 mA which would imply that they are maybe 1 amp motors? Are they adequate for the job - check the spec. Also, does it help if you increase the current to say 90% of the rated current.

    Is the power supply adequate? What is lowest voltage that you see when printing?

    Are all the axis is free of any binding?

    Edit. Try running M122 at the end of a print and check for missed steps or under voltage events.

  • I do appreciate all of your help, very much so! Thank you!

    I can confirm mechanically everything is okay. Swapped out the for the old board just to verify once again. Everything works near flawlessly with the rambo running marlin. I upgraded so I could have WiFi, quieter printer, and a nice display.

    These are the default settings sent with the printer and they work great on the rambo with marlin and repetier. I have not had to change the jerk much but have lowered accel when i was printing with my old board running marlin.
    Jerk X240 Y240 Z24 E60
    Accel X3000 Y3000 Z30 E2000

    After reading what was in M122, there were no errors/missed steps. The steppers were defined 0.75a in marlin firmware but I tried 0.85a and 1a as my steppers are 1a, There was no noticeable difference with any of those current changes. You'd think that the accel and jerk settings would all be somewhat the same among firmware, to a degree. Maybe marlin and repetier have more optimized jerk/accel code for 3D printing.

    This is all pretty frustrating.

  • I can't comment on what Marlin does as I have no experience if using it. One things that stands out with the settings you listed above is that the extruder jerk is very low. More normal settings would be in the order of 600. Try that.

  • I have indeed tried that as someone else recommended that, no difference. 60 was also set by the manufacturer, and it worked great prior.

  • administrators

    Please post the GCode of the circles or ovals etc. that you are trying to print that print jerkily. We've seen issues before with slicers generating tiny non-extruding moves between extruding moves. S3D still does that when printing skirts, but thankfully not the rest of the time.

    Extruder jerk of 60 is very low, and if you use pressure advance you will certainly need a lot more. I suggest at least 600.

  • Sorry for taking a bit to reply, I had to put my old board on for a bit to finish a project. 60 does seem low after looking at everyone else's, but it worked PERFECT on marlin which really throws me off that this firmware is so different when it comes to the jerk and accel. I have attempted it with 2 slicers, S3D and Idea maker, both same jerky motion, nothing is smooth. Here is my gcode though, feel free to check it out!

  • administrators

    That's some of the worst GCode I have ever seen. It includes lots of really tiny segments, which means very low extrusion distances, but it's only giving the extrusion distance to 4 decimal places when it needs at least 5. So the extrusion rate is varying erratically.

    I have seen S3D do this before when generating the skirt, but not for the actual print as it is here.

    For Marlin to be printing this without jerking, it must be ignoring the extruder jerk limit completely.

    You might get reasonable results if you set the extruder jerk limit very high in M566. But IMO a better solution is to use a slicer that generates better GCode.


Looks like your connection to Duet3D was lost, please wait while we try to reconnect.