Skip to content

How to run Real Time Level

Mark edited this page Jan 21, 2025 · 41 revisions

Note

1. This feature only works with the BDsensor and Z motors are connected in the same MCU.

2. Install the sensor coil as close as possible to the nozzle in the X/Y axis.

3. the Real Time Level and the mesh bed level are different and they cannot work together.

4. Be careful,if you first use this feature, and make sure the BDsensor has been calibrated with the plate, the wrong z_offset or others may cause the PEI plate damage.

For Klipper:

  1. Test First:
G28
BDSENSOR_SET REAL_TIME_HEIGHT=0.3
G1 Z0.2

For changing the distance between nozzle and bed you can press the bed plate or the x carriage with different pressure with hand, then you can see the z axis will move up and down automatically.

  1. Edit the gcode in your slicer:
  • Disable the auto leveling by removing the BED_MESH_CALIBRATE and adding BED_MESH_CLEAR in the start gcode.
  • Enable the Real Time Level at the start of first layer BDSENSOR_SET REAL_TIME_HEIGHT=0.3 and disable it after first layer BDSENSOR_SET REAL_TIME_HEIGHT=0 For example, adding 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}BDSENSOR_SET REAL_TIME_HEIGHT=0.3 {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

  • Recommend to setting the first layer speed <= 50mm/s.

Tip

Error:Timer too close

You can fix this problem by increasing the value of rt_sample_time(this is the sample time of the Real_time_level while printing),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 low. Here are the default value for different speed MCU:

MCU Freq: default rt_sample_time
above 100MHz 11ms
60MHz~100MHz 16ms
<60MHz 19ms

Tip

Please set the z_offset to 0 after calibrating the bdsensor.

if you want to modify the z_offset, please modify it in the printer.cfg and not recommend to adjust the z_offset while printing.

For Marlin:

https://github.com/markniu/Bed_Distance_sensor/wiki/Installing-Bed-Distance-Sensor