Marlin RC3 Auto Bed Leveling appears backwards
December 06, 2015 02:39AM
I upgraded/switched from Kimbra/Marlin to the RC3 release of Marlin on a Ramps 1.4. I have ABL enabled and when I do a G29 it moves to the max X min Y to start and this seems to be throwing the whole bed compensation backwards.

If I print a 3 layer perimeter (.2mm layer height) around a part the left side (.71mm) is thicker than the right (.60mm).

Last time I used marlin it started in the min x min y position and moved from there probing the bed.

Did I miss configure something?

//===========================================================================
//============================ Bed Auto Leveling ============================
//===========================================================================

// @section bedlevel

#define AUTO_BED_LEVELING_FEATURE // Delete the comment to enable (remove // at the start of the line)
#define DEBUG_LEVELING_FEATURE
#define Z_MIN_PROBE_REPEATABILITY_TEST // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.

#if ENABLED(AUTO_BED_LEVELING_FEATURE)

// There are 2 different ways to specify probing locations:
//
// - "grid" mode
// Probe several points in a rectangular grid.
// You specify the rectangle and the density of sample points.
// This mode is preferred because there are more measurements.
//
// - "3-point" mode
// Probe 3 arbitrary points on the bed (that aren't colinear)
// You specify the XY coordinates of all 3 points.

// Enable this to sample the bed in a grid (least squares solution).
// Note: this feature generates 10KB extra code size.
#define AUTO_BED_LEVELING_GRID

#if ENABLED(AUTO_BED_LEVELING_GRID)

#define LEFT_PROBE_BED_POSITION 30
#define RIGHT_PROBE_BED_POSITION 190
#define FRONT_PROBE_BED_POSITION 10
#define BACK_PROBE_BED_POSITION 190

#define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.

// Set the number of grid points per dimension.
// You probably don't need more than 3 (squared=9).
#define AUTO_BED_LEVELING_GRID_POINTS 6

#else // !AUTO_BED_LEVELING_GRID

// Arbitrary points to probe.
// A simple cross-product is used to estimate the plane of the bed.
#define ABL_PROBE_PT_1_X 15
#define ABL_PROBE_PT_1_Y 180
#define ABL_PROBE_PT_2_X 15
#define ABL_PROBE_PT_2_Y 15
#define ABL_PROBE_PT_3_X 180
#define ABL_PROBE_PT_3_Y 15

#endif // AUTO_BED_LEVELING_GRID

// Offsets to the Z probe relative to the nozzle tip.
// X and Y offsets must be integers.
#define X_PROBE_OFFSET_FROM_EXTRUDER 25 // Z probe to nozzle X offset: -left +right
#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Z probe to nozzle Y offset: -front +behind
#define Z_PROBE_OFFSET_FROM_EXTRUDER -9.77 // Z probe to nozzle Z offset: -below (always!)

#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z axis before homing (G28) for Z probe clearance.
// Be sure you have this distance over your Z_MAX_POS in case.

#define XY_TRAVEL_SPEED 8000 // X and Y axis travel speed between probes, in mm/min.

#define Z_RAISE_BEFORE_PROBING 25 // How much the Z axis will be raised before traveling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 3 // How much the Z axis will be raised when traveling from between next probing points.
#define Z_RAISE_AFTER_PROBING 10 // How much the Z axis will be raised after the last probing point.

//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" // These commands will be executed in the end of G29 routine.
// Useful to retract a deployable Z probe.

//#define Z_PROBE_SLED // Turn on if you have a Z probe mounted on a sled like those designed by Charles Bell.
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.


//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
//it is highly recommended you let this Z_SAFE_HOMING enabled!!!

#define Z_SAFE_HOMING // This feature is meant to avoid Z homing with Z probe outside the bed area.
// When defined, it will:
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
// - If stepper drivers timeout, it will need X and Y homing again before Z homing.
// - Position the Z probe in a defined XY point before Z Homing when homing all axis (G28).
// - Block Z homing only when the Z probe is outside bed area.

#if ENABLED(Z_SAFE_HOMING)

#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).

#endif

// Support for a dedicated Z probe endstop separate from the Z min endstop.
// If you would like to use both a Z probe and a Z min endstop together,
// uncomment #define Z_MIN_PROBE_ENDSTOP and read the instructions below.
// If you still want to use the Z min endstop for homing, disable Z_SAFE_HOMING above.
// Example: To park the head outside the bed area when homing with G28.
//
// WARNING:
// The Z min endstop will need to set properly as it would without a Z probe
// to prevent head crashes and premature stopping during a print.
//
// To use a separate Z probe endstop, you must have a Z_MIN_PROBE_PIN
// defined in the pins_XXXXX.h file for your control board.
// If you are using a servo based Z probe, you will need to enable NUM_SERVOS,
// Z_ENDSTOP_SERVO_NR and SERVO_ENDSTOP_ANGLES in the R/C SERVO support below.
// RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin
// in the Aux 4 section of the RAMPS board. Use 5V for powered sensors,
// otherwise connect to ground and D32 for normally closed configuration
// and 5V and D32 for normally open configurations.
// Normally closed configuration is advised and assumed.
// The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin.
// Z_MIN_PROBE_PIN is setting the pin to use on the Arduino.
// Since the D32 pin on the RAMPS maps to D32 on Arduino, this works.
// D32 is currently selected in the RAMPS 1.3/1.4 pin file.
// All other boards will need changes to the respective pins_XXXXX.h file.
//
// WARNING:
// Setting the wrong pin may have unexpected and potentially disastrous outcomes.
// Use with caution and do your homework.
//
//#define Z_MIN_PROBE_ENDSTOP

#endif // AUTO_BED_LEVELING_FEATURE

Edited 1 time(s). Last edit at 12/06/2015 02:40AM by randyf1965.
Re: Marlin RC3 Auto Bed Leveling appears backwards
December 06, 2015 07:25AM
Did you try to print something, before you start ABL?
Maybe it's mirrored because of wrong endstop settings?

// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR ??
#define Y_HOME_DIR ??
#define Z_HOME_DIR ??
-Olaf
Re: Marlin RC3 Auto Bed Leveling appears backwards
December 06, 2015 08:11AM
Just printed a letter R and it came out as shown in Pronterface. Even on a small shape like the R the right side was .17mm and the left .20mm


// ENDSTOP SETTINGS:
// Sets 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

Edited 1 time(s). Last edit at 12/06/2015 08:21AM by randyf1965.
Re: Marlin RC3 Auto Bed Leveling appears backwards
December 06, 2015 08:21AM
I did a G29 V4 using 6 points probing and put a wooden ruler under the 1st probing point and it is the front right point.

SENDING:G29 V4
G29 Auto Bed Leveling
Bed X: 190.000 Y: 10.000 Z: 13.639
Bed X: 158.000 Y: 10.000 Z: 9.826
Bed X: 126.000 Y: 10.000 Z: 9.717
Bed X: 94.000 Y: 10.000 Z: 9.605
Bed X: 62.000 Y: 10.000 Z: 9.440
Bed X: 30.000 Y: 10.000 Z: 9.272
Bed X: 30.000 Y: 46.000 Z: 9.326
Bed X: 62.000 Y: 46.000 Z: 9.470
Bed X: 94.000 Y: 46.000 Z: 9.636
Bed X: 126.000 Y: 46.000 Z: 9.765
Bed X: 158.000 Y: 46.000 Z: 9.836
Bed X: 190.000 Y: 46.000 Z: 9.953
Bed X: 190.000 Y: 82.000 Z: 9.962
Bed X: 158.000 Y: 82.000 Z: 9.887
Bed X: 126.000 Y: 82.000 Z: 9.802
Bed X: 94.000 Y: 82.000 Z: 9.710
Bed X: 62.000 Y: 82.000 Z: 9.549
Bed X: 30.000 Y: 82.000 Z: 9.459
Bed X: 30.000 Y: 118.000 Z: 9.480
Bed X: 62.000 Y: 118.000 Z: 9.644
Bed X: 94.000 Y: 118.000 Z: 9.719
Bed X: 126.000 Y: 118.000 Z: 9.810
Bed X: 158.000 Y: 118.000 Z: 9.927
Bed X: 190.000 Y: 118.000 Z: 9.991
Bed X: 190.000 Y: 154.000 Z: 9.998
Bed X: 158.000 Y: 154.000 Z: 9.920
Bed X: 126.000 Y: 154.000 Z: 9.850
Bed X: 94.000 Y: 154.000 Z: 9.760
Bed X: 62.000 Y: 154.000 Z: 9.646
Bed X: 30.000 Y: 154.000 Z: 9.587
Bed X: 30.000 Y: 190.000 Z: 9.575
Bed X: 62.000 Y: 190.000 Z: 9.729
Bed X: 94.000 Y: 190.000 Z: 9.770
Bed X: 126.000 Y: 190.000 Z: 9.847
Bed X: 158.000 Y: 190.000 Z: 9.922
Bed X: 190.000 Y: 190.000 Z: 9.982
Eqn coefficients: a: 0.00598885 b: -0.00143419 d: 9.31839656
Mean of sampled points: 9.83375167
planeNormal x: -0.005989 y: 0.001434 z: 1.000000

Bed Height Topography:
+-----------+
|...Back....|
|Left..Right|
|...Front...|
+-----------+
-0.25875 -0.10500 -0.06375 +0.01375 +0.08875 +0.14875
-0.24625 -0.18750 -0.07375 +0.01625 +0.08625 +0.16375
-0.35375 -0.19000 -0.11500 -0.02375 +0.09375 +0.15750
-0.37500 -0.28500 -0.12375 -0.03125 +0.05375 +0.12875
-0.50750 -0.36375 -0.19750 -0.06875 +0.00250 +0.11875
-0.56125 -0.39375 -0.22875 -0.11625 -0.00750 +3.80500

Corrected Bed Height vs. Bed Topology:
+0.78722 +0.74933 +0.59894 +0.48480 +0.36816 +0.23652
+0.74809 +0.61520 +0.53731 +0.43567 +0.31403 +0.19989
+0.58896 +0.56107 +0.44443 +0.34404 +0.26990 +0.14201
+0.51608 +0.41444 +0.38405 +0.28491 +0.17827 +0.06163
+0.33195 +0.28406 +0.25867 +0.19578 +0.07539 +0.00000
+0.22657 +0.20243 +0.17579 +0.09665 +0.01376 +3.63462

Bed Level Correction Matrix:
+0.999982 +0.000000 +0.005989
+0.000009 +0.999999 -0.001434
-0.005989 +0.001434 +0.999981
Re: Marlin RC3 Auto Bed Leveling appears backwards
December 14, 2015 05:08PM
The bed leveling feature of Marlin can only account for a sloped but flat bed. It cannot account for the aberration from your putting the ruler there. It simply uses all of the data from the probed points to attempt to calculate a plane that best fits all of the measurements. It then uses that plane to calculate what changes it needs to make to make it "level". So that stray point from the ruler is obviously going to be difficult to fit to a plane and will just makes matters worse. That said, I'm having issues with auto bed leveling as well. I'm not convinced that more probe points is necessarily better. If the bed isn't flat I would expect it to make the calculated plane less accurate than a simple 3 point probing.
Re: Marlin RC3 Auto Bed Leveling appears backwards
December 14, 2015 05:43PM
Unless your mechanics are super good.... Grid is better than 3-Point. But if your bed is not flat, you may want to bring up Mesh Bed Leveling. Right now I'm looking at unifying the Delta bed leveling with Mesh. The big problem with Cartesian Mesh leveling is you have to manually set the points. Delta's auto bed leveling handles that automatically. But it needs some work to be right for Cartesian.
Sorry, only registered users may post in this forum.

Click here to login