Correct Microstepping Settings
-
If you have 1.8 deg motors and are running cartesian with true 1/256 the processing power would possibly allow you to move fast enough. With a delta and 0.9deg motors on 1/256 it's not very quick maybe 90mm/s max.
Plus unless your axes are zero friction then you'll have to accumulate a number of microsteps before it actually moves. In which case maybe 1/64 would work better. I've tried a lot of modes and settled on 256 interpolated. Best of both worlds.
-
Well, I have a cartesian (Prusa Clone) printer with 1.8° motors and my printing speeds are ~100mm/s (travel moves 130mm/s). So this should work fine with X256 microstepping?
No axis can run at zero friction but why does this make a difference depending on the microstepping?
What do you mean by (256 interpolated)? You mean X16 interpolated (to 256)?
Is it possible to use X32 or X64 with interpolation to 256? -
How hot the motors get does not depend on the interpolation setting, only on the motor current setting.
For most users, x16 microstepping with interpolation enabled gives excellent results. If you choose higher microstepping, make sure that the MaxReps reported by M122 stays preferably below 50 and certainly below 100 during long fast moves.
The TMC2660 drivers only support interpolation with microstepping is set to x16.
-
No axis can run at zero friction but why does this make a difference depending on the microstepping?
Okay so microstepping is partially activating different coils in the motor to achieve partial positions between the notches you can feel when you turn the motor by hand (full steps).
When you start dividing 200 full steps (1.8deg motor) into 1/256ths of a step, you have the insane number of 51200 steps per one rotation of the shaft. Let's say you ask your system to move just 1 microstep (not sure you can actually do this but stay with me) nothing will happen, no movement will take place. The change in magnetic field in the motor is so tiny that the axis will not move, the friction (sometimes people use "stiction" which is more descriptive) of the axis will be greater than the force this minuscule magnetic field change generates. Now the motor is effectively 1 microstep out of position but in reality, the distance it is out is so small it doesn't matter*. Next you ask for 10 microsteps of movement, the driver adds another 10 microsteps of magentic field change, maybe at this point the axis moves the 11 microsteps requested and now is in the correct position.
This effect would not occur if axes were zero friction (air bearings or maglev), and it occurs less with less microstepping as to move 1 microstep at 1/16th is a bigger change in the magnetic field in the motor, than to move 1 microstep at 1/256th. However its not true that torque gets less and less the smaller the microsteps, as the motor will sit on full step positions every 256 microsteps (when set to 1/256th) where the torque will be the same as it would be when set to move full steps.
*(if your machine uses 80 step/mm on 1/16th with GT2 belt and 20t pulleys, then 1 microstep is 0.0125mm per microstep if you change to 1/256th it is 0.00078125mm/microstep or 0.78microns/microstep! - a red blood cell is 5 microns in diameter)
-
For most users, x16 microstepping with interpolation enabled gives excellent results. If you choose higher microstepping, make sure that the MaxReps reported by M122 stays preferably below 50 and certainly below 100 during long fast moves.
I set it to X256 and printed a benchy. MaxReps was 41, so everything should be fine, right?
-
MaxReps 41 is fine. You might find that it increases if you do larger prints, depending on your acceleration and maximum speed settings.
-
I printed at 1/16 with interpolation.
I printed with 1/256.
On my motor there is no difference. -
I printed at 1/16 with interpolation.
I printed with 1/256.
On my motor there is no difference.On ANY motor there is no difference because the driver is sending 256 micro-steps per step either way. However the CPU on the Duet is another story entirely.
For those that are confused little bit about interpolation it works like this:
Assuming 100steps/mm at no micro-stepping for ease (obviously not real life but it makes the math pretty).
No micro stepping:
GCODE "Move X 1mm" => Duet "calculate 100 step pulses" => TMC Stepper Driver "100 step pulses" => Motor "1mm"x16 micro stepping:
GCODE "Move X 1mm" => Duet "calculate 1600 micro-step pulses" => TMC Stepper Driver "1600 micro-step pulses" => Motor "1mm"x16 micro stepping with interpolation to x256:
GCODE "Move X 1mm" => Duet "calculate 1600 micro-step pulses" => TMC Stepper Driver "25,600 micro-step pulses" => Motor "1mm"x256 micro stepping:
GCODE "Move X 1mm" => Duet "calculate 25,600 micro-step pulses" => TMC Stepper Driver "25,600 micro-step pulses" => Motor "1mm"In every case your motor shaft has turned 1/2 of one full rotation. However the more micro-step pulses you ask the Duet to calculate / create the harder the electronics have to work to create them. Depending on the other math it is having to do (Cartesian is easiest, Delta, CoreXY, Scara, etc.. are harder), other processes its managing (extruder temp, bed temp, fan speeds, GCODE parsing, Wifi, web server) you could hypothetically run into hardware limitations or just plain overtax the board. By using interpolation at the driver level the Duet gets to do less and the driver just takes whatever number it was given and multiplies it by 16 before generating the pulses to the stepper. You get nice quiet motors, well more than acceptable positional accuracy (as Simon pointed out), and the Duet gets to do less work, everyone is happy.
Dave/Tony feel free to correct / elaborate as I am not sure if the load on the Duet is due to math, or actual step pulse generation, or both. Also not sure it really matters lol.
-
I specially printed a round shape. I thought 1/256 would give a more curved shape. No.
So, in both cases, linear interpolation is used? -
The problem here is scale. Between 1/16th and 1/256th we're going from 0.0125mm per microstep to 0.00078125mm sounds like a big improvement but 0.0125mm is itself a very small distance its 12.5 microns. If you make up a circle or a hole from 12.5 micron steps even if it is 2mm in diameter you are not going to see the steps. However few if any 3d models use as many steps for a hole, it's not uncommon for a small hole to be approximated by a 16 sided polygon! You will see the steps there if it's large, (or if its small and you have a fine nozzle and a very accurate printer).
1/16th is plenty for the scale of printing we are undertaking.
Maybe if you make a machine optimised for very tiny models (0.15mm nozzles, super low friction axes etc…) and you use 0.9 deg motors and maybe 1/32 or 1/64 microstepping, maybe you'll be able to print really tiny thing. But as well as an SLA or DLP which cost less than £500 now? No. So why would you?
Running at above 1/16th is about noise reduction, not accuracy, any accuracy gain is too small to make a difference.
-
The diameter of the circles is 15 - 25 mm. The circles are in the form of polygons.
Format STL vector. What are the polygons? -
What I am trying to say is that holes are often approximated by polygons, the facets of those polygons are large and microstepping settings will not affect them. If you can make holes which are genuinely round i.e. made up of 128 segments or more for small holes, or many more than that for large holes, then perhaps you might see a difference on higher microstepping. But I doubt it.
Microstepping to a certain level, such as 1/16th adds some accuracy depending on how you gear the movement to your axis, i.e. pulley sizes, leadscrew pitch etc.. , but after this level, accuracy does not improve enough to be noticeable. Noise reduces. But then the best combination is 1/16th with interpolation - all the noise reduction, enough accuracy and low demand on the processor.
Try printing a cube with a hole in it with microstepping set to 1, then another at 1/2, then 1/4 etc… and try them all. Chose the best one, but remember on some setups speed will reduce at the very high microstepping like 1/256 because even the mighty Sam4 processor running RRF can only generate 350000 steps/sec.
-
If I am not mistaken all surfaces in STL files are represented by triangles. Why? Because through the magic of tesselation triangles can make almost any shape fairly well.
https://m.all3dp.com/what-is-stl-file-format-extension-3d-printing/
A slicer reads this triangle data and does its best to create paths using GCODE that are reasonably accurate. GCODE actually has the ability to create “true” arcs (G2/G3) but I’m not aware of any slicers that implement it. The consensus seemed to be “it’s hard and for very little benefit”.
TL;DR
No matter how many circles you print, or your micro-stepping you’re still printing faces not arcs. -
Well, actually the printer can only print straight lines - at least with STLs and common slicers.
Polygons, of which 3D models are made in most cases, are three-dimensional triangles which are defined by three positions (vertices) in space. These vertices are connected by lines called vectors or edges and the surface (called face) surrounded by these edges is 'filled'. But this is not what the printer sees.
A very, very simple explanation of how slicing works: The slicer software computes the model layer by layer. For each layer the slicer checks where the layer crosses the faces. Because each polygon has an additional information called normal, which is essentially the direction the surface faces (this is why it is called face), the slicer knows which side of the face is a solid part and not air. When all the positions where faces cross the layer are calculated, the slicer connects these positions with two-dimensional lines and probably adds more details like additional perimeters, infill etc.
Finally the printer prints the lines defined by the slicer.
And this is, why we will never get round edges, as long as we use STLs and slicers that do not support curves. Of course we could use extremely high res models, but this would make the slicing process much slower and I doubt this would actually lead to better prints. With a line thickness above 0.4mm and melted filaments for printing the lines, we would probably not be able to see any improvement. -
If I am not mistaken all surfaces in STL files are represented by triangles. Why? Because through the magic of tesselation triangles can make almost any shape fairly well.
https://m.all3dp.com/what-is-stl-file-format-extension-3d-printing/
A slicer reads this triangle data and does its best to create paths using GCODE that are reasonably accurate. GCODE actually has the ability to create “true” arcs (G2/G3) but I’m not aware of any slicers that implement it. The consensus seemed to be “it’s hard and for very little benefit”.
So, does accuracy depend on the STL model?
-
That's one factor for sure but not the only one.