Bed_Distance_sensor
Bed_Distance_sensor copied to clipboard
Kippler support
Any chance you add Kippler support?
Seems will wait for more time, Since I am not familiar with klipper and python, also try to looking someone help to supporting.
hi there,
working on klipper support for the sensor but cant even connect the probe for any reason. Its connected to the raspebrry PI`s I2C connector but i2cdetect cant find the device.
PI SDA -> Sensor SDA PI SCL -> Sensor SCL PI GND -> Sensor GND PI 5V -> Sensor 5V
I2C is working
device seems to work, i can see the LED when putting some metall piece to the sensor
any idea?
The device has a 5V VIN, but does the device uses a 3.3V or a 5V I2C connection. Cant find any information on it
I tried it with an Arduino I2C scanner nd found this
if the device is connected to the arduino it returns an derror for these addresses
Unknown error at address 0x51 Unknown error at address 0x54 Unknown error at address 0x57 Unknown error at address 0x5A Unknown error at address 0x5D
there is a different from the standard I2C. See this timing diagram of this sensor https://github.com/markniu/Bed_Distance_sensor/blob/main/doc/images/0220517153950.png , for increasing the speed, there is no I2C address transfer in the timing diagram that's the difference from the standard I2C.
There is a library for the arduino: markyue/Panda_SoftMasterI2C
for example add
lib_deps =
markyue/Panda_SoftMasterI2C
in the platformio.ini
ok, thank you
The device has a 5V VIN, but does the device uses a 3.3V or a 5V I2C connection. Cant find any information on it
this device is 5v I2C connection,but can work with normal 3.3v MCU like stm32 which most gpios are 5V tolerate
nice it works, getting the first readings. will play a bit with it and let you know when i need more infos
nice it works, getting the first readings. will play a bit with it and let you know when i need more infos
look forward to
Python module finished :-)
https://www.youtube.com/watch?v=nbHTrJHoE-k
wow, nice work!
Thats not good. I just realized that this sensor will most likely not be supported by klipper naytime soon. Problem is the unusual I2C communication the sensor uses. We cant use the inbuilt I2C micricontroller code from klipper to connect to the device, a microcontroller implementation just for this sensor seems unlikely to be approved by the klipper mantainers. So a real implementation is not likely.
is it possible to change the firmware of the sensor to use standarized I2C communication?
it can not be flashed firmware from the i2c port. and the reason for not use standard I2C is that we need quik response of the sensor when homing z axis. maybe we can add the softI2C code of this sensor to the klipper.
i am trying to implement it atm
Can BD sensor data be read with klipper now?
yes, on a microcontroller level
good job ! I am editing the wiki document about the calibration that maybe you needed
yes, working on the calibration, having also some questions. will ping oyu in the nbext days
Have updated the document which contains the calibration process. https://github.com/markniu/Bed_Distance_sensor/wiki/Data-Protocol
Hi @HelgeKeck @markniu, may I know what are the configs for Klipper implementation?
I was wondering, could we simply use a MCU to connect the sensor to klipper, like we can do with the ADXL345 sensor (for resonance compensation)? Would it solve the issue with the unusual I2C protocol, or would it be too slow to react?
@JayBee-git I was also thinking the same but not sure how Klipper will read the data from sensor. I'm also looking into it.
@ashbuilds true, I know serial can be used in klipper but that would probably require to change some code. BLtouch is going through the printer motherboard which is a MCU as well, so I bet there is something that can be done here. Maybe even connecting the BDTouch to the motherboard could work?
The output of the TCA 305 sensor chip is a simple open drain already. What is the point of using a custom protocol with a micro controller here instead of simply exposing the output of the sensor directly? I am sure you have good reasons @markniu but it would be nice if you could explain them.
There is a progress for Bed Distance sensor working with klipper:
can display the distance value on screen, homing, and still need some work for the probe, calibration ...
the BDsensor is connected to mainboard not RaspberryPi, It's not recommend to connect to RaspberryPi for there maybe a sync problem while homing.
Awesome! Really very interested in this. Does it work with a pei bed surface being magnetic? I have glass ATM. But thinking about getting pei.
Awesome! Really very interested in this. Does it work with a pei bed surface being magnetic? I have glass ATM. But thinking about getting pei.
yes, I also test with the pei + steel + magnet on the bed
There is a progress for Bed Distance sensor working with klipper: can display the distance value on screen, homing, and still need some work for the probe, calibration ...
the BDsensor is connected to mainboard not RaspberryPi, It's not recommend to connect to RaspberryPi for there maybe a sync problem while homing.
Have you any news about bd sensor on klipper?