Arduino Forum

Forum 2005-2010 (read only) => General => Frequently-Asked Questions => Topic started by: elementh on Aug 22, 2010, 08:07 am

Title: Edge Detection Robot (Ultrasonic or Infrared)
Post by: elementh on Aug 22, 2010, 08:07 am
I plan to make an edge detection robot, in which, upon detecting an edge (e.g. end of a table) it'll stop and reverse.

Which would be a most suitable sensor ultrasonic or infra-red and what should the output be analog or digital?

It'll be used indoors, but may be subjected to natural lighting coming in from windows.
Title: Re: Edge Detection Robot (Ultrasonic or Infrared)
Post by: PaulS on Aug 22, 2010, 11:31 pm
Quote
Which would be a most suitable sensor ultrasonic or infra-red and what should the output be analog or digital?

I'd think that 15 minutes with a web browser and a search engine and you'd know how each sensor works. Then, without embarrassing yourself, you'd KNOW the answer.

The sensor manufacturer will tell you what kind of output the sensor produces.

I don't think visible light is going to interfere with a sound-based sensor. Do you?

On the other hand, can you hear an edge?
Title: Re: Edge Detection Robot (Ultrasonic or Infrared)
Post by: Schmidtn on Aug 23, 2010, 08:12 pm
Yeah, I was kind of thinking the same thing... this is a very general problem and a lot of solutions would solve it... just not sure what'd work best for their problem.  Digital will work... go/no-go style.  If you trigger high, you're about to fall off the edge and need to turn around.  Analog would work too (see the ultrasonic example below).  

But on the ultrasonic question, "...can you hear an edge?"  Heck yeah you can.  If you hang an ultrasonic sensor over the front bumper x number of inches above the table and that sensor comes up with anything larger than x, then you know you're about to drive over an edge.

I guess we kind of need more information.  How big is your robot?  What's your budget?  What other sensors are on the robot?  How good are you at writing code?  

Based on what you've already told us I would suggest a QTI:
http://www.parallax.com/Store/Sensors/ObjectDetection/tabid/176/CategoryID/51/List/0/SortField/0/Level/a/ProductID/100/Default.aspx
You can use it as either digital or analog and it's got a daylight filter on it.  I'd use two of those... one sticking off the two corners of the front bumper.  If one triggers then turn away from that sensor because it's about to go over the edge.
Title: Re: Edge Detection Robot (Ultrasonic or Infrared)
Post by: elementh on Aug 24, 2010, 11:08 am
Thanks for the reply guys!

In the end, I decided to to IR, mainly due to cost. I got hold of the Sharp Analog sensors.

I'll estimate the robot would be within a 300x300mm, but I think the length would be close to 250mm. Apart from detecting edges, it also needs to carry some load.

There are no other sensors on it.

How good am I at coding? Bad, since I have no experience whatsoever with C/C++.

But I have worked with MATLAB and quite comfortable with it.
Title: Re: Edge Detection Robot (Ultrasonic or Infrared)
Post by: Schmidtn on Aug 25, 2010, 06:05 am
Well it looks like the only limit you might have is how hard the code is to write so I'd say a simple IR sensor set to (fake) digital output seems like a great fit.  If the distance is too far (meaning it's hanging over the edge of the table) then trigger high and if your trigger is high then turn the robot away from the edge it's about to fall off of.  Good luck and keep us posted! :)
Title: Re: Edge Detection Robot (Ultrasonic or Infrared)
Post by: UltraMagnus on Aug 25, 2010, 07:08 pm
remember, many ultrasonic rangefinders have a minimum range, within which they will report things as being outside their maximum range.  This is caused by their blanking period.
Title: Re: Edge Detection Robot (Ultrasonic or Infrared)
Post by: elementh on Aug 26, 2010, 06:21 am
I'll keep in mind what everyone has posted!

Quote
Good luck and keep us posted!


Sure. I have already started a previous thread regarding the coding.
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1281013047/0