This is a fork of the ADXL-Probe by jniebuhr to allow x and y homing with it, full credits go to the original project and the original license still applies
!!! This project is in a BETA state, use at your own risk !!!
The ADXL345 has an interesting feature called tap detection. With the appropriate tuning, this can be used to implement a nozzle probe on 3D printers. This project aims to support nozzle probing through tap detection for printers using Klipper.
You can watch this thing in action here: https://www.youtube.com/shorts/_qd0kMkrVZw
Results you can expect for a properly tuned system (This was on a Voron Trident):
probe accuracy results: maximum 0.007500, minimum 0.000937, range 0.006563, average 0.004031, median 0.004219, standard deviation 0.001841
I also measured the force on the bed using a standard kitchen scale, this was approximately 200g. A CAN bus board was used, so a direct connection might result in a quicker stop (See Multi MCU homing in the Klipper docs for more information on this).
cd $HOME
git clone https://github.com/LynxCrew/adxl345-probe
cd adxl345-probe
./scripts/install.sh
This code requires the ADXL int1 or int2 pins to be wired to one of your boards (preferrably the one that controls Z motion). For a ADXL345 breakout board, simply run a wire. If you're using a CAN toolboard, the following boards are supported as they have wired the pins:
Board | Supported | int_pin | probe_pin | Link |
---|---|---|---|---|
Mellow Fly SB2040 (v1/v2) | ✓ | int1 | gpio21 | https://aliexpress.com/item/1005004675264551.html |
Mellow Fly SHT36 v2 | ✓ | int1 | PA10 | https://aliexpress.com/item/1005004675264551.html |
Huvud | ✓ | ? | ? | |
NiteHawk | ✓ | int1 | gpio21 | |
EBB36 | with soldering | int1/int2 | choose |
This configuration must be below your adxl345 section.
[adxl345_probe]
probe_pin: <pin for either int1 or int2>
int_pin: int1 # select either int1 or int2, depending on your choice of wiring
tap_thresh: 12000 # this needs to be tuned
tap_thresh_x: 12000 # tap threshold for x homing, defaults to tap_thresh
tap_thresh_y: 12000 # tap threshold for y homing, defaults to tap_thresh
tap_thresh_z: 12000 # tap threshold for probing, defaults to tap_thresh
tap_dur: 0.01 # this needs to be tuned
tap_dur_x: 0.01 # tap duration for x homing, defaults to tap_dur
tap_dur_y: 0.01 # tap duration for y homing, defaults to tap_dur
tap_dur_z: 0.01 # tap duration for probing, defaults to tap_dur
speed: 20 # this needs to be tuned
z_offset: 0
# Adjust this to your liking
samples: 3
sample_retract_dist: 3.0
samples_result: median
samples_tolerance: 0.01
samples_tolerance_retries: 20
enable_x_homing: False
# Define whether the adxl probe should be used to home x
enable_y_homing: False
# Define whether the adxl probe should be used to home y
enable_probe: True
# Define whether the adxl_probe should register as a probe
log_homing_data: False
# Log accelerometer data to a file
stepper_enable_dwell_time:
# Time to dwell after enabling the steppers before homing
If you want to use the probe as endstops as well:
[stepper_z]
... your remaining config ...
endstop_pin: probe:z_virtual_endstop
[stepper_x]
... your remaining config ...
endstop_pin: adxl_probe_x:virtual_endstop
[stepper_y]
... your remaining config ...
endstop_pin: adxl_probe_y:virtual_endstop
Make sure to remove position_endstop
in this case.
In progress...
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.