MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.18k stars 19.22k forks source link

Average multiple z-probes for actual z-home location #24561

Open 3dprinteruser942 opened 2 years ago

3dprinteruser942 commented 2 years ago

Is your feature request related to a problem? Please describe.

Hello all, I print using a heated chamber but need to use a bltouch to level my print bed. I followed the pictures in this reddit post and moved the brains of my bltouch outside the enclosure. https://www.reddit.com/r/3Dprinting/comments/jj0s9r/comment/hpp845a/?utm_source=share&utm_medium=web2x&context=3 The bltouch now does not have any failures in the 60°C chamber, however it now probes the bed distance in a range of about .075, all the time, not affected by temperature. I found that by running M48, the max and min of the sample of probes is still extremely consistent.

I would like to be able to run M48, or any command, and take a sample of probes, then average the max and min of that output and use that for my homing location in replace of G28.

This would let me get precise homing in my heated chamber using the bltouch. I have attached a screenshot of the output from running M48 with 14 probes each time.

Min and max data typed out: -.076 .001 -.069 .006 -.068 .007 -.069 .012 -.065 .009 -.066 .012 -.059 .009 -.062 .011 -.061 .011 -.063 .012 -.064 .014

Any help is extremely appreciated.

System: Ender 3V2 with V4.2.2 board and V3.1 bltouch

Are you looking for hardware support?

No response

Describe the feature you want

Make another command similar to G28, but make it take multiple probes of the bed and average the minimum and maximum readings to get the z-home location.

Additional context

image

jmding8 commented 1 year ago

+1 vote for this. I have a lot of issues with inconsistent z-homing results. 95% of the time, it's good enough. But 5% of the time, its way off (usually, nozzle way too low). I have swapped main boards multiple times, swapped endstops multiple times, and have experimented with firmware noise filtering, none of which have helped.

I am certain that taking the mean (or better yet IMO, the median) of multiple z-home measurements would solve my problems.

Note that I am not using UBL or any other form of mesh compensation.