Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Ultrasonic Sesnor Accuracy (http://www.chiefdelphi.com/forums/showthread.php?t=101788)

SoyStuff 02-02-2012 16:00

Ultrasonic Sesnor Accuracy
 
Has anyone managed to get the advertised 3cm accuracy using the Maxbotix Ultrasonic Rangefinder provided with the Kit of Parts? If so, what did you do to achieve this? Our sensor seems be returning data that is off by more than 40cm.

nitneylion452 02-02-2012 16:03

Re: Ultrasonic Sesnor Accuracy
 
I don't have experience with that particular ultrasonic sensor, but it seems like you need to calibrate it. Should be directions in a manual or online for how to do that as it varies by sensor.

electroken 02-02-2012 16:14

Re: Ultrasonic Sesnor Accuracy
 
The speed of sound (or ultrasound) varies with the density of air. That means temperature, humidity, and barometric pressure are all working against you in your quest for an accurate distance measurement.

nitneylion452 02-02-2012 16:22

Re: Ultrasonic Sesnor Accuracy
 
Quote:

Originally Posted by electroken (Post 1118636)
The speed of sound (or ultrasound) varies with the density of air. That means temperature, humidity, and barometric pressure are all working against you in your quest for an accurate distance measurement.

But that wouldn't lead to a difference of 40cm. At 70 deg F, C is ~344 m/s, at 60 it is 340 m/s and at 80 it is 347 m/s. Not a notable difference. Also barometric pressure is fair to assume constant, unless he's somewhere significantly above or below sea level.

slijin 02-02-2012 16:54

Re: Ultrasonic Sesnor Accuracy
 
Here's the spec sheet for the sensor.

Quote:

Each time after the LV-MaxSonarŽ-EZ1™ is powered up, it will calibrate during its first read cycle. The sensor uses this
stored information to range a close object. It is important that objects not be close to the sensor during this calibration
cycle. The best sensitivity is obtained when it is clear for fourteen inches, but good results are common when clear for at
least seven inches. If an object is too close during the calibration cycle, the sensor may then ignore objects at that distance.
I found when testing the sensor that the signal is very susceptible to interference from other irregular obstacles (i.e. it ignores walls unless directly facing them) in its field of vision (which I estimated to be roughly 60 degrees, centered on its line of sight). The waveform is highly erratic when there are multiple objects in its field of vision, and oscillates between the closest and farthest object it can see.

Chris Hibner 02-02-2012 17:21

Re: Ultrasonic Sesnor Accuracy
 
After we calibrated the sensor, we saw accuracy to within a half an inch as long as we were 90 degrees to a wall and there were no interfering objects. Interfering objects will probably be a big issue, so you'll need to come up with a way to recognize them.

SoyStuff 02-02-2012 20:31

Re: Ultrasonic Sesnor Accuracy
 
Okay then. Pardon my ignorance, but how exactly would one go about calibrating the ultrasonic sensor? Is there a specific process that we are supposed to follow, or do you just mean that we should get some data and work out a formula, which is what we've done.

Chris Hibner 02-02-2012 21:08

Re: Ultrasonic Sesnor Accuracy
 
Quote:

Originally Posted by SoyStuff (Post 1118830)
Okay then. Pardon my ignorance, but how exactly would one go about calibrating the ultrasonic sensor? Is there a specific process that we are supposed to follow, or do you just mean that we should get some data and work out a formula, which is what we've done.

We took measurements every 6 inches. We wrote on a piece of paper the actual distance (measured via tape measure) and the voltage reading from LabVIEW. Put everything in an Excel spreadsheet, then use y = mx+b to find the best fit "m" (i.e. slope or scale factor) to make the data work best.

SoyStuff 02-02-2012 23:16

Re: Ultrasonic Sesnor Accuracy
 
Quote:

Originally Posted by Chris Hibner (Post 1118851)
We took measurements every 6 inches. We wrote on a piece of paper the actual distance (measured via tape measure) and the voltage reading from LabVIEW. Put everything in an Excel spreadsheet, then use y = mx+b to find the best fit "m" (i.e. slope or scale factor) to make the data work best.

That's what we did, too. Unfortunately, it doesn't seem to be working. The sensor is just extremely inaccurate. Is it possible that there is something wrong with it, or that it was wired improperly?

slijin 02-02-2012 23:54

Re: Ultrasonic Sesnor Accuracy
 
Quote:

Originally Posted by SoyStuff (Post 1118830)
Okay then. Pardon my ignorance, but how exactly would one go about calibrating the ultrasonic sensor? Is there a specific process that we are supposed to follow, or do you just mean that we should get some data and work out a formula, which is what we've done.

As I pointed out in my post, make sure that 1)the space in front of the sensor is kept clear when you first provide power to it and that 2)there's nothing interfering with your readout and introducing error to your testing; e.g. if you're testing distance with just a pencil or some thin item, it's not going to work.

Dale 03-02-2012 00:10

Re: Ultrasonic Sesnor Accuracy
 
Since the analog input on the breakout is only 8 bits and everything is housed on a very electrically noisy robot I'll bet at the end of the day you'll get about 7 bits of dependable data out of the analog port of the sensor. Don't expect too much from it and you'll be fine. The 3cm is the theoretical accuracy but not with our hardware or environment.

Chris Hibner 03-02-2012 07:37

Re: Ultrasonic Sesnor Accuracy
 
Quote:

Originally Posted by SoyStuff (Post 1118933)
That's what we did, too. Unfortunately, it doesn't seem to be working. The sensor is just extremely inaccurate. Is it possible that there is something wrong with it, or that it was wired improperly?

Make sure everything is out of the way between the sensor and the wall(including the tape measure you're measuriung with). Make sure your wall is flat and big (don't do it near doors, etc). Make sure your sensor wires do not go near any motors or the radio.

Also, increase the oversampling and averaging. That will settle the sensor noise and improve your accuracy.

SoyStuff 03-02-2012 22:48

Re: Ultrasonic Sesnor Accuracy
 
Thanks for your help, everybody. We've got it working properly now. We were measuring distance to a wooden board, but the board was not quite perpendicular to the sensor, and it was warped. Today, we got a bigger, straighter board, used a measuring tape instead of a bunch of meter sticks, and took readings at intervals of 50cm. Now, we have an equation that works. Again, we appreciate your help. We didn't realize that the angle of the board would have such a tremendous effect. To compensate for that, we've coded some gyro stuff, and everything seems to be going smoothly so far.

Chris Hibner 03-02-2012 22:58

Re: Ultrasonic Sesnor Accuracy
 
Quote:

Originally Posted by SoyStuff (Post 1119563)
Thanks for your help, everybody. We've got it working properly now. We were measuring distance to a wooden board, but the board was not quite perpendicular to the sensor, and it was warped. Today, we got a bigger, straighter board, used a measuring tape instead of a bunch of meter sticks, and took readings at intervals of 50cm. Now, we have an equation that works. Again, we appreciate your help. We didn't realize that the angle of the board would have such a tremendous effect. To compensate for that, we've coded some gyro stuff, and everything seems to be going smoothly so far.

Excellent. Good to hear. What accuracy to you have now?

ayeckley 04-02-2012 07:32

Re: Ultrasonic Sesnor Accuracy
 
Just to add another data point, when we first tested the sensor we found huge intermittent drops in the measured range when more than 8' from the target wall, even with a properly-initialized sensor, perpendicular target, clear range to target etc. Two days later the problem did not recur even with no changes to the hardware or software. The leading theory so far (which we will test at the next opportunity) is that all of the grinding noise from the welding class going on next door had a high ultrasonic spectral content which interfered with the unit. Without the grinding noise two days later, the sensor was well-behaved.


All times are GMT -5. The time now is 20:35.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi