# GRBL: inaccurate on X axis by ~4 mm on 400 mm

This is GRBL-related. I have a laser-engraver type machine, Chinese, ~550 mm X axis, aluminium extrusions, 2mm-pitch T belt, Nema 17H3430 motors, one mechanical homing switch for X, Arduino-based.

The X-axis accuracy is not up to par. When I make a mark on the X axis and jog to that mark (after homing), depending on the day, the position varies within ~4 mm or so. Sometimes I have to use G00 X-418, others G00 X-422.

I checked the belt tension, it seems OK, not too tight, not too loose. Is there something else I should check?

Another idea I have: put a homing switch on the other end of the X-axis, then home both ends of the X-axis, measuring the difference in machine position, then modify the steps/mm value for each session to force the command that puts me on the mark to be constant (e.g. G00 X-420). Any other ideas? Thanks.

This seems to be either a case of either belt slop or missed steps or it is a case of the accuracy of the limit switch.

If the limit switch moves even a little into either direction, you have to account twice that as the maximum error. So the 4 mm error could come from 2 mm into either direction from the 0-position.

However, there is a silver lining: Laser engraving, just like CNC, usually first dials in the 0 regarding the workpiece instead of the 0 of the machine. As long as the machine's movement is ok, you should be fine even without tightening the mounting of the X-endstop. I suggest to run the following test to find out what kind of error actually hounds you though:

1. Mount a waste piece
2. Go to a position on the workpiece
3. Run the laser for a split second
4. X10
5. Run the laser for a split second
6. Repeat 4&5 till you have 10 points
7. Measure the real distances between the dots engraved

If the distances are always the same but short, you have the wrong steps/mm set and need to adjust them accordingly. If the distances are inconsistent, you have either lost steps or a sloppy belt. To fight lost steps, carefully up the signal to the motor a little. If the results don't change from that, tighten the belt a little - it should sing like a guitar string.

• Thanks, I'll go through the steps. By "signal to the motor", I assume you mean the current on the drivers (TMC2130), which I set according to a formula I found for them. BTW, the motors are very quiet (as expected) and move evenly. – MrSparkly Oct 21 '19 at 14:20
• @MrSparkly yes, upping the current can sometimes help to counter lost steps. – Trish Oct 22 '19 at 8:56