Welcome! Log In Create A New Profile

Advanced

Marlin Settings

Posted by Fri 
Fri
Marlin Settings
May 04, 2013 09:45PM
Any suggestionsI just flashed a copy of the newest Marlin and have a weird scenario.
I like the fact that the axises bounce, makes it more precise, but the x is just runing into the stop.
I change the switch and everything, but only the x axis is behaving like that.
Any suggestions
Re: Marlin Settings
May 05, 2013 07:56AM
was it working before? if so check the pin assignment in pins.h
Fri
Re: Marlin Settings
May 05, 2013 09:31AM
Yeah, it was working before and it works without bounce and with sprinter (with bounce).
Just Marlin with bounce, x wont stop. Interesstingly, manually triggered it works, most of the time.
I changed the wire and the switch...no luck.
Re: Marlin Settings
May 05, 2013 12:46PM
in configuration.adv in marlin your x y and z should be this.

#define X_HOME_RETRACT_MM 5
#define Y_HOME_RETRACT_MM 5
#define Z_HOME_RETRACT_MM 1


in configuration.h

#define min_software_endstops false //If true, axis won't move to coordinates less than HOME_POS.

when you home on marlin use gcode G28


what is your homing code used?
Fri
Re: Marlin Settings
May 05, 2013 06:40PM
I tried all that and it was all set like that. It's the weirdest thing. I suspect it is the wire from the endstop.
When triggered manually, it not always bounces, when I switch the endstop from z to x it works fine.
I have a brand new switch on the x, and I tried a different (new) wire, same result. I was able to home twice fine, after that
it would run into the stop again. It appears as if the signal from the x endstop is not strong enough sometimes.
That said, when I do it without bounce or switch to sprinter, it works fine.

Did anyone install a emergency stop switch? Is there a open input on the board?

Edited 1 time(s). Last edit at 05/05/2013 06:56PM by Fri.
Re: Marlin Settings
May 05, 2013 10:06PM
marlin defaults to disable limit switches except for G28 commands. are you using custom homing code, like what makerbots did in the past with cupcake?
Fri
Re: Marlin Settings
May 06, 2013 03:10PM
No, I tried G28 and it does the same as when I hit home X or home all in pronterface.
Y and Z are fine.
Thanks

Edited 1 time(s). Last edit at 05/06/2013 08:03PM by Fri.
Re: Marlin Settings
May 06, 2013 04:48PM
can you show a picture of your z axis homing switch in place?
Fri
Re: Marlin Settings
May 06, 2013 07:55PM
Here are two pics, one with the x hitting the stop and one in the open position.
Thanks
Attachments:
open | download - 2013-05-06_19-46-26_220.jpg (40.6 KB)
open | download - 2013-05-06_19-46-41_641.jpg (42.4 KB)
Fri
Re: Marlin Settings
May 06, 2013 08:00PM
Well that was the x axis, which is the culprit. The Z is working fine, it is right underneath the right column.

Something else, and again it is not consistant. When I tigger it manually and the hold it and hit home, the axis
makes a slight move towards the stop and then away, obviously this is not good, since it is depressed, it should move away only. And when I flash sprinter, no problem at all.

Edited 1 time(s). Last edit at 05/06/2013 08:13PM by Fri.
Re: Marlin Settings
May 06, 2013 08:06PM
can you also list your config file, it may be possible that the x axis is the wrong direction, and you are hitting a max end stop.
Fri
Re: Marlin Settings
May 06, 2013 08:15PM
#ifndef CONFIGURATION_H
#define CONFIGURATION_H

//

// This determines the communication speed of the printer
#define BAUDRATE 250000
//#define BAUDRATE 115200


#ifndef MOTHERBOARD
#define MOTHERBOARD 33
#endif




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

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

// 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 false // for Mendel set to false, for Orca set to true
#define INVERT_Y_DIR false // 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 ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing

const bool min_software_endstops = true; //If true, axis won't move to coordinates less than zero.
const bool max_software_endstops = true; //If true, axis won't move to coordinates greater than the defined lengths below.

#define min_software_endstops false //If true, axis won't move to coordinates less than HOME_POS.
#define max_software_endstops true //If true, axis won't move to coordinates greater than the defined lengths below.
// Travel limits after homing
#define X_MAX_POS 175
#define X_MIN_POS 0
#define Y_MAX_POS 190
#define Y_MIN_POS 0
#define Z_MAX_POS 100
#define Z_MIN_POS 0


#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)


// The position of the homing switches. Use MAX_LENGTH * -0.5 if the center should be 0, 0, 0
#define X_HOME_POS 0
#define Y_HOME_POS 0
#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 {30*60, 30*60, 4*60, 0} // set the homing speeds (mm/min)

// default settings

#define DEFAULT_AXIS_STEPS_PER_UNIT {54,54,2560,593} // default steps per unit for ultimaker
#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 45} // (mm/sec)
#define DEFAULT_MAX_ACCELERATION {9000,9000,100,10000} // 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 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // 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)

Edited 1 time(s). Last edit at 05/07/2013 08:00AM by Fri.
Re: Marlin Settings
May 06, 2013 10:23PM
try

#define HOMING_FEEDRATE {30*60, 30*60, 4*60, 0} // set the homing speeds (mm/min)

change to this

#define HOMING_FEEDRATE {15*60, 15*60, 3*60, 0} // set the homing speeds (mm/min)

//homing speeds should be slower to ensure accuracy, especially with spring levers on switch.

are you able to move x as normal if you power down place x carriage in the middle, and then add 20mm, then subtract 20mm in move?
Re: Marlin Settings
May 07, 2013 06:13AM
Hi Fri;

I had a problem similar to your a year or so ago with one of my printers. Same issue. Intermittent X switch. Swapped switch, swapped wire, then I realized it would only fail when the X motor was running.

In my case the wire I was using on both the X motor, and the X Switch was (at the time) untwisted, and/or unshielded.

My fix was to find an old Cat 5 ethernet cable, cut it up, and use the White/Blue, White/Orange for my X motor, and then White/Green for the switch. I pulled the White/Green out and away from the bundle and ran that separately.

It would seem that the X motor when running would induce noise into the switch wire, and trigger a false.

I know the ethernet-as-cable debate has been brought up as service wire; I can not speak to if a certain gauge, or type of ethernet cable is good/bad with regards to DC load capabilities, but it would be an easy fix for you to test to see if your issue is hardware, or software related.


Regards
Fri
Re: Marlin Settings
May 07, 2013 08:12AM
Thanks,
This would explain the problem with the x axis in Marlin, but how do you explain that I don't have the issue with
Sprinter. It only is the x and yes it only does it when the x motor is running and only with bounce. I will give the shielded
wire a shot. Where did you get the small connectors to connect the wires to the board?
Re: Marlin Settings
May 07, 2013 08:43AM
Fri Wrote:
-------------------------------------------------------

> Did anyone install a emergency stop switch? Is
> there a open input on the board?


To have a proper E-Stop, you would want the E-Stop circuit to interrupt the 12VDC inputs to the board.

Wiring a button to a input, and stopping the system via software is not a valid Emergency Stop.

Edited 1 time(s). Last edit at 05/07/2013 08:44AM by ShadowRam.
Re: Marlin Settings
May 07, 2013 10:10AM
--------------------snip--------
Thanks,
This would explain the problem with the x axis in Marlin, but how do you explain that I don't have the issue with
Sprinter. It only is the x and yes it only does it when the x motor is running and only with bounce. I will give the shielded
wire a shot. Where did you get the small connectors to connect the wires to the board?

----------------------------------


I have no idea why your end stop false triggers in marlin but not sprinter. When I teach, and I get stumped I use my default answer:

Voodoo. winking smiley

As for the connectors, I have access to a local electronics shop that stocks several sizes of headers. If you do not have a local place many of the big electronics house would have them (digikey, mouser, jameco) . Maybe even e-bay

[www.ebay.com]


If your issue is false triggers I too would like to know why it fires on one firmware, but not the other. Unless its some sort of "denounce" setting in firmware. But that is just a wild guess.
Fri
Re: Marlin Settings
May 07, 2013 12:50PM
Thanks Man,
I will get to the bottom of this and let everyone know, but it is very time consuming and puzzling to say the least.
I flashed sprinter and did a M119, in Marlin all three were "L" in Sprinter, x&y are H and only z is L.
Could this be a hint?

Edited 1 time(s). Last edit at 05/07/2013 01:41PM by Fri.
Fri
Re: Marlin Settings
May 10, 2013 02:50PM
I found a solution, still doesn't explain what is going on, but it works now.

Thanks for the help, hope this helps someone else.

Fri
Attachments:
open | download - Mechanical Settings.doc.docx (12.6 KB)
Re: Marlin Settings
October 14, 2013 04:50AM
HI just wanted to add in Marlin when I changed the // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. to false it gave me false triggers Not sure if helps but is what was causing mine.
Sorry, only registered users may post in this forum.

Click here to login