On achieving a better leveling (With help from Snapmaker Devs)

Thanks for posting this.

So I decided to see if there was a way I could ā€œhackā€ the firmware to do ABL, but have the bed heater turned on.

Before I go any further, I guess Iā€™ll need some help from SM devs, since itā€™s quite explicitly written that they donā€™t want bed heating while leveling:

image

From the rest of this thread, it sounds like bed heating while leveling is actually a good idea, but the firmware code says otherwiseā€¦

They are changing this.

Its because the current in the heater can affect the sensing range of the prox sensor, but they have found that the warping of the bed during heating far exceeds this

1 Like

See this issue in GitHub. Donā€™t know where exactly they stand with the referenced changes, but I guess itā€™s best to avoid duplicate work:

1 Like

Iā€™m really new to 3d printing, so iā€™m not an expert here.
I had a problem starting a print (bad 1st layer, bad adhesion etc), so i checked my bed matrix. - it had a spread over 0.7mm (i even placed a couple of paper ā€œwashersā€ under some of the screws just to make the bed uneven in different place)).

Then i discovered that G28 command that we all have in our starting g-code is turning off bed mesh leveling by default. And if you enter it in a console and then manually move your nozzle close to bed and try some G0 with same Z height you will see that there is no mesh bed levelling enabled. You would need to explicitly enable it every time.
So i added M420 S1 right after G28 in my start gcodeā€¦

And for the adhesion - i bought a can of 3DLAC spray. That was it.
Rub your bed sheet with alcohol, spray it with 3dlac, youā€™re good to go. Just donā€™t forget to calibrate your Z offset so, that your first layer is not squashed by the nozzle.

So my bed is stillā€¦eneven to say the least, but i guess i will print those rectangles without a problem.
Yes 5x5 mesh is not a perfect match (basically frequency of your beds irregularities can be higher than the bed matrixā€™s points), but itā€™s close enough for me.

Also i donā€™t bother slowing first layer too much anymore.
I print PLA with 40mm/s and 40% fan for my 1st layer, and 50-70mm/s for the rest (100% fan). Donā€™t want to push it too far though). My bed is 50C for the 1st layer and 40C for the rest. So i guess warping of the aluminum thing under the heated bed is less prominent

i spent days trying to find good settings. Havenā€™t printed anything big and tall yet, but small/mid sized (~150mm) objects are ok.

Hello bloom,
I donā€™t think G28 has any effect on the bed leveling, if you read the machine echo, the leveling is turned on before the print starts, it is indeed turned off for a second, but it was turned back on when the print starts. What is your firmware?
How did you check your bed matrix? With the sensor or with a dial? Was your bed heated or not? This could make a difference on the stock bed.
Your bed temp seems low for PLA, for better adhesion use higher temp and a slower first layer. The recommended settings for that is ~10mm/s (I use 14mm/s and work all fine), pretty much for the rest I go as high as 60mm/s, and the machine handles it like a champ.

Thanks for the reply!
Using latest firmaware (february revision)
i use M503 (i guess) to see what settings are stored in the firmware. there are values for mesh matrix (5x5)

I had a lot of problems printing without spray and that M420 command (but maybe youā€™re right and printer turns leveling on automatically). I was setting bed to 50-70C and printing 15-25mm/s for the first layer without luck (well, there were times when it worked though).

But after i started using that spray + added m420 command i tweaked my settings to start with 40mm/s with bed at 50c and 40% fan and then switching to 50/60 mm/s for walls and 70mm/s for infill just because i can. And it prints good (PLA: Basf, Playmaker and some cheaper rolls).
I donā€™t like to wait so i push my temps down and my speeds up until i find the fastest possible setting with a good result)

Iā€™m going to level my bed (physically i mean) to eliminate that 0.7+ difference to get even better prints.

P.S. as for the Bed leveling turning on before printing. I connected to my sm 2 via USB and sent a G28 command. then i moved a nozzle close to bed with G0 (like 0.1mm)ā€¦ then i moved it horizontally. and measured the Z distance. it was different. But when i sent a M420 S1 command after G28 via USB and repeated G0 commands i got pretty much same 0.1mm in Z. So i made a conclusion bed levelling is really turned off by a G28.
And i donā€™t understand how printer would recognize that itā€™s an actual print and would enable bed leveling after every G28 command (or set a flag that prohibits from turning it off after G28) if you donā€™t have it set explicitly in your start g-code ?
If itā€™s so, then itā€™s a wishful thinking on my side)
But it works somehow)

I hasnā€™t look into the code for it, but the machine echo Leveling On when the print starts. Have you tram your machine like brent said in this post? It might eliminate a big chunk of that difference. I found out using the laser print platform was a great help.

I havenā€™t tried anything yet. But definitely will.
My #1 is printing some kind of a support for a heated bed cable, cause seeing some photos of it, broken on this forum doesnā€™t make me happy)

What process did you do to access the backend code? I have been wanting to add an 11X11 grid to the touch screen. I havenā€™t looked much into it, Figure ld ask you before figuring it out myself. (save myself sometime lol). What IDE are you using, and are you just grabbing the code from the firmware updates?

Iā€™m a Electrical and Software engineer, so these types of mods are right up my alley.

That code snippet is just from the open source repo: GitHub - Snapmaker/Snapmaker2-Modules

I havenā€™t looked into actually modifying it yet (maybe @brent113 could explain more on what that setup is like, I think Iā€™ve seen him posting about running his own branch of the firmware).

As for modifying the touch screen, AFAIK, the source for that is still unreleased (but coming soon?). I just plugged a raspberry pi and run octoprint, and I use that to send gcode macros to the printer (you can also use luban, but gcode over wifi for luban apparently has ā€œless than trueā€ output (itā€™ll reply OK to a bunch of stuff that isnā€™t ā€œokā€)).

It sounds like right now thereā€™s 2 options:

  • Wait for the tablet source code to be released so we can play with that in addition to the firmware on the machine (probably would also reveal some new stuff we can do for option 2)
  • Plug in an rpi or some computer, and use octoprint + gcodes to do what you want (e.g. I just set up a quick macro for being able to do 7x7 or 11x11 leveling macros, and w/ octoprint, I can trigger that from my phone/tablet/laptop)

Pretty straightforward. Download VSCode and install the PlatformIO extension. Download the source code. Open the folder as the VSCode workspace. Run Task ā†’ PlatformIO: Build. Then Run Task ā†’ Pack Snapmaker Firmware. Firmware will be in .\release\Snapmaker_V{short_build_version}_{date}.bin

Of course nothing is quite as easy as Iā€™ve described, but those are the steps, and hopefully youā€™ll be able to troubleshoot the inevitable issues that pop up.

Thatā€™s my understanding as well.

The firmware in the OSS repo is behind the closed source though? I see the last commit is updating to 1.9.2 vs the closed source being at 1.14? Do you know somewhere that has a summary of the differences (obv itā€™ll just be hearsay since we canā€™t actually see whatā€™s in the closed source firmware binaries)?

1 Like

I have just followed your guide on the 7x7 bed leveling using YAT, dumb question here but how do I do the last step and reset the Z offset to 0.00mm? What is the command for it or do I just home the machine?


This is my bed level after following the 7x7 guide as posted above, visualised in Excel. This is the leveling data:

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
0 6.00750 6.01449 6.02148 6.03125 6.04824 6.06801 6.08000 6.07653 6.06528 6.05875 6.06486 6.07570 6.08000 6.07000 6.05347 6.04250 6.04296 6.04898 6.05500
1 6.08310 6.09763 6.11216 6.12759 6.14746 6.16823 6.18019 6.17496 6.16093 6.15352 6.16267 6.17844 6.18639 6.17897 6.16373 6.14894 6.13747 6.12644 6.11542
2 6.15870 6.18077 6.20284 6.22394 6.24668 6.26844 6.28037 6.27340 6.25659 6.24829 6.26048 6.28118 6.29278 6.28794 6.27399 6.25537 6.23198 6.20391 6.17583
3 6.21375 6.24227 6.27079 6.29625 6.31995 6.34060 6.35125 6.34306 6.32486 6.31625 6.33014 6.35361 6.36750 6.36509 6.35310 6.33250 6.30074 6.26037 6.22000
4 6.23449 6.26803 6.30157 6.32954 6.35113 6.36714 6.37445 6.36604 6.34892 6.34097 6.35411 6.37643 6.39009 6.38980 6.38085 6.36139 6.32729 6.28267 6.23806
5 6.23468 6.27215 6.30961 6.33880 6.35635 6.36562 6.36833 6.36024 6.34559 6.33889 6.34993 6.36893 6.38102 6.38269 6.37744 6.36097 6.32809 6.28397 6.23986
6 6.23500 6.27523 6.31546 6.34500 6.35820 6.36069 6.35875 6.35060 6.33801 6.33250 6.34209 6.35875 6.37000 6.37389 6.37236 6.35875 6.32681 6.28278 6.23875
7 6.24533 6.28697 6.32862 6.35746 6.36571 6.36114 6.35426 6.34550 6.33441 6.33023 6.33978 6.35623 6.36829 6.37541 6.37814 6.36690 6.33383 6.28677 6.23972
8 6.25579 6.29769 6.33958 6.36685 6.36983 6.35818 6.34630 6.33655 6.32657 6.32366 6.33380 6.35101 6.36463 6.37523 6.38224 6.37324 6.33876 6.28827 6.23778
9 6.25750 6.29894 6.34037 6.36625 6.36597 6.35014 6.33500 6.32361 6.31292 6.31000 6.32097 6.33972 6.35500 6.36750 6.37653 6.36875 6.33412 6.28269 6.23125
10 6.24528 6.28573 6.32618 6.35139 6.35133 6.33602 6.32033 6.30589 6.29107 6.28574 6.29788 6.31951 6.33662 6.34809 6.35504 6.34676 6.31462 6.26727 6.21991
11 6.22431 6.26306 6.30182 6.32653 6.32870 6.31682 6.30231 6.28418 6.26341 6.25440 6.26794 6.29322 6.31227 6.32112 6.32373 6.31394 6.28555 6.24477 6.20398
12 6.20125 6.23750 6.27375 6.29750 6.30195 6.29389 6.28125 6.26070 6.23556 6.22375 6.23820 6.26597 6.28625 6.29306 6.29236 6.28125 6.25528 6.21889 6.18250
13 6.17875 6.21192 6.24509 6.26746 6.27373 6.26919 6.25889 6.23799 6.21132 6.19843 6.21302 6.24138 6.26195 6.26850 6.26725 6.25528 6.22803 6.19006 6.15209
14 6.15417 6.18345 6.21272 6.23324 6.24138 6.24075 6.23347 6.21351 6.18688 6.17380 6.18804 6.21582 6.23597 6.24284 6.24208 6.22945 6.19958 6.15785 6.11611
15 6.12625 6.15000 6.17375 6.19125 6.20074 6.20398 6.20000 6.18181 6.15639 6.14375 6.15727 6.18357 6.20250 6.20875 6.20764 6.19500 6.16560 6.12468 6.08375
16 6.09347 6.10924 6.12501 6.13769 6.14767 6.15457 6.15412 6.13867 6.11587 6.10445 6.11677 6.14046 6.15708 6.16097 6.15778 6.14616 6.12282 6.09104 6.05926
17 6.05736 6.06351 6.06966 6.07634 6.08631 6.09682 6.10019 6.08832 6.06930 6.05972 6.07047 6.09064 6.10417 6.10474 6.09866 6.08870 6.07451 6.05645 6.03838
18 6.02125 6.01778 6.01431 6.01500 6.02496 6.03907 6.04625 6.03796 6.02273 6.01500 6.02417 6.04083 6.05125 6.04852 6.03954 6.03125 6.02621 6.02185 6.01750