Can't enable Active Low Endstops
-
I'm running firmware 1.20.1RC2 (2018-01-01).
When I send M574 S1 for active high endstop input with [c]M574 X1 Y1 Z1 S1[/c], a parameterless M574 command then returns [c]Endstop configuration: X: low end active high switch, Y: low end active high switch, Z: low end active high switch,[/c], as expected.
But when I send M574 S0 for active low endstop input with [c]M574 X1 Y1 Z1 S0[/c], a parameterless M574 command then returns [c]Endstop configuration: X: low end unknown type, Y: low end unknown type, Z: low end unknown type,[/c]. I'd expect "active high switch", not "unknown type".
M119 and the on-board endstop LEDs also confirm that the active low mode is not working. My switch is connected between +3.3V and X/Y/X_STOP. When I measure the voltage on the X/Y/X_STOP inputs with no switch connected, they are all 3.3V, so it makes sense that the switches wouldn't make any difference.
Is this a bug or is there still a way I can enable active low endstops?
-
That is odd the listing in the wiki for M574 is a bit strange in that it suggests a normally closed switch is active high, which is wrong a normally closed switch sits at 3.3v when the switch is open, and goes to 0v when active I. E. Active low.
Have you tried leaving it set to S1?
-
That is odd the listing in the wiki for M574 is a bit strange in that it suggests a normally closed switch is active high, which is wrong a normally closed switch sits at 3.3v when the switch is open, and goes to 0v when active I. E. Active low.
I think in the Wiki, "active high" means it's "active" when homed. So I think the wiki is correct.
Have you tried leaving it set to S1?
Well I've used NC active high switches with S1 for the last year. Today I happened to try NC active low and it looks like they don't work. So I'll go back to active high. Just wanted to report a potential bug.
-
The "unknown type" message is a reporting bug that is fixed in firmware 1.21RC1.
-
Good…but is it only a reporting bug? Because when I was poking around, it didn't seem like the input pin changed from a pull-up to a pull-down when I switched from active high to active low.
-
Yes, it is just a reporting bug.
-
I just updated to 1.21RC1, and the reporting issue is fixed as you said.
But I'd like to better understand how you are handling the active low case. If you are using a NC switch (the safe way to do endstops) and want active low behavior, the STOP input would need to have a pull-down enabled, with the switch between the STOP input and 3.3V. When the carriage is not homed, the switch connects STOP to 3.3V, so the input is high. When the carriage homes, the switch opens, and the uC's internal pulldown takes the input to ~0V, so the input would be low.
However when I enable "active low" mode, the input is still pulled up to 3.3V, so there is no way to pull the input low. (Unless you are using a NO switch and tie one end of the switch to ground.)
How is active low supposed to work?
-
I understood it to be the other way. When open the Pullup pulls it to 3.3v (high value resistor) when the switch closes it connects input to ground the voltage goes to 0v as this path has practically no resistance.But then this is not failsafe as a wire break would leave the pin at 3.3v?Forget that makes no sense.
-
I just updated to 1.21RC1, and the reporting issue is fixed as you said.
But I'd like to better understand how you are handling the active low case. If you are using a NC switch (the safe way to do endstops) and want active low behavior, the STOP input would need to have a pull-down enabled, with the switch between the STOP input and 3.3V. When the carriage is not homed, the switch connects STOP to 3.3V, so the input is high. When the carriage homes, the switch opens, and the uC's internal pulldown takes the input to ~0V, so the input would be low.
However when I enable "active low" mode, the input is still pulled up to 3.3V, so there is no way to pull the input low. (Unless you are using a NO switch and tie one end of the switch to ground.)
How is active low supposed to work?
Active low would be used for a NO switch or a Hall effect endstop sensor.