Figure 1. What appears to be the same switch from Biqu Equipment.
Their instructions say:
- Red line connecting VCC (ramps of +)
- Connect the black wire GND (ramps of -)
- Green Line connection SIGNAL (ramps in s)
Green is actually the switch output and black probably provides the common for the LED cathode (negative).
I suspect that you're using red and black when you should be using red and green. I recommend that you connect up the black anyway. The visual indication of switch status will be useful.
Figure 2. The schematic from Thingiverse.
- Red, Vcc.
- Black, GND.
- Black, GND.
- Green, Output.
How it works:
- With the switch as shown the output is high and the LED is shorted out (so it is dark).
- When actuated the output is pulled low and current flows through R1 and the DETECT LED to ground. The LED is lit.
- R2 makes sure that the line is pulled high during switching from NO to NC rather than leave it floating and susceptible to stray switching due to interference.
- C1 further filters any noise.
The schematic on the CNC shield page is a horrible low-quality JPEG but we can make out enough information.
Figure 3. The end-stop pinout. Note that CONN_3 allows selection of GND or 5V to the end-stop switches. Note also that you can fit end-stop switches on both ends of each axis but that they share a common input to the Arduino. (There are a limited number of pins available so some doubling up is required.) The controller will usually determine which endstop was hit by the direction of travel at the moment the input was triggered.
simulate this circuit – Schematic created using CircuitLab
Figure 4. (a) CONN_3 connection for switched positive. (b) Switched GND. (c) Three-wire sensor boards.
I recommend that you try wiring as shown in Figure 1c.
- Jumper 1 and 2 on CONN_3. That will put out a +5 V on each of the X+, Y+ and Z+ pins.
- Somehow connect up the limit switch black wires to any of the spare
GND pins. Pin 3 on the select is available.
- Wire the greens back to the X-, Y- and Z-.
Note that the schematic and board top-view pinout are not very clear so you may need to do some PCB tracing.