It has taken a bit of trial and error and a good, old-fashioned, low-tech method of validating our CNC setup, but we’re thrilled to see that it finally looks like it’s working.
To begin with, we placed a pen (instead of a drill) in the z-axis and fiddled with the motor tuning settings in Mach3. We had no idea how many turns per unit (i.e. millimetre) we needed, so went with a default of 200 (assuming that the steppers were 200 steps/rev). The grid it plotted looked like we’d used inches instead of millimetres – the gaps between the dots were massive!
To simplify things, we replaced our grid with a row of three dots, using the g-code
G0 X0 Y0
G0 X10 Y0
to draw a row of three dots on a sheet of paper. We checked our Mach3 settings and confirmed that we had, indeed, set the default units to mm and not inches. After measuring with a steel rule, we confirmed that the dots were not actually an inch apart either.
So we were pretty sure that the machine was set up for millimetres (but not 100% convinced) but had no idea of the leadscrew pitch. Inspired by Steve’s coding method – where if something works but not quite, you keep applying multipliers and choosing different numbers until it’s close enough – we set to work changing the values in the Mach3 settings. Firstly by reducing the steps per millimetre down to 100.
This time, the spacing between the dots looked better, but we were now about 12mm apart, not 10.
Reducing the steps per millimetre to 90 brought the dots too close together, but it seems that 95 is the magic number for our machine:
Each dot was perfectly 10mm apart – exactly as the g-code described.