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!
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.
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.
unlinkp parport.0.pin-15-in net probe-in parport.0.pin-15-in-not
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:
[EMCIO] TOOL_CHANGE_AT_G30 = 1
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.