detecting distance cheaply

Hi all,

I'm working on a project and I've come into a problem that has had me thinking for weeks. I need to find a way to safely detect distance, ~0-3 cm away, without much error. this is a lot to ask, but I'm fine spending 50 dollars on something like a laser if you can help me make sure it can detect distance. also, it can't touch the surface in anyway. if you have any ideas, shoot a message my way!

thanks,
Coolzoe

"Distance" is an abstract quantity that is actually not detectable.

An object can be detected by a sensor, and the distance from the sensor to the object can be measured.

Please describe the object(s) to be detected and define "without much error".

the ultrasonic sensor maybe....

do you need to know exactly between 0 to 3cm (1.48cm for example) or to just know something is there between the 0 and 3cm...

what exactly are you making? is it stationary or portable? if its portable and you need precise mesurment a tape measure works pretty well

okay, so maybe not enough information was given, but thanks for the replies. the sensor should be able to get an excavate number, and it would be on a moving platform, going up and down as well as forwards and backwards. in terms of 'not much error', I meant not having drift stack up, so instead of starting with a number and adding or subtracting the detected change in distance, just giving the distance every time it is used.

What is an "excavate number"?

Ultrasonic sensors return the distance to the object that reflects the sound, with an accuracy of typically +/- 1 cm.

Most ultrasonic distance sensors don't work for distances below some minimum value. For the HC-SR04, this is typically 3 cm.

Consider the Sharp IR distance sensors.

Question.. when you say detect do you mean measure the distances between 0 and 3 cm. Or detect a single point in the range of 0 to 3 cm?

how about a stick of a known length (say, 3cm) and a tactile button. Would be very cheap and accurate.

Have you looked at TOF lasers? They are relatively inexpensive and they really don't care if the platform is moving, only that it is pointed at the target.

Here is one of two TOF units that Adafruit has VL6180
If that sparks your interest but want a little bit "more", try Digikey.

oztechlab:
Hi all,

I'm working on a project and I've come into a problem that has had me thinking for weeks. I need to find a way to safely detect distance, ~0-3 cm away, without much error. this is a lot to ask, but I'm fine spending 50 dollars on something like a laser if you can help me make sure it can detect distance. also, it can't touch the surface in anyway. if you have any ideas, shoot a message my way!

thanks,
Coolzoe

Distance from what? From an object? If so ..... what sort of object? Size, dimension, shape, material properties.

tinman13kup:
Here is one of two TOF units that Adafruit has VL6180
If that sparks your interest but want a little bit "more", try Digikey.

Checked it out. That little device looks like a big piece of the puzzle for a project of mine. It eliminates at a stroke half a dozen alternative approaches I was toying with. Thanks!