Welcome! Log In Create A New Profile


Puzzled by the Endstop logic (Mega2650/Marlin/RAMPS1.4)

Posted by terrapin 
Puzzled by the Endstop logic (Mega2650/Marlin/RAMPS1.4)
April 24, 2014 10:11PM
I am testing the Mega2650 board with Marlin firmware loaded. The Endstop pins (D3 for X-min, etc) has about 4.9v when not connected to the switch. When I issue M119, it reports "Open" for all axis. If I ground the Endstop pins (such as D3 for X-min), it will report "Triggered" when M119 is issued.

The confusion is that from everything I read, the endstop switch should be NC which means connected when not triggered, which also means the endstop pin should be grounded when not triggered. This is just the opposite to my situation described above.

I checked the "Configuration.h" file and found there is the original statement "X_MIN_ENDSTOP_INVERTING=true" which would allow me to invert the logic if I set it to false instead. However, it doesn't say what the logic is when not inverted. I guess that if I set it to false, it would do what I was expecting it to do, but again, I thought that the convention was that the endstop pins are grounded by default, which apparently is not in my case.

The pullup resistors are enabled in the configuration file so I don't need external pullup resistors (actually it didn't make any logical difference when I tried to add pullup resistors here).

If anyone can explain the logic and see what (if anything) is wrong in my case, I would appreciate it.

Re: Puzzled by the Endstop logic (Mega2650/Marlin/RAMPS1.4)
April 25, 2014 12:16AM
open refers to the switch not being depressed. like triggered refers to the switch being depressed.

Yes its the reverse of the logic levels on most setups. (open does not mean open cct) This is so when your end stop plug fall off (or switch fails open cct), you notice vs crashing bits of hardware together.

The firmware is configurable so that if you can use NO vs NC so other type of endstops that use this can be used.
Sorry, only registered users may post in this forum.

Click here to login