TCRT5000 for measuring distance

I need to measure short distances between 2-12mm. Basically I want to know how far an object is at all times. To do this, I have purchased an IR proximity sensor called TCRT5000. Does anyone have any experience with these sensors? Will they work for my application? If not, what are other suggestions.

Thank you

That is just an IR LED and IR Phototransistor in a single housing. From that you can get a indication that something reflective is present but it won't give precise distance information.

If you want a distance measurement you might want something like the Sharp GP2D120. It measures distance from 4 to 30 CM. I don't know if the range can be shortened any more and this is the shortest range model they make.

Any other suggestions? I need sensors with mm resolution.

Does it have to be a non-contact solution?

It does not need to be non-contact. Any ideas?

I think the term to search for is "displacement sensor" or "displacement transducer". This covers both contact and non-contact sensors. Be warned that they are not cheap. Even used on eBay the prices rapidly go up to $50.