Welcome! Log In Create A New Profile

Advanced

Prusa i3 rework endstop issues (I think)

Posted by chrstrvs 
Prusa i3 rework endstop issues (I think)
September 30, 2018 07:31AM
Hi all!

I'm new this whole 3D printing thing, but did quite a lot of research before I decided to build my own Prusa i3 rework. I just got it together yesterday and I'm having some issues when trying to move the motors manually in Pronterface. The X and Y axis can move towards the endstops, i.e. + and when I press the X and Y home buttons the axis moves towards their home positions. When they hit the endstops they act as they should and retract a tiny bit, but from there I can't move the axis in the other direction, i.e -, I can only move them towards the endstops.
The Z axis can only move down to a certain point, then it stops and has to move up before it can move down to the same point again, which isn't the home position.
The endstops are working as they should and show "open" when not pushed and "triggered" when pushed.
I have set the endstops as min endstops in Marlin and physically on the Ramps board, even though, as I understand it, since my X axis endstop is on the right side of the printer and my Y axis endstop is on the back, should be max endstop, but if I set it as max it will only move away from the endstop and never towards it.
When I power up the printer and the first time I press home, regardless of axis, the Z axis spins a few revolutions first before it starts moving the axis I wanted to home. I don't know if this is related or not.

The Marlin firmware is the latest as of a couple of weeks ago. I've tried with another genuine Arduino board, but it didn't make any difference.
I've read a lot of threads on different forums, but none of the suggestions worked for me.
I'm sure I've just set up Marlin the wrong way, but I can't figure out what. I've worked a lot with Arduino, so this part isn't new to me.

Another problem is that if I tell the Z axis to move 0.1 or 1 cm(?) it works fine, but if I tell it to move 10, it moves a little bit and then stops and makes a horrible noice, like it's crashed against something. If I slow down the speed of the Z axis motors it seems to work fine. Any ideas why?

I'm super excited about starting to print, but this is holding me back =(

You can find my Marlin Configuration.h file attached.

Regards,
Christian
Attachments:
open | download - Configuration.h (70.3 KB)
Re: Prusa i3 rework endstop issues (I think)
September 30, 2018 07:59AM
Y endstop at the back is minimum endstop
X endstop on right is a max endstop

- should move motors towards min endstops
+ should move things towards max endstops

So basically you have things arse about face....

firstly change X endstop to be on max endstop

In configuration.h adjust
// Direction of endstops when homing; 1=MAX, -1=MIN
// :[-1,1]
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

to
#define X_HOME_DIR 1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

try and home an axis, if it moves the wrong way change the motor direction

find this section of configuration.h
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR true/false
#define INVERT_Y_DIR true/false
#define INVERT_Z_DIR ture/false

change the direction from true to false or false to true as needed.

If things still don't move correctly check endstops
any that are listed as triggered you cannot move in that direction.


regard Z, if you using m5 or m6 or m8 as your Z lead screws then the max feed rate is to high

Ie find #define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 }

and change to #define DEFAULT_MAX_FEEDRATE { 500, 500, 2, 25 }

Edited 2 time(s). Last edit at 09/30/2018 08:06AM by Dust.
Re: Prusa i3 rework endstop issues (I think)
September 30, 2018 08:33AM
I did as you suggested and set the X min stop to be max and changed it physically on the Ramps board. Now the X axis only wants to move to the left, -. Also when homing it moves to the left, even though the endstop is on the right. If I try to make it move to the right, +, towards the endstop nothing happens.
When I tell the Y axis to move home it moves towards the back of the printer, as i should, but this is according to Pronterface +, so I'm not sure your logic about - being min and + being max or is there more than I thought that isn't working as it should?

Should I change anything here?
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 180

Thanks for the tip about the feed rate. I changed it and now it works! =)
Re: Prusa i3 rework endstop issues (I think)
September 30, 2018 10:48AM
Y is correct,

you have to look at it in repect to the nozzle

to move Y to 0 it has to move Y back, as the nozzle cant move forward


X sounds like its just broken.. (dead stepper driver or controller)

use the ramps test firmware [reprap.org]
it moves all steppers back and forward, it ignores endstops
It also turns on and off all mosfet, also ignoring temperature readings
Re: Prusa i3 rework endstop issues (I think)
September 30, 2018 11:01AM
Ah, okay, got it! The Y axis that is.

I tried the test code and all five motors moved back and forth, back and forth, so that's good! I wonder what's causing this. Do I have to manually, with my hands that is, move all axis to the endstops before I power on the printer or something like that?
Re: Prusa i3 rework endstop issues (I think)
September 30, 2018 11:53AM
definitely not

In fact moving the motor to fast by hand will destroy the stepper drivers (they are then generators and the power has to go somewhere)

put the real firmware back...

re x are you sure you changed X home direction to
#define X_HOME_DIR 1

what does M119 say when no endstops are hit?
Re: Prusa i3 rework endstop issues (I think)
September 30, 2018 01:36PM
Yeah, I know. I would unplug the motors first.

Yes, I am sure that I set X_HOME_DIR to 1, not -1.

Pronterface says:
x_max: open
y_min: open
z_min: open

when all endstops are not triggered.

I downloaded the latest Arduino, 1.8.7. This made no difference.

Edit: I noticed that I had a very old version of Pronterface. I updated this to 1.6.0, but this didn't any difference either.

Edited 1 time(s). Last edit at 09/30/2018 01:56PM by chrstrvs.
Re: Prusa i3 rework endstop issues (I think)
October 01, 2018 05:01AM
So I did some more testing today.
The setup is as follows:
X endstop set to max. X homing direction set to 1.
Y endstop set to min. Y homing direction set to -1.
Z endstop set to min. Z homing direction set to -1.
Software endstops disabled for testing.

With this the printer acts as follows:
X homes in the right direction, but movement is inverted. So that when I press - it goes to the right and when I press + it goes to the left.
Y homes in the wrong direction, but movement is correct.
Z homes in the right direction, but movement is inverted.
If I set Y endswitch as max and reverse the direction of Y home it homes in the right direction and movement is correct.
When homing any axis the Z axis moves down past the endstop and crashes in to the bed. Then the axis of which I pressed home moves a little bit.

I don't know what to try next. Maybe I'll order a new Ramps board, even though the Ramps test firmware works.

Does anyone have any other ideas?
Re: Prusa i3 rework endstop issues (I think)
October 01, 2018 06:49AM
are you sure your looking at the machine from the front?

this is the front



ie X axis is in front of the frame and the largest part of Y is out front.

Edited 2 time(s). Last edit at 10/01/2018 07:01AM by Dust.
Re: Prusa i3 rework endstop issues (I think)
October 01, 2018 07:38AM
Yep, that's how I look at it. I'll attach a picture of it as well.
The only difference that I can tell between mine and the one in the picture is that I have my Y endstop on the back of the machine.
Attachments:
open | download - IMG_6085.JPG (795.4 KB)
Re: Prusa i3 rework endstop issues (I think)
October 01, 2018 08:11AM
well its not making sense...

with homing direction set, there should be no way that movement is backwards when homing moves are correct.



what stepper driver do you have? pictures?

do you have microstepping jumpers installed under the stepper drivers? maybe it not so much moving as jumping around
Re: Prusa i3 rework endstop issues (I think)
October 01, 2018 08:33AM
I'll attach a picture of one of the stepper motors. They are all the same brand and model.
The jumpers are there. Three per driver. The drivers are A4988. All parts on the printer are from China.

I tested the Ramps test firmware again which made all motors go back and forth very nicely.

Also I want to thank you for taking the time to help me out!
Attachments:
open | download - IMG_6086.JPG (669.9 KB)
Re: Prusa i3 rework endstop issues (I think)
October 01, 2018 09:40AM
what version of the arduino ide are you using? Im going to try and replicate this oddness

please attach current Configuration.h and Configuration_adv,h
Re: Prusa i3 rework endstop issues (I think)
October 01, 2018 12:06PM
I was initially running 1.8.5, but updated to 1.8.7 yesterday.
You can find the files attached. I haven't touched or even looked in Configuration_adv.

Very kind of you to test on your own printer!
Attachments:
open | download - Configuration_adv.h (67.4 KB)
open | download - Configuration.h (72.2 KB)
Re: Prusa i3 rework endstop issues (I think)
October 01, 2018 12:21PM
Get the direction of the motors working first, then the end-stops.
Sounds like the X motor wiring is backward

I like to make all the end-stops MIN and use this for the X end-stop switch mount:
[www.thingiverse.com]


My updated Instructable on our Prusa i3 Build
[www.instructables.com]
Re: Prusa i3 rework endstop issues (I think)
October 01, 2018 01:38PM
Quote
SteveRoy
Get the direction of the motors working first, then the end-stops.
Sounds like the X motor wiring is backward

I like to make all the end-stops MIN and use this for the X end-stop switch mount:
[www.thingiverse.com]

I did as you suggested and put the X axis endstop on the left side, so min endstop. Since I don't have a functioning 3D printer to print a endstop holder with, a ziptie will have to do for now.
I can't remember the order in which I did the following, but I moved the motors a bit in one direction since they didn't want to move in the other. I moved the motors by hand to their endstops so that they triggered. I pressed home on each axis in Pronterface. At the moment I can move the motors in both directions.
I sent M114 to get the current position of the axis (is it axes in plural?) and Pronterface says "X:-140.00 Y:-71.00 Z:-91.80 E:0.00 Count X:-11200 Y:-5680 Z:-367200".
I then tried to send G92 X0 Y0 Z0 to make the current position as 0, 0, 0, but it just says "SENDING:G92 X0 Y0 Z0" and nothing happens.
Can you guys make anything of this? Do I have to set an offset of some sorts and if so how and why?
Re: Prusa i3 rework endstop issues (I think)
October 01, 2018 02:07PM
I did some more testing and all of a sudden where I think that 0, 0, 0 is, ie when the nozzle is on the left corner of the bed closest to me, so the bed itself is moved away from me, so did Pronterface. When i sent M114 it said "X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0".
I thought that that was pretty cool and moved the X axis 1 mm to the right. M114 said "X:1.00 Y:0.00 Z:0.00 E:0.00 Count X:80 Y:0 Z:0".
I moved the X axis 10 more mm and M114 said "X:11.00 Y:0.00 Z:0.00 E:0.00 Count X:880 Y:0 Z:0".
"Awesome!" I thought, "Now we're getting somewhere!", but when I tried to move the X axis back to the left Pronterface said "echo:endstops hit: X:11.00" and the X axis wouldn't move.
M114 said "X:1.00 Y:0.00 Z:0.00 E:0.00 Count X:880 Y:0 Z:0", so not "X:11.00 Y:0.00 Z:0.00 E:0.00 Count X:880 Y:0 Z:0".
I then tried moving the Y axis back 10 mm, which worked just fine. M114 said "X:-9.00 Y:10.00 Z:0.00 E:0.00 Count X:880 Y:800 Z:0". So all of a sudden Pronterface thinks that the X axis has moved from 11.00 to 1.00 to -9.00. I moved the Y axis another 10 mm and M114 said "X:-9.00 Y:20.00 Z:0.00 E:0.00 Count X:880 Y:1600 Z:0".
When I tried to move the Y axis back in the other direction Pronterface said "echo:endstops hit: X:11.00 Y:20.00".

I'm sorry if this is a bit hard to read, but I really think that we're on to something here. For some reason it seems that Pronterface, or Marlin or whatever thinks that the motors have moved when they haven't, or am I interpreting this wrong?
Re: Prusa i3 rework endstop issues (I think)
October 02, 2018 03:57AM
I just might have gone and solved it! I tried homing the X axis with the endstop triggered, i.e I manually pressed the endstop, and then the X axis would move in both directions. I tried this for the other two axis and it worked there as well. I reversed the logic of the endstops in Marlin and voila! It works! Now M119 says triggered when the endstops are not triggered, and open when they are triggered, which in my world is the wrong way around, but hey, it works.
Is this how it normally works?
Re: Prusa i3 rework endstop issues (I think)
October 02, 2018 11:53AM
The end stop switches can be "normally open" (NO) or "normally closed" (NC)
I wire them up as normally open so when they are pressed the contacts are closed

The NO or NC is setup in configuration.h

// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.

You need to invert the logic in configuration.h or the wiring of the switches, but not both.
I'd suggest changing configuration.h

Have a look at my Instructable, the link is in my signature

Steve


My updated Instructable on our Prusa i3 Build
[www.instructables.com]
Sorry, only registered users may post in this forum.

Click here to login