Ultrasonic verses infrared distance sensor comparison
-
- Posts: 26
- Joined: 12 Oct 2010, 08:19
Ultrasonic verses infrared distance sensor comparison
Hello,
A while ago I did a comparision test of an ultrasonic and infrared distance sensors. Each sensor was mounted to an NXT device about 30 inches from a wall. One test was done with the wall only. Another test was done with a rectangular block of wood about 10 inches away from the wall and 20 inches from the sensor. The block of wood was about an inch wide (in the direction of the scan). A slow scan was done with each sensor. Distances and angles were saved to a file and graphed in Excel. The resulting graphs are shown in the attached pitures. From the graphs it would appear that the ultrasonic sensor has about a 90 degree "field of view".The infrared sensor had a much narrower fleid of view.
Certainly the best choice will depend on the application. Hopefully this information will help to make a more informed choice.
Dave
A while ago I did a comparision test of an ultrasonic and infrared distance sensors. Each sensor was mounted to an NXT device about 30 inches from a wall. One test was done with the wall only. Another test was done with a rectangular block of wood about 10 inches away from the wall and 20 inches from the sensor. The block of wood was about an inch wide (in the direction of the scan). A slow scan was done with each sensor. Distances and angles were saved to a file and graphed in Excel. The resulting graphs are shown in the attached pitures. From the graphs it would appear that the ultrasonic sensor has about a 90 degree "field of view".The infrared sensor had a much narrower fleid of view.
Certainly the best choice will depend on the application. Hopefully this information will help to make a more informed choice.
Dave
- Attachments
-
- Wall only
- Distance without object.jpg (63.78 KiB) Viewed 13016 times
-
- Wall with object
- Distance sensors.jpg (65 KiB) Viewed 13016 times
Re: Ultrasonic verses infrared distance sensor comparison
This is really nice information.
Thanks.
Thanks.
My blog: nxttime.wordpress.com
-
- Posts: 6
- Joined: 08 Oct 2010, 19:06
Re: Ultrasonic verses infrared distance sensor comparison
did you pre-convert your data to compensate for the curve in distance
not good with words so i made a graph:
not good with words so i made a graph:
Re: Ultrasonic verses infrared distance sensor comparison
Thanks for sharing these results with us.
I'm having a bit of trouble interpreting your results. Could you provide us with some more information about your test layout?
Why did the US and infrared range drop to 0 at 90-100 degrees?
Why did the US range have the peaks at 70 inches without the block but plateaus at 70 inches with the block?
Why didn't the US see the wall at all when the block was in front of it?
What was the infrared sensor seeing at 30 inches or was that max range?
I've spend a lot of time experimenting with the US sensor.
Two of the main problems I've run into is that it can't see soft objects (absorption?) and it can't see flat surfaces that are slanted away from it (specular reflection?).
Do you know if the infrared sensor suffers from these problems?
I'm having a bit of trouble interpreting your results. Could you provide us with some more information about your test layout?
Why did the US and infrared range drop to 0 at 90-100 degrees?
Why did the US range have the peaks at 70 inches without the block but plateaus at 70 inches with the block?
Why didn't the US see the wall at all when the block was in front of it?
What was the infrared sensor seeing at 30 inches or was that max range?
I've spend a lot of time experimenting with the US sensor.
Two of the main problems I've run into is that it can't see soft objects (absorption?) and it can't see flat surfaces that are slanted away from it (specular reflection?).
Do you know if the infrared sensor suffers from these problems?
-
- Posts: 26
- Joined: 12 Oct 2010, 08:19
Re: Ultrasonic verses infrared distance sensor comparison
Merry Christmas,
The sensor's center of rotation was at X, Y coordinaters of 0,0. The scan was started at 90 degrees left (pointed along the negative X axis) and went to 90 degrees right (pointed along the positive X axis). The sensor would rotate and stop in two degree increments. After being stopped for two seconds it would save the current distance reading to an array. So the program gave two arrays: One for angles and another for distance readings. Those arrays were saved to a file and put into Excel. The angles and distances were converted to X,Y coordinates and plotted -those were the graphs in the initial posts for this topic.
So when the ultrasonic sensor was pointed 50 degrees left of the Y axis, it was reading 100 inches (-75,65 in X,Y).
When the ultrasonic sensor was pointed 40 degrees left of the Y axis, it's reading was about 33 inches (-20, 26 in X,Y).
I hope the above description answers most of the questions. If not, let me know. Below are a couple answers to specific questions.
The IR sensor is not as sensitive to slanting of the measured surface -from the graphs it first detected the wall at about a 20 degree angle.
Dave
The sensor's center of rotation was at X, Y coordinaters of 0,0. The scan was started at 90 degrees left (pointed along the negative X axis) and went to 90 degrees right (pointed along the positive X axis). The sensor would rotate and stop in two degree increments. After being stopped for two seconds it would save the current distance reading to an array. So the program gave two arrays: One for angles and another for distance readings. Those arrays were saved to a file and put into Excel. The angles and distances were converted to X,Y coordinates and plotted -those were the graphs in the initial posts for this topic.
So when the ultrasonic sensor was pointed 50 degrees left of the Y axis, it was reading 100 inches (-75,65 in X,Y).
When the ultrasonic sensor was pointed 40 degrees left of the Y axis, it's reading was about 33 inches (-20, 26 in X,Y).
I hope the above description answers most of the questions. If not, let me know. Below are a couple answers to specific questions.
The US sensor returns the closest object it detects. Since it's field of view is roughly 90 degrees (45 degrees per side). It first detected the block when the sensor was pointed at 45 degree left of the Y axis. It stopped detecting the block when the sensor was pointed 45 degree to the right of the Y axis.Why didn't the US see the wall at all when the block was in front of it?
The sound does not get a strong reflection from a soft object. The ir sensor is measuring the reflected energy from an infrared light -so the hardness or softness of a surface does not matter. -I understand (but haven't tested it) that highly relfective surfaces (like a mirror) can cause it problems.Two of the main problems I've run into [with the US sensor] is that it can't see soft objects (absorption?) and it can't see flat surfaces that are slanted away from it (specular reflection?).
The IR sensor is not as sensitive to slanting of the measured surface -from the graphs it first detected the wall at about a 20 degree angle.
Dave
Re: Ultrasonic verses infrared distance sensor comparison
Dave, thanks for the info.
Could you answer another couple of questions about the IR sensor?
I was surprise to see that the various Mindsensor's IR sensors only work over a rather limited set of ranges. Is this a problem?
Can they be integrated into a Mindstorms robot using the standard cables and technic parts?
What has been your experience with these sensors? I assume that you're using the DIST-Nx-Medium-v2. Are use using NXC?
And I'd like to wish you, yours, and anyone who may be reading this today a very merry Christmas.
Could you answer another couple of questions about the IR sensor?
I was surprise to see that the various Mindsensor's IR sensors only work over a rather limited set of ranges. Is this a problem?
Can they be integrated into a Mindstorms robot using the standard cables and technic parts?
What has been your experience with these sensors? I assume that you're using the DIST-Nx-Medium-v2. Are use using NXC?
And I'd like to wish you, yours, and anyone who may be reading this today a very merry Christmas.
-
- Posts: 26
- Joined: 12 Oct 2010, 08:19
Re: Ultrasonic verses infrared distance sensor comparison
Hi,
I have the DIST-Nx-Long-v2. It's range is from 300 to 1400 mm.
Its the longest range IR sensor offered by MindSensors. -It's only a probelm if a person wants to measure something farther away than 140 cm (55 inches).
It was holes for mounting to lego connectors and uses the standard NXT cable and sensor ports.
I had the v1 before. The v2 (version2) appears to be more robust. The sensor to board connection has been greatly improved on version 2.
I've used it with NXT-G and RobotC.
It always worked well. One limitation is that if there is not an object within the sensor's range it can give unpredictable results. For example if it's just pointed into space instead of returning the maxium range (1400 mm) it may give a value like 190 mm or 889 mm, or whatever.
Dave
I have the DIST-Nx-Long-v2. It's range is from 300 to 1400 mm.
Its the longest range IR sensor offered by MindSensors. -It's only a probelm if a person wants to measure something farther away than 140 cm (55 inches).
It was holes for mounting to lego connectors and uses the standard NXT cable and sensor ports.
I had the v1 before. The v2 (version2) appears to be more robust. The sensor to board connection has been greatly improved on version 2.
I've used it with NXT-G and RobotC.
It always worked well. One limitation is that if there is not an object within the sensor's range it can give unpredictable results. For example if it's just pointed into space instead of returning the maxium range (1400 mm) it may give a value like 190 mm or 889 mm, or whatever.
Dave
-
- Posts: 125
- Joined: 29 Sep 2010, 18:07
- Contact:
Re: Ultrasonic verses infrared distance sensor comparison
So in other words, you scanned the data as polar coordinates/vectors and then converted them to rectangular/Cartesian coordinates? That's awesome, I literally just learned how to do that last week in my math class.dad-and-adam wrote:Merry Christmas,
The sensor's center of rotation was at X, Y coordinaters of 0,0. The scan was started at 90 degrees left (pointed along the negative X axis) and went to 90 degrees right (pointed along the positive X axis). The sensor would rotate and stop in two degree increments. After being stopped for two seconds it would save the current distance reading to an array. So the program gave two arrays: One for angles and another for distance readings. Those arrays were saved to a file and put into Excel. The angles and distances were converted to X,Y coordinates and plotted -those were the graphs in the initial posts for this topic.
- Stryker AKA Jordan
http://nxtbystryker.wordpress.com
http://nxtbystryker.wordpress.com
Who is online
Users browsing this forum: No registered users and 3 guests