Maker Pro
Maker Pro

Looking for a distance sensor

O

OBones

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
 
M

Martin Brown

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.

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
 
R

Rich Grise

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.

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
 
O

OBones

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

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
 
S

Sjouke Burry

OBones said:
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
Ultra-sonic sensor, used them to protect a remotely controlled
vehicle.
 
O

OBones

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

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

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.

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

Thanks for the pointers
 
R

Rich Grise


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
 
O

OBones

Rich said:
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.

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.
 
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.

So will everything else (though won't be moving). I wouldn't think
measurement accuracy would be all that great.
Using a LIDAR seems a bit "dangerous" as there will most likely be
humans in the vicinity when the device operates.

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. ;-)

http://www.silabs.com/products/opticalsensors/infraredsensors/Pages/default.aspx
 
R

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.

So will everything else (though won't be moving). I wouldn't think
measurement accuracy would be all that great.
Using a LIDAR seems a bit "dangerous" as there will most likely be humans
in the vicinity when the device operates.

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. ;-)

http://www.silabs.com/products/opticalsensors/infraredsensors/Pages/default.aspx[/QUOTE]

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
 
Does that qualify as LIDAR? I would kinda think so, or maybe IRDAR. ;-)

LIDAR uses coherent light, no?
I just thought of the Polaroid ultrasonic rangefinders for autofocus.

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.
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" ;-)

IME, they don't work very well.
 
O

OBones

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

I don't need great precision anyway.


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

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. ;-)

http://www.silabs.com/products/opticalsensors/infraredsensors/Pages/default.aspx

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.
 
I don't need great precision anyway.

Missing the object or being confused by background wouldn't be good, I assume.
Well, having the laser being looked at directly could cause permanent
eye damage.

A few lasers are used in industry without blinding people. It's possible. ;-)
They sure look nice, but the range is a bit too short and current
requirements are quite high.

The range is pretty impressive, but not all that reliable.
Thanks for the link, though, it might prove useful in other situations.

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

Rich the Cynic

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

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
 
F

Fred Abse

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.

On one trip to England, I went into an Aldi store (German-owned,
pile-'em-high-sell-'em cheap supermarket). No bar codes there, the
checkout clerk just keyed the items into the register at high speed *from
memory*!

No price tags on the merchandise, just on the pallets.

Ve haff vays ;-)
 
O

OBones

Rich said:
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.

Yes, but there is very low risk of having the beam straight into your
eyes because it is targeted at an area right in front of the register.

For measuring distance, you have to point it in a direction where there
might be someone in between. And that, depending on the power of the
laser, could prove dangerous.
 
O

OBones

George said:
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.

Alas, no, it's not the same thing and it can't be tempered with.
Would have been much easier indeed
 
O

OBones

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

Right, but I could "miss it" for a second or two without much risk.

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

Interesting. Must have to do with their power.
 
O

OBones

Jan said:
Just use 3 diagonal light beams interrupted by the 'thing'.
that gives you 3 levels for alarm, blue orange red if you like.
That system has been used many times.
Cheap and reliable.

I like that idea. Needs more installation steps but can be quite
interesting as a "low cost" option if I can't find a nice sensor
 
O

OBones

George said:
With a VISIBLE laser and power below 1mW your blink reflex saves your
eye before there is any damage. 1mW is about the same amount of power
as staring into the sun. So low power visible lasers can be used...
they are also cheap!

Ah nice, quite interesting.
 
Top