Creality 3D Printer
To make bed leveling quick and accurate I printed a holder for this very cheap but excellent quality DTI.
The DTI is fitted to the holder and pushed on the the fan housing. The code is selected from the SD card and it will first heat up the bed and nozzle to operating temperature (if required) and then home the bed and pause whilst the height is set with a slip of paper between bed and nozzle.
After a delay the Z axis rises and then descends onto the bed and the DTI is set to zero.
After a pause it then moves to each corner in turn and the bed adjusting screw is turned until the DTI reads zero.
It then returns to to the home position, rises and the DTI can be removed ready to print.
I have printed these leveling knob attachments and they make adjustment very easy, no more fumbling around under the bed.
Link to the DTI which the bracket fits. https://goo.gl/YexD6u
I don't claim originality for the idea which came from one I saw here. I have tweaked the code a bit and designed a purpose made holder to suit the the DTI The DTI is easily removed so it can be used for other purposes but it is so cheap it can remain permanently fitted to the bracket.
I found it best to level the bed when it is up to operating temperature but 2 codes are shown below, one for hot bed leveling and one for cold.
VIDEO
Here is the code to make the machine travel to each corner for adjustment.
Copy and paste into a text editor and save it as :Bed alignment.gcode
Copy to your micro SD card and run in the same way as doing a print.
M190 S60 ;heat bed to 60C
M104 S195 ;start heating extruder to 195C
M109 S195 ;wait until extruder reaches 195C
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;set fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
G4 P20000 :wait 20 seconds to set first corner with paper slip
G1 Z25.0 F9000 ;move bed to clear indicator
G92 E0 ;zero the extruded length
G1 F9000
M107 ;set fan off
;Move DTI to each corner in turn
G0 F3500 X10.000 Y60.00 Z10.000
M117 ;zero DTI
G4 P10000 ;wait 10 seconds to set DTI to zero
G1 X280.000 Y300.000
G4 P10000 ;wait 10 seconds to adjust bed
G1 X280.000 Y60.000
G4 P10000 ;wait 10 seconds to adjust bed
G1 X10.000 Y300.000
G4 P10000 ;wait 10 seconds to adjust bed
G1 X10.000 Y60.000 ;return DTI to start position
G4 P10000 ;wait 10 seconds to adjust bed
M107 ;set fan off
G0 F9000 Z25
;End GCode
M104 S0 ; set extruder temperature off
M140 S0 ; set bed temperature off
M84 ;disable steppers
If you want to adjust with a cold bed use this code:
Save the file as above and save it as: Cold bed alignment.gcode
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;set fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
G4 P20000 :wait 20 seconds to set first corner with paper slip
G1 Z30.0 F9000 ;move bed to clear indicator
G92 E0 ;zero the extruded length
G1 F5000
;Move DTI to each corner in turn
G0 F3500 X10.000 Y60.00 Z10.000
M117 ;zero DTI
G4 P10000 ;wait 10 seconds to set DTI to zero
G1 X280.000 Y300.000
G4 P10000 ;wait 10 seconds to adjust bed
G1 X280.000 Y60.000
G4 P10000 ;wait 10 seconds to adjust bed
G1 X10.000 Y300.000
G4 P10000 ;wait 10 seconds to adjust bed
G1 X10.000 Y60.000 ;return DTI to start position
G4 P10000 ;wait 10 seconds to adjust bed
G0 F9000 Z25
;End GCode
M104 S0 ; set extruder temperature off
M140 S0 ; set bed temperature off
M84 ;disable steppers