Could someone suggest what I'm doing wrong, please?

Could someone suggest what I’m doing wrong, please?

I’m trying to set up my repstrap, which I’ve named JunkBot. The problem is, my X axis doesn’t stop when the endstop is manually pressed.

I’ve used a multimeter to confirm that it’s a normally open switch, and that it functions correctly.

I’m using marlin and repetier-host. I’m not sure if there is any way to see a triggered endstop in the program.

I’ve attached the photo of my ramps board so you can see the connections.

M119 to see the state of the endstops

Ok. M119 says that all endstops are open whether I press the stop or not.

Are my connections wrong?

You probably need to enable the endstop pullups.

In the firmware? I pulled the config.h from an Instructable I was following, should I link to it?

This is my first printer and I’m feeling my way thought the process.

Yes, well mine is Configuration.h, but there is a line that says “#define ENDSTOPPULLUPS” or something to that nature. Make sure that line isn’t commented out.

Aha!, my configuration.h reads as follows:

#ifndef ENDSTOPPULLUPS
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX
// #define ENDSTOPPULLUP_ZMAX
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
#endif

#ifdef ENDSTOPPULLUPS
#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#endif

// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS

It looks like they’re not commented out.

maybe you should disable them then. How did you wire the switch?

It’s a normally open switch connected to signal and ground.

And I only see one endstop connected to the RAMP?

Yeah, just one at the moment. I’m still testing.

Note: The latest firmware such as Marlin seems to use NO as the default pin on the switch. Otherwise you may need to invert the end-stops in the firmware. You can use M119 to check your end-stops status. (from: http://reprap.org/wiki/RAMPS_1.4)

Test your end stop with M119 to make sure it’s working as expected before powering any of your axis then. Useful for fault finding. As it states above, check your firmware configuration as well. Did you select Mechanical end-stops?

The switch is normally open, so that’s fine. And I’ve tested it with a multimeter to ensure it operates correctly.

I’ve used M119 to check the endstop status, it reports as open whether I hold it closed or not.

It’s a mechanical stop, it’s actuality the one from the DVD drive I used as an actuator. I’m really at a loss.

there’s something with the wiring or configurations. With M119, are you seeing x, y z min and max (6 endstop?). If yes, try other endstop port to see if there’s change, if no, check the configuration (enable/disable pullup, checking pin). Try an other firmware maybe so you know if its hardware or software problems?

Forgive me if you already checked this, but have you checked the resistance of the switch to make sure it is actually closing by connecting the multimeter to the end of the wires where they connect to the ramps and watch it go from infinity to something like .01 ohm?

Yes. I’ve checked the switch. It goes from infinite (open) to near zero (closed) when pressed.

I’ll try another firmware and disabling the pullups.

Using M119 at the moment shows
X: open
Y: open
Z: open
Whether the button is pressed or not.

I tried plugging into the Y endstop pins with the same effect. I haven’t tried on the Z pins yet.

Move to the second set of pins :slight_smile: