Strain Gauge/Load Cell based Endstops

Ok, I seem to have gotten stable calibration and probing behaviors so its demo time. @MFBS, here is my chicken :chicken: :poultry_leg:

Even without the linear regression code to pinpoint the triggering time I can get really good results from PROBE_ACCURACY at 1mm/s: (note: this printer has a custom belt reduction + ball screw Z axis, not the stock tool changer one)

PROBE_ACCURACY PROBE_SPEED=1 SAMPLES=10 SAMPLE_RETRACT_DIST=3
PROBE_ACCURACY at X:200.000 Y:125.000 Z:4.623 (samples=10 retract=3.000 speed=1.0 lift_speed=5.0)
probe at 200.000,125.000 is z=1.613229
probe at 200.000,125.000 is z=1.612639
probe at 200.000,125.000 is z=1.612639
probe at 200.000,125.000 is z=1.614410
probe at 200.000,125.000 is z=1.612049
probe at 200.000,125.000 is z=1.612639
probe at 200.000,125.000 is z=1.614410
probe at 200.000,125.000 is z=1.615000
probe at 200.000,125.000 is z=1.615590
probe at 200.000,125.000 is z=1.615000
probe accuracy results: maximum 1.615590, minimum 1.612049, range 0.003542, average 1.613760, median 1.613819, standard deviation 0.001194

At 5mm/s its, of course, worse:

PROBE_ACCURACY PROBE_SPEED=5 SAMPLES=10 SAMPLE_RETRACT_DIST=10
PROBE_ACCURACY at X:200.000 Y:125.000 Z:11.717 (samples=10 retract=10.000 speed=5.0 lift_speed=5.0)
probe at 200.000,125.000 is z=1.625625
probe at 200.000,125.000 is z=1.619132
probe at 200.000,125.000 is z=1.616181
probe at 200.000,125.000 is z=1.614410
probe at 200.000,125.000 is z=1.610868
probe at 200.000,125.000 is z=1.627986
probe at 200.000,125.000 is z=1.618542
probe at 200.000,125.000 is z=1.622674
probe at 200.000,125.000 is z=1.623854
probe at 200.000,125.000 is z=1.613229
probe accuracy results: maximum 1.627986, minimum 1.610868, range 0.017118, average 1.619250, median 1.618837, standard deviation 0.005383

The triggering force is set at 50g and can be adjusted from the config. It takes some number of ms for the trsync to stop the motors so the peak force seen is 75g when probing @ 1mm/s and 120g when probing at 5mm/s. But this seems very gentle on the printer which was the goal. The config looks like this:

#####################################################################
#   ADS1263
#####################################################################
[ads1263]
spi_bus: spi3
cs_pin: SPI3_CS
gain: 5         # Gain = 32 (max)
sample_rate: 8  # 400 Hz

#####################################################################
#   Load Cell & Load Cell Endstop
#####################################################################
[load_cell]
sensor: ads1263
is_probe: True
z_offset: 0.0
counts_per_gram: 71968
trigger_force_grams: 50.0

Code updated: GitHub - garethky/klipper at adc-endstop
There is still a long way to go to a safe an accurate system:

  • Improvements are needed for calibration, usability and safety.
  • Incorporating the HX711 sensor
  • Incorporating linear regression to find the exact time of contact.
  • Incorporating a high pass filter as seen in Prusa’s implementation

I’m working with @D4SK and @etotheipi on these topics.

One major roadblock in all this has been noise and reliability. I seemed to have solved this by using the 5V regulator on the Octopus board and adding a 330uF filtering capacitor. Using a dedicated PSU reduced the noise but I got weird spikes and sensor reboots (which are now detected and shut down the MCU for safety).

If you are looking at making boards for this application, please pay attention to power filtering! Just throwing a sensor on a PCB is not enough. This capacitor took the noise down from at least 20g to less than 1g. Smaller caps did nothing. Ti has a board design guide in their manual.

4 Likes