# How to use a BLTouch or equivalent touch probe to 3D scan objects with a 3D printer?

I thought about using a BLTouch probe to do 3D scans of objects.

The objects to be suitable require smooth gradients and enough space for the probe, without anything hitting the print head/hot end.

What tools do I need to control the printer and obtain such data? are there GCodes scripts for that?

I would need to define a grid size, spacing, retraction, maximum expected height increase between adjacent points.

• Why am I thinking there's no way you're going to get the resolution out of a touch probe you'd need to actually scan an object? I mean, it's only used for one axis of the three, which is the z-axis. – Pᴀᴜʟsᴛᴇʀ2 Oct 5 '19 at 1:09
• If you define a mesh and you test each node, you can produce a map. Of course the issue is the lateral rigidity of the probe: the pin should not bend laterally when the surface is not parallel to the bed – FarO Oct 5 '19 at 12:05

I don't know the probe, but I have used a delta 3D printing machine (of my design) to scan a surface. It takes some time.

Your resolution will be limited by the probe geometry of the touch probe tip. You want a Z-probe function that reports the Z-value of the point, not that simply sets Z= when the probe "hits". The RepRap firmware has this in the G30 command.

You will need to write a loop that probes all points of interest. This is best done by writing a program (or script) that generates the G-code. I have a PERL script that generates the calibration mesh for my Delta machine, and I can share that with you.

I edit the script for the area to be scanned. This includes (in my case) the radius and the resolution. I then run the script to produce G-code to do the probing.

I send the G-code to the printer with Repetier-Host. Repetier-Host builds a log file of every character returned by the printer. The G30 command returns in the log the Z value wher ethe probe hit.

After the G-code is fully executed, I run a PERL script on the log file to extract the Z height of each of the probed points.

What you do with that data is up to you.

• I wasn't aware of G30. It does what I need, the rest of the procedure is as I had expected it. – FarO Oct 7 '19 at 8:06
• the resolution could be improved by using a very thin needle mounted to the tip of the probe to get better accuracy by having less probe area. The system relies on a very accurate set of stepper motors and making sure that the print head and bed have best no play on his axis. The process should be run slow to make sure there is no shivering in the bed. To get more than one side of the surface, multiple probings are needed, best with known turns between them. – Trish Oct 7 '19 at 15:14