Changing homing direction on Y?

4,485 views
Skip to first unread message

Craig

unread,
Dec 23, 2012, 2:59:07 AM12/23/12
to 3d...@googlegroups.com
I have spent the last couple hours on this. Using Marlin firmware and pronterface.

On the Y axis I have the direction moving correct in pronterface, but when I press home it moves about 1cm in the wrong direction and stops. Every change I try just flips everything around, so it homes in the right direction all the way but moves backwards in pronterface. It's starting to feel like I have shuffled things around 1000 times but just keep missing the mark. Is there something I need to change to flip the home direction but leave everything else alone?

X and Z are working and homing correctly.

LoialOtter

unread,
Dec 23, 2012, 1:18:19 PM12/23/12
to 3d...@googlegroups.com
The firmware sounds like it's properly set up. You need to move the end stop connector from - to +. That should fix it out at least get you in the right direction.

Regards,
Loial

Sublime

unread,
Dec 23, 2012, 6:27:54 PM12/23/12
to 3d...@googlegroups.com
Do not do what loial is saying. The problem is the endstops need to be inverted int he firmware (look for invert endstops). Right now the endstop is showing as tripped so it will only move away from it instead of towards it. After inverting the endstops in the firmware you  may find that you have them at the wrong end but not until then. Also you may need to turn on/off the endstop pullup resistor depending on how you wired the endstops. By default they are pulled high and the endstop goes to ground but you may have it wired different.

LoialOtter

unread,
Dec 23, 2012, 6:59:04 PM12/23/12
to 3d...@googlegroups.com
Actually, since only one endstop is affected and the others are fine means that the endstop is detecting the wrong state (an open on opto-endstops an open means it's detecting). If the axis works fine the other way it is detecting correctly. The connector is in the wrong location.

Make sure the direction it's the same in software and hardware and that the travel detection is correct. Negative for home to zero, positive for home to max.

LoialOtter

unread,
Dec 23, 2012, 7:50:00 PM12/23/12
to 3d...@googlegroups.com
I meant travel direction, not detection (stupid autocomplete).

To get into further detail, there are two primary ways you can map your machine:
1) X - Right positive (200mm for example), Left negative (0 for example)
    Y - Away positive (200mm for example), Towards negative (0...)
    Z - Up positive (150mm...), down negative (0)

2) X - Left positive, right negative and zero
    Y - towards positive, away negative and zero
    Z - Up positive, down negative and zero

Endstops can be put on any end of the axis though the way I set up Andrew's Mendelmax was the first way with endstops at min on X and Y and min on Z. You need to make sure the connectors are in the correct location on the connectors on your controller board. I know that RAMPs  has them pretty poorly labelled. Because you can change the location of the endstops the firmware has a lot of options for them.

Endstop pull-ups are required for microswitches and are not required from what I understand from most opto-switches. Also from what I understand they do no harm either and I would suggest leaving them on.

Inverting endstops is to set which polarity the switch sends when it's enabled or the axis is at that position. This should be the same for all of them if you're using all the same type of endstops. Opto-endstops are usually non-inverted and mechanical are inverted. The easy way to tell if these are set wrong is that, when they're plugged into the right connector, they hop about 5mm in the oposite direction to homing when not at the endstop.

The inverting part is for direction of travel, Sounds like you have this correct but remember when you have the endstop connected to the wrong connector and you're using opto-endstops it'll hop in the opposite direction to the homing direction.

Home direction should be set to where the endstops are for each axis. If you're using the first arrangement and your endstop is at the left side on X, the direction would be -1.

Another caveat that's caught me is if you enable your min_software_endstop you must have your endstop set at 0 or the HOME_POS value will make the axis not able to move. I usually suggest disabling your software endstops completely and just be careful not to drive it into the ends.

All make sense?

So, that said, please don't ignore my suggestion to try changing the endstop connector location. Try it and see if it works, if it does then great, if it doesn't, give us your current section of the config file and either a good description or picture of your connectors and such.


Sublime

unread,
Dec 23, 2012, 8:20:42 PM12/23/12
to 3d...@googlegroups.com
Sorry I had read your post as move the endstop to the other end not move the connector the other position. One thing you forgot to mention is that to use the max endstops you have to edit pins.h to reflect you are using the max not the min.

LoialOtter

unread,
Dec 23, 2012, 8:25:53 PM12/23/12
to 3d...@googlegroups.com
I had forgotten that step, yes. Thanks.

For my RAMPs I have
#define X_MAX_PIN           2
#define Y_MAX_PIN          15

also make sure //#define DISABLE_MAX_ENDSTOPS is commented out.

Craig

unread,
Dec 24, 2012, 12:43:20 AM12/24/12
to 3d...@googlegroups.com
Right now the printer is setup to have X left =0, right =200, Y rear = 0, Y front =200, Z bottom =0, top = 100. I have been following the reprap diagrams so I hope that's right. X switch is on 0, Y is on 200, Z is on 0. Here's part of my configuration file: 

//===========================================================================
//=============================Mechanical Settings===========================
//===========================================================================

// corse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors

#ifndef ENDSTOPPULLUPS
  // fine Enstop settings: Individual Pullups. will be ignord 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_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops. 
const bool Y_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops. 
const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops. 
//#define DISABLE_MAX_ENDSTOPS

// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define E_ENABLE_ON 0 // For all extruders

// Disables axis when it's not being used.
#define DISABLE_X false
#define DISABLE_Y false
#define DISABLE_Z false
#define DISABLE_E false // For all extruders

#define INVERT_X_DIR true    // for Mendel set to false, for Orca set to true
#define INVERT_Y_DIR true    // for Mendel set to true, for Orca set to false
#define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
#define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E2_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false

// 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

#define min_software_endstops false //If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops false  //If true, axis won't move to coordinates greater than the defined lengths below.
#define X_MAX_LENGTH 200
#define Y_MAX_LENGTH 200
#define Z_MAX_LENGTH 100

// The position of the homing switches. Use MAX_LENGTH * -0.5 if the center should be 0, 0, 0
#define X_HOME_POS 15
#define Y_HOME_POS -10
#define Z_HOME_POS 0

//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {1500, 1500, 120, 0}  // set the homing speeds (mm/min)

// default settings 

#define DEFAULT_AXIS_STEPS_PER_UNIT   {72,72,2560,800}  // default steps per unit for ultimaker 
#define DEFAULT_MAX_FEEDRATE          {400, 400, 2, 45}    // (mm/sec)    
#define DEFAULT_MAX_ACCELERATION      {5000,5000,50,5000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.

#define DEFAULT_ACCELERATION          1000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves 
#define DEFAULT_RETRACT_ACCELERATION  2000   // X, Y, Z and E max acceleration in mm/s^2 for r retracts

// 
#define DEFAULT_XYJERK                20.0    // (mm/sec)
#define DEFAULT_ZJERK                 0.4     // (mm/sec)
#define DEFAULT_EJERK                 5.0    // (mm/sec)


IMG_20121223_213629.jpg

Craig

unread,
Dec 24, 2012, 12:53:04 AM12/24/12
to 3d...@googlegroups.com
Sounds like I have my Y backwards altogether....

LoialOtter

unread,
Dec 25, 2012, 12:28:05 AM12/25/12
to 3d...@googlegroups.com
Ya, looks like it's just logically backwards though. You're endstop is connected to the negative side and software is configured correctly for that. Simply reversing the direction of the motor would be enough to fix the problem if I'm correct.

The other option is to change
#define INVERT_Y_DIR true    // for Mendel set to true, for Orca set to false
to
#define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false

Though I've had a little mead so i could be way off at this point.

Merry Christmas, Happy Yule and Good Midwinter and all the rest of it

Craig

unread,
Dec 25, 2012, 1:43:02 PM12/25/12
to 3d...@googlegroups.com
Thanks...

I'll give it a try once all the festivities are done and I can think straight again...

Craig

unread,
Dec 26, 2012, 5:03:22 PM12/26/12
to 3d...@googlegroups.com
That did the trick. Thanks! Now it's on to adjusting the pololu's and calibration.

Craig

unread,
Jan 5, 2013, 7:24:41 PM1/5/13
to 3d...@googlegroups.com
Still off on the Y. The prints reversed from Pronterface to whats actually getting printed. Is there a way to flip that without messing up the printer?

Here's an example:
IMG_20130105_154118.jpg
IMG_20130105_154124.jpg
Reply all
Reply to author
Forward
0 new messages