How to Install BDsensor on EBB36 CAN Board 3d Printer,klipper
by YueM2 in Circuits > Electronics
340 Views, 0 Favorites, 0 Comments
How to Install BDsensor on EBB36 CAN Board 3d Printer,klipper
Here is an example of how to install BDsensor on the EEB36 with USB connection
Supplies
Before you have install BDsensor on the EBB36, I assume you have installed/run the EBB36 before or have read the document of the EBB36 user menual.
Install Hardware
Hardware connection:
Probe | BDsensor
GND --> GND
5V --> 5V
PB9 --> CLK
GND --> GND
PB8 --> SDA
Install the Software of BDsensor
Clone And Install The Software Of BDsensor
cd ~
git clone https://github.com/markniu/Bed_Distance_sensor.git
./Bed_Distance_sensor/klipper/install_BDsensor.sh
Config Firmware
Compile and flash the firmware into the CANbus toolhead board which the BDsensor connected.
cd ~/klipper/
make menuconfig
Here I use the USB port instead of CAN port for the comunication while do menuconfig.
Different board has different configuration in the step make menuconfig and the setp of flash firmware , please read the document of the board from the factory, we didn't change any of that.
Compile Firmware
make
please make sure there is BD_sensor.o on there , else please check the step2
Flash Firmware
This step is also the same as the document from EBB36 factory
Configure BDsensor
Here is the example of the configure for my printer
please refere to Installing for Klipper · markniu/Bed_Distance_sensor Wiki (github.com)
Check Connection
Check the connection by M102 S-1. Here is an example of the return message
Send: M102 S-1
Recv: V1.0 pandapi3d.com
please check the connection and wire order if it return blank.
Calibrate
- Clean the nozzle
- Send command SET_KINEMATIC_POSITION Z=50 then move the Z axis down in the menu until the nozzle just touches the bed plate, the BDsensor will use this position as the zero position.
- Sending gcode command M102 S-6.
- After that you can check whether the BDsensor has been calibrated successful by M102 S-5 that will return the raw calibration data which stored in the BDsensor. If the first raw calibration data returned by the M102 S-5 is greater than 400, that means the sensor is mounted too high and needs to be remounted closer to the bed, the recommend value of first data is around 100. also make sure that the value of second data is greater than the first data by more than 10, else adjust the height of z and do calibarte again.
Check Accuracy
Move the z axis to 1mm after homing then read the distance value from BDsensor by M102 S-2, the returned value should be about 1mm too, e.g. 0.98~1.02mm.
G28
G1 Z1
waiting the toolhead stops then
M102 S-2
Check if the zero position is as expected by G1 Z0 after G28, if not please calibrate again.
G28
G1 Z0
Gcode Command for BDsensor:
BDSENSOR_VERSION # equals M102 S-1 , read the version of BDsensor
BDSENSOR_CALIBRATE # equals M102 S-6 , calibrate the BDsensor
BDSENSOR_READ_CALIBRATION # equals M102 S-5 , read the raw calibrate data
BDSENSOR_DISTANCE # equals M102 S-2 , read the distance value measured by BDsensor
BDSENSOR_SET # set value, now only for setting z_adjust, for example BDSENSOR_SET z_adjust=0.1