{"action":"created","issue":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/1619","labels_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/1619/labels{/name}","comments_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/1619/comments","events_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/1619/events","html_url":"https://github.com/MarlinFirmware/Marlin/pull/1619","id":61939766,"number":1619,"title":"Manual bed leveling + mesh bed leveling","user":{"login":"epatel","id":81102,"avatar_url":"https://avatars.githubusercontent.com/u/81102?v=3","gravatar_id":"","url":"https://api.github.com/users/epatel","html_url":"https://github.com/epatel","followers_url":"https://api.github.com/users/epatel/followers","following_url":"https://api.github.com/users/epatel/following{/other_user}","gists_url":"https://api.github.com/users/epatel/gists{/gist_id}","starred_url":"https://api.github.com/users/epatel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epatel/subscriptions","organizations_url":"https://api.github.com/users/epatel/orgs","repos_url":"https://api.github.com/users/epatel/repos","events_url":"https://api.github.com/users/epatel/events{/privacy}","received_events_url":"https://api.github.com/users/epatel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2015-03-16T01:44:41Z","updated_at":"2015-12-25T18:58:37Z","closed_at":"2015-03-21T22:39:42Z","pull_request":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/pulls/1619","html_url":"https://github.com/MarlinFirmware/Marlin/pull/1619","diff_url":"https://github.com/MarlinFirmware/Marlin/pull/1619.diff","patch_url":"https://github.com/MarlinFirmware/Marlin/pull/1619.patch"},"body":"Here is a **manual** way to configure a bed leveling combined with a bed level solution using a **mesh**.\r\nI 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.\r\n\r\nI 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.\r\n\r\nEnable 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?).\r\n\r\nThe 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. \r\n\r\nThis is what I get when measuring the bed I have (using 5x5 points) Pretty bad bed huh?\r\n```\r\n2.00  2.10  2.10  2.05  2.00 \r\n2.25  2.25  2.24  2.20  2.15 \r\n2.35  2.34  2.40  2.35  2.35 \r\n2.05  2.15  2.25  2.25  2.25 \r\n1.75  1.95  2.15  2.15  2.15 \r\n```\r\n\r\nBut 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.\r\n\r\n![img_2432](https://cloud.githubusercontent.com/assets/81102/6659331/9351005e-cb83-11e4-84fc-3b043cb29599.JPG)\r\n![img_2434](https://cloud.githubusercontent.com/assets/81102/6659334/ab0d0756-cb83-11e4-9338-5b882bb99137.jpg)\r\n\r\nThis image explain the bi-linear calculation pretty good. (from http://www.dspguide.com/ch23/7.htm)\r\n\r\n![bilinear](https://cloud.githubusercontent.com/assets/81102/6709750/f703323a-cd7b-11e4-89e5-36334f7917ee.gif)\r\n"},"comment":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/comments/167258375","html_url":"https://github.com/MarlinFirmware/Marlin/pull/1619#issuecomment-167258375","issue_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/1619","id":167258375,"user":{"login":"brainscan","id":2219672,"avatar_url":"https://avatars.githubusercontent.com/u/2219672?v=3","gravatar_id":"","url":"https://api.github.com/users/brainscan","html_url":"https://github.com/brainscan","followers_url":"https://api.github.com/users/brainscan/followers","following_url":"https://api.github.com/users/brainscan/following{/other_user}","gists_url":"https://api.github.com/users/brainscan/gists{/gist_id}","starred_url":"https://api.github.com/users/brainscan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brainscan/subscriptions","organizations_url":"https://api.github.com/users/brainscan/orgs","repos_url":"https://api.github.com/users/brainscan/repos","events_url":"https://api.github.com/users/brainscan/events{/privacy}","received_events_url":"https://api.github.com/users/brainscan/received_events","type":"User","site_admin":false},"created_at":"2015-12-25T18:58:37Z","updated_at":"2015-12-25T18:58:37Z","body":"Either use G29 or M501 to show the mesh points and then alter the z value to whatever you want. \r\n\r\nSent from my iPhone\r\n\r\n> On 25 Dec 2015, at 18:32, adamfilip <notifications@github.com> wrote:\r\n> \r\n> How do you know what X & Y each point is set too.?\r\n> If i wanted to choose alter specific point. I wouldnt know what XY location that point was at\r\n> \r\n> A\r\n> \r\n> —\r\n> Reply to this email directly or view it on GitHub.\r\n> \r\n"}}