Limit Switches - My quest for accuracy

Over the past year and a bit I have been faffing with limit switches. My shapeoko didn’t come with them (early model).

I started my journey with micro switches, moved to slightly larger ones then onto hall effect magnetic sensors, I then tried some proximity switches with no luck, however I now have a full set of working proximity switches. The trick was to use a lower voltage.

The beauty of proximity switches is there is no contact - it detects the metal body of the machine and is powered through a 5v pin like the touch probe

I did a quick video for anyone who wants to take a look.

here are the limit switches I ordered in case anyone wants to have a go - importantly they are NO and 6-36V and have a pretty light on them :sunny:

If anyone wants the design for the Y axis mount here it is:

My Z axis mount is unique to my Z axis so I won’t share that and X is mounted with hot glue, although I might change this shortly, if I do I will update.


Is there any fundamental reason why proximity sensors would be more accurate than magnetic sensors?

I speculate it’s a combination, firstly the magnetic sensors I used were rated at 10-30 volts there is speculation that running this type of sensor on a lower voltage decreases its accuracy due to not being fully powered.

Secondally and combined with the above when mounted straight on they should be ok, but going when mounted sideways the magnetic fields vary more meaning they can be triggered slightly earlier or later.

Whilst I can’t confirm the above as fact I can say each time I homed my machine and returned to a work piece it was off my a fraction (usually 0. Something of a mm).

With the proximity sensors I’m getting Higher accuracy when returning to jobs. It’s worth noting this likely wouldn’t be an issue when milling signs, wood etc but allot of my parts are aluminium. I also made sure all sensors were mounted to trigger head on.

Hello Luke,

Thank you for the video. I would like to take up your offer for more info.
I have just placed an order using the ebay link you provided. Probably going to take a while before I get them. However i might as well try and understand what I’m doing before they get here.

Can you explain which wires (colours) from the switch go where on the board / supply?
What 5v supply did you use.

Thank you for any assistance you can give.

Best wishes .

Wonderful, I don’t think you will be disappointed.

The 5v comes from the board and goes to the brown wire on the sensor.

The black and blue wires on the sensor go to the usual probe pins, I think blue is the neutral and the black is the other - if not swap them around.

I pulled the 5v from a pin I added on the corner of my board.

However if you don’t fancy that you can pull a 5v from another pin as detailed in the touch probe assembly:

Also here are 2 designs for mounts for you:

Y axis:

X asis:

Thank you.

Just a few questions. You mentioned Black & Blue go to the probe pins - did you mean x/y/z limit pins?

The eBay listing shows 10+ volts but you are only using 5v. Is this because that is the max the board will take as an input?

Best wishes.

Yep correct.

The picture is incorrect, it should be 6-36v.

Thank you. I’ll let you know when I get them delivered.

Best wishes.

I now have my proximity switches. Instead of attaching the brown to +5v. Can I attach it to +12v which is a screw terminal and connected to a optional fan (not used) and always powered?

Best wishes.

I’d try a 5v in first instance, when I tried 24v it messed up my switches temporarily and did not function right

Thank you for the support.

I am having problems. Just connected a single proximity switch (X Limit)
Connected Blue & Black to the connection at the bottom of the board board and Brown on the +5v . Then put a screw driver close to the proximity switch, but nothing happens.
Also tried to swap Black and blue around.

If I put a multimeter on Black and Blue. Should I see a voltage?

Do I need to enter something into the GRBL settings?

Best wishes

You should see the resistance between black and blue change from high to low (mega ohms to maybe a couple ohms)

Can you confirm you have 5 volts from the source?

Thinking about this I wonder if it’s not getting enough power. What should happen is when the switch goes near an alloy the light will turn on.

Yes. I put a meter between +5 Brown and GND further down the same line of pins. Shows 4.93v

Best wishes.

That’s a little low. Mine are min 5v. Try powering the switch from a 12v and ground

Ok. Connected Brown to +12v and now the proximity light comes on if I put a metal object in front.

If I allow travel on the x and then put a metal object to activate. Should it stop, or do I have to set something in grbl.

Best wishes.

When light activates it should stop the travel. All 3 wires must be connected

Thank you. Light on proximity switch comes on but does not stop.
All 3 wires are connected.

I have to stop for the day. I’ll do some more googling and more testing when I can.

Once again thank you for your time.

Best wishes.

Do you have homing enabled in GRBL? $22 = 1 (homing cycle, bool)

1 Like