Limit Switch - Reading Pins

Does anyone know if i read across the pins on the sheild board if i should show 5vdc. Right now i am not showing any voltage unless it is looking just to grd the pin? Anyone know.

If your $5 setting is equal to 0, reading the limit switch pins to ground should be high (~5V) when they are not triggered.
If your $5 setting is equal to 1, the limit switch pins to ground should be low (at or near 0V) when they are not triggered.

Actually, it does make sense.

With NO switches in the not triggered state the I/O pin is “floating” and the Arduino pull up causes the pin to be high (about 5 volts).

With NC switches in the not triggered state the switch is shorting the pin to ground which causes the pin to be in a low state (about 0 volts).

However, the setting of $5 does not influence the voltage readings. $5 is used by grbl to determine which condition is the not triggered state.

2 Likes

No. Keep in mind that voltage is a potential difference.

There is always voltage applied to the pin. With a NO switch in the open position you don’t have anything hooked to the pin so there isn’t any current flowing through the pull up resistor and therefore no voltage drop at the pin so you just read the voltage applied to the resistor.

With a NC switch in the closed position you force the pin to ground potential so current flows through the resistor and drops the voltage to zero across the switch. The value of the resistor is chosen to cause enough current through the resistor to drop almost all of the voltage.

If you had a sufficiently accurate voltmeter you could measure an infinitesimal voltage across the switch due to the switch contact resistance.

1 Like

$10=19 and $10=115 will have the homing pin status activated.

1 Like