25 Minute CNC digitizing probe

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!

Construction


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)

  1. Install the probe in the router
  2. Move to the X Y origin over the workpiece
  3. Probe to the surface G31 Z-1 F10
  4. Zero X, Y, Z
  5. 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)
  6. When you resume the gcode it will pause again for the tool change.
  7. Replace the probe with the cutter
  8. 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)
  9. 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.
  10. Jog Z up a little to clear the workpiece
  11. Turn on the router
  12. 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.

Links:

ScorchWorks G-Code Ripper
Mach 3 CNC Controller
Xylotex CNC Controller and stepper motors

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
Compulsively Creative

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.

Maker of CamBam supports Workshop 88 makerspace!

HexRay supports Workshop 88 with a complimentary
CamBam site license & member discount!

Workshop 88 would like to extend a big thank you to HexRay for supporting the our CNC efforts by allowing us unlimited use of CamBam on club Windows and Linux computers plus a discount on CamBam to Workshop 88 members.

For more information about CamBam, check out their website: http://www.cambam.info/

From the website:

CamBam is an application to create CAM files (gcode) from CAD source files or its own internal geometry editor. CamBam has many users worldwide, from CNC hobbyists to professional machinists and engineers.
CamBam currently supports the following:

  • Reading from and writing to 2D DXF files.
  • 2.5D profiling machine operations with auto-tab support
  • 2.5D pocketing operations with auto island detection
  • Drilling (Normal,Peck,Spiral Milling and Custom Scripts)
  • Engraving
  • True Type Font (TTF) text manipulation and outline (glyph) extraction.
  • Conversion of bitmaps to heightmaps
  • 3D geometry import from STL, 3DS and RAW files
  • 3D waterline and scanline machining operations
  • Extendable through user written plugins and scripts

Be sure to check out their CamBam bundles with Mach 3 controller and CutViewer too.  Personally, I purchased the full CamBam + Mach 3 + CutViewer bundle; I couldn’t beat the price and I’ve been happy with them to this day.

As if that wasn’t good enough: “Unlicensed CamBam installations will continue to work after the 40 evaluation uses are up and allow editing drawings and viewing toolpaths.  However, g-code output is limited to 1000 lines, so another option is for people to work on designs at home, then bring them in to the group’s licensed computers to generate g-code.”

This level of support from HexRay is fantastic and something Workshop 88 greatly appreciates!


I have been using CamBam as my go-to CAD-CAM software for many years, to see a sampling of the kinds of things it can do, take a peek at some of my personal CamBam projects:

3D vacuum forming mask mold master for independent movie

Utility shelf for beverages and keys

Wall artwork – Wooden V

Engraved Bahr family crest

Atari Adventure engraved sign

Philosophy Custom Guitars engraved sign

Working miniature TV

Halftone portrait

Stay tuned to see CamBam powered Workshop 88 CNC projects!

…and on behalf of Workshop 88:

THANK YOU Andy @ HexRay!

If you’d like to find out more about Workshop 88, please contact us:
http://blog.workshop88.com/interact-with-us/ or stop by our weekly open house any Thursday evening after 6:30pm.

D. Scott Williamson
Compulsively Creative

Shapeoko plots!

Our shapeoko has produced its first output under control of g-code!  It’s taped up on the refrigerator at the space. 🙂

Inkscape converted a bitmap of the logo to a .svg, the  gcodetools extension generated g-code, and vi did the final modifications. 🙂 The .svg needs a little cleanup, but it was more than adequate for this first test.

We now have a profile that’s calibrated to within a few percent for X, Y, and Z, though there’s still work on max speeds and accelerations.  This plot was made with a ballpoint pen in a very crude holder.  The bitmap-to-path converter generated inside and outside paths for the lines, so the mismatch of the actual plotted paths gives us some insight into opportunities for mechanical improvement of the shapeoko/penholder system.  While the penholder is responsible for some of the tracking errors, we still have a lot to do to tighten up the shapeoko.  The plate joining the Y and Z axes wobbles surprisingly.  But it’s starting to work!

Update 10/2/12: Using the very convenient test facilities of the axis setup in linuxcnc’s stepconf tool, I maximized travel speed on all 3 axes.  The shapeoko1 profile is getting pretty usable.  Here’s a little real time clip of it plotting.  This one used a Sharpie, and even though it only stayed in one spot while the Z axis raised or lowered the pen, the paper bled the ink into very noticeable dots every time it stopped.