# Strain Gauge/Load Cell based Endstops

**URL:** <https://klipper.discourse.group/t/strain-gauge-load-cell-based-endstops/2134>\
**Category:** Developers\
**Created:** [February 23, 2022, 5:15am UTC](https://klipper.discourse.group/t/strain-gauge-load-cell-based-endstops/2134 "2022-02-23T05:15:09Z")\
**Posts on this page:** 1\
**Showing post:** 211

<div class="post-metadata">

**Author:** ![garethky](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/garethky/32/956_2.png) [@garethky](https://klipper.discourse.group/u/garethky)\
**Post date:** [July 20, 2023, 6:32am UTC](https://klipper.discourse.group/t/strain-gauge-load-cell-based-endstops/2134/211 "2023-07-20T06:32:51Z")

</div>

😍 🔥

 ![Screenshot 2023-07-19 at 10.48.02 PM](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/4/408d0d23ef835b966264c3af911220f64a7b99e6.png)

- Black dots are samples
- Orange dot: the “elbow point”. Likely first point of the collision dataset
- Blue and green lines: least squares best fits of the pre and post collision lines
- Red dot: the estimated time when the collision started which is reported to klipper
- Yellow dot is the point where the endstop on the board triggered to stop the move
- Magenta dot is when klipper said probing ended.

Taken me more than a year to get here but these `PROBE_ACCURACY` results are just _nuts_ 🥜 🥜 🥜

```auto
// PROBE_ACCURACY at X:200.000 Y:125.000 Z:6.573 (samples=10 retract=5.000 speed=5.0 lift_speed=5.0)
// ...
// probe accuracy results: maximum 1.573681, minimum 1.570139, range 0.003542, average 1.572205, median 1.572205, standard deviation 0.001245

```

(sampled at 1200 SPS)  
That’s 1/2 the standard deviation of a switch probe at the same speed. It’s very close to a commercial CNC probe.

There is still room for improvement, especially on consistency between speeds and sample rates. I have at least 3 things left to try:

- alternate elbow finder from @D4SK
- 60Hz notch filter from SciPy to remove noise
- Using the `trapq` to [find when the Z axis stopped](https://klipper.discourse.group/t/capture-z-position-and-acceleration/9484/) so we can take advantage data points after probing ends.
- And maybe a 4th idea…

---

_[View the full topic](https://klipper.discourse.group/t/strain-gauge-load-cell-based-endstops/2134)._
