Best method for precise distance measurement

Hi All, I need to detect distance fairly precisely (detect an object like my hand within 1/4" in the range of 1-24in), and I'm wondering what the best method to pursue would be. Here are the options that I'm aware of:

Ultrasound (via the Parallax Ping sensor, e.g.) IR emitter/detector capacitance sensing (via, e.g. the Capsense library) heterodyning (like a theremin)

I tried capacitance sensing, but even after I set it up with shielded cables and so on it doesn't appear to have the range or the precision or the stability I want.

In an ideal world, the sensor module would be precise, stable, have a light processor footprint, and if possible linear in nature.

Any ideas? I don't mind buying an IC to do the job, I'm just unsure where to go next with this.


I think your most likely success story will come from ultrasound, with IR coming in a close second at that range (it won't be as linear as ultrasound). It also depends upon the precise object you'll be sensing. Some objects reflect sound well, some don't, some objects reflect IR well, some don't.

I would also consider imaging, if you have the horsepower to do it and the thing you're looking for is fairly well recognized, stable in size and shape, and consistently illuminated.

Thanks for the advice. I tried heterodyne and phototransistor sensing, but couldn’t really get them to work for me. Finally I ponied up the $35 for a parallax ping. It was more money than I wanted to spend, but I can’t argue with the results-- it’s accurate, stable, and even linear.

Also, if you do pulse sensing with an external interrupt pin, the processor load is minimal.