So on the ShapeOko forum,

So on the ShapeOko forum, we were discussing how to keep your limit switches NC while using the new touch plate setup. I haven’t tried this yet as I don’t have all the parts, but supposedly this will work. I originally was going to use a relay but the NPN transistor idea should do the trick.

Again, test this on a bread board or something before wiring it up to your machine just to be sure.


Essentially it’s a transistor NOT gate which flips the signal opposite of what is presented to it. Should cost you all of about $0.50 to implement and just about any small NPN should work, doesn’t have to be a 2N2222 if you have something else on hand.

As drawn should work, but that poor base emitter is sort of exposed to potential ESD event. Perhaps a 10K to +3.3 and a 1K in series with touchplate to base, with a 0.1uf ceramic cap base to ground for some protection? May not be the right values but you get the idea. A small signal(fast) clamp diode, cathode to base, anode to ground, would limit negative exposure as well. Bipolar transistors are pretty tough, but workshops tend to be, well, uncontrolled.
For those using G2 on a DUE, be aware there are no on board external pullups on the limit switch ports. But better news, the latest G2 builds provide for individual NO/NC settings. It is not clear if all the logic to deal with this is in place yet. See the good news, or bad news, is that the future has way more knobs to keep track of

Well, now an ESD protection diode may add a whopping $0.25 to the build :wink: That does make sense. I’ll have to see what I have hanging out in the parts box to put this circuit together and test once I get the rest of the stuff in.

This may be overthinking it. I have my limit switches set up on the NC connection of the microswitch and the TinyG set up for high signal. Home/Limit switches and the touch plate seem to work fine with no additional hardware. This is John Lauer had it set up in his video - straight into the screw connectors.

When I asked John about this, he said it was setup for NO, not NC. I don’t see how a NC setup could allow a NO switch to trigger the z-min.

Not arguing one way or the other mind you, but I’d have to see it to understand I suppose.

Pretty sure it is NC as this makes the switches less prone to noise. I thought the same about Zmin but it seems to work fine with the setup. Maybe the specific G code used resets the way the I/O is used?

Not familiar with the tinyg, so is that z min input normally high? If so, it looks like you are pulling it to ground through the transistor, which seems fine bit I don’t see a resistor anywhere for that path. Perhaps it has one internally?

Also, I’m no electronics expert, but could you use a MOSFET here?

Frank - Correct, tinyG (verified by schematic) and tinyGv9 (by observation of board) have a pull-up to 3.3V and a cap to ground. DUE does not have anything on its PWB. You are a GRBL/UNO user, correct? perhaps UNO does not either. I don’t see anything on Gshield schematic, not experience using it.
A MOSFET could be used as well, but 2N2222 has been an inexpensive ‘junk box’ transistor since almost before MOSFETs became widely available., so it is the likely prototype, if not final implementation.