View unanswered posts | View active topics It is currently Wed Jul 23, 2014 7:07 am






Reply to topic  [ 4 posts ] 
Using IR distance sensor at infinity 
Author Message
Novice

Joined: Thu Apr 17, 2008 6:04 am
Posts: 70
Location: Plymouth, Indiana, USA
Post Using IR distance sensor at infinity
Hello,
One of the MindSensors IR (InfraRed) distance sensors has a maximum range of 1500 mm (about 59 inches). If the distance to something is beyond that, it still gives a reading. The table below gives some examples:

Actual, mm Reading, mm
760 750
1000 970
1300 1100
1500 1200
1800 1100
2000 1000
2300 900
3000 800
"infinity" 130

I would like my program to recognize when the actual distance is beyond the useful range. I am thinking, that even though a reading is produced it has more scatter (variation from reading to reading) when the maximum range is exceeded. If that is the case, it may be possible for a program to recognize this and return "beyond range" instead of a bogus reading. To further complicate things, the sensor can be on a moving vehicle.

I will try to write a program to recognize the scatter (if any), but was wondering if anyone has a technique for dealing with this.

Merry Christmas,
Dave

_________________
Dad (Dave) and Adam


Sat Dec 24, 2011 6:30 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3162
Location: Rotterdam, The Netherlands
Post Re: Using IR distance sensor at infinity
Well, if you know the range of a sensor and the values it will return, then anything outside of that range is erroneous. You must also keep in mind that readings will vary on how absorbent the material you are bouncing the IR light off. The further away you are, the more likely you are influenced by the properties of the surface.

There isn't really a magic trick to this, this how I would do it :)

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Dec 24, 2011 7:55 am
Profile WWW
Novice

Joined: Thu Apr 17, 2008 6:04 am
Posts: 70
Location: Plymouth, Indiana, USA
Post Re: Using IR distance sensor at infinity
I know the range of the sensor but don't know the distance to what I am measuring. A reading of 1000 could mean the distance is 1000 (within range) or 2000 (out of range).
My goal is to make a remote vehicle that sends a map back to the controlling NXT. So the vehicle can be operated while unseen.
I did some preliminary testing and there is much more scatter when out of range -it should be enough for the program to decide if it is within range or not. Working out an algorithm will be the fun part. :D

The sensor seems to be fairly robust as far as different surfaces and angles to surfaces. In my experience, it gives reasonable results unless the surface is shiny (like a mirror).

Dave

_________________
Dad (Dave) and Adam


Sat Dec 24, 2011 10:06 am
Profile
Moderator
Moderator
User avatar

Joined: Tue Sep 14, 2010 9:19 pm
Posts: 496
Post Re: Using IR distance sensor at infinity
Store X values in an array, and calculate the standard deviation. If it is more than Y, then the sensor may be out of range. Now the hard part comes when the object is moving in relation to the sensor. So for example, if the robot is moving forward, the readings will be further apart than when it is not. I would suggest making Y a function of the motor speed of the wheels. I have no idea what to do if the object is moving independent of the robot.

_________________
sudo rm -rf /


Sat Dec 24, 2011 12:09 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.