Let's Make Robots!

ir sensor and ultrasonic

hay guys me again!

just wondering what the pros and cons of both of these sensors are and the one i should use in my first project.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

IR is affected by color whereas, sound(ultrasonic) is blind to color. IR can typically find narrow, rounded objects better than ultrasonic. I have read about people getting 'jumpy' readings with ultrasonic. I have as yet to see the same issues from IR.

I have seen both sensors successfully used in first projects. Which one is more likely based on how much you want to spend and/or who you are willing to purchase from. Most of the IR sensors I have seen are 10 to 15 USD. I have seen ultrasonics as low as 9 USD and as high as 33 (Radio Shack).

so is it possible, with the ir sensor, to make the robot follow objects of specific colours?

What I meant, guess I should have been more specific, when I said that IR is affected by color is that some glossy vs flat and white vs black issues occur when dealing with IR sensing. Meaning distance to target can be negatively affected by the 'perfect storm' of color and shine or lack thereof.

if i wanted to get an ir sensor then what kind of specs do you think is the minimum you should have?

In order to do what? The specs only become important when you have something you want to accomplish.

The maximum range is usually important. Most IR sensors are also going to have a small dead range at very short distances where the readings cannot be trusted.

Some IR sensors give you a simple digital on/off depending on if an object is detected, rather than an analog voltage proportional to the range.

Other specs you might care about are the required supply voltage and the current demands.

if i wanted to get an ir sensor then what kind of specs do you think is the minimum you should have?

well i just wanted a sensor like the one used in the 'start here' project just to avoid stuff

then look up the specs for the sensor that is used in the SHR and work from there. Sharp, to my knowledge, is really the only game in town when it comes to IR range sensors.

See this post that discusses some alternatives.