cvoinescu wrote:GRBL 0.8c has direct support for limit switches on all three axes, and a separate emergency stop input. You don't need to wire them together, and they're more useful wired separately (because the limit switches can then be used for homing too).
GRBL expects the pin to be pulled low when the limit is reached or the e-stop is pressed, and supplies weak pull-up resistors for that. For the limit switches, there are two strategies:
1. Normally open (NO) switches: wire the two limit switches on each axis in parallel, between GND and the respective input pin (D9 for X, D10 for Y, D11 for Z). Add an optional pull-up resistor (around 1 Kohm) to VCC for each pin.
2. Normally closed (NC) switches: wire the two limit switches on each axis in series, between VCC and the respective input pin. Add a pull-down resistor (required, around 1 Kohm) to GND for each pin. This method has better noise immunity and practically eliminates false limit switch triggering. If you're a purist, you'll want to recompile GRBL with the internal weak pull-ups disabled, but it works just fine even with them enabled too.
Usually, emergency stop buttons have two sections, one NO and one NC. Wire the V+ motor supply through the NC section (so that pressing the switch cuts power to the motors), and wire the NO section between the e-stop input pin (A2, if I recall correctly -- do check the GRBL wiring diagram) and GND. To avoid false triggering in a noisy environment, a pull-up to VCC is a good idea (1 Kohm or so).
When using a resistor in order to eliminate noise in the NO option, can I get away with using a 10K ohm resistor ? I have a few laying around so that would be convenient.