Using endstops with only two wires
October 14, 2020 07:33AM
Hello everyone,

may thats a too easy question or has been answered somewhere alreday, but I have an old CNC machine with endstops just wired for two cables as seen in the picture. I want to use that machine as a 3D printer and now wondering how I can do that by using the marlin firmware.

Does anyone has experience with that?

Regards


Tom
Attachments:
open | download - 1698.jpg (174.2 KB)
Re: Using endstops with only two wires
October 14, 2020 08:35AM
you connect the two wires to gnd and signal and enable pull up resistors in firmware on the endstops.

So when the switch is connected to gnd the signal is low, and when not connected it is pulled high

depending on if the switches are normally open or normally close you may need to invert the endstops.

Two wire endstops are extremely common.
Re: Using endstops with only two wires
October 14, 2020 08:45AM
I even don't enable pullups and they work fine without. Never had a problem. I'm shorting Sig to GND since 2012.


http://www.marinusdebeer.nl/
Re: Using endstops with only two wires
October 14, 2020 09:22AM
A lot of controller have external pull up resistors on the board, but not all.
Re: Using endstops with only two wires
October 14, 2020 09:52AM
Quote
Dust
A lot of controller have external pull up resistors on the board, but not all.

True, so with a board that already has external pull up resistors, does that mean the setting has zero influence?


http://www.marinusdebeer.nl/
Re: Using endstops with only two wires
October 14, 2020 01:56PM
Quote
Ohmarinus
True, so with a board that already has external pull up resistors, does that mean the setting has zero influence?

It doesn't have zero influence - if you enable ENDSTOPPULLUPS on a board that already has built in resistors then you get double the pullup strength (both the onboard and on-chip pull ups would be enabled). It's unlikely to cause a problem with switches, but does end up using slightly more current when the endstop switch is closed. So if you do have hardwired pull ups on your board it's best to disable ENDSTOPPULLUPS if possible.

Until a few months ago, disabling ENDSTOPPULLUPS if you had a BLTouch would trigger a sanity check compilation error on Marlin, even if the board had hardwired pull ups. I added an ONBOARD_ENDSTOPPULLUPS option for the Marlin pins files to allow them to specify that the board has hardwired pull ups so that you can disable ENDSTOPPULLUPS on those boards. Currently this is enabled for Re-ARM, SKR1.3/1.4, and Longer3D LK boards, but it probably should be enabled for more.
Re: Using endstops with only two wires
October 15, 2020 02:07AM
Hello

thank you for your help.

I enabled the pull ups and testing by grounding the signal, but when check via M119 Endstop status, nothing changes.

Anything I could do / test?

Regards,


Tom
Re: Using endstops with only two wires
October 15, 2020 05:18AM
you need the correct MOTHERBOARD defined, so it knows what pins to look at
Sorry, only registered users may post in this forum.

Click here to login