The MPCNC instructions recommend running it for a while, taking it apart, then putting it back together, so all the parts have a chance to relax and get used to working together. To that end, I figured doing some full platform plots would run the rollers over the entire length of the rails:
I taped three B-size sheets together, with an A-size sheet in the far right corner, into a 29×19 inch sheet to put borders around the MPCNC’s 28×18 inch work area. The tape is on the top surface to prevent embarrassing accidents where the pen snags on an edge, at the cost of blurry lines where the ink doesn’t stick quite right.
The far left corner of the paper washes up on the tool length probe’s base, but the pen position turns out to be so repeatable (it should be!) you can swap them with gleeful abandon and get good results:
The pen rumbles along at 12000 mm/min = 200 mm/s = 7.8 inch/s with no hint of wobblulation. Most likely, those big loops aren’t particularly challenging, although watching the big central assembly whip around a tight curve can be startling.
I modified the pen holder for 3-point support, as the recess for the pen flange isn’t quite deep enough:
Good old masking tape holds the pens securely enough for now.
The glass plate I’d been using for B-size plots doesn’t cover the full area, but I’d set the Z axis limit switch to trip just before the bottom of the rails whacked into the glass. Extending the travel by 5 mm required a snippet of black tape:
The patterns come from a scratch-built Spirograph generator, because I wanted to review what’s new in GCMC. More on the software tomorrow …
cycloids.gcmc, a test program producing a fixed set of hypotrochoids and epitrochoids, more commonly known as Spirograph patterns:
I’m using them to get familiar with bCNC’s Workspace Coordinate System settings and to exercise the MPCNC hardware; ya gotta plot before you can cut.
Most came out fine, but some showed distinct wobbles:
Tight curves and higher speeds produce more wobbles:
You’d probably never feed a wood router over 6000 mm/min = 240 inch/min, so this isn’t as much of a problem as it might appear. Also, I expect a few pounds of router will have fewer wobbulations than a weightless pen hung on a thin plastic mount:
Just one more thing to keep in mind.
It turns out old-school plotter pen nibs skid right off the rounded top of the switch lever:
You can’t see the nib inside the cap, but you get the idea.
Flattening the top and adding a snippet of masking tape produces a better outcome:
I aligned the flat section so it’s parallel to the platform when the switch activates.
Stipulated: plotter pens aren’t a good test for tool length probing, because they have a locating flange to ensure a consistent position in the pen holder and a rigidly controlled flange-to-tip length:
What’s going on here involves configuring and testing bCNC’s overall tool change process: not using cutting tools preserves both sanity and hardware!
NYS DOT repaved the section of Rt 376 between our house and the Red Oaks Mill intersection during a mid-October week, doing most of the work overnight to avoid jamming traffic to the horizon in all directions. Having nothing better to do, I supervised the proceedings …
They prepared the surface by milling off the old pavement during three successive nights, which was just about as noisy as you’d think:
The asphalt spreader sported bizarre LED lights:
Southbound paving began with a crisp new truck:
He would look the same rolling a highway straight through Hades:
The short truck cleared the overhead wire:
Then they chucked up a series of longer Flow Boy trailers:
Despite all the machinery, the job requires guys with rakes and shovels.
All the pictures come from the Pixel, hand-held with automagic exposure and HDR+.
My tax dollars were definitely awake and hard at work during those nights!
A first pass at a useful prolog, minus the offending codes:
cat ~/.config/gcmc/prolog.gcmc (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)
Including any of the usual “end of program” M-Codes in the epilog(ue) causes GRBL to pause before exiting the program, so leave only a placeholder:
cat ~/.config/gcmc/epilog.gcmc (epilog begins) (M2) (allow program to continue) (epilog ends)
Having done a
git clone into
/opt/gcmc before building the program, the GCMC library routines live in:
Limiting numeric values to two decimal places makes sense:
With all that in hand, unleashing the compiler on an unsuspecting source file requires this jawbreaker:
gcmc -P 2 -I /opt/gcmc/library \ -G ~/.config/gcmc/prolog.gcmc \ -g ~/.config/gcmc/epilog.gcmc \ -o cycloids.ngc \ cycloids.gcmc
One might, of course, tuck all that into a little script, rather than depend on extracting it from the
bash history as needed.
The resulting G-Code file looks about right:
head cycloids.ngc (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) F2500.00 [pi@MPCNC tmp]$ head -25 cycloids.ngc (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) F2500.00 G0 Z1.00 (-- tracepath at Z=-1.00mm --) G0 X-145.50 Y-30.00 G1 Z-1.00 G1 X-145.51 Y-29.93 ... vast snippage ... G1 X175.50 Y30.00 G1 Z1.00 G0 Z25.00 (epilog begins) (M2) (epilog ends)
Then it’s just a matter of tweaking
cycloids.gcmc to make interesting things happen:
It’s little more than a flange atop a wide base:
The flange offset puts the switch actuator on the midline of the base, not that that matters, and the base features rounded corners and a suitable legend, because I can.
I clipped the PCB’s through-hold leads nearly flush and stuck it to the flange with 3M permanent foam tape, which seems to work much better than screws & inserts for simple things that need never come apart.
The Protoneer CNC Shield includes a Probe input on the GRBL-compliant A5, although it took me a while to find the legend on the SCL pin in the I2C header. I moved the endstop power jumper to another header, then conjured a quick-and-dirty connector:
When I embed the endstop switch PCB in epoxy, I’ll add a drop to the connector while engaging in Magical Thinking. The whole Arduino + CNC Shield must go into an enclosure after I finish measuring the motor currents.
The OpenSCAD source code as a GitHub Gist:
The original doodles show a severely over-complexicated solution desperately searching for an actual problem:
Putting a large flat pan at the end of a relatively long lever arm, with the pivot arranged to put the pan level at the switch actuation point, made sense at the time. Give the relatively small tools I expect to use, directly ramming them into the switch lever should work just as well.
Putting all that complexity in harm’s way seemed like a Bad Idea when I sat down and looked at it in cold blood.
A friend recommended a Finger Wrench and it looks useful, indeed:
That’s a 10-32 socket head cap screw, on the large end of the screws I normally use.
The orange PETG required a bit of smoothing around the overhangs, but should work well enough. The dark tinge near the bottom comes from the black filament I used for the MPCNC’s Z Axis sensor and won’t affect its operation in the least.
Done with one perimeter thread and a 3 mm brim to glue down the bottom:
That was easy …