Sherline Tool Length Probe: Adding a Jack

Probe jack and switch
Probe jack and switch

I’ve been mulling over adding a tool length probe for a while and finally decided that the simplest approach might be the best: a momentary-contact pushbutton switch that pulls a parallel port input pin to ground.

The motivation is that a simple switch seems to be repeatable enough for tool length probing and it’s cheap enough that I won’t form a deep emotional bond to it. When a probe crashes the switch, I can just pop another one in place without any heartache or putzing around for a day or three to build another over-elaborate probe station.

The catch is that the Sherline motor driver box doesn’t include connections for any of the parallel port input pins.

The choices seem to boil down to:

  • Adding a breakout board between the parallel port and the driver box or
  • Hacking the driver box to get access to the port pins

Well, I’ve already pretty well hacked up my controller, as I wrote up in Circuit Cellar magazine (Aug & Oct 2004), so I don’t have much to lose… and the box is already in the shop!

Probe to port pin 15
Probe to port pin 15

This picture shows the connection to pin 15 of the parallel port on the Sherline driver PCB. The driver doesn’t use that input pin (or any of the others, for that matter), which means the PCB doesn’t have a trace leading anywhere convenient. I ran the new wires through the connector mounting hole, rather than around the edge, and soldered them directly to the connector pins on the bottom of the board.

The jack is an ordinary 1/8″ (3.5 mm, these days) stereo (3 conductor) jack, with lah-dee-dah gratuitous gold-flavored flashed plating; anything similar will work just fine.


  • Sleeve -> driver box
  • Ring -> circuit ground (pin 19 is convenient)
  • Tip -> pin 15, the probe input

The cable shield connects only at the plug into the driver box, not at the switch end. That ensures there’s no current flowing through it and it can do a marginally better job of shielding the two conductors within. I’m reasonably sure that makes no difference whatsoever in this application.

The cable got chopped out of an AV-interconnect dingus with all sorts of fancy connectors on the other end. It’s a surplus find, cost maybe a buck, and has the redeeming feature of sporting molded plugs that I don’t have to solder.

The switch connections are soldered and insulated with heat stink shrink tubing. The general idea is that the driver box provides all the power, there’s no electrical contact with the mill table or spindle, and thus no reason to use fancy circuitry to solve a problem that’s not there.

I did not add a capacitor across the switch contacts, figuring that I’d solve that problem when it happened. The common practice of putting a honkin’ big cap across switch contacts is bad practice: it effectively shorts the power supply across the contacts for a brief moment every time the switch closes. Some stored energy is good (it keeps the contacts clean), too much simply burns them away. ‘Nuff said.

Probe jack - inside
Probe jack - inside

I marked a hole on the front panel symmetric with the LED, eased the circuit board out of the case and wrapped it in a shop rag to keep the swarf out, propped the case on the drill press table, and rammed a 1/4″ hole through the spot marked X with a step drill. Yeah, hand-held on the table, just like you’re never supposed to do.

The force is strong with me…

The (well, my) Sherline.hal file connects pin 15 to the probe sense input (maybe I defined that when I set things up; I don’t recall now), but it assumes the pin will be high when active. The parallel port pin has a built-in pullup resistor and a switch to ground makes it active when low. These two lines in my custom_postgui.hal file disconnect the high-active pin signal and connect the low-active pin signal.

net probe-in

You do it that way to avoid changing the Sherline.hal file, which will be overwritten if you ever run the automagic configuration program again.

If you’re doing this from scratch, just configure the whole thing using the configuration tool, it’ll set the HAL file properly and you won’t need any of that fiddling around.

Tweak the Sherline.ini file to add support for tool changing with the G30 command:


Button everything up, then do a quick

G91 G38.2 Z-10 F10

and poke the button while the Z axis is in motion. The Z axis should stop instantly. If not, check your wiring.

Now, some Orc Engineering is in order: I need a low-budget fixture to put the switch in harm’s way.

6 thoughts on “Sherline Tool Length Probe: Adding a Jack

  1. I am deeply astonished to hear that a bog-standard microswitch is sufficiently repeatable — at least, since in my little world ‘sufficient’ is at least 0.0005″ and preferably 0.0002″…

    1. since in my little world ’sufficient’ is at least 0.0005″ and preferably 0.0002″…

      Yup, that’s far more finicky than my simple needs…

      I have some lever-action microswitches somewhere in the heap that I might try out after I either crash this one or decide I need something fancier. For now, I need more power-on hours & projects with this one.

      I’ll do a writeup in a few days with more details on the switch that’s sure to make your hair stand on end… [grin]

      1. I also was curious about why you chose a switch over something optical or a direct-contact-voltage setup. I’m looking forward to the details.

        1. Quick, cheap, easy…

          The trouble with marching electrons through the spindle is that it doesn’t work: the lube filling the bearings is a really good insulator, much to my surprise. So I’d have to remember to put a clip lead on the actual tool before measuring it, remove it before continuing, and keep it out of the swarf tangle between uses. Fooey!

          Plus, a few mils of tool overtravel requires either a compliant support that returns precisely to the same position or a sacrificial surface that gets all chewed up and ruins the accuracy anyway. Either seemed like a bunch of trouble waiting to happen.

          Optical sensors require a really nice beam (hence, fancy optics), a flat tool bottom, and absurd cleanliness. The ones I’ve seen are all substantial chunks o’ metal. I thought about a pair of cylindrical lenses and a laser, but couldn’t convince myself it would actually work in a small volume.

          Ditto for mechanical switch interfaces, which all seem to be space transformers that let the tool poke the surface here in order to close a switch there. A pushbutton switch gets rid of all that overhead.

          It’d be really nice if the thing actually works. The early indications are positive…

Comments are closed.