1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-12-01 23:58:33 +00:00

Created Manual bed leveling + mesh bed leveling (markdown)

AnHardt 2015-11-06 01:05:57 +01:00
parent c3aef1ff9d
commit 3bbc83c576

@ -0,0 +1,48 @@
Here is a **manual** way to configure a bed leveling combined with a bed level solution using a **mesh**.
I happend to buy a non-finished RigidBot BIG which was not too great, after shipping and been misshandled by the previous owner. The structure was solid though and I have re-build most of it using a RAMPS 1.4 board + 128x64 LCD board. But the bed wasn't flat, I even tried to use a sheet of glas and compensate with that.
I have previously experimented to add an option in the menu for doing a bed leveling without servos etc. This on a smaller Huxley. So I added that and I started to experiment with the GRID auto bed leveling in Marlin. But after a while I started to understand that the bed leveling in Marlin is only based on a plane which still require a flat bed. Not enough for this big non-flat bed. The GRID wasn't using a mesh. So I built that, a mesh based bed leveling. One obstacle I realized was long lines needs to be split on mesh boundaries. I wrote most code in a "simulator" to get the logic right and have tested it all day. The mesh calculations are basically a bi-linear calculation from the mesh edges, maybe not perfect.
Enable in Configuration.h, both `MANUAL_BED_LEVELING` and `MESH_BED_LEVELING`. I have separated them so one might use them for other things in the future (maybe?).
The bed level option is added last in the Prepare menu. When selecting it the hotend will travel to all points and one use the encoder to move it up/down. Move it down until the usual paper thickness from the bed and press the encoder to "enter" that value, keep doing that until all points have been entered. The mesh can be saved in the EEPROM so storing them is good. A G28 homing will show if the mesh is active or not. If it does not travel to the first measure point (for sync position with mesh) the mesh is not active.
This is what I get when measuring the bed I have (using 5x5 points) Pretty bad bed huh?
```
2.00 2.10 2.10 2.05 2.00
2.25 2.25 2.24 2.20 2.15
2.35 2.34 2.40 2.35 2.35
2.05 2.15 2.25 2.25 2.25
1.75 1.95 2.15 2.15 2.15
```
But with this method I have been able to print pretty much all over the bed. The bed is BIG, at least 360x290 print area with some to spare. The width of the reptiles print is over 200mm and without this it would have been impossible.
![img_2432](https://cloud.githubusercontent.com/assets/81102/6659331/9351005e-cb83-11e4-84fc-3b043cb29599.JPG)
![img_2434](https://cloud.githubusercontent.com/assets/81102/6659334/ab0d0756-cb83-11e4-9338-5b882bb99137.jpg)
This image explain the bi-linear calculation pretty good. (from http://www.dspguide.com/ch23/7.htm)
![bilinear](https://cloud.githubusercontent.com/assets/81102/6709750/f703323a-cd7b-11e4-89e5-36334f7917ee.gif)
*The bed level option is added last in the Prepare menu. When selecting it the hotend will travel to all points and one use the encoder to move it up/down. Move it down until the usual paper thickness from the bed and press the encoder to "enter" that value, keep doing that until all points have been entered. The mesh can be saved in the EEPROM so storing them is good. A G28 homing will show if the mesh is active or not. If it does not travel to the first measure point (for sync position with mesh) the mesh is not active.*
https://github.com/MarlinFirmware/Marlin/pull/1619
Later I also added `G29`, with which one can do this without a display.
`G29` or `G29 S0` Print mesh info
`G29 S1` Initiate probing, will do a homing + travel to first probe point. Now use Printrun or what you use to slowly lower the hotend until it touches the bed, i.e. with a paper between to feel when it's close enough.
`G29 S2` Save current height for the current point, then travel to next probe point. Repeat the manual lowering until touches. Do this until all points has been probed.
I use a paper and do the *goto next point* when the paper feel loose, which gets the compensation a little too loose so I compensate that in Slic3r with "Z offset" (in Printer Settings) set to `-0.05`.
When probing and `MESH_HOME_SEARCH_Z` set at 4 the Z endstop is considered being at 4 mm and it is possible to search downward (yes, this will press on the Z endstop unless it is an opto) to 0. It might be possible to have the endstop below the bed, but I think the traveling between the points need to change as it will travel on the endstop level between the probe points, so an extra lift might be needed.