# How to auto-zero the z-axis using a high-precision distance sensor?

**URL:** <https://forums.maslowcnc.com/t/how-to-auto-zero-the-z-axis-using-a-high-precision-distance-sensor/13609>\
**Category:** Technical Details\
**Created:** [June 3, 2020, 7:24pm UTC](https://forums.maslowcnc.com/t/how-to-auto-zero-the-z-axis-using-a-high-precision-distance-sensor/13609 "2020-06-03T19:24:08Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![zaneclaes](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/zaneclaes/32/16801_2.png) [@zaneclaes](https://forums.maslowcnc.com/u/zaneclaes)\
**Post date:** [June 3, 2020, 8:41pm UTC](https://forums.maslowcnc.com/t/how-to-auto-zero-the-z-axis-using-a-high-precision-distance-sensor/13609/10 "2020-06-03T20:41:08Z")

</div>

> [@emilecantin](#):
>
> we care about the **bit** ’s position

Ah. I haven’t dealt with many bit changes yet. But it seems to me that calibrating **once** when you change the bit and then having a “perfect” z-axis until you change the bit again is vastly preferable. I mean, it makes sense to me to calibrate when I change bits, and I’ve got my hands in there anyways. The problem I’m trying to solve for is the 99% of the rest of the time when I want a perfect z-axis without any fear of slippage or drift. This is a big [problem on the Rigid](https://forums.maslowcnc.com/t/cheap-fixes-for-z-axis-slop-on-the-ridgid-r22002/4031) btw… I’ve mostly fixed it but I still get a mm of drift or so per 30-60m.

Plus, this solution isn’t mutually exclusive to the touchplate. The secondary small Arduino running the zeroer could automatically find zero using this exact technique during the bit change, updating its constant offset value for the sensor distance… best of both worlds, no?

---

_[View the full topic](https://forums.maslowcnc.com/t/how-to-auto-zero-the-z-axis-using-a-high-precision-distance-sensor/13609)._
