Society of Robots - Robot Forum

Software => Software => Topic started by: Robotboy86 on June 21, 2007, 06:48:17 PM

Title: New here! wanted to say hi, and to bounce an idea off of you :)
Post by: Robotboy86 on June 21, 2007, 06:48:17 PM
Quick intro to me:

Been hooked on eletronics when me and my dad built a small DC motor when I was 6.  Strayed into computer programming for a few years, and about a year ago got into VEX.  Since then, i've moved far away from VEX and now am starting to get deeper into robotics.  I'm a 20 year old college student/PC Technician.

Now the idea!  I am looking at implementing some of the sharp IR Range finders into an upcoming bot and one of the biggest worries is what happens if it is staring down a long empty hall.  The sensors would give readings that would be all over the place.  As such, my idea was to put a second sensor about 3cm behind it, and a few cm's above it(To avoid crossing the signals) and then to have the computer(I use a mini-itx board as the brain) compare the two signals and compare the distances.  As such, if they are in there prime range the signals should be about 3cm's apart... but if they are in that area where it quickly drops off(Out of range) then they should much farther off.. as an actual disagreement of 3cm's in the non prime area yields a computer viewed distance of 15-25cm or something.



I hope that makes sense, I tend to ramble..  I am working on a balance bot that can roam my house and avoid people/objects by using a combination IR Range finders and ultrasound.

Thanks
Title: Re: New here! wanted to say hi, and to bounce an idea off of you :)
Post by: JesseWelling on June 21, 2007, 07:46:32 PM
My experience with IR's just says to calibrate them your self and chop them off at where you see reasonable outputs. So if you get too much noise past x centimeters then your maximum measurable limit is x centimeters. Beyond that you are just guessing so why not use what you are sure of. Another option though is using an IR/Sonar pair. They work as a good sanity check against each other. You also might look into filters. I'm new to the whole signal processing gig so maybe someone else could point you in a better direction in that regard.
Title: Re: New here! wanted to say hi, and to bounce an idea off of you :)
Post by: Robotboy86 on June 21, 2007, 08:32:18 PM
I'm not sure I understand what your saying Jesse.  How would you "chop it off" if you have a way ot determinng its response to be any diffirent then a legimate signal?  The panasonic IR's use non-linear response signals..  and in 3 basic phases.  Too close(1-5cm or something like that) it changes readings sharply, then from 5-80cm or so it returns a very useable non-linear response.  Then from 80-XXX it returns another useless return.  I am not trying to extend there range or anything, I am simply seeking a way to determine whether or not the response fits in category 1, 2, or 3.  1 = Too close, 2 = ideal range, 3 = too far.  The first IR would return a range of say 55cm, and the second would return a distance of ~58cm.  This would let me then do a quick calculation that the diffrence is ~3cm, which is where it should be.  As such, I would know that the distance is correct.  On the other hand though, is sensor 1 gave me 45cm, and sensor 2 gave me 64cm, I would know that its not in proper range.  Because there diffirence is 16cm..

Does that make any sense? 

Also.. I would like to think that I could also use this to create 3 non-linear formulas,  Formula 1 for the super close range, formula 2, for the biggest range(5-90cm or whatever), and third for that long distance range.
Title: Re: New here! wanted to say hi, and to bounce an idea off of you :)
Post by: brijesh on June 21, 2007, 10:18:48 PM
Lets look at 3 "phases".
First phase is ambiguous and 3 phase is useless. So ignore those to phases.

To remove first phase signals, mount the sensor 5cm( or whatever is end point of first phase) from the edge of the robot. That way you are guaranteed not to get any readings that fall in first phase. you will end up operating the IR sensor on 2nd and 3 rd phase.

IR sensor has limited range, up to 80cm. So if you get a value above 80cm then just ignore it, "chop it off". It only means that path is clear up to 80cm.

here is some psuedo code.

value = read_IR_sensor();

if(value > 80cm)
{
 no objects. ( up to 80cm minus 5cm ahead.)
}
else
{
object at value cm.
}


Of course you may get erroneous readings once in a while. For that you will need some sort of filtering. Instead of using 2 IR sensors you could implement a simple filter, average over n values or moving average filter over n values. Higher the value of n the better...but it introduces lag. So there is a trade off.



Title: Re: New here! wanted to say hi, and to bounce an idea off of you :)
Post by: Robotboy86 on June 22, 2007, 03:41:09 AM
Ya...  I had this idea of the sensor readings in my head that had a third phase.  I just rechecked the readings from the sensor, and at distance the readings are pretty obvious its at distance.

Sorry about the confusion :)
Title: Re: New here! wanted to say hi, and to bounce an idea off of you :)
Post by: Admin on June 22, 2007, 06:47:20 AM
In my tests with Sharp IR I never saw any noise that needed to be filtered.

Besides, you dont want to filter a chair leg from your sensor data ;D
Title: Re: New here! wanted to say hi, and to bounce an idea off of you :)
Post by: megaman935 on June 22, 2007, 09:45:02 AM
Besides, you dont want to filter a chair leg from your sensor data ;D
*Bam*
"awww man! not again!"

 ;D I can just picture the outcome so well.... ;D