Welcome! Log In Create A New Profile

Advanced

Sanguinololu homing/end stop problems

Posted by nicoowtje 
Sanguinololu homing/end stop problems
July 21, 2013 08:48AM
Hello,

I am in the process of building an Ultimaker like Reprap using a Sanguinololu as controller with Repetier software and firmware.
It's almost finished, except for the belts and pulleys for the X\Y axis.

However, I got the following problems:

-X axis stepper only turns one way
-Z axis only homing to minimum, I need it to home to maximum

My guess is that both problems have something to do with the end stops.
The original Ultimaker uses 6 end stops, 3 min stops and 3 max stops. I am using a Sanguinololu as a controller, which only supports 3 end stops.
So what I did: I wired the min and max end stops together.
When I move the printbed up and push the end stop it just continues to move. When I move it down, the end stop works fine.

Is it possible that you can only home Z to max if you have max endstops? And if so, is there any possibility to do this with a sanguinololu?

Here is my configuration:

// ##########################################################################################
// ##                            Endstop configuration                                     ##
// ##########################################################################################

/* By default all endstops are pulled up to high. You need a pullup if you
use a mechanical endstop connected with gnd. Set value to false for no pullup
on this endstop.
*/
#define ENDSTOP_PULLUP_X_MIN true
#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_PULLUP_Z_MIN true
#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_PULLUP_Z_MAX true

//set to true to invert the logic of the endstops
#define ENDSTOP_X_MIN_INVERTING true
#define ENDSTOP_Y_MIN_INVERTING true
#define ENDSTOP_Z_MIN_INVERTING true
#define ENDSTOP_X_MAX_INVERTING true
#define ENDSTOP_Y_MAX_INVERTING true
#define ENDSTOP_Z_MAX_INVERTING true

// Set the values true where you have a hardware endstop. The Pin numbe ris taken from pins.h.

#define MIN_HARDWARE_ENDSTOP_X true
#define MIN_HARDWARE_ENDSTOP_Y true
#define MIN_HARDWARE_ENDSTOP_Z true
#define MAX_HARDWARE_ENDSTOP_X false
#define MAX_HARDWARE_ENDSTOP_Y false
#define MAX_HARDWARE_ENDSTOP_Z false

//If your axes are only moving in one direction, make sure the endstops are connected properly.
//If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here



//// ADVANCED SETTINGS - to tweak parameters

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

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

// Inverting axis direction
#define INVERT_X_DIR true
#define INVERT_Y_DIR true
#define INVERT_Z_DIR 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

// Delta robot radius endstop
#define max_software_endstop_r true

//If true, axis won't move to coordinates less than zero.
#define min_software_endstop_x false
#define min_software_endstop_y false
#define min_software_endstop_z false

//If true, axis won't move to coordinates greater than the defined lengths below.
#define max_software_endstop_x false
#define max_software_endstop_y false
#define max_software_endstop_z false

// If during homing the endstop is reached, ho many mm should the printer move back for the second try
#define ENDSTOP_X_BACK_MOVE 5
#define ENDSTOP_Y_BACK_MOVE 5
#define ENDSTOP_Z_BACK_MOVE 5

// For higher precision you can reduce the speed for the second test on the endstop
// during homing operation. The homing speed is divided by the value. 1 = same speed, 2 = half speed
#define ENDSTOP_X_RETEST_REDUCTION_FACTOR 2
#define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 2
#define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 2

// When you have several endstops in one circuit you need to disable it after homing by moving a
// small amount back. This is also the case with H-belt systems.
#define ENDSTOP_X_BACK_ON_HOME 1
#define ENDSTOP_Y_BACK_ON_HOME 14
#define ENDSTOP_Z_BACK_ON_HOME 0

// You can disable endstop checking for print moves. This is needed, if you get sometimes
// false signals from your endstops. If your endstops don't give false signals, you
// can set it on for safety.
#define ALWAYS_CHECK_ENDSTOPS true

// maximum positions in mm - only fixed numbers!
// For delta robot Z_MAX_LENGTH is maximum travel of the towers and should be set to the distance between the hotend
// and the platform when the printer is at its home position.
// If EEPROM is enabled these values will be overidden with the values in the EEPROM
#define X_MAX_LENGTH 165
#define Y_MAX_LENGTH 175
#define Z_MAX_LENGTH 80

// Coordinates for the minimum axis. Can also be negative if you want to have the bed start at 0 and the printer can go to the left side
// of the bed. Maximum coordinate is given by adding the above X_MAX_LENGTH values.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0


PS. Sorry for the bad English, it's not my native language.

Regards,

Nico
Re: Sanguinololu homing/end stop problems
July 21, 2013 09:44AM
Yes if you want to home to max you need to use a max endstop and change the homing direction. Just change the pin definitions in pins.h to swap the MIN and MAX pins.


[www.hydraraptor.blogspot.com]
Re: Sanguinololu homing/end stop problems
July 21, 2013 10:17AM
Thank you very much! It is now homing correctly to the top.

However my X axis stepper is stil going only one way
Re: Sanguinololu homing/end stop problems
July 22, 2013 04:08AM
In order to be able to home the Z-Axis to MIN or MAX you need 3 conditions:
either
MIN_HARDWARE_ENDSTOP_Z true and Z_MIN_PIN > -1 and Z_HOME_DIR-1
or
(MAX_HARDWARE_ENDSTOP_Z true and Z_MAX_PIN > -1 and Z_HOME_DIR 1
void Printer::homeZAxis()
{
    long steps;
    if ((MIN_HARDWARE_ENDSTOP_Z && Z_MIN_PIN > -1 && Z_HOME_DIR==-1) || 
        (MAX_HARDWARE_ENDSTOP_Z && Z_MAX_PIN > -1 && Z_HOME_DIR==1))

I don't see any difference between X and Y in the Configuration.h. Does the Y-Stepper motor work in both directions?
if yes, then probably it's a hardware issue, try without the X_MAX endstop.

Edited 1 time(s). Last edit at 07/22/2013 04:11AM by flurin.
Re: Sanguinololu homing/end stop problems
August 02, 2013 02:42PM
Hi,

I have another question.

Is there a possibility to use the unused pins of the sanguinololu for max stops? in that way, i could wire the min stops directly to the endstop pins on the sanguinololu and the max stops the the other, unused pins
Re: Sanguinololu homing/end stop problems
August 03, 2013 12:36AM
nicoowtje Wrote:
-------------------------------------------------------
> Is there a possibility to use the unused pins of
> the sanguinololu for max stops? in that way, i
> could wire the min stops directly to the endstop
> pins on the sanguinololu and the max stops the the
> other, unused pins

It is probably possible, I would have to check the code and to be sure do some tests with the board (I use Arduino Mega 2560/RAMPS 1.4).

But for the beginning you can run your Printer without X and Y max endstops. On my ORD Bot Hadron I only use 3 min endstops.

Be sure to click Home in the "Manual Control" (Windows, Rpetier-Host V0.90C) tab before you start moving the axes. And add "G28 ; home all axes" in your Slicer's Custom G-code > Start G-code.

Edited 3 time(s). Last edit at 08/03/2013 04:14AM by flurin.
Sorry, only registered users may post in this forum.

Click here to login