On a whim I decided to whip together a collet mounted Z depth probe for my CNC machine.
It took 25 minutes and works GREAT!
Select 1/4″ aluminum rod to fit my 1/4″ collet
Measure length that I think will fit into the collet with clearance for the switch and wiring, marked with a pencil.
Clamp into a vise and cut with hacksaw. Be sure to wear eye protection. I used hardboard to protect the soft aluminum from being gauged and pressed out of shape in the vise.
Use a hacksaw to cut a square notch into one end. I cut just off center down the middle by eye about half an inch then cut sideways from the thinner side to remove D shaped slug leaving a D shaped semicircular shaft.
The rod was slightly oversized and would not fit properly into my collet.
I clamped it into the chuck of my drill press and used a file on the spinning rod to reduce its diameter until it fit. Files are designed to be pushed away from the operator so be sure to pay attention to the direction of rotation and file, this results in pushing the file away from you pressed against the right side of the cylinder in a standard drill press. Of course, only test the fit when the drill press is off and stopped.
You could also use sandpaper if a file is not available, but it will take longer.
I used the file to take sharp corners off business end.
Align the switch with the cutaway in the end of the rod and mark the height of the mounting holes in your switch on the round part of the D.
Notice the pencil marking near and on my finger.
Use the hacksaw or file to cut a notch in the back round D part at the height you marked. This will be needed to hold the switch securely in place later.
I selected a long length of stranded wire with an RCA connector on one end from the junk wire drawer. Just about any flexible wire will suffice, just remember that the wire will repeatedly flex with the motion of the machine so should not be too stiff and ideally should be stranded, not solid conductor type.
I grabbed a microswitch and soldered the wires to the “C” common and “NC” normally closed connections. You want the switch normally closed so that if there is ever a fault or broken wire the CNC digitizer will detect the open circuit right away and interpret that as contact with the workpiece while probing.. If you wire it normally open and a connection is broken then the CNC machine will try to probe right into your workpiece. (unless, you make a mistake I did, but more on that later…)
To attach the switch to the D shaped end of the aluminum rod. I lashed the switch to it using a twist tie, for a more permanent connection add a drop of epoxy between the switch and metal.
Strip the insulation off a twist tie. It is easiest to remove 1/2″ – 3/4″ sections until you have a fully stripped steel wire rather than try to strip very long sections in a single go.
Thread the twist tie through the mounting hole in the switch twice.
Slide the D shaped portion of the aluminum rod into the wire loop and start twisting the wire ends by hand. Be sure the wire seats in the slot you sawed or filed in the back of the round part of the “D”.
Tighten the wire using pliers being careful not to break the wire or delicate plastic part of the switch. You may need to wiggle the switch in order to seat it properly on the rod aligning the hole with the groove for a tight fit.
At this point I also bent the end of the metal switch plate slightly a few mm from the end to provide more springy direct contact right under the tip of the center of the probe to ensure the metal arm is what makes contact and closes the switch rather than pressing the microswitch under the arm directly down on the workpiece.
Tie the electrical wire to the shank for a strain relief and attach the wire to your machine so that it does not get pinched or caught in moving parts.
Completed probe elevated and engaged.
Wiring and configuration
Wire your probe. I threaded mine conveniently through the spiral compressed air hose.
Connect your new probe to your controller’s digitizer input.
Note: Wiring and configuring your motion controller is not included in the 25 minutes.
I had already wired and configured a digitizer for Mach 3 using a Xylotex motion controller on the parallel port.
You will need to configure your CNC controller to accept a probe and wire it accordingly. On my parallel port connection on the Xylotex motion controller I wired a 10k resistor from the probe pin to +5 and wired the switch between the probe pin and ground so when the switch is normally closed, the pin reads “0”, and when the switch is depressed the circuit to ground opens and the pin is pulled up to +5 and reads a logic “1”. I offer this as an example for my configuration but you should check your controller and software manuals to determine correct wiring for your equipment.
In Mach 3 I can test my digitizer probe by looking at the diagnostics screen. When I press the button I can see the digitizer input light up telling me that the switch is working and the software is configured correctly.
Test function and repeatability
To test the digitizer function I issue a G31 Z-1 F10 command. This tells Mach 3 to move Z to -1 at a feedrate of 10 inches per minute (ipm) and to stop when the digitizer is engaged.
To test reliability and repeatability I issued this command 12 times and recorded the Z height where the probe engaged each time. I entered these measurements into a spreadsheet to calculate the minimum, maximum, average and standard deviation of the samples… this probe was reproducible with a standard deviation of 0.000824″, under a thousandth of an inch. This is great for woodworking or PCB engraving.
Test engraving on a non flat surface
To really test it I mounted a piece of melamine on a set of 1/4 inch shims to create a severe slope and performed a standard engraving cut.
As you can see, any slope or irregularity is a nightmare for engraving with a “V” bit. High portions of the work surface are engraved too deeply and lower portions may not be engraved at all resulting in an uneven line width.
I used ScorchWorks G-Code Ripper to generate a new gcode file from the first one that included probing and compensated for the measured work surface elevation in the g-code.
When I engraved the new g-code (on the right) it started by probing the surface, then asks the user to switch to a cutter bit and completes the engraving operation. This sample was engraved to a uniform depth which is an improvement but I still didn’t know how to set an accurate zero depth so it is too deep.
The final missing piece was to figure out a way to register the probe zero height to the cutter z height.
My collets do not allow reproducible tool height location so I had to find a workflow to zero each bit during the machining process. Here is what I found:
Make sure your gcode contains an M6 manual tool change operation and that your controller pauses and allows you to change bits, jog, and reset zero z (or alternative similar functionality)
- Install the probe in the router
- Move to the X Y origin over the workpiece
- Probe to the surface G31 Z-1 F10
- Zero X, Y, Z
- Start the g-code with probe operations, it will probe the surface, and then pause (be sure your router does not get turned on or it will rip your probe wiring to shreds)
- When you resume the gcode it will pause again for the tool change.
- Replace the probe with the cutter
- Manually jog to X=0 and Y=0
(In my Mach 3 controller I cannot execute gcode like G0 X0 Y0 during a tool change, I have to jog manually)
- Manually jog z to the work surface and manually zero Z.
I use a 0.001″ thick JOB rolling paper as my machinist mentor taught me. Place the paper under the bit and move it down one thousandth at a time until it just pinches the paper then either type .001 into the Z DRO or just zero Z if a thousandth of an inch is not critical.
- Jog Z up a little to clear the workpiece
- Turn on the router
- Resume g-code program to complete the machine operations
These steps are meant for you to understand the operations I had to go through with my machine to get great results. You may have to adjust these steps for your software/controller.
It works perfectly!
The source artwork is really not intended for engraving, it’s just something I grabbed to run some tests, please don’t judge the it too harshly. You can see that the depth of cut is uniform across the finished piece. This would engrave just as well on a curved or irregular workpiece as well.
This is particularly impressive considering how deliberately un-level the workpiece was fixtured.
Not just for engraving…
This isn’t just helpful for engraving, I recently used probing to correct for the irregularities in 4′ x 8′ sheets of 1/4″ plywood. These sheets can be warpy and wavy by over 1/2″ on a large part. Normally I would have to cut many passes with the 1/4″ bit potentially deep into my spoilboard to ensure good cuts. My machine is slow and those extra passes cost a painful amount of time. With probing I was able to cut each part out of the irregular 1/4″ thick material using a .3″ cutting depth and a 1/4″ endmill in a single pass with excellent results, several times faster than it would have taken me in the past.
Here is a custom organizational shelving unit I made for a friend, it turned out great.
It took less than 25 minutes to make the probe while taking all these pictures along the way! It took under 20 minutes the second time (see below), and it took waaaay longer to write this blog post.
I hope this was helpful, or at least entertaining.
D. Scott Williamson
P.S. Test your probe and wire it carefully!
At the beginning of the first large scale plywood cut my CNC machine made several successful probes of the surface then plowed into the table with slow deliberate force destroying the probe switch.
Upon close inspection, the alligator clips I hastily used to mount the probe for initial tests were still in use and shorted together bypassing the fail safe and switch operation resulting in the crash. It’s a good thing that it did not create a dangerous situation.
I was able to re-cut the end of the rod and install a new switch in under 20 minutes which after careful rewiring has operated reliably ever since.