Skip to main content

Collision Sensing in Marlin

info

This feature requires the BD sensor firmware version (you can obtain this version by sending M102 S-1, not the hardware version on the sensor) to be V1.1b, greater than V1.2b, or purchased after March 2024; otherwise, you will need to use an external hardware tool (such as STlink) to flash the firmware into the BD sensor.

How It Works

  • Automatically performs Z-axis offset calibration during execution of G28: can be triggered after homing (when the nozzle touches the bed) — then slowly moves upward until the nozzle just clears the bed — sets this position as the Z-axis zero point.

Benefits

  • Automatic Z-axis offset calibration.
  • You can still manually adjust the Z-axis offset for different filaments.
  • Compensates for thermal drift.
  • Thermal drift changes the Z-axis offset but does not affect the bed mesh height map range with the BD sensor. This means the bed mesh remains consistent even at different temperatures.
Tip

The code for this feature is available in the official Marlin GitHub pull request list: https://github.com/MarlinFirmware/Marlin/pull/27243 So please use the following Marlin code: https://github.com/markniu/MarlinPULL/tree/bugfix-2.1.x

How to Use

Enable BD_SENSOR and add #define BD_SENSOR_CONTACT_PROBE in configuration.h It should look like this:

#define BD_SENSOR
#if ENABLED(BD_SENSOR)
#define BD_SENSOR_PROBE_NO_STOP // Probe bed without stopping at each probe point`
#define BD_SENSOR_CONTACT_PROBE // it uses nozzle collision sensing to probe while homing`
#endif
  • Increase the probing speed in configuration.h.

  • Sensitivity depends on speed, so you need to adjust the Z-axis speed.

  • homing_speed (homing speed) and second_homing_speed (second homing speed) should be within the range of 3 to 10; these are the Z-axis probing feed rates.

  • For example:

 #define Z_PROBE_FEEDRATE_FAST  (5*60)
#define Z_PROBE_FEEDRATE_SLOW (5*60)
  • Increase the homing retraction lift distance of the Z-axis to more than 4 millimeters in Configuration_adv.h.
#define HOMING_BUMP_MM      { 5, 5, 5 } 

Test Homing

  • Please send approximately 10 G28 Z commands, or use the M48 command, to check its stability.
Demo Video
Loading...
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -