View unanswered posts | View active topics It is currently Sun Apr 20, 2014 3:38 pm






Reply to topic  [ 5 posts ] 
IR/Ultrasonic Range Finder 
Author Message
Rookie

Joined: Tue Feb 28, 2012 10:15 pm
Posts: 2
Post IR/Ultrasonic Range Finder
Hi,
I am currently working on a project which involves an sensor to detect the range of a ball in a tube. I have narrowed down the sensor to either IR or Ultrasonic Range Finder. But I am confused right now on how to start and go about for the code to measure the distance of the ball inside a tube where the sensor is also placed?
Can u help me out in this ?


Tue Feb 28, 2012 10:32 pm
Profile
Rookie

Joined: Fri Jan 27, 2012 6:57 pm
Posts: 40
Post Re: IR/Ultrasonic Range Finder
Could you put the sensor at the end of the tube? Then maybe just have the ball fall out the bottom of the tube right before it gets to the sensor?
Also, this would probably only work well if the tube is very straight, and the sensor is mounted so it points directly up the tube.


Wed Feb 29, 2012 12:50 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3107
Location: Rotterdam, The Netherlands
Post Re: IR/Ultrasonic Range Finder
You would use the same code is when you are measuring distance in any other way with these sensors. The tube makes no difference.
If you ignore the presence of the tube, how would you measure the distance between the sensor and the ball suspended in front of it?

EDIT: Also don't post the same question to multiple sub forums. It's a pain in the butt when I have to merge two topics and can result in -you- not getting the answers you need.

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


Wed Feb 29, 2012 2:35 am
Profile WWW
Rookie

Joined: Tue Feb 28, 2012 10:15 pm
Posts: 2
Post Re: IR/Ultrasonic Range Finder
thanks for the response guys..
@sumasmreq: I am putting the sensor on top of the tube and will have a fan at the bottom which makes the ball float according to a control system... The setup for the whole thing would not be a problem for me but its just the way to start the coding for this.. I am using the ultrasonic range finder and microblaze processor.

@Xander: The same way is just the way to measure the output and convert it to the distance parameter right(according to the scaling and resolution stuff of the sensor)
and sorry for posting it in multiple forums


Also guys, I am planning to do the control system based on a hand which is outside the tube. So basically, the ball comes to a position where the hand is outside the tube. I would use another range finder to get the position of the hand. I want to know that by using a look up table for positions and sending in appropriate voltage to the fan would be a good idea or any other better suggestionS??


Sat Mar 03, 2012 11:12 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3107
Location: Rotterdam, The Netherlands
Post Re: IR/Ultrasonic Range Finder
The LEGO US Sensor returns the distance in cms, the Mindsensors IR Sensor in mm. You do realise that this is a Mindstorms NXT/VEX platform based forum, right? I have no experience with the Microblaze uController, which seems to be something made by Xilinx.

The Sharp IR Sensors are very good at measuring distances, probably better than the US ones, especially since they don't suffer from the same echo issues. They're also quite a bit more accurate. Make sure you pick the right one, though. There are long, medium and short range ones, each with their own specific ranges and accuracies. They come in digital and analogue, the analogue ones will require a lookup table/conversion from analogue to a distance, the digital I2C ones simply need to be queried to get a distance in mm. Pick whichever one is most convenient/useful for you :)

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


Sun Mar 04, 2012 3:38 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 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.