CNC-3018XL X-Axis Recalibration

Plotting the backlash / calibration target on both the CNC-3018XL and the MPCNC quickly showed, contrary to what I expected, the MPCNC was dead-on accurate, albeit with some wobbulation and a trace of backlash:

MPCNC - Backlash test - detail
MPCNC – Backlash test – detail

Although it looks ug-u-lee, the (lower speed) drag knife cuts come out nice and, because the entry and exit moves match the main cut, the minimal backlash wasn’t a problem.

Turns out only the X axis on the 3018XL had a problem:

Cal Target - 400 step-mm - merged
Cal Target – 400 step-mm – merged

Apparently the longer leadscrew I installed as part of the “XL” conversion has a small thread pitch error: about 1 mm short in every 250 mm of travel. I don’t have any (definite, non-handwavy) method to measure the pitch directly, other than by running the follower nut and measuring the results, but it’s consistently short.

Quite some time ago (after blowing up the OEM controller board), I set up the Protoneer CNC board in 1:8 microstep mode, making the GRBL $100 setting a nice, round 400 step/mm for a two-start leadscrew with 2 mm pitch and 4 mm pitch:

400 step/mm = (200 step/rev * 8 µstep/step) / 4 mm 

After a few more measurements suggesting the leadscrew actually traveled 249.2 mm, the correct value will be:

401.28 step/mm = 400 step/mm × 250 mm / 249.2 mm

To verify I understood the problem and solution, I set $100 to a few integer values around the goal:

Cal Target - stacked - 399-402 step-mm
Cal Target – stacked – 399-402 step-mm

The top image shows the leftmost line at the 10 mm mark on the scale, because it’s easier for me to match the ink line with an engraved line, rather than the non-line at the end of the ruler.

The other images show the results for $100 set to 399, 400, 401, and 402 step/mm, respectively. The results last two results bracket the desired 250 mm outcome, with 401 step/mm being Close Enough™. GRBL accepts a floating point step/mm value, so I set $100 to 401.28, but I was unable to convince myself the result came out consistently different than 401.00.

Plotting both the tick marks (green) and the knife path (red) on the 3018XL, then cutting the bare paper on the MPCNC, showed the two machines now agree on where the knife should fall. The outer end of the tick marks extends 1 mm beyond the cut line to ensure small misalignments do not produce an obvious white gap around the edge of the deck.

The Y axis continues to match:

Tek CC - 2022-02-14 - Y detail
Tek CC – 2022-02-14 – Y detail

And now the X axis looks just as good:

Tek CC - 2022-02-14 - X detail
Tek CC – 2022-02-14 – X detail

The drag knife corners are rounded, as you’d expect. The cut seems slightly offset from a small origin touch-off error, but the scales now match.

GCMC XY Axis Calibration Target

The CNC-3018XL drawing the scales on a Tek Circuit Computer disagreed with the MPCNC cutting the perimeter. The Y axis edges looked OK:

Tek CC - 2021-11 - Y detail
Tek CC – 2021-11 – Y detail

But the cut on the X axis edges went too close to the tips:

Tek CC - 2021-11 - X detail
Tek CC – 2021-11 – X detail

I conjured a calibration target to help measure the two machines:

Cal Target - CNC3018XL
Cal Target – CNC3018XL

The X- side of the plot gives the general idea:

CNC-3018XL - Backlash Test - 400step-mm
CNC-3018XL – Backlash Test – 400step-mm

The vertical lines consist of two halves, drawn in order from left to right on the top and right to left on the bottom, meeting in the middle at the Y=0 axis. If they do, in fact, meet in the middle, then there’s no problem with backlash.

The 25 mm distance between adjacent lines verifies the linear calibration; the total distance along the X and Y axes provides more travel for more error accumulation.

The circles provide some reassurance the machine can draw a smooth circle, because they come from GRBL’s (or whatever) G2 G-Code commands, not a linear approximation.

Spoiler: after a considerable amount of drawing, measuring, and muttering, the problem emerged from the CNC-3018XL’s X-axis leadscrew:

Cal Target - 400 step-mm - merged
Cal Target – 400 step-mm – merged

It’s half a millimeter short on each end!

More on this tomorrow …

The GCMC source code as a GitHub Gist:

(epilog begins)
(bCNC may regard plot as done before this returns)
(epilog ends)
view raw epilog.gcmc hosted with ❤ by GitHub
(prolog begins)
G17 (XY plane)
G21 (mm)
G40 (no cutter comp)
G49 (no tool length comp)
G80 (no motion mode)
G90 (abs distance)
G94 (units per minute)
(prolog ends)
view raw prolog.gcmc hosted with ❤ by GitHub
// Grid pattern to check XY scaling
// Ed Nisley KE4ZNU - 2021-11
// gcmc -P 4 --pedantic --prolog prolog.gcmc --epilog epilog.gcmc --output 'Scale Grid.ngc' 'Scale Grid.gcmc'
FALSE = 0;
// Define useful constants
SafeZ = [-,-,10.0mm]; // above all obstructions
TravelZ = [-,-,2.0mm]; // within engraving / milling area
PenZ = [-,-,-1.0mm]; // depth for good inking
PenSpeed = 2000mm;
// Overall values
PlotSize = [250mm,200mm,-];
comment("PlotSize: ",PlotSize);
GridSize = [25mm,25mm,-];
Margins = [5mm,5mm,-];
CenterOD = 5.0mm;
TextFont = FONT_HSANS_1_RS; // single stroke stick font
TextSize = 3.0 * [1.0mm,1.0mm];
// Draw it
comment("Draw title info");
tp = scale(typeset("Scale & Backlash Test Pattern",TextFont),TextSize);
tp += [-PlotSize.x/2 + GridSize.x/2,PlotSize.y/2 - GridSize.y/2,-];
tp = scale(typeset("Grid " + GridSize,TextFont),TextSize);
tp += [-PlotSize.x/2 + GridSize.x/2,PlotSize.y/2 - GridSize.y/2 - 1.5*TextSize.y,-];
tp = scale(typeset("F " + PenSpeed + "/min",TextFont),TextSize);
tp += [-PlotSize.x/2 + GridSize.x/2,PlotSize.y/2 - GridSize.y/2 - 3.0*TextSize.y,-];
tp = scale(typeset("Ed Nisley - KE4ZNU",TextFont),TextSize);
tp += [-PlotSize.x/2 + GridSize.x/2,-(PlotSize.y/2 - GridSize.y/2),-];
tp = scale(typeset("",TextFont),TextSize);
tp += [-PlotSize.x/2 + GridSize.x/2,-(PlotSize.y/2 - GridSize.y/2 + 1.5*TextSize.y),-];
comment("Mark center point");
comment("Label axes");
tp = scale(typeset("X+",TextFont),TextSize);
tp += [GridSize.x + 0.5*TextSize.x,-TextSize.y/2,-];
tp = scale(typeset("Y+",TextFont),TextSize);
tp += [-TextSize.x/2,GridSize.y + 0.5*TextSize.y,-];
comment("Draw left-to-right");
tp = scale(typeset("L to R →",TextFont),TextSize);
tp += [-PlotSize.x/2 + GridSize.x/2 - tp[-1].x/2,GridSize.y/2,-];
goto([-(PlotSize.x/2 + Margins.x),GridSize.y,-]);
for (p=[-PlotSize.x/2,GridSize.y,-] ; p.x <= PlotSize.x/2 ; p.x += GridSize.x ) {
comment(" p: ",p);
comment("Draw right-to-left");
tp = scale(typeset("R to L ←",TextFont),TextSize);
tp += [PlotSize.x/2 - GridSize.x/2 - tp[-1].x/2,-GridSize.y/2,-];
goto([(PlotSize.x/2 + Margins.x),-GridSize.y,-]);
for (p=[PlotSize.x/2,-GridSize.y,-] ; p.x >= -PlotSize.x/2 ; p.x -= GridSize.x ) {
comment(" p: ",p);
comment("Draw bottom-to-top");
tp = scale(typeset("B to T ↑",TextFont),TextSize);
tp += [-GridSize.x/2 - tp[-1].x/2,-(PlotSize.y/2 - TextSize.y),-];
goto([-GridSize.x,-(PlotSize.y/2 + Margins.y),-]);
for (p=[-GridSize.x,-PlotSize.y/2,-] ; p.y <= PlotSize.y/2 ; p.y += GridSize.y ) {
comment(" p: ",p);
comment("Draw top-to-bottom");
tp = scale(typeset("T to B ↓",TextFont),TextSize);
tp += [GridSize.x/2 - tp[-1].x/2,(PlotSize.y/2 - 1.5*TextSize.y),-];
goto([GridSize.x,(PlotSize.y/2 + Margins.y),-]);
for (p=[GridSize.x,PlotSize.y/2,-] ; p.y >= -PlotSize.y/2 ; p.y -= GridSize.y ) {
comment(" p: ",p);
comment("Draw circles");
maxr = (PlotSize.x < PlotSize.y) ? PlotSize.x/2 : PlotSize.y/2;
for (r=GridSize.x/2 ; r <= maxr ; r += GridSize.x) {
comment(" r: ",r);
view raw Scale Grid.gcmc hosted with ❤ by GitHub

CNC-3018XL: Improved X-Axis Home Switch Mount

A few months of inactivity left the CNC-3018XL table parked in its homed position where the gentle-but-inexorable pressure of the switch lever displaced the foam holding the plastic actuator tab on the X-axis bearing enough that it would no longer operate reliably:

3018 CNC - Y axis endstop
3018 CNC – Y axis endstop

Putting foam tape in a highly leveraged position produces the same poor results as in finance.

The fix requires reorienting the switch so a solid block on the bearing can push directly on the actuator lever:

CNC-3018 X Home Switch - bottom view
CNC-3018 X Home Switch – bottom view

The block must curve around the bearing to give the tape enough surface area for a good grip:

CNC-3018 X Home Switch - oblique view
CNC-3018 X Home Switch – oblique view

The solid model for the new X-axis mount looks about like you’d expect:

CNC-3018 X Home Switch Mount - solid model
CNC-3018 X Home Switch Mount – solid model

I increased the home switch pulloff to 2 mm, although it’s not clear that will make any difference in the current orientation.

The OpenSCAD source code as a GitHub Gist:

// 3018-Pro Mount for Makerbot Endstop PCB
// Ed Nisley KE4ZNU - 2019-07 (using OEM machine axes)
// 2022-02-02 rotate X block (after renaming axes to match new layout)
/* [Build Options] */
Layout = "Show"; // [Build, Show]
/* [Hidden] */
ThreadThick = 0.25; // [0.20, 0.25]
ThreadWidth = 0.40; // [0.40]
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
Protrusion = 0.01; // [0.01, 0.1]
HoleWindage = 0.2;
ID = 0;
OD = 1;
//- Shapes
// Basic PCB with hole for switch pins
// origin at switch actuator corner, as seen looking at component side
SwitchClear = [15.0,5.0,2.0]; // clearance around switch pins
SwitchOffset = [12.5,9.0,0.0]; // center of switch pins from actuator corner
PCB = [26.0,16.4,2*SwitchClear.z]; // switch PCB beyond connector, pin height
//XBlock = [PCB.x + 10.0,PCB.y,20.0];
XBlock = [PCB.x,PCB.y,10.0];
XBearing = [10.0,26.5,28.5];
XPin = [10.0,20.0,10.0];
module XMount() {
if (false) // side-push switch tended to slip
difference() {
cube(XBlock + [0,2*Protrusion,0],center=false);
translate(SwitchOffset + [0,0,10.0 - SwitchClear.z/2])
cube(SwitchClear + [0,0,Protrusion],center=true);
else {
difference() {
translate(SwitchOffset + [0,0,XBlock.z - SwitchClear.z/2])
cube(SwitchClear + [0,0,Protrusion],center=true);
difference() {
cube(XPin + [0,0,XBearing[OD]/4],center=false);
translate([-Protrusion,XPin.y/2,XPin.z + XBearing[OD]/2])
cylinder(d=XBearing[OD],h=XPin.x + 2*Protrusion,center=false);
cube(XPin + [2*Protrusion,0,0],center=false);
YBlock = [PCB.x,PCB.y,5.0];
module YMount() {
difference() {
translate(SwitchOffset + [0,0,YBlock.z - SwitchClear.z/2])
cube(SwitchClear + [0,0,Protrusion],center=true);
ZBlock = [PCB.x,PCB.y,6.0];
ZPin = [20.0,10.0,5.5];
module ZMount() {
difference() {
translate(SwitchOffset + [0,0,ZBlock.z - SwitchClear.z/2])
cube(SwitchClear + [0,0,Protrusion],center=true);
difference() {
cube(ZPin + [0,2*Protrusion,0],center=false);
//- Build things
if (Layout == "Show") {
translate([0,-(ZBlock.y + XBlock.y)])

Raspberry Pi: WLAN to Wired Network

The CNC-3018XL and MPCNC machines each have a Raspberry Pi feeding G-Code into an Arduino clone controlling the stepper motors. The former grew a USB WiFi interface in place of its internal WiFi hardware when it seemed to have difficulty connecting to the house router, while the latter pretty much worked. Of late, however, I’ve been trying to reduce the number of WiFi devices cluttering the airwaves, with the result of wiring both machines to an old Ethernet switch from the Box o’ Network Stuff:

LinkSys Switch for CNC machines
LinkSys Switch for CNC machines

The blue puck is the KVM button to select one of the machines for the keyboard / mouse / monitor on the bench.

One key point I generally screw up: the WiFi IP address cannot become the wired IP address without rebooting everything else on the network. Instead, just change the IP addresses and be done with it.

Collecting all the pieces in one place:

Disable the both internal WiFi hardware and Bluetooth in /boot/config.txt, thereby eliminating the need to force the WiFi down in /etc/rc.local:


Define the static IP address in /etc/dhcpcd.conf:

interface eth0
static ip_address=
static routers=
static domain_name_servers=

Kill IPV6 activity in /etc/sysctl.conf:


I very much doubt this information is either complete or correct, but it serves the purpose as of early 2022.

CNC 3018 Tool Clamp Rehabilitation

The CNC 3018 Z-axis stage has a plastic clamp holding the spindle motor, so I just duplicated the motor diameter in the mounts for my diamond drag bit, cheap pen, and fancy pen holders. For obvious reasons, I tend to err on the small side for anything intended to fit into anything else, which led to each of the holders sporting a small strip of tape to soak up the difference.

While poking around the 3018, I once again noticed the clamp’s crappy fit around the holder:

CNC3018 tool clamp - top
CNC3018 tool clamp – top

The inside should be circular, but it’s definitely not:

CNC3018 tool clamp - top detail
CNC3018 tool clamp – top detail

The end of the 30 mm M3 SHCS bottoms out before the clamp closes, although I’ve managed to crank the screw tight enough to put enough of a dent in there to snug the clamp:

CNC3018 tool clamp - side
CNC3018 tool clamp – side

Some awkward scraping and filing eroded enough of the plastic to let a 25 mm SHCS close the clamp firmly around the holder:

CNC3018 tool clamp - revised
CNC3018 tool clamp – revised

The tool holders now slide in easily with the screw released and fit firmly with the screw tightened a reasonable amount, minus the tape snippets shimming the difference.

If I had the courage of my convictions, I’d take it all apart, bore the clamp out to a circular profile, realign the clamp screw passage to suit, then rebuild all those tool holders for the new diameter; it now works well enough to tamp that project down.

Tek Circuit Computer: Paper Matters, Redux

The back of a Tektronix Circuit Computer’s bottom deck carries instructions and information:

Tektronix Circuit Computer - rear
Tektronix Circuit Computer – rear

A separate instruction manual told you how to use the thing, under the reasonable assumption you’d be intimately familiar with slide rules.

In this day and age, the back should carry how-to-use instructions, so I summarized the manual into half a dozen lists:

Tek CC - instructions - first pass
Tek CC – instructions – first pass

Which looked fine & dandy & ready to print, thereby exposing various typos / inconsistencies / misalignments:

Tek CC - test print - HP Brochure vs ordinary copy paper
Tek CC – test print – HP Brochure vs ordinary copy paper

Whereupon I (re)discovered just how much paper matters.

The HP Brochure Glossy inkjet paper on the left produces wonderful results with a 0.5 mm Pilot V5RT ball point pen and has coating on both sides. It’s intended for handouts, brochures, and suchlike; the Pilot pens produce identical results on either side.

The same text, printed on plain old 22 pound “multipurpose” paper on the right, looks much better and makes the HP paper looks like something done with crayon on paper towel.

I could try a font with finer strokes, but … ick.

It’s unclear whether Brochure Matte paper would make any difference, nor whether running coated “inkjet” paper through a laser printer would have an … infelicitous … outcome.

Past experience shows the unsteady ziggurat of Linux printing doesn’t respond well to tweakage: when the default settings don’t work, there’s no easy / predictable way to change any particular setting.

For future reference, print the instruction on what will become the back of the bottom deck, mark the center point, tape it to the CNC 3018 platform, touch off XY = 0 at the center, and draw the front scales: everything lines up perfectly without extra fuss & bother.

Drag Knife Blade Lengths

The distances from the sharp tip to the top end of the edge, measured parallel to the shank axis:

  • 60° = 1.3 mm
  • 45° = 0.7 mm
  • 30° = 0.6 mm

Here, the angle goes upward from the paper / Tek CC deck / whatever to the shank axis, so the 60° blade at the top of the picture has the longest blade edge.

Drag Knife Blades - unused 60 45 30 degree
Drag Knife Blades – unused 60 45 30 degree

That’s for one trio of blades from a single eBay seller. I expected no consistency between sellers and that’s exactly what I got when I sorted my collection by peering through the microscope:

Drag Knife Blades - inconsistent cap colors
Drag Knife Blades – inconsistent cap colors

Red seems consistently 45°, but blue & yellow caps can cover either 30° or 60° blades. The actual blade angle lies mostly within ±5° of the nominal value, with 45° between 40° and 50°, but I doubt my few samples span the QA space.

The flat shaping the backside of the blade should put the point 0.25 mm from the shank axis and, because the blades are 1.0 mm ⌀, also 0.25 mm from the OD. A few spot measurements suggest the point offset can be up to 0.4 mm from the axis, so any fancy calculations you might think of making seem pretty much irrelevant.

There’s not much practical difference between the 30° (“window tint”) and 45° (“vinyl”) blades, particularly given the angle and offset tolerances, but 60° blades (“card stock”) seem better suited to cutting the 0.3 mm to 0.4 mm thick laminated Tek Circuit Computer decks than the 45° blades I’ve been using.