3dprinters

Marlin 2.0 Change Bed Size at Runtime


Is it possible to change the size of the bed at run-time? To clarify, I want to change the bed dimensions to effectively modify the probing-grid-area of the automatic-bed-leveling routine (I'll accept any answer that accomplishes this that doesn't involve re-compiling Marlin firmware).

Details

Printer: Flsun Q5 Auto Leveling Kossel Delta 3D Printer, but I've removed the hot-end and replaced it with a spring-loaded drawing tip with the Z-probe switch triggering when the spring is compressed sufficiently.

Controller: MKS-robin-nano

I need to draw on a rectangular work-piece that will inevitably have some slight curvature to it. Drawing on this surface requires relatively constant pressure. My hope is that I can do an automatic-bed-leveling (G29) on just the work-piece area, and then allow the leveling to produce a relatively constant drawing pressure along the surface.


Solution

  • There is one solution I found trying to do same thing as you. To clarify I am using marlin bugfix-2.0.x branch. If you choose AUTO_BED_LEVELING_BILINEAR in Configuration.h mariln uses the older (not unified) mesh bed leveling system. The example procedure for your case would then be:

    1. Make sure you have flashed marlin with AUTO_BED_LEVELING_BILINEAR.

    2. Move tool-head to the lower left corner (top view) of your rectangular work-piece just touching the surface either manually, using G-codes, repetier, pronterface, whatever.

    3. G92 X0 Y0 Z0 to set the machine position to 0,0,0.
    4. G29 F0 L0 R40 B20 to probe a 40mm by 20mm rectangle. The Mnemonic are: Front, Left, Right, Back.
    5. M500 to save the probed grid.
    6. M420 S1 to enable leveling to affect your G1-moves in probed area.
    7. Execute your drawing G-code.

    Be careful with G29 command when using AUTO_BED_LEVELING_BILINEAR though, as some of the options described at G29 marlin help page doesn't work e.g. I couldn't get the P option to work so to change probing grid size (amount of probe points) you have to recompile. Also to then draw on the surface you may be using negative Z values for G1 moves in your G-code, in that case don't forget to M211 S0 to be able to move below 0 (which would be your work-piece surface).