Welcome! Log In Create A New Profile

Advanced

Acceleration and Jerk setting with stepping, time to tweak?

Posted by Downunder35m 
Acceleration and Jerk setting with stepping, time to tweak?
January 19, 2016 11:17PM
While getting my laser cutter working with an Arduinio instead of the supplied chinaware I encountered a weird problem that had to check on my printer as well.
During fast movements of the laser head (near the physical limits of the machancis) I noticed a lot of missed steps and "layer" shifting as a result.
I never encountered this on my printer that bad so I thought it is worth to investigate as both printer and laser cutter run on the same Marlin version.

To get everyone on the same level, the only real difference in the mechanics are smaller motors and longer travel ways, both are belt driven for the axis.
But the big difference is that by default the cutter would work with 1/128 stepping!
I noticed quite soon that an Arduino Mega with a 16MHz clock and only a small buffer is unable to handle the commands in time.
So the speed was extremely slow but the machine also extremly quite.
The Arduino is capable of a stepping frequency of around 10000, the Marlin default is set to 40000.
As a result the buffer can be filled before enough print moves are finnished, and in return the machine either slows down or stops for a moment.
These stops cause "vibrations" and shuttering of the affected axis.
My first attempt was to lower the stepping frequency to 10000 but that only made everything even slower, the only real way out was to reduce the stepping to a more same 1/32.
Now I had the speeds I wanted but at these speeds it was impossible to to use without fear of falling apart from the vibrations and shuttering.
Here I noticed the missed steps for the first time.
Further tests showed that the shorter the print moves are the worse the problem is, so nice long lines work just fine, short ones wth changning directions not at all.
After a lot of tweaking and testing I got it now working without losing steps but still some noise from the motors and vibrations, that what I did:

After reducing the stepping the motor current was reduces as well.
The Jerk was increased from the standard 20 to 50 - makes no sense but at lower levels the controller has trouble with the timing and buffering.
The acceleration as first increased to 2000 but this caused massive noise when changing directions at high speeds, also some steps got lost.
Reducing it to under 100 made all work really good mechanical but - and that's a big but: It also slowed the movement down too much at the start and end of print moves.
So it was set to a same 600 instead.

For out printers this might be intersting for several reasons:
1. If the controller allows a higher stepping will give us an almost silent machine - considering it will still be able to move fast enough.
2. A print head being slowed down too much by acceleration and / or jerk settings can cause the filament to be extruded very differently in the affected areas.
This includes layer bonding, shape of the outer most primeter, blobs at the end of print move and too thin extrusion when a new line starts.
3. Reducing acceleration and jerk for the Z-axis can be quite helpful if your machine is not 100% perfect in mechanical terms.
It will increase your prtint times by a few minutes for really big parts but should eliminate many problems caused by wobble or other mechanical issues on the z leadscrew.
4. Check how much your machine can handle in these terms by checking the movements with simple testshape.
Create one like a "M" with very long legs left and right, do the same at the bottom in reverse, like a "W".
Set almost insane sprint speeds and don't worry about filament not looking good at all when printed this way.
Observe how the head moves when it comes to the short parts with the sharp turns.
If it "jumps" from one direction to the other you might loose some steps on the way - and have a lot of noise as well.
You might want to lower the acceleration a bit in this case.
If it slows down massively after the long straight or start the next long quite slow until reaching full speed you might want to increase the acceleration.
Once it moves fine check the jerk settings.
Start by setting the jerk to zero first - this will cause the printhead to basically stop before changing direction.
Depending on your stepping (1/8, 1/16 and so on, not the values to get accurate dimensions) this can cause some vibration of the table.
Again observe the movement.
Now increase the jerk to 200 and repeat - again observe the movement.
The head should change direction without losing too much speed as this will always cause problems with the nozzle pressure.
But you do not want the head to stop during sharp turns or cause "jumps" that could cause the motors to lose a step or two as the moving mass is too much to handle.
If at 200 you still get repeated matching layers with well defined corners (considering our insane speeds) you can try to increase the jerk even higher.
If you get missing steps, overshooting corners (mainly for the y-direction) you want to lower the jerk by 10, repeat until you see good results with slowing the head down too much in the corners.

Now you got it setup to handle the higest speeds you migh encounter during simple inflills - including the problems with short lines here.
This means at sane print speeds your machine will now work much better in the mechanical department!
Keep in mind that especially the acceleration will only be affected at very high print speeds, during slower speeds the acceleration is usually still so high that movents change almost at an instead.
But if you do get higher speeds you no longer should see problems with corners or lost steps.
Again: If your controller allows you might want to try a higher stepping for your x and y motors.
The additional accuracy is limited by the mechanical downsides of our machines but it helps to drastically reduce the noise levels from the motors - especially is only a 1/8 stepping is used by default.
Good thing is that the firmware can stay untouched and that you simply double the amount of steps if you change from 1/8 to 1/16 - simply use the M92 command winking smiley
VDX
Re: Acceleration and Jerk setting with stepping, time to tweak?
January 20, 2016 05:20PM
... to avoid all this problems, I'm running my machines (up to now 8 or 9 with lasers or ink-jet dispensers) with ArduinoDue, RADDS shield and RASP128 1/128 microstepping drivers.

My max speeds with direct driven spindles are up to 150mm/s, with tooth-belts up to 500mm/s -- but for avoiding mechanical resonancies from the acelerated masses I'm laser-engraving with max. 50mm/s and ink-jetting with max. 100mm/s ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Sorry, only registered users may post in this forum.

Click here to login