Looking for a distance sensor

Hello all,

I'm looking for a distance sensor to be used in a situation where I need to mesure the distance from the sensor of an object moving toward or away from it without noticeable lateral movement (and I don't want to measure it anyway). The object is always different but all possible combinations are showing an almost flat square surface of 20 centimers side and cannot be tempered with so the sensor has to work on its own.

With this measurement, I want to give feedback (visual, audible, to a supervisory system...) of that distance considering that anything closer than 5 centimeter is considered "too close" and anything farther than

200cm (approximately) is considered "too far".

I don't need great precision, and if I was to use an ADC for reading the analog value, 8 bit would be enough giving me a resolution of roughly

1cm. Note that I would prefer a linear sensor but it doesn't have to be. For instance, it could be that the greatest precision is obtainable between 5 and 100cm (80% of values for instance) and less precise farther than 100cm. I would need however to distinguish between the "too close" and "too far" states.

As the system will have to run on batteries in most installations, I would like it to consume as little energy as possible with the possible help of microcontroller turning it on and off on a regular basis. Having a microcontroller on the board is almost granted for the whole system to work, so it should not be a problem to add the management of the sensor.

For this kind situation, I know of laser, infrared and ultrasonic sensors but I'm not sure what would be best suited considering the "low current" requirement. Nor do I know if there is a better kind of sensor.

So if anything comes to mind to anyone, please do not hesitate to point me in the right direction.

Regards

Reply to
OBones
Loading thread data ...

On a sunny day (Sat, 02 Oct 2010 13:45:12 +0200) it happened OBones wrote in :

Would it not be much simpler to have that object break a light beam for alarm? So measure diagonal?

Reply to
Jan Panteltje

Seems like an ultrasonic transducer ought to do OK at such short range.

Speed of sound is ~340m/s so for 1cm precision on a round trip you need to be able to time with better than 60uS resolution. A PIC run on a watch crystal at 32kHz takes next to no current and would give you a raw CPU timing resolution of 1/8192s or ~2cm. You might be in trouble seeing an echo if the target is soft and furry.

Regards, Martin Brown

Reply to
Martin Brown

We'd need to know a lot more about the constraints of your situation: When I google "Laser Rangefinder" WITH quotes, I get "About 259,000 results", but that's only one method and, of course, your objects would have to reflect enough laser light for it to work at all, and I don't know what the limits of their range are - a foot is one nanosecond by LIDAR. ;-)

Good Luck! Rich

Reply to
Rich Grise

I want to have a feedback of how close, how far it is so that, for instance, I can use a bicolor led that displays a shade of its possible colors according to distance.

But you are right that if I wanted to have a "too close" indication only, breaking a barrier would be easier

Reply to
OBones

let's see: measure distance to a surface 20cm on a side distance is 5 to 200cm runs on batteries

Sounds like a perfect job for a Basic Stamp. They sell an ultrasonic sensor that is designed to interface w/the various stamps (and other microcontrollers)

Reply to
lektric.dan

Ultra-sonic sensor, used them to protect a remotely controlled vehicle.

Reply to
Sjouke Burry

Fair enough, "short range" was more like subcentimeter for me.

Well, sensing a cat being undesired, that is actually perfect if it is being ignored.

Thanks for the pointers

Reply to
OBones

One way.

Reply to
who where

OK, two nanoseconds!

But there's also ultrasonic, but what are we sensing? Will the object reflect well? Should there be two US pingers to triangulate the object? Or for that matter scanning LIDAR?

I wish I had a mental picture - it sounds like there's some kind of object coming down some kind of conveyer belt, but we don't know what object, how big it is, or any of its characteristics.

Where's the Original Poster? Hey, you! What does your object, and the measuring environment, look like?

Thanks, Rich

Reply to
Rich Grise

Well, I would like a quite versatile solution, but I do understand the object surface makes a big impact on the choice of sensor. The sensing will be done in air, at room temperature most of the time and the objects would most likely be plastic boxes so that they reflect sound quite nicely.

Using a LIDAR seems a bit "dangerous" as there will most likely be humans in the vicinity when the device operates.

Reply to
OBones

So will everything else (though won't be moving). I wouldn't think measurement accuracy would be all that great.

Why?

By chance have you checked out the SiLabs optical position sensors? They stopped by a few weeks ago and gave me some cute USB demos. I'm not sure what I'd use them for, but they've been fun to play with. ;-)

formatting link

Reply to
krw

formatting link

Does that qualify as LIDAR? I would kinda think so, or maybe IRDAR. ;-)

I just thought of the Polaroid ultrasonic rangefinders for autofocus.

A couple of them, and a little compute power, should get what you want - once I worked with a guy who built robots, and he had one called "Newton," which was like a 2.5' tall version of R2D2; it had two ultrasonic pingers that were very much like those polaroid things - do a websearch for "ultrasonic rangefinder," and you'll get ... "About 3,910 results" ;-)

Cheers! Rich

Reply to
Rich Grise

formatting link

LIDAR uses coherent light, no?

Maybe. Every ultrasonic focusing system I've ever used was easy to confuse, though. ...to the point that it was useless for anything with a large lens.

IME, they don't work very well.

Reply to
krw

No kidding. I've seen systems go crazy from air currents in a room.

--
Politicians should only get paid if the budget is balanced, and there is
enough left over to pay them.
Reply to
Michael A. Terrell

I don't need great precision anyway.

Well, having the laser being looked at directly could cause permanent eye damage.

formatting link

They sure look nice, but the range is a bit too short and current requirements are quite high. Thanks for the link, though, it might prove useful in other situations.

Reply to
OBones

I suppose you could hack one of those laser rangers sold in DIY stores...

=== "Well, sensing a cat being undesired, that is actually perfect if it is being ignored."

We bought a cat flap which reads our clan's microchips. Can be quite funny watching neighbours' cats haplessly throwing themselves against the flap. Just have to keep spare AA batteries handy as the lock 'fails open' when the power runs out...

--------------------------------------- Posted through

formatting link

Reply to
Nik

Missing the object or being confused by background wouldn't be good, I assume.

A few lasers are used in industry without blinding people. It's possible. ;-)

formatting link

The range is pretty impressive, but not all that reliable.

Fun toys. They were really designed to be an alternative to cap-sense for things like sliders (page turners in Kindle sort of appliances).

Reply to
krw

A WHOLE BUNCH of lasers are used at checkout counters. They're the ones that scan the UPC barcode so that the Mexican checker doesn't have to read, or know any math, or anything.

Cheers! Rich

Reply to
Rich the Cynic

Are you looking at the same thing all the time? Can you paint some sort of image on it and do a video capture. The size of the image could then be turned into a distance.

George H.

Reply to
George Herold

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.