# Accurate distance measurements <1mm @ <10cm

#### Supuflounder

Joined Jun 5, 2020
5
I want fairly precise distance measurements over a small area, say 200mm x 200mm, accurate to <1mm (ideally ~0.1mm) measured from no more than 10cm away. Non-contact preferred. Grid size no larger than 2mm x 2mm, 1mm x 1mm preferred. I have seen precision contact switches which are threaded housings and claim 3 micron reproducibility, but the width and depth capabilities do not allow the grid precision or depth range capabilities we need. Our Z-axis motion resolution will be orders of magnitude less precise than this, closer to .03mm than the actual resolution of the touch sensor. We also assume that our sample is non-conductive. I am looking to build a 2 1/2D sensor that can measure a z-range of ~5cm with sufficient accuracy to produce a “point cloud” to a CAD system, from a “hand-cut” prototype so we can create casting molds for plastics, or vacuum-forming molds. The goal is to convert a 1-off prototype to produce small quantities of inexpensive research prototypes. We have access to injection molding and vacuum forming equipment but the tedious task of converting a 3D model (which is really a 2 1/2D model) with any precision is challenging. Current 3D scanning technology that is affordable lacks the precision we need. $15,000+ is far outside the research budget of two retired scientists who may have given up our jobs but not our curiosity. Assume that neither of us are intimidated by the idea of building a 2-axis or 3-axis CNC platform or accompanying software, we just are having problems coming up with a reliable sensor mechanism. Triangulation of laser beams has been rejected because shadowing effects of vertical faces would make it difficult to use. Low-resolution non-contact sensors can determine approximate depth, so if we have a physical probe we can back out far enough to keep the probe from scraping the uneven surface. TOF sensors are usually rated for minimum distances that are smaller than our maximum depth needs. #### Irving Joined Jan 30, 2016 1,064 You don't want much! What are you scanning? You've ruled out the two obvious options I've used. I've had moderately good results ~0.25 - 0.5mm with two, pref three, high-res (4k+) cameras at 60deg to each other and a strong light picking up the 'speckling' on the surface. Works better if you can spray the surface with a paint 'sputter' beforehand. Shadowing is always going to be an issue unless you can freely rotate the target... Thread Starter #### Supuflounder Joined Jun 5, 2020 5 Thank you. You are not the first person to suggest that my specs for something are somewhere between barely-possible or impossible to meet (I've been doing things like this for 57 years, and have somewhat of a reputation). The question becomes "What can I get that is good enough". I could probably acquire two 4K cameras for a reasonable price (the new RasPi hi-res camera might do the job). What I do with the stereo pixels to get the depth would be the next step. Suggestions of where I should look (I'm not afraid of image processing, but I've never tried to do 3D-from-two-images before and details like registration of the images and the fundamental data reduction are beyond my 2D experience). The next problem is that, having rotated the object, getting the second set of data integrated with the first. Pointers to Web sites, textbooks and/or references of any sort would be a great help. #### AlbertHall Joined Jun 4, 2014 10,542 #### panic mode Joined Oct 10, 2011 1,865 "TOF sensors are usually rated for minimum distances that are smaller than our maximum depth needs. " and what depth would that be? what is the material and type of surface? baumer electric has excellent distance sensors. my favorite optical sensor brand and i used them on countless projects (automotive, nuclear...). for example 16-120mm range and resolution better than 0.1mm, or 50-350mm range with resolution better than 0.2mm. should be about$1k or so. output can be 0-10V, 4..20mA or RS485.

or if you have XYZ mechanism (3D printer or CNC or whatever) and considered precision switch, but prefer contactless sensing,
you may also use their discrete output version of the laser sensor. this would be about \$250-300 and have pinpoint accuracy and very low hysteresis at some (teachable) fixed distance such as 50mm for example.

all of them are selfcontained (no separate head/amplifier), easy to interface, fast output (order of 1ms, not 30ms), high linearity, background suppression, practically uninfluenced by target color and material, small sensing cone, visible red dot on the target.
fast output means one can collect samples without pausing motion of the XY or XYZ mechanism.

one common application in automotive was to look at the end of the seat track while seat is moved back and forth. laser is looking at the back side of the track. on many car seats that is a rough and uneven edge (not controlled - stamped metal) so surface may be in various orientation from one seat to another. plus it is painted black, often high gloss.

another example is same product looking at machined and reflective surface of aluminum or steel, leather, plastic etc of any color.

the other option would be to use laser pointer (either dot or line) and high res camera for example.

then there is just camera and computer solution - take bunch of pictures from different angle (or record video) and then run some photogrammetry software to generate 3D model. but did not play with it yet so cannot speak from own experience.
https://all3dp.com/1/best-photogrammetry-software/

Last edited: