This will gave you amazing first layers!
The printer adjusts the nozzle by measuring the distance in real time in 10ms ~ 20ms
Note: The BDsensor and Z motors must be connected in the same MCU board.
G28
BDSENSOR_SET REAL_TIME_HEIGHT=0.3
G1 Z0.2
You can see the z axis will move up and down automatically if you press the bed plate or the x carriage with hand.
Disable the auto leveling
Removing the BED_MESH_CALIBRATE
and adding BED_MESH_CLEAR
in the start gcode. Because the Real Time Level and the mesh bed level are different and they cannot work together.
Enable the Real Time Leveling
Enable it at the beginning of the first layer using BDSENSOR_SET REAL_TIME_HEIGHT=0.3
Disable the Real Time Leveling
Disable it after the first layer using BDSENSOR_SET REAL_TIME_HEIGHT=0
For example, add the following line in the orca slicer which is in the “Printer settings–>Machine G-code–>Before layer change G-code”
{if layer_num == 0}
G1 Z[first_layer_height]
BDSENSOR_SET REAL_TIME_HEIGHT=0.3
G4 P1000
{endif}
{if layer_num == 1}BDSENSOR_SET REAL_TIME_HEIGHT=0 {endif}
BDSENSOR_SET REAL_TIME_HEIGHT=xx
xx is the max z axis height that will do real time leveling automatically, here we just let this value the same as the first layer height in slicer setting.for example 0.2 or 0.3mm
Set the first layer speed < 50mm/s, that includes the print speed,travel speed,infill speed.
The reason is that MCU needs to read the data from the sensor and then adjust the z motors that will consume some cpu time and delay.
6.1 Error:Timer too close
Reason: This Real time level feature will create a new software task in the MCU to read sensor data and adjust the z motors.That task will consume some MCU time, if the MCU can not run fast enough or the printing is too fast, then it may cause this timer too close
. BTW, This task only runs in the first layer printing.
Solution: increase the interval process time( modify the value rt_sample_time ) and slow down the first layer print speed.
For example:
[BDsensor]
....
rt_sample_time:16 # ms
The value of rt_sample_time depends on the MCU speed, please increase this value if the MCU speed is too slow. Here are the default value for different speed MCU:
MCU Freq: | default rt_sample_time |
---|---|
above 100MHz | 11ms |
60MHz~100MHz | 16ms |
<60MHz | 19ms |
6.2 Error: shutdown: Invalid oid type
The reason is the sensor and the z motors are not connected in the same MCU. It’s not possible to read sensor data from the high level python then adjust z motors in real time during printing.
6.3 X/Y Motor noise in the first layer
The Real time leveling consume some cpu time in the MCU that will cause some delay to X/Y motors, then the XY motors may cause some noise in high speed printing in the first layer.