Before I start I want to thank “UnLtdSoul” for his contributions to “CNC leveling” a few years back. I looked at his mods to Marlin, but they no longer worked with the latest release 1.1.9. I always thought this should be possible, his work showed me where to start. Thank you!
As many of you know Marlin has the ‘bed size’ hard coded in ROM in configuration.h. G29 would only work with those values, and it also no longer accepted X and Y inputs in ver 1.1.9. I modified the behavior of G29 as follows: Allow X and Y inputs to specify how many points to sample in x and y planes, and also to specify the size of the work piece using the L, F, R, B input parameters. I also added a new gcode command; G24, which makes the machine think it’s been homed. This allows machines without endstops to do ‘bed leveling’.
I posted a video on the Facebook V1 forum and I posted files there as well. I’ll post files here too. In the video I show a vbit making a perfect large circle with one side of the work raised by half an inch.
- position router either manually or with controls or with gcode in your file.
- G90 ; absolute positioning
- G21 ; metric mode
- G24 ; psuedo ‘home’ command (no motion)
- M0 Connect Touchplate ; message and pause to user
- G28 Z ; home to your touchplate
- G92 xx ; set xx=your touchplate height
- M0 Begin Level Probe ; message and pause to user
- G29 S5000 X5 Y5 L10 F10 R350 B425
; S5000 is the speed to move point to point
; sample X5 and Y5 points (25 points total)
; left front position of workpiece 10,10
; right back position of workpiece 350,425 (substitute your values)CNC-Marlin-Level-mods.zip (129.7 KB)
- M500 ; save the mesh
- M420 S1 ; turn on leveling
- M0 Remove Touchplate ; message and pause to user
- Turn on router/spindle and insert your project gcode here