Go to Post Mmmmmmmm. Donuts! - Sean Schuff [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-02-2016, 02:14
rohinb rohinb is offline
Registered User
FRC #3482
 
Join Date: Jan 2016
Location: Campbell, California
Posts: 3
rohinb is an unknown quantity at this point
Question Ultrasonic Rangefinder giving inconsistent values

Hi all,
Our team is using an ultrasonic rangefinder (link here: http://www.maxbotix.com/Ultrasonic_Sensors/MB1023.htm) and we have been having trouble getting consistent values from it. It seems to randomly switch from accurate values to unreasonable values (with an error anywhere from 20cm to 70cm) for the voltage and the value (we are using java and the methods getValue(), getAverageValue(), getVoltage(), getAverageVoltage()). As of now we are simply printing these values to try to find a way to make them consistent. We are aiming it at a hard surface (a metal plate or a wall) and are aware of the 30cm deadzone. Does anyone have any ideas? Any help would be appreciated.
Thanks,
Rohin Bhushan
Team 3482
  #2   Spotlight this post!  
Unread 23-02-2016, 03:53
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,554
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Ultrasonic Rangefinder giving inconsistent values

Quote:
Originally Posted by rohinb View Post
Hi all,
Our team is using an ultrasonic rangefinder (link here: http://www.maxbotix.com/Ultrasonic_Sensors/MB1023.htm) and we have been having trouble getting consistent values from it. It seems to randomly switch from accurate values to unreasonable values (with an error anywhere from 20cm to 70cm) for the voltage and the value (we are using java and the methods getValue(), getAverageValue(), getVoltage(), getAverageVoltage()). As of now we are simply printing these values to try to find a way to make them consistent. We are aiming it at a hard surface (a metal plate or a wall) and are aware of the 30cm deadzone. Does anyone have any ideas? Any help would be appreciated.
Thanks,
Rohin Bhushan
Team 3482
Ultrasonic sensors have a 'cone' of detection. Some of them are quite wide. Do you have more than one sensor running? Do you have anything near the cone of detection? Is the sensor extremely close to the ground?

Have you set a gain? The sensor returns a value that is linearly proportional to the distance, but you need to use a gain to make it accurately report. I.e. - is it consistently wrong? Or is the distance inconsistent.

We've never had good luck with the maxbotix sensors.
  #3   Spotlight this post!  
Unread 23-02-2016, 07:44
ayeckley's Avatar
ayeckley ayeckley is offline
Registered User
AKA: Alex Yeckley
FRC #2252 (Mavericks)
Team Role: Mentor
 
Join Date: Apr 2007
Rookie Year: 2007
Location: Sandusky, OH
Posts: 268
ayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond reputeayeckley has a reputation beyond repute
Re: Ultrasonic Rangefinder giving inconsistent values

We also found (years ago) that they are sensitive to "environmental" ultrasonic noise. Such as that produced when two hard objects (like gear teeth) smack together and produce a broad spectrum of frequencies. Like on most robots...

No, we don't have spectral measurements to support the theory, just a basic knowledge of sound and vibration physics. It masks as an EMI issue, but when the gear teeth (and only the gear teeth) were removed from the test scope the problem effectively went away. YMMV.
__________________

  #4   Spotlight this post!  
Unread 23-02-2016, 08:57
jajabinx124's Avatar
jajabinx124 jajabinx124 is offline
Team 2052 Alumnus
AKA: Kshitij Wavre
no team
Team Role: College Student
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Madison, WI
Posts: 541
jajabinx124 has a reputation beyond reputejajabinx124 has a reputation beyond reputejajabinx124 has a reputation beyond reputejajabinx124 has a reputation beyond reputejajabinx124 has a reputation beyond reputejajabinx124 has a reputation beyond reputejajabinx124 has a reputation beyond reputejajabinx124 has a reputation beyond reputejajabinx124 has a reputation beyond reputejajabinx124 has a reputation beyond reputejajabinx124 has a reputation beyond repute
Re: Ultrasonic Rangefinder giving inconsistent values

Check the wiring of the sensor as well.

The analog methods you are using sounds right.. but just in case can you post your code so we can look at it?
__________________
FRC Volunteer CSA (MRI off-season event, 2017 Lake Superior Regional, 2017 10,000 Lakes Regional) 2016 - Present
FRC 2052 KnightKrawler (Team Captain, Strategist, Scouting, Programming) 2013 - 2016

1 Division Win & Einstein Appearance
3 Division Quarter-Finalists
1 Regional Chairman's Award
5 Regional Wins, 3 Regional Finalists
3 MN State Championship Wins, 1 MN State Championship Finalist
Thanks to all our alliance partners who krawled with us: 41, 70, 225, 525, 1595, 2054, 2062, 2122, 2175, 2227, 2472, 2526, 2883, 2990, 3018, 3244, 3276, 3310, 3313, 3360, 3538, 3692, 4011, 4198, 4536, 4607, 4778, 5172, 5690
  #5   Spotlight this post!  
Unread 23-02-2016, 15:05
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: Ultrasonic Rangefinder giving inconsistent values

You might try shielded cable. We had this problem a couple of years ago and didn't solve it. If you figure something out, please let us know. On the Maxbotix site they sell shielded cable and they claim its steady when using it.
__________________
Brian K
Team 1225 Robotics Mentor
  #6   Spotlight this post!  
Unread 23-02-2016, 15:20
G_rupp's Avatar
G_rupp G_rupp is offline
Registered User
FRC #1108
 
Join Date: Jan 2011
Location: Paola, KS
Posts: 43
G_rupp is an unknown quantity at this point
Re: Ultrasonic Rangefinder giving inconsistent values

Try using the Pulse width output into the DIO instead of the Analog. We attempted to use Analog the first year they came in the KOP. We changed to the pulse width and have consistent results between minimum (6 inches) and about 80 inches. Beyond that, the reading will jump from the correct value.
  #7   Spotlight this post!  
Unread 23-02-2016, 16:00
Loading Loading is offline
Registered User
FRC #2585
 
Join Date: Feb 2016
Location: Texas
Posts: 2
Loading is an unknown quantity at this point
Re: Ultrasonic Rangefinder giving inconsistent values

It might be possible for you to filter out unreasonable values in software. If you see a large jump in the ultrasonic sensor's value that doesn't match up with other values that it's output that value might just be noise.
  #8   Spotlight this post!  
Unread 25-02-2016, 21:04
MultipleMono's Avatar
MultipleMono MultipleMono is offline
Programmer & IT Guy
FRC #3128 (Aluminum Narwhals)
Team Role: Programmer
 
Join Date: Apr 2015
Rookie Year: 2013
Location: San Diego
Posts: 7
MultipleMono is an unknown quantity at this point
Re: Ultrasonic Rangefinder giving inconsistent values

These ultrasonics also have a serial output that the RoboRIO can read. I wrote a driver for them a while back, and you're welcome to use it. Like the DIO, it should be more reliable than the analog.
  #9   Spotlight this post!  
Unread 25-02-2016, 21:12
Landonh12's Avatar
Landonh12 Landonh12 is offline
270 points
AKA: Landon Haugh
FRC #0364 (Team Fusion)
Team Role: College Student
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Gulfport, MS
Posts: 212
Landonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud ofLandonh12 has much to be proud of
Re: Ultrasonic Rangefinder giving inconsistent values

We have never had success with these sensors. We've tried using 3 of them in the past to no avail.

Some other may have had success, but from my experience they were only good at detecting something going from really close to really far away.
__________________
Team Fusion 364 - Driver/Programmer 2012-2015; Controls Mentor 2016-Present
  #10   Spotlight this post!  
Unread 25-02-2016, 21:13
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,723
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Ultrasonic Rangefinder giving inconsistent values

Let me say that after working with sonic and ultrasonic rangefinders on robots for a few weeks a couple of years ago, we switched to almost entirely optical/IR for range finders. I am an (underwater) acoustician in my day job. I was most unhappy with (affordable) acoustic and ultrasonic sensors' handling of returns less than twice the nominal minimum range.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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