Dimensional Accuracy - X axis travel is 5mm too long when traveling 200mm

Basic Information:

Printer Model: Custom Cartesian derived from stock Anet A8 motors, using MGN12 rails on all axis.
MCU / Printerboard: MELLOW FLY DP5
Host / SBC: RPi 2b
klippy (3).log (2.6 MB)

When commanding the printer head to move 200mm in X direction, it actually moves ~205mm. (Same behavior in Y axis - but focusing on X here).

My rotation distance is set at 32 based on (16 teeth x 2 belt pitch). The carriage runs along the x gantry on mgn12 linear rail, pulled along by GT2 belt.

I can confirm my hardware on X axis as:

  • Stock Anet A8 Timing Pulley (on the stepper shaft) – 16 Teeth
  • New 2GT Idler Pulley - 16 Teeth
  • Stock Anet A8 stepper motor - (likely 42SHDC3025-24B but not certain)
  • New GT2 Timing Belt 2mm Pitch

The 42SHDC3025-24B motor specs are :

  • Stepper Motor 42SHDC3025-24B
  • Rated Power 14W
  • Rated Voltage 3.96V
  • Rated Current 0.9A
  • Rated Speed 1000rpm
  • Rated Torque 0.34NM
  • Holding Torque 0.4N.M
  • Step Angle 1.8°
  • Step Angle Accuracy ±5%
  • Phase 2
  • Resistance 4.4Ω±10%
  • Temperature Rise 80K Max
  • Ambient Temperature -20ā„ƒ~+50ā„ƒ
  • Ambient Humidity 90% Max
  • Insulation Resistance 100 MĪ© Min. ,500VDC
  • Size 424240(mm)
  • Weight 280g

Relevant printer.cfg x stepper definitions:

[stepper_x]
step_pin: D0_STEP
dir_pin: D0_DIR
enable_pin: !D0_EN
microsteps: 16
rotation_distance: 32
endstop_pin: !D0_STOP
position_endstop: -27
position_min: -27
position_max: 220
homing_speed: 50

[tmc2209 stepper_x]
uart_pin: D0_CS
run_current: 0.4
interpolate: False
sense_resistor: 0.110
stealthchop_threshold: 99999

Ive tried loosing the belt and tightening the belt, but it still overshoots.
Any suggestions, what to try next?

Is the difference proportional to the travelled way?
Meaning 2.5mm when only 100mm travelled?
Maybe the belts are too stretched and you should test new one at least on one axis.

1 Like

Try

rotation_distance: 31.22 see if it is close to 200mm, if it increases then try 32.8

For the rotation distance of 32 to be precisally accurate a range of other factors also need to be accurate.
There are many possible sources of imprecision:

  • Gear terth pitch (can vary depending of quality of the part)
  • alignment between driving pulley and idler pulley
  • gantry angle skew in relation to y and/or z
  • belt pitch (again quality of manufacturing)

It’s very difficult to have all these variables to be accurate to a precision that is so small to have insignificant impact. And small deviations in each will compound together to make one bigger deviation. So the best approach is to simply calibrate your rotation distance. If there are no other electronic issues (like microstep skipping), once you calibrate that you should be good to go. Fórmula is very simple:

Real Rotation distance = Current rotation distance * measured travel distance Ć· expected travel distance

Make this test as big as you can so any measurement error is as small as possible if compared to total (if you make 0.5mm error on a 200mm travel test, the deviation will be unnoticeable)

Personally, I would not follow this.
On well defined hardware with known parameters and no mechanical defects, such a deviation is neither normal nor acceptable.

Of course, you can try tuning it away but this might just cover up the underlying root-cause for this deviation and later on be causing issues that will be hard to diagnose.

1 Like

I agree in part. The context of my suggestion was due to the fact of being a custom printer. Going there myself, with imperfect screw holes in aluminum extrusions and plates it’s near impossible to get it perfect (without having a drill press and whatnot). That’s why I also put a disclaimer about ruling out other causes such as motor skipping steps (overheating or under current, could cause it)

Obviously you’d want to keep deviation to a minimum, but exactly square everything is simply impractical (assuming the absese of specialised equipment).

For example my case:
X = 40.115
Y = 79.724

To me this is square enough given my limitations in equipment and I get tolerance of 0.05, which I find quite good

His rotation distance dieverge in almost a full millimeter, which I agree is excessive. I would add to before doing what I suggested to reduce this skew, by working on the alignments, then round off

This is a common misconception. Over long distances, the amount travelled by an axis with belts and pulleys is determined by the number of teeth on the pulley and the average spacing between teeth on the belt (the belt pitch).

The alignment of the teeth, the alignment of the pulley, and similar mechanical errors can cause poor positional accuracy, but these inaccuracies will be localized and cyclic - they will not accumulate over long distances.

The way one can think about this is to consider a 20 toothed pulley turning a belt with a 2mm pitch. If one rotates that pulley 1 million times, they will move the belt 20 million teeth - there is no chance that the belt will somehow move 20,000,003.2 teeth. Thus, over long distances, the distance travelled is determined solely by the belt pitch and number of teeth on the pulley.

This is why it is not recommended to use a ā€œmeasure and trimā€ procedure for kinematic axes. Unless extreme care is taken, there is a high chance one may measure a local/cyclical inaccuracy and incorrectly extrapolate that to longer distances. Thus, there is a high chance that a manual calibration will make the configuration worse.

-Kevin

6 Likes

What you’re saying does make sense, however, I experienced something else. I may still be looking at it from the wrong angle (angle is the key concept where I am coming from), and perhaps the center of your point which I do not disagree with was my argument about the pulley pitch, which coming to think about it again, it was not really thought through. But that is not the only factor at play, and all what I realized from my own patchy setup that distance matters to account for other deviations, which measurement errors impact are proportional to the travel distance.

Consider that the gantry has a 5 degree skew, in relation to the Y axis. With 20 teeth, driving a 2mm pitch belt, the true travel over the X axis will be: d*cos(5). And rotations will be the result / 40. You are correct that rotation rate will not change regardless of the distance, but:

If you measure a travel of 50mm,with the 5 degree skew I mentioned that will translate to an actual 49.8 approx. of effective distance traveled over X. If you measure 200mm, it will be approx. 199.2

A manual measurement error of 0.2 mm will have a much bigger impact over the 49.8 distance than 199.2 distance. When applying the factor to correct this over rotation distance the impact of the travel distance will be:
49.8+/-0.2mm versus
199.2+/-0.2mm

The first could even invert the skew whilst the second will get you closer to the desired distance. Moreover the smallest the pulley is, the bigger is the effect of error in measurement.

By carefully making these measurements (printing a ruler can make this easier and more accurate), I was able to reduce my own skew (which I was unsuccessful otherwise, due to the custom nature of my build, aka frankie), to around 0.05 mm over a 200mm distance. At smaller dimensions this difference becomes undetectable which allows me to work with very tight tolerances, better than many well calibrated production printers.

Today I am confident that when tolerances are not working as I expect them, it’s because there is something wrong with printing settings (such as temperature affecting flow rate) or the filament dimensional accuracy.

For sure I am not equipped to improve the accuracy at this level structurally.

I may still have not accounted for everything, but for the time being, that has worked well for me.

PS: I have a known misalignment issue I did not solve yet. One my my driver pulleys does not sit perfectly aligned with the idler. I lack some parts to correct that, but it causes the belt to drive at small angle, which impacts the rotation distance. It works similarly to my previous example. The carriage is fixed in a linear rail the is perfectly horizontal, but the belt is not perfectly horizontal. I was able to correct it using this procedure, whilst I don’t have a permanent solution. It has impact on resonances, but with input shaping the impact is minimal

If you think your printer has an XYZ skew then I recommend following the procedure at Skew correction - Klipper documentation to measure that skew. Then attempt to mechanically fix the skew as much as possible and then, if needed, use the [skew_correction] module to address remaining skew in software.

Well, FWIW, I’d call that a mechanical issue causing a cyclic positional error, not an incorrect ā€œrotation distanceā€. As it impacts position but does not impact the total distance travelled with one full rotation of the stepper motor.

Ultimately, though, if you’ve found some settings that work for you, then that’s great. I’ve seen many people misunderstand rotation_distance and I’ve seen many proposed calibration procedures that are error prone. As such, I don’t recommend a ā€œmeasure and trimā€ procedure and I do recommend caution before attempting similar types of manual calibration. (Again, in brief, there is a high risk that one could measure a local/cyclic error and erroneously extrapolate that to other distances.)

Cheers,
-Kevin

1 Like

Thanks for the elaboration and I will try to be more careful with my suggestions. I may he too biased to my setup which likely does not apply in most other circumstances. And the reason I ruled out a cyclic error is that the positional skew is proportional to the requested travel distance. Which makes sense considering some simple trigonometry.

Also, there may be a slight divergence in the interpretation. I think what I wanted to communicate with travel distance was from the perspective of the bed, not the belt. If I measure the length the belt travels now it will likely be incorrect, but the distance the nozzle travels along the bed is definitely very accurate. The rotation distance is not wrong in that sense, but that is the setting that allow me to correct the skew caused by something else. I may have indicated that rotation distance is wrong, but what I really meant was that the rotation distance of the belt and pulley system did not match their intended projection to the the print bed. ā€œadjustingā€ it can allow corrections that would otherwise become too difficult to do otherwise, all things considered.

It would be interesting to know if the OP has a 5mm increase also on a 100 mm move, or is it 2.5 mm.

2 Likes

That was the first question in this thread. :smiley:

Hahaha, got so involved in it I also lost track of that. I have a slight suspicion we will never know the answer.

Upps … :blush:

1 Like

Though never been answered…

As Kevin and Sineos stated, the rotation_distance is defined by the mechanical components and should not be changed!
And no math in this earth will result in such off values if the components being used are at least from ordinary quality.

So that should be verified and not just compensated by wrong values.
Even shrinkage of used filament should not produce such a difference but might sum up with other issues.

Well, if you make it that way, I will never have the accuracy I have today. For the lack of an alternate compensation mechanism to account for other mechanical imprecisions, that’s what I can do to make things better, otherwise things will remain worse. So I have two options:

1 - Be strict and accept the dimensional inaccuracies I get with my setup

2 - Be flexible and get a very accurate result, by tuning a parameter that can help me achieve that.

Being very aware of what are my limitations, I can very easily make this choice. The alternative is worse as I currently do not have the means to make mechanical improvements to my structure. Moreover software improvements (or mistakes) are much easier to revert.

I agree, that’s why I mentioned later that this skew should be reduced to a minimum. My bet is quite a bad alignment issue. Which usually can be easily worked out.

This is the print I used to test the fix of the Z issue on the other thread

I think this is not too bad, given other variables that can affect this dimension.

What do you think this would look like if I did not change it? I’d be happy if you hand me over the solution, I will gladly use it to make my bed perfectly flat, my gantry perfectly square, zero out all the twist and square off the whole frame, install some fancy belts and pulleys, install a custom aluminum bracket for the toolhead, re tap the extruder body and maybe add a more beefy stepper motor.

In the meantime a correction through rotation distance adjustment will do.

I think this whole discussion is getting hypothetical. The OP (@aps) should appear again so that we can find out issue for this deviation.

3 Likes

This was the answer I believe

The belts were previously over stretched or deformed in some way I suspect.

A sign of this was that the smooth side of the belt had become corrugated to the touch at sections.

I realise now there was some resistance to movement as the affected sections moved around the pulleys.

Replacing the belt from the same stock as the original belt has fixed the issue.

Further accuracy issues (if any) must be due to mechanical design now.

I have marked the solution and replied.

1 Like