How to connect these limit switches in series?

All the black pins along the “bottom” (in your latest image) connect to ground, which is electronically identical to the blue gnd pin you’re using.

I never meant to say those boards wouldn’t work at all, but that I personally have not been able to get them to work as Normally Closed switches. As long as you use them as Normally Open and connect them in parallel you should be fine.

Many machines have limit switches at min and max of each axis, so the designers of the shield made it easy to connect those machines with two wires per switch. As noted before, grbl can infer which of the two limit switches for an axis was tripped based on the direction of motion for that axis which grbl keeps track of internally.

I’m glad you’re having good luck in your project. One last warning - the 0.9 (and later) version of grbl enabled PWM control of spindle speed by swapping the Z limit and SpindleEnable pins on the Arduino. Protoneer released a version 3.10 of the shield that reflects this, but you can make it work on a v3.00 shield. I can’t tell which shield version you have from the photos. If you can’t get Z limit switches to work, plug them into the SpinEn pin.

Ok, Now a problem has arisen connecting to the computer, when the limit switches are activated the connection stops. Yes, I’m putting it in parallel.

The USB connection drops, or the machine stops moving and enters a locked state?

The latter is by design when hard limits are active. Tripping a limit switch (outside of the homing cycle) turns off the spindle and coolant pins and prevents further motor movement. You have to unlock the machine to continue.

If the controller itself is losing USB connection (or resetting), I’d suspect voltage from the LED circuit on the end stops is causing the problem but I don’t have any evidence to back that up.

I found what was happening, the limit switch board has 3 outputs but these are not necessarily the same sensor output. In fact, there are 4 outputs on the board but 3 female pins for connection to the Shield V3.

This board only works by connecting to 5V (red wire), GND (black wire) and signal (green wire). In other words, 3 pins must necessarily be connected, and not 2 like the switch connections (COM and NO/NC).

The only alternative for this specific limit switch board is to change the command $5=0 to $5=1. In the first diagram I shared here, I connected it to the X+ (black pin) but it is to the white pin. I did so by connecting one sensor to the X+ (white pin) and another to the X- (white pin).

Anyway, all the tutorials on the internet show this end of course switch acting like this. I will share two links from which I extract this information. The first link, I realized that the same connection scheme that I mentioned was used. And the second (in the video) was used in parallel.

What I didn’t understand is that in GRBL the command $5=0 refers to limit switches that are set to NO. And I’m using it in parallel, I don’t understand why it worked. I believe these switches are developed for the purpose of controlling RAMPS circuit boards.

Makerbot-style Endstop Power Adapter for Protoneer Arduino CNC Shield – The Smell of Molten Projects in the Morning (softsolder.com)

So are you all sorted out? You’re getting the behavior you want?

1 Like

Yes, thank you for help me.

Thanks @SupraGuy

1 Like