Jerk and Acceleration in Cura
-
Hi, I recently bought a Modix Big-40 that has a Duet3D board.
Here are the specs from the WebControl:
Board: Duet WiFi 1.02 or later
Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 2.05.1 (2020-02-09b1)I'm having issues with ringing/ghosting in my test prints. I tried tightening the belts, I tried loosening them, nothing made a real difference. I read that I could try enabling the jerk/acceleration control in the Cura slicer but I'm lost on how to set the values.
The manufacturer has a short tutorial on how to setup the printer in Cura, but that tutorial doesn't say, that I should change the GCode flavor from the default Marlin to RepRap. Which is the first thing that confused me, since this is a RepRap printer?
The second thing are the jerk/accel values. The printer has a config file that has some max values already set:
M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation M92 X100.00 Y100.00 Z2000.00 E418.500 ; Set steps per mm M566 X240 Y360 Z30.00 E120.00 P1 ; Set maximum instantaneous speed changes (mm/min) M203 X9000.00 Y9000.00 Z360.00 E1200.00 ; Set maximum speeds (mm/min) M201 X1000.00 Y1000.00 Z120.00 E250.00 ; Set accelerations (mm/s^2) M204 P500 T1000 ; Set print and travel accelerations (mm/s^2) M906 X1800.00 Y1800.00 Z1800.00 E1000.00 I40 ; Set motor currents (mA) and motor idle factor in per cent M84 S60 X Y E0 ; Set idle timeout - one minute
What GCode flavor should I use in Cura? What jerk/accel values should I set? Will that even make any difference, since the config already has some values? I also noticed that the printing time is always significantly longer than what the slicer estimates.
I'm absolutely new to all of this, so I would greatly appreciate any help and advice on this matter.
-
@Raniot Hello and welcome to the Duet world!
I'm guessing you have already read up on what ringing is and things you can do to change/improve it. In general it comes to trying to push a heavy print head round a corner too quickly, meaning the flex in the system bounces a bit and causes the artefacts you're seeing.
As well as changing the belt tension, you might want to double check all the joints/bolts/connections on the gantries are tightened - In the past I have found a screw loosened in the printhead which gave me some ringing.
After that you're mostly onto tuning the printer to try and slow it down round the corners. For this you can play with speed, acceleration, and jerk, and you can adjust them in your printer config, and/or in your slicer. General advice is to set sensible limits for the machine in your config file (i.e. things that will mean it won't skip steps, break itself etc), then set more detailed/controlled limits using your slicer. In the Slicer you can usually set different limits for different move types, so you can have fast, high acceleration moves forthe infil where ringing/quality is less important, but slower and more controlled moves on the external perimeters where quality is paramount. On an 800mm tall print like yours can do, this can make a world of difference on print times!
Regarding the firmware flavour, you should definitely set it to Reprap. Reprap and Marlin are very similar, but some of the commands are slightly different and use different units (e.g speed & jerk are in mm/min in Reprap but mm/s in Marlin).
I would start by using the values from your config file provided by the printer manufacturer in your slicer. I mostly use PrusaSlicer which only allows you to play with acceleration, so would recommend starting with just that, then you can play with Jerk later if needed. Looking at your config file, your machine has acceleration limits of 1000mm/s^2 in X & Y (from the M201 command), but these are then limited to 500mm/s^2 for printing moves (i.e. moves where the extruder is moving) and 1000mm/s^2 for travel moves (both from the M204 command). So I would put 500mm/s^2 for all the printing moves, and 1000mm/s^2 for travel moves in the Cura controls. Cura will then start inserting M204 lines in the Gcode files where needed to change these limits as needed during the print.
From there on, you mostly need to play with the slicer values on test prints until you get to a result you're happy with. At the same time, you might also consider changing the speeds for different move types in Cura (e.g. slowing down external perimeters a bit). For reference, on my big home made CoreXY, I print external perimeters at about 60% the speed of my infill, and with 30% the acceleration. You may be able to go faster than this, or might need to go slower - only tuning will tell!
Whilst tuning things, you could disable the acceleration control in the slicer and manually send different M204 commands during a print via the web control to see in real time what the results are. It may be a little harder, but will be quicker. There are a few good forum posts out there on the best methods for doing this, e.g.:
https://forum.duet3d.com/topic/14250/tuning-jerk-accel-speed-settings/3?_=1592332339377Regarding the slicer time estimations, you will probably find these get a lot better when you set up the accceleration control in Cura. I think the acceleration & jerk limits in your config are reasonably low compared to most printers (this is probably to be expected because your machine is so big, it will have a lot of mass to move around!), so will take a bit longer to accelerate/decelerate than Cura might expect by default.
If you're confused/unsure on the commands in the config file, you can always look them up here:
https://duet3d.dozuki.com/Wiki/Gcode
The descriptions are very good and will generally give you a good idea of what is going on, but it can be a bit daunting at first!One final thought, you might want to consider using 'Dynamic Acceleration Adjustment' - M593:
https://duet3d.dozuki.com/Wiki/Gcode#Section_M593_Configure_Dynamic_Acceleration_Adjustment
This is a useful feature to combat ringing by tuning out the first natural frequency of your motion system. There's some details on what it is,how to use and tune it etc in the link above. First check if this is already in your config file from the printer manufacturer though! -
@engikeneer
Thank you very much for this amazing thorough answer! I'll check all the screws again but I don't think they're the issue here.Just for context, so people can see where I'm coming from:
-
While assembling the printer, I was afraid of tightening the belts too much so the first test cube turned out like this:
-
After that I went and thightened the belts by a lot more and managed to eliminate the Y-axis but not the X-axis ringing:
-
Then I thought, maybe I overtightened the belts on the X-axis so I loosened them by a little bit, but that didn't help at all.
I'm thinking that I maybe need to bolt my printer down somehow, or to set the jerk/accel values, which is why made this post.
I'll follow your advice and also try out the 'Dynamic Acceleration Adjustment', I've seen it in a couple of other posts but wasn't quite sure about, thinking that the manufacturers config file was already enough.
One couple of last questions though:
-
The units in the config file for speed and acceleration are listed as mm/min and mm/s^2. I understand that this is due to the RepRap GCode flavor, which differs from Marlin. Cura also uses mm/s^2 for acceleration, so no difference here except for speed/jerk (mm/s). I guess I need to divide the speed/jerk values from the config by 60 before inputting them into Cura, correct?
-
I also tried to use the PrusaSlicer at first but noticed that I can't set the machine limits for my printer when using the RepRap GCode flavor. The machine limits only appear in the settings when using Marlin. I know the commands are different but maybe it's possible to set the GCode flavor to Marlin and then work around that? Do I need to set some values differently and if so which and how? I read in some other post, that the reason why PrusaSlicer doesn't have machine limits for RepRap is because RepRap doesn't support the necessary GCode commands, is that true? This is one of the many things that confused me when researching this problem.
-
-
@Raniot in PrusaSlicer, the acceleration control is under print settings / speed, not under the machine settings (though the marlin flavour does have it here too as you've found...). I would recommend using that with Reprap flavour.
The print settings means it puts M204 commands in controlling the print and travel move accelerations, but won't override/overwrite the machine limits set in your M201 in config. I like that because it means the machine limits set in config are always respected, even you you accidentally type a wrong number in the Slicer.
There may be something similar in Cura if you search though. Maybe @Phaedrux or another Cura user can help point you in the right direction? Failing that then maybe just try some different values and see what the commands come out in the Gcode file? I know there are some marlin commands that are compatible with reprap so it might even work without the 60x multiplication in some cases, but I'm not sure.
-
The jerk and accel controls in cura are hidden by default (as many settings are). Under the speed heading you can click on the little gear icon and the full list of available options will come up where you can put a check next to the options you want visible.
At this point in tuning it's actually better to NOT set any accel or jerk values in the slier because they are then baked into the sliced gcode file. This makes it impossible to tune the settings on the fly during a print. Instead of setting them in the slicer now, just start a print and send the commands to try different values while it's printing to see how it behaves. This way you don't have to re-slice and start a whole new print just to test a settings change.
Example of a good place to start
M566 X600 Y600
M204 P600 T2000
RepRapFirmware does honor the marlin syntax for jerk M205 https://duet3d.dozuki.com/Wiki/Gcode#Section_M205_Set_max_instantaneous_speed_change_in_mm_sec
But it's still a better idea to use RepRapFirmware Gcode flavor in the slicer. Yes you lose the machine limits page in PrusaSlicer, but you don't really need it. I don't think they let you change jerk in there anyway.
Once you have found some good jerk and accel values you can use the Cura jerk and accel settings to set different values on a per print move type basis. So you could have faster settings for infill and slower for the external walls.
-
@Phaedrux @engikeneer
I set the jerk and accel values as recommended by @engikeneer and this almost completely got rid of the ringing/ghosting. There is still a slight hint of it visible but it got a lot better. The slicer now also shows the correct time, which is only off by a minute or two at most for small prints.Thanks everyone for the advice!