Welcome! Log In Create A New Profile

Advanced

Custom probing points MK52 bed

Posted by Ohmarinus 
Custom probing points MK52 bed
December 06, 2020 03:10PM
Hi, I have been figuring out that I'm doing something wrong. Using a custom built Prusa MK2S with a MK52 heated bed.

I'm using #define AUTO_BED_LEVELING_BILINEAR in Marlin 2.0.6.1 and need to define four spots for the machine to probe because I'm using an MK52 bed which has magnets that interfere with the readings of the PINDA probe.

I've found a guide that says I need to set these values:
#define LEFT_PROBE_BED_POSITION 0
#define RIGHT_PROBE_BED_POSITION 225
#define BACK_PROBE_BED_POSITION 278
#define FRONT_PROBE_BED_POSITION 0

But these values don't exist in my Marlin install.

First of all I want to know, in able to do a bed leveling at the beginning of each print I use G29, it now probes 9 points on the bed. This kinda works, but I'm getting slight errors that make the first layer print badly. I'm using AUTO_BED_LEVELING_BILINEAR and I want the printer to probe four pre-defined spots on the MK52 bed so that I can avoid the magnetic interference.

Am I even using the correct bed leveling method? And where can I set the predefined probing positions? I hope someone knows the answer.

Edit:
From what I understand this used to be called 'grid leveling'. Sadly I cannot find this back in the newer versions of Marlin, also not in the latest one. Is there any way to set exact probing coordinates or am I lost? I don't want to be stuck with some old obscure Marlin version.

Edited 2 time(s). Last edit at 12/06/2020 04:11PM by Ohmarinus.


http://www.marinusdebeer.nl/
Re: Custom probing points MK52 bed
December 06, 2020 05:25PM
That is because the names were changed to in the newer versions of Marlin


This is my numbers you will need to enter your own.
  #define GRID_MAX_POINTS_X 6
  #define GRID_MAX_POINTS_Y 6

  // Set the boundaries for probing (where the probe can reach).
  //#define MIN_PROBE_EDGE_LEFT MIN_PROBE_EDGE + 10
  //#define MIN_PROBE_EDGE_RIGHT (X_BED_SIZE - (MIN_PROBE_EDGE + 10))
  //#define MIN_PROBE_EDGE_FRONT MIN_PROBE_EDGE + 15 // 28 For SN04-N and 15 for for TL-W3MC2
  //#define MIN_PROBE_EDGE_BACK (Y_BED_SIZE - (MIN_PROBE_EDGE)) // + 15 For SN04-N and nothing for TL-W3MC2

Note I have disabled this found no longer need

Edited 2 time(s). Last edit at 12/06/2020 05:27PM by Roberts_Clif.


Computer Programmer / Electronics Technician
Re: Custom probing points MK52 bed
December 06, 2020 07:53PM
Looks like they changed MIN_PROBE_EDGE to PROBING_MARGIN In Marlin 2.0.7

  #define GRID_MAX_POINTS_X 6
  #define GRID_MAX_POINTS_Y 6

  // Set the boundaries for probing (where the probe can reach).
  //#define MIN_PROBE_EDGE_LEFT PROBING_MARGIN + 10
  //#define MIN_PROBE_EDGE_RIGHT (X_BED_SIZE - (PROBING_MARGIN + 10))
  //#define MIN_PROBE_EDGE_FRONT PROBING_MARGIN + 15 // 28 For SN04-N and 15 for for TL-W3MC2
  //#define MIN_PROBE_EDGE_BACK (Y_BED_SIZE - (PROBING_MARGIN)) // + 15 For SN04-N and nothing for TL-W3MC2


Try This

Edited 2 time(s). Last edit at 12/06/2020 08:04PM by Roberts_Clif.


Computer Programmer / Electronics Technician
Re: Custom probing points MK52 bed
December 07, 2020 04:40AM
Quote
Roberts_Clif
Looks like they changed MIN_PROBE_EDGE to PROBING_MARGIN In Marlin 2.0.7

  #define GRID_MAX_POINTS_X 6
  #define GRID_MAX_POINTS_Y 6

  // Set the boundaries for probing (where the probe can reach).
  //#define MIN_PROBE_EDGE_LEFT PROBING_MARGIN + 10
  //#define MIN_PROBE_EDGE_RIGHT (X_BED_SIZE - (PROBING_MARGIN + 10))
  //#define MIN_PROBE_EDGE_FRONT PROBING_MARGIN + 15 // 28 For SN04-N and 15 for for TL-W3MC2
  //#define MIN_PROBE_EDGE_BACK (Y_BED_SIZE - (PROBING_MARGIN)) // + 15 For SN04-N and nothing for TL-W3MC2


Try This

The weird thing is when I search for these variables in both config and config_advanced they are not present in my file. Are you using Prusa Marlin firmware, or the official source from marlinfw.org ?

I'm going completely nuts, why can't I just set four custom locations to probe.

The Prusa firmware has this option:
 #define AUTO_BED_LEVELING_GRID
  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
  // and least squares solution is calculated
  // Note: this feature occupies 10'206 byte
  #ifdef AUTO_BED_LEVELING_GRID

    // set the rectangle in which to probe
    #define LEFT_PROBE_BED_POSITION 15
    #define RIGHT_PROBE_BED_POSITION 170
    #define BACK_PROBE_BED_POSITION 180
    #define FRONT_PROBE_BED_POSITION 20

     // set the number of grid points per dimension
     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
    #define AUTO_BED_LEVELING_GRID_POINTS 2

But I'm using a selfbuilt machine with a MK52 bed, so I cannot use the prusa firmware because I'm using a different controller (Ramps 1.4) and TMC2209 drivers for example.

Edited 3 time(s). Last edit at 12/07/2020 04:45AM by Ohmarinus.


http://www.marinusdebeer.nl/
Re: Custom probing points MK52 bed
December 07, 2020 04:51AM
Oh I found it, it's in Config_advanced and it's even different from what you posted haha.

#if PROBE_SELECTED && !IS_KINEMATIC
  //#define PROBING_MARGIN_LEFT PROBING_MARGIN
  //#define PROBING_MARGIN_RIGHT PROBING_MARGIN
  //#define PROBING_MARGIN_FRONT PROBING_MARGIN
  //#define PROBING_MARGIN_BACK PROBING_MARGIN
#endif

I think this is what I need to change. So confusing that they apparently rename it with every update... This is in Marlin 2.0.7.2

Despite setting everything up correctly, the machine doesn't want to probe correctly;

Bed size:
// The size of the print bed
#define X_BED_SIZE 235
#define Y_BED_SIZE 210

Nozzle offset set correctly (probe is right of the nozzle and slightly towards the back):
#define NOZZLE_TO_PROBE_OFFSET { 22, 5, -0.35 }

Probe margin set to zero:
#define PROBING_MARGIN 0

Margins defined as followed:
#if PROBE_SELECTED && !IS_KINEMATIC
#define PROBING_MARGIN_LEFT 0
#define PROBING_MARGIN_RIGHT 28
#define PROBING_MARGIN_FRONT 8
#define PROBING_MARGIN_BACK 10
#endif

First I had the values subtracted from the bed size as follows:
#define PROBING_MARGIN_LEFT 0
#define PROBING_MARGIN_RIGHT X_BED_SIZE - 207
#define PROBING_MARGIN_FRONT 8
#define PROBING_MARGIN_BACK Y_BED_SIZE - 200

The locations of the dots are on X0, X207, Y8 and Y200. So I subtract these from the max bed dimensions and it should come in correctly. My zero point is not exactly where it needs to be because the X-carriage cannot home fully due to the custom Ramps enclosure that is fitted on the printer. Therefor the fan is in the way of the X-carriage so I cannot yet utilize the full area of the MK52 heated bed.

Instead of probing at X207 Y200 it probes at X185 Y195 so it subtracts 22mm from the X and 5mm from the Y positions that it should probe which I realize is exactly the distance that I set through the NOZZLE_TO_PROBE_OFFSET. But this should NOT happen I believe. Because the machine makes a mesh for where it thinks the nozzle should be right?

Sadly the machine doesn't want to home correctly on the PROBING_MARGIN_RIGHT and the PROBING_MARGIN_BACK. Anyway, setting the NOZZLE_TO_PROBE_OFFSET to 0 fixed the issue. But I don't think it's an elegant solution.

Edited 4 time(s). Last edit at 12/07/2020 06:19AM by Ohmarinus.


http://www.marinusdebeer.nl/
Re: Custom probing points MK52 bed
December 07, 2020 07:17AM
Yes!!!

My sample was used on an earlier version of Marlin 2.x.x

I see the information got you on the right track this is always good..

With the never versions of Marlin I only use These two lines.

  #define GRID_MAX_POINTS_X 6
  #define GRID_MAX_POINTS_Y 6

It sometimes drives me crazy that the variable name are always changing.
Looks like the change is

Quote
Firmware Notes:
* If you are replacing the prior *_PROBE_BED_POSITION options,
* LEFT and FRONT values in most cases will map directly over
* RIGHT and REAR would be the inverse such as
* (X/Y_BED_SIZE - RIGHT/BACK_PROBE_BED_POSITION)

So My new values would be
#if PROBE_SELECTED && !IS_KINEMATIC
  //#define PROBING_MARGIN_LEFT PROBING_MARGIN +10
  //#define X_BED_SIZE - PROBING_MARGIN_RIGHT PROBING_MARGIN +10
  //#define PROBING_MARGIN_FRONT PROBING_MARGIN + 15 // 28 For SN04-N and 15 for for TL-W3MC2
  //#define Y_BED_SIZE - PROBING_MARGIN_BACK PROBING_MARGIN // + 15 For SN04-N and nothing for TL-W3MC2

Did I understand this correctly

Edited 6 time(s). Last edit at 12/07/2020 07:48AM by Roberts_Clif.


Computer Programmer / Electronics Technician
Re: Custom probing points MK52 bed
December 07, 2020 08:07AM
Quote
Roberts_Clif
Yes!!!

My sample was used on an earlier version of Marlin 2.x.x

I see the information got you on the right track this is always good..

With the never versions of Marlin I only use These two lines.

  #define GRID_MAX_POINTS_X 6
  #define GRID_MAX_POINTS_Y 6

It sometimes drives me crazy that the variable name are always changing.
Looks like the change is

Quote
Firmware Notes:
* If you are replacing the prior *_PROBE_BED_POSITION options,
* LEFT and FRONT values in most cases will map directly over
* RIGHT and REAR would be the inverse such as
* (X/Y_BED_SIZE - RIGHT/BACK_PROBE_BED_POSITION)

So My new values would be
#if PROBE_SELECTED && !IS_KINEMATIC
  //#define PROBING_MARGIN_LEFT PROBING_MARGIN +10
  //#define X_BED_SIZE - PROBING_MARGIN_RIGHT PROBING_MARGIN +10
  //#define PROBING_MARGIN_FRONT PROBING_MARGIN + 15 // 28 For SN04-N and 15 for for TL-W3MC2
  //#define Y_BED_SIZE - PROBING_MARGIN_BACK PROBING_MARGIN // + 15 For SN04-N and nothing for TL-W3MC2

Did I understand this correctly

Almost there!!
I think it should be:
#if PROBE_SELECTED && !IS_KINEMATIC
  #define PROBING_MARGIN_LEFT PROBING_MARGIN +10
  #define PROBING_MARGIN_RIGHT (X_BED_SIZE - PROBING_MARGIN) +10
  #define PROBING_MARGIN_FRONT PROBING_MARGIN + 15
  #define PROBING_MARGIN_BACK Y_BED_SIZE - PROBING_MARGIN

See, first you define the PROBING_MARGIN_ and then you do the math winking smiley The reason why the setting for MARGIN_RIGHT is between parentheses is because that forces the script to first subtract and after that it adds the 10. Also don't forget to remove the // in front of the settings, otherwise they will not be included.

Try it out whilst keeping your finger on the power button in case it doesn't work out.

Edited 3 time(s). Last edit at 12/07/2020 08:11AM by Ohmarinus.


http://www.marinusdebeer.nl/
Re: Custom probing points MK52 bed
December 07, 2020 08:16AM
I always do after a firmware flash.

Thank You.

Whoops
Marlin\src\HAL\AVR\../../inc/../../Configuration_adv.h:1665:75: error: expression cannot be used as a function
#define PROBING_MARGIN_RIGHT PROBING_MARGIN (X_BED_SIZE - PROBING_MARGIN) +10

I got this.

#define PROBING_MARGIN_RIGHT PROBING_MARGIN (220 - PROBING_MARGIN) +10
^
static_assert(PROBING_MARGIN_RIGHT < _MARGIN(X), "PROBING_MARGIN_RIGHT is too large.");

No I do not.

GOT it


 #define PROBING_MARGIN 20

  #define PROBING_MARGIN_LEFT PROBING_MARGIN 
  #define PROBING_MARGIN_RIGHT PROBING_MARGIN 
  #define PROBING_MARGIN_FRONT PROBING_MARGIN 
  #define PROBING_MARGIN_BACK PROBING_MARGIN // 65 For SN04-N

Edited 4 time(s). Last edit at 12/07/2020 09:00AM by Roberts_Clif.


Computer Programmer / Electronics Technician
Sorry, only registered users may post in this forum.

Click here to login