Home Motors

107 views
Skip to first unread message

Rayne Lang

unread,
Sep 3, 2012, 9:33:46 PM9/3/12
to make...@googlegroups.com
Hi Guys,

Thanks for the help with everything so far! I finally have may prusa mendel build completed, my heated build platform installed and working, and all my wiring cleaned up. My question this time is about homing the motors. I have my X and Y endstops at the wrong end so if the prusa mendel is forward they are MAX and if it is backwards they are MIN. Z is always MIN.

I have the prusa facing forward and would like to use MAX endstops for the X and Z axis. I have made the adjustments in Sprinter to allow the motor direction to be corrected, and I set the X_HOME_DIR and Y_HOME_DIR to 1 for MAX, but when I hit the home button in pronter face the motors do not move. I have switched the micro switched on my RAMPS 1.4 board from the MIN to the MAX pins. Do I need to switch the RAMPS connectors back to MIN, or do i need to change the MIN_SOFTWARE_ENDSTOPS and MAX_SOFTWARE ENDSTOPS?

Any help would be good, I dont want anything crashing so i want to make sure the software is set right before i hit the button again. THANKS!

Rayne Lang

unread,
Sep 3, 2012, 9:59:12 PM9/3/12
to make...@googlegroups.com
oh, one other quick question. How does the MAX home work.. does it set this to position 0 and everything else is a negative position, or does it set it to your max range and calculate position 0 from that? THANKS!

Joshua Wills

unread,
Sep 3, 2012, 10:27:05 PM9/3/12
to make...@googlegroups.com
What did you change in Sprinter for the motors?  The only setting you need to change is the X_ and Y_HOME_DIR to 1; the only physical change is to move the header from MIN to MAX.

And yes, when you Home to MAX, it sets it to the firmware-defined max travel, (200,200) for example.  (0,0) will then be the opposite corner, and (100,100) the center.

Rayne Lang

unread,
Sep 3, 2012, 10:45:28 PM9/3/12
to make...@googlegroups.com
Those are the only changes that I made, other then switching the bit that inverts the direction of the motors (mine were going backwards). Currently though, I hit the home button and nothing happens. :(

Joshua Wills

unread,
Sep 3, 2012, 10:52:14 PM9/3/12
to make...@googlegroups.com
Change the motor direction back - it cancels out the other changes that you made.

Rayne Lang

unread,
Sep 3, 2012, 11:28:20 PM9/3/12
to make...@googlegroups.com
Thanks for trying to help Joshua,

I'll try to explain better.

Currently I have the following setup

1) Pronterface +1,+10,+100 move buttons all move the motor in the right direction.
2) X and Y endstops are connected to X_MIN and Y_MIN on Ramps 1.4
3) Sprinter HOME_DIR are both set to -1.

When I hit the home button everything works perfectly. The problem is that due to wiring limitations i would like to turn my prusa mendel 180 degrees to face the other direction. When I do this my motors no longer move the correct way when I hit the Pronter face buttons (+1,+10,+100) the printer moves in the opposite direction. The other difference is my MIN endstops are now MAX endstops. I have adjusted the setup as follows.

1) Inverted motor directions to make pronterface buttons
2) X and Y endstops are now connected to X_MAX and Y_MAX on Ramps 1.4
3) Sprinter HOME_DIR are both set to 1.

These are the only changes that I made but when I hit the home button nothing happens. If i change the motor direction back they will be going backwards to what I want. Is there something else I need to change to make this setup work?

Thanks SOOO MUCH!

Jay Couture

unread,
Sep 4, 2012, 2:37:41 PM9/4/12
to make...@googlegroups.com
So it's all relative, but when you press the X +10 button are you wanting the axis to move to the left or to the right? Next, is the end stop switch on the far left or far right?

-Jay

Rayne Lang

unread,
Sep 4, 2012, 2:52:10 PM9/4/12
to make...@googlegroups.com
So I would like my +10- button to move my axis to the right for X and back for Y (as this is the way the buttons are oriented). The X endstop is on the right (MAX) and the Y endstop is at the back (MAX).

Jay Couture

unread,
Sep 4, 2012, 3:17:20 PM9/4/12
to make...@googlegroups.com
Ok, so you have the 
const bool X_ENDSTOP_INVERT = false;
const bool Y_ENDSTOP_INVERT = false;
const bool Z_ENDSTOP_INVERT = false;

const bool INVERT_X_DIR =  true ; // should be set so that the axis moves to the right toward X_MAX
const bool INVERT_Y_DIR =  true ; // Should be set so that axis moves to the rear toward Y_MAX
const bool INVERT_Z_DIR = true;
const bool INVERT_E_DIR = false;

#define X_HOME_DIR 1
#define Y_HOME_DIR 1
#define Z_HOME_DIR -1
  • Issue a M119 to display the current endstop status. Repeat after pressing and holding the endstops to confirm the readings.
-Jay

Rayne Lang

unread,
Sep 4, 2012, 3:57:45 PM9/4/12
to make...@googlegroups.com
I do not have exactly that setup as a couple of my motor connections are backwards and I fixed it by toggling the INVERT_DIR bits. I also only have one ENDSTOPS_INVERT bit and it is set to true. If I toggle this bit to be false my endstops always indicate HIGH and indicate LOW when pushed.This seems backwards so I think it should remain true. My HOME_DIR is set the same as you.

If I press the home for Z axis it homes fine, if I press it for X or Y nothing happens. No motors turn on.

Jay Couture

unread,
Sep 4, 2012, 4:19:18 PM9/4/12
to make...@googlegroups.com
Correct should be low when pushed. Look at the RAMPS 1.4 schematic. The switch shorts to ground on touch (assuming you connected to the NO normally open contact). The system uses the Atmel internal pullup resistors to pull the signal high when not pushed.

I pulled those configuration.h lines from the most recent Sprinter on github, what version are you using?

Check your pins.h file for motherboard == 33 and find the X_MAX_PIN and Y_MAX_PIN to see if they are defined. In the one on the github they are not. Line 1111 in sprinter.pde specifically looks to make sure the X_MAX_PIN (for your situation, it looks at X_MIN_PIN for the normal orientation) has been defined, otherwise it won't home.

The Ramps 1.4 reprap link shows X_MAX_PIN is 2 and Y_MAX_PIN is 15

-Jay

Rayne Lang

unread,
Sep 4, 2012, 4:44:20 PM9/4/12
to make...@googlegroups.com
Okay so I think we are getting away from the problem... or I have a really big one, because I should only have to change a couple settings to make the fix I want to make. Lets approach the problem from the start.

These are my current settings.

#define MOTHERBOARD 33

#define ENDSTOPPULLUPS 1
const bool ENDSTOPS_INVERTING = true;


const bool INVERT_X_DIR = true;
const bool INVERT_Y_DIR = false;

const bool INVERT_Z_DIR =  true;
const bool INVERT_E_DIR = false;

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

const bool min_software_endstops = false;
const bool max_software_endstops = true;

Endstops plugged into X_MIN Y_MIN and Z_MIN.

With these settings everything on my printer works the way I want it to. I can home motors, print parts, pronter face buttons match directions, everything works perfect. All I want to do now is turn my printer 180 degrees so my printer can plug into the wall without extension cables. Turning the printer effects the X and Y axis directions (to make pronterface buttons match) and turns the MIN endstops to MAX endstops.

What lines should I change to do this?

Jay Couture

unread,
Sep 4, 2012, 5:18:12 PM9/4/12
to make...@googlegroups.com
I'm going down this path because you said nothing happens when you home X and Y. I've made the assumption you have compiled and loaded the changed FW each time. You are right except when I looked at the distribution for Sprinter in the pins.h file I noticed that they were undefined. I want to confirm what you have in yours.

Open the pins.h file and do a search for motherboard == 33 and confirm 

#define X_MAX_PIN 2
and
#define Y_MAX_PIN 15

-Jay

Rayne Lang

unread,
Sep 4, 2012, 6:42:19 PM9/4/12
to make...@googlegroups.com
Hey Jay,

I just wanted to recap because i had been re-uploading my Sprinter file over and over and wanted to go back to a copy that I knew worked and go from there.

I did go check the pins.h file and your right, both Y and X MAX were set to -1. I have changed them to the correct values and set the Y and X MIN to -1. (should I just leave them set to the right values?). I am now able to home the motors properly. Thanks you for all of your help!!!!!

Rayne Lang

unread,
Sep 4, 2012, 7:09:30 PM9/4/12
to make...@googlegroups.com
So my last problem is with the MIN_SOFTWARE_ENDSTOP and MAX_SOFTWARE_ENDSTOP. If both of these values are set to false I can home the motors properly. They go, hit the endstop, back up, then go forward again. As soon as i try to enable the software endstops again the motors no longer home properly. Is this just a feature I will not be able to use anymore or is there another trick to allow me to use these again?

Rayne

Jay Couture

unread,
Sep 4, 2012, 8:54:45 PM9/4/12
to make...@googlegroups.com
You should leave the pins defined for the min. Not sure why they were not defined for the max inputs.

Software endstops keep track of the current position and if you instruct the machine to exceed those it's stops that. You don't need them.

However, I see a note in the code : 
"Version 1.3.05T
- changed homing function to not conflict with min_software_endstops/max_software_endstops (thanks rGlory)
- Changed check in arc_func
- Corrected distance calculation. (thanks jv4779)
  - MAX Feed Rate for Z-Axis reduced to 2 mm/s some Printers had problems with 4 mm/s"

So what version are you using?

-Jay

Rayne Lang

unread,
Sep 4, 2012, 9:29:21 PM9/4/12
to make...@googlegroups.com
I'm using the version that I downloaded from the forums titled 'sprinter for prusa mendel (5:1)' so maybe it is out of date. I'll download the one from gethub and get back up to date. It would be nice to have the limits in just incase i hit -100 button instead of -10. 

jay.c...@gmail.com

unread,
Sep 5, 2012, 9:02:17 AM9/5/12
to make...@googlegroups.com
Make sure you save your current configuration.h file so you can copy over the same values. Also, when pronterface connects, it prints out the fw vesion on the arduino.
Sent on the Sprint® Now Network from my BlackBerry®

From: Rayne Lang <rayn...@gmail.com>
Date: Tue, 4 Sep 2012 18:29:21 -0700 (PDT)
Subject: Re: [MakerGear] Re: Home Motors
Reply all
Reply to author
Forward
0 new messages