Welcome! Log In Create A New Profile

Advanced

Problem with Endstops

Posted by matrix4721 
Problem with Endstops
May 10, 2013 04:08PM
Hi all, got a bit of a problem with my newly built prusa mendel, the problem i had was when i told it to move into the home position the heads would move in the opposite direction from the end stops and would crash inless I manually pressed the endstop myself, at which point it would stop, so ive edited the marlin firmware and inverted the direction which the heads move when told to return to the home position, it worked, the heads now move in the right direction towards the end stops HOWEVER, it doesnt stop when it touches the endstops, even if i press the endstop it still doesnt stop, i dont understand why, the end stops worked before, any ideas?
Re: Problem with Endstops
May 10, 2013 04:52PM
It sounds like you may have to reverse the steppers in the firmware? If they are going in the opposite direction it probably thinks the end stops are at the starting positions. (or you can reverse the plugs coming from the steppers, make sure to remove all power and USB first)
Re: Problem with Endstops
May 10, 2013 05:08PM
**UPDATE** hey all, right im gonna make it abit more complicated, if i tell the heads to manually move, lets say 50mm, and the head starts to move and i press the endstop switch then the head stops, but when i say move to home postion and the head hits the endstop switch it keeps trying to move and crashes?? how can it work when on manual but not work when moving to home position?
Re: Problem with Endstops
May 10, 2013 06:01PM
When it hits the endstop, is it actually switching?
I had to bend the levers out a bit to ensure that the endstops triggered properly.
Re: Problem with Endstops
May 10, 2013 06:08PM
Hi, thanks for your reply, yeah i can hear it click but it doesnt stop, it keeps crashing
Re: Problem with Endstops
May 10, 2013 07:25PM
**Update** ive just checked the endstops with a multimeter using the beep test and it beeps when the switch is pushed
Re: Problem with Endstops
May 10, 2013 09:05PM
Use gcode M119 to test the endstops, the printer will report the current state of the endstops each time you send it.
Re: Problem with Endstops
May 10, 2013 11:51PM
>**Update** ive just checked the endstops with a multimeter using the beep test and it beeps when the switch is pushed

It should beep with the switch not pushed and stop beeping when it is pushed. You want the switch wired in "normally closed" fashion so that in the event it gets disconnected it's a safe mode of failure (axis ceases movement during homing move). As Andrew Smith pointed out, use M119 to test the endstops. This should be done before any G28 command whenever you mess with the electronics (or build a new machine). If it says "open", it means the switch is not being pressed and if it says "triggered" it means it is being pressed. Also, you need to make sure they're wired to the proper pins on your electronics. You didn't mention which electronics you're using, but with RAMPS there are minimum and maximum endstop pins. If you're only using three endstops (which is true for most people), they should be connected to the "minimum" (-) pins for all three axes.
Re: Problem with Endstops
May 11, 2013 06:09PM
Hi, thanks for the replies, ive run M119 and it says

x_min: open
x_max: open
y_min: open
y_max: open
z_min: open
z_max: open

Does that mean ive wired them incorrectly? i am running RAMPS 1.4 electronics and wired it as per repraps instructions to the board but the endstops ive taken from laserjet printers so perhaps the wiring is slightly different
Re: Problem with Endstops
May 11, 2013 06:11PM
And when i press the endstops and run M119 i get
x_min: TRIGGERED
x_max: open
y_min: TRIGGERED
y_max: open
z_min: TRIGGERED
z_max: open
Re: Problem with Endstops
May 11, 2013 06:43PM
Just had a thought (dangerous i know lol) but is there anything i need to alter to the Marlin firmware for the mechnical endstops?

ive already changed the following:
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
const bool Y_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
i had to set the value to ''true'' to get the heads to move in the correct direction when homing, the thing that confuses me is, if the switches are wired up wrong then why does it attempt to move into the home position? and why doesnt the machine react when the switches are pressed (even tho they do stop the ends when trying to manually move the heads) also when trying to move the heads i can move it all the way over to the right but only half way over to the left before it says ''echo:endstops hit: X:19.99
echo:endstops hit: X:19.97'' even tho the endstops havent been physically pressed? im in desperate need of your help as this is doing my head in, kind regards
Re: Problem with Endstops
May 12, 2013 08:14AM
Hi all, im been up all night trying to solve this problem and think im nearly there, i think i had corrupted firmware because ive downloaded the latest release of marlin and homing now seems to work, the only issue is the y axis moves in the wrong direction when homing, ive found the following lines in the marlin firmware

// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

i changed the value from -1 to 1 but now when i click home it doesnt move, any ideas?
Re: Problem with Endstops
May 12, 2013 10:08AM
If you're using endstops on the minimum pins (which you are), then you want to make sure the homing direction is set to -1. Try changing INVERT_X_DIR.
Re: Problem with Endstops
May 12, 2013 12:05PM
Thanks everyone for your help, im all up and running now, for some reason i couldnt get it to invert the direction of the y axis while homing so i just moved the endstop to the other end of machine, if anyone knows how i can alter the title of this thread so i can write 'fixed' that would be great, once again thanks for all your help
Re: Problem with Endstops
May 12, 2013 02:01PM
Make sure Y_HOME_DIR = -1. It should home the Y axis in the direction of the Y motor and the endstop switch should be on that side.
Sorry, only registered users may post in this forum.

Click here to login