Accurate presence sensor (0.5 - 10 mm) for Uno recommendations

Hi, everyone. I'm working on a project at work and would like some recommendations. I need to detect presence of a part at a relatively close range (0.5 - 10 mm) accurately. My HRC ultrasonic is catching noise from the requited cable length and the eventuality of part motion as it is placed in the fixture. The part I am trying to sense is a roughly 100 x 75 mm tyvek package (white it color, with black printing on it), so.... not a uniform surface. All in all, I'd like an upgrade. What I'm looking for is a fast, accurate and consistent signal. Any recommendations would be happily welcomed! Thank you all!

A Raspberry Pi with an AI camera, or maybe better, a SEEED Studio ESP32 camera with AI.

Link?

A proximity detector detects proximity. SO you will need to arrange the delivery process so unwanted items are kept away, or disable the detector until the package is in place.

Depending on the conditions an optical sensor should be able to be made to work reliably. This is an example but you would need better electronics

I would use a time of flight sensor, rather than any ultrasonic sensor, like this one: Time of flight sensor

Arduino have recently introduced the Modulino range of sensors.

Have look at the Modulino Distance sensor.

You would want an accuracy of at least +/-0.05 mm and I don't think you will find one.

Thanks for all the suggestions, everyone! I'm going to give the Modulino a shot, first. Because Production Supervision is asking for this, scope has changed again... I'll need to detect both the Tyvek target as well as being able to detect the component in the packaging as well (before it's packaged). The component is an eye-dropper bottler (about the size and shape as a visine or cleareyes bottle), but it is not opaque and filled with clear liquid. I'm going to aim for the cap for detection. I'll let you all know how it goes and post pics/vids of the tester tomorrow. I'd appreciate your input. The Reader's Digest version is I'm using a Nema 23 Stepper to extend a rack via a pinion with a compression force sensor sandwiched in between the rack and and a piece that will push on the bottle. The point is to check if bottles are leaking. The sensor triggers the system to start. I'll try to attach a pic of it in the early stage here for context. I still need to secure the packaging and program the LCD for counting. Also, I've changed the 'Pusher' geometry to cradle the part so it doesn't slip around. Green light means minimum force threshold was met, staying red means it wasn't. I've recently update the program to have the LED stay dark until force is sensed. If the min force is not met in 1.5 seconds, the led blinks red and 8-bit NES Super Mario death tune plays. If the threshold is met, the '1-Up' tune plays as the light goes green. Figured I may as well have some fun...

have a look at Pololu proximity-sensors-and-range-finders

I have used TOF sensors in various applications

may give you some ideas

Maybe do the squeeze and monitor the rack position?  If rack goes past a defined point it signifies an empty bag.  This could be as simple as a microswitch on the fixed side actuated by the rack.

.02

Good idea, Doug. If I need to simplify, that's what I'll do but as of right now, I need a quantifiable output for data collection. Force seemed like a good place to start, but I suppose I could figure force from distance if I needed.

In only has an accuracy of +/- 7mm. Seems totally useless.