Page 1 of 1

Video guide for Unified Bed Leveling (UBL) in Marlin 1.1?

Posted: Mon Jul 10, 2017 10:10 pm
by frederik
Hi all,

I've managed to set up Marlin UBL on two of my printers running the latest Marlin release. That is I'm able to measure the parts of the bed that my probe can reach (G29 P1) an then I auto-fill the rest of the bed (G29 P3). The official guide explains various ways to manually measure the rest of the bed and/or print a test pattern, but honestly so far I'm struggling to make this work. I couldn't find a good video showing these steps and thought that it might make an excellent guide for Tom to do.

Some questions I'm struggling with:
  • How should I do the test print pattern?
  • How can I validate the mesh before each print with a three-point probe (in case one of my axes shifted a bit)?
  • What else should I put in my start gcode after having a working mesh?
  • How should I think about using different meshes for different temperatures?
  • How does the manual probing/validation work once I've created a mesh (that still has some unprobed values where my probe can't reach)?
  • Which firmware parameters should I set for optimum probe coverage of the bed considering my probe offset and physical travel limits. For some reason Marlin considers areas outside of the bed (where my nozzle can go) as part of the probable grid, which doesn't make sense to me.

Re: Video guide for Unified Bed Leveling (UBL) in Marlin 1.1?

Posted: Fri Jul 14, 2017 10:36 am
by dietz
Hey there,

i am not an Expert but i'll try to answer as good as I can:
  • i personally like to to download/design a rectangular shape (height doesnt really matter) that fills almost all the building plattform, then I set the first layer count to 0 so the print will start with just the infill. Then you either just wait till it's done with the first layer or set your slicer to stop after the first layer by itself. That way you have a nice Overview where you still need to adjust the height without wasting too much filament or time (i attached an image of an example)
  • i dont think that is (easily) possible because you have to decide if you want billinear OR 3 point ABL at the time you compile your firmware, so G29 is either the one or the other (it could work in Repetier tho, since they use G29, G30 and G31 for the different methods of ABL, dont know if two can be used at the same time)
  • I personaly didn't add much, if you didnt already you can define the Z-Fade-Height with "M420 Zx" so in my case "M420 Z2" for a fade height of 2mm (this means it only corrects the Z-value for 100% at the first layer, then <100% at the second etc etc. And all Layers above 2mm have no Z-compensation at all)
  • that is a good question ... my approach to this is simply running the G29 before every single print, so the bed and nozzle are always on the temp is also print with
  • can't help you with that since i only do the automatic ones (too lazy for the manual part tbh :P )
  • uhm ... first of all, check if the probe offset is set correctly in the firmware, only then the carriage will know where its safe to probe when using the settings for which area it should probe. Next you should insert the exact values of your bed into the FW (so it knows where the carriage has to be when the nozzle is at 0/0/Z and at MAX/MAX/Z). Marlin has a setting in the FW how far it travels from the border of the bed (position of the probe in that case) for measurment, so if you inserted both the Probe-offset and the Bed-Dimensions and Bed-Offsets-from-Homing-Values correctly it should work. (Piece of advice: in some rare cases the printer just crashes into X or Y on one side, it can be the case when the probe has like a 30mm offset to the nozzle, you try to probe 10mm from the border or the bed (probe-position!) but the nozzle can only reach 10mm outside of the border, you have to increase the value how far it travels from the border then in the firmware!)
I hope what i wrote made sense (both the content and also the grammar) or was at least understandable. If not, please let me know, i still try to figure this stuff out for myself and there are still a lot of :?: 's for me there :D

Re: Video guide for Unified Bed Leveling (UBL) in Marlin 1.1?

Posted: Sat Jul 15, 2017 6:46 am
by frederik
Thanks for your detailed reply. My question was specifically around the new Unified Bed Leveling, not the old bilinear / 3P approaches. UBL actually offers its own in-firmware test pattern, on-screen mesh editing, mesh storage, etc. It's pretty great, but also more complex to set up and get perfect.

See: ... eling.html

Re: Video guide for Unified Bed Leveling (UBL) in Marlin 1.1?

Posted: Sat Jul 15, 2017 9:47 pm
by oakdesign
I'm currently analysing the UBL feature within the Marlin code. I haven't been able to test it so far as my Anet A8 has a ATMega128 based board and the flash memory is just to small to get UBL activated.
At the Moment I'm completly rebuilding my printer with a 2040 Alu profile Frame and a Ramps1.4 as controller board, as soon as I have it running I will get into physically testing the UBL and might answer your questions shortly

Regards Richard

Re: Video guide for Unified Bed Leveling (UBL) in Marlin 1.1?

Posted: Sun Jul 16, 2017 3:50 pm
by dietz
Ohhh, i had Marlin 1.1.0_RC8 and thought UBL is the same as MeshBedLeveling there (was just looking into the configuration.h)... sorry!

Since i am not that satisfied with the ABL in 1.1RC8 I am configuring Marlin 1.1.4 for my printer right now and try to get it working on my Tevo Black Widow, wish me luck!

Re: Video guide for Unified Bed Leveling (UBL) in Marlin 1.1?

Posted: Wed Jul 26, 2017 1:44 pm
by arden
Been playing with this a bit today. The question above about start gcode is one I had as well since the documentation doesn't really make it clear. Actually it implies that it will be active on power up which suggests no start gcode is needed.

Out of curiosity I send a G29, no parameters and the printer didn't respond to this. G29 A works as expected, wouldn't it be useful for G29 with no parameters to default to the same behaviour as G29 A so as to be compatible with already generated gcode.

Though, if the printer doesn't respond to the empty command and UBL is active on power up I guess it already would be compatible. Can anyone confirm whether UBL is active after being setup without sending a G29 A?

I'll mesh around with it more tomorrow but interested if others have experience.

Re: Video guide for Unified Bed Leveling (UBL) in Marlin 1.1?

Posted: Wed Jul 26, 2017 11:18 pm
by frederik
I now use this
G29 L1 ; load mesh for abs temperature from slot 1
G29 J ; do a three point probe in case the bed tilt changed