I’ve been playing around with making an aluminum Turners Cube on the MPCNC and found myself wanting a way to easily set the origin of the machine to the corner of the work. For this project I’m mounting the workpiece in a 3 inch vise. I replaced the metal vise jaws with 3d printed ones to avoid marring the aluminum. After squaring the stock, the Turners Cube requires making the same cut on all 6 sides of the cube. I realize that I could have mounted a stop on the vise to get repeatable clamping but what fun would that have been?
I started by trying to modify Ryan’s firmware by enabling
Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PINwith no luck. I also saw elsewhere on the forums that some
G38.Xwas broken for the firmware versions that most of us use. I ended up merging the latest bugfix-2.0 branch of Marlin into Ryan’s firmware and still had no luck. A couple of hours of debugging C++ macro hell later on my updated firmware (seriously, how anyone keeps up with the amount of preprocessing in marlin amazes me) I found that manually configuring
Z_MIN_PROBE_PINfixed my issues.
Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN seems buggy and doesn’t set the appropriate pin to be monitored by G38. Last of the nuts and bolts that I’ll mention is that for anyone wanting to dive any deeper into Arduino than modifying config values should consider setting up a proper IDE and tooling to make life easier. I took a step away from my usual linux dev tools and followed this guide to get going.
Enough blabbing. Here’s a clip: https://i.imgur.com/n90gSV8.mp4
It’d be cool to see this supported out of the box for MPCNC users. Is there anything keeping to to the version of marlin that Ryan ships his boards with?