Limit Switches XY and Z in arduino program

Hi Genius’s
I would like to add a limit switches and emergency stop to my machine.

  1. “Z” Limit to pause G-code run. For safety of equipment like accidental set G-code to over run distance supposed to be 10 but entered 100. So it makes a mechanical contact Switch. to tell machine, so I can make corrections without damage. Z to stop up or down, and turn off spindle.
  2. X-Y Limit. to pause G-code run. I will place a bump in one of the links on the chain so I can physically set the limit, Then a roller switch could open contact.
  3. E-stop, Emergency stop all, also for power outage will not restart by itself. magnetic relay and reset. so equipment will not restart without control.

The limit switches will be normally closed. each axis X,Y will need 1 pin each, Z will need 2 pinsa total of 4 pins.

So I need Arduino programing and what digital pins are available for control.

Arduino Mega 2560 Rev3
Driver Board v1.2b

Please Help

limit switches on X and Y don’t work well, unless you know where you are, you
can either run the chain off the sprocket or rip the sled apart before
triggering the limit switches

This is because you need to feed out chain on one side to retract chain on the
other side.

limit switches on the Z make a lot of sense.

David Lang

1 Like