go away spammer

Author Topic: Two Sharp IR's mounted on top of each other - good or not?  (Read 2606 times)

0 Members and 1 Guest are viewing this topic.

Offline Metal Slug 2Topic starter

  • Supreme Robot
  • *****
  • Posts: 333
  • Helpful? 11
Two Sharp IR's mounted on top of each other - good or not?
« on: March 03, 2009, 11:01:29 PM »
Last week i upgraded my $50 robot with the Sharp IR rangefinder upgrade and loaded the Stampy algorithm code onto the bot.  Yet, as I played around with the robot I noticed that the sharp IR rangefinder would many times "miss" the object it should follow and thus spin in a full circle until it found the object (a cereal box, which I held) again.

i was just wondering...if I were to mount a second (or third) Sharp IR rangefinder on top or directly above my current one (yes, it will be the same type of IR rangefinder as I have currently) and program it to follow the same code the first Sharp IR rangefinder used for object following, would this decrease the chances of my robot "missing" an object i want it to follow??

But first of all, would this be possible??.

My assumption is that if I have two sensors, if one "misses" the object, there is still a chance that the second sensor might have 'detected' the object and therefore the robot will not lose track of the object it's following.  Overall minimizing the probability that my robot will move past the object it needs to follow.

If this idea is incorrect, or using the same stampy algorithm for the second sensor will not work, could you please give me advice on how I can accurately follow and object...

Thanks :)

Offline Jdog

  • Robot Overlord
  • ****
  • Posts: 259
  • Helpful? 3
Re: Two Sharp IR's mounted on top of each other - good or not?
« Reply #1 on: March 04, 2009, 04:46:08 PM »
I don't see how the sharp ir misses anything, mine won't miss a chair leg.

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,208
  • Helpful? 15
  • Hardware and Firmware Designer
    • The Hellinic Robots Portal
Re: Two Sharp IR's mounted on top of each other - good or not?
« Reply #2 on: March 04, 2009, 05:17:31 PM »
Since you talk about "how to" positioning your sensors, I can't the why a picture hurts.....
It would help both, us to understand and you to address your problem....

But the idea of missing... reminds me code problem.... not sensor...
If there was a sensor problem with this arrangement the it would be
failure to get the right distance (would always show more due to more radiation than emitted)

Post code and a picture.... and that should do the trick...

Regards, Lefteris
Greece
For whom the interrupts toll...

Offline Metal Slug 2Topic starter

  • Supreme Robot
  • *****
  • Posts: 333
  • Helpful? 11
Re: Two Sharp IR's mounted on top of each other - good or not?
« Reply #3 on: March 04, 2009, 07:43:24 PM »
alright, i think i might know what the problem is now... the code is the exact same as the stampy algorithm, nothing changed, so that isn't the problem.  i think its the way the sensor is mounted.

I haven't had enough time to really properly mount my Sharp IR sensor.  Its simply mounted by a piece of hockey tape folded into a cylindrical shape with the sticky side out and then mounted upon the servo.  The Sharp IR rangefinder however, sits on the servo facing upwards at about a 30 degree angle to the floor.  when i would hold an object in front of it, that object would be held perpendicular to the floor.

I think my problem is that the IR light shot out of the Sharp rangefinder "bounced" off the object it needed to follow and only received a minimal amount of reflected light, thus "missing" the object a heck of a lot of times.

Is this thought correct?? (i dint have my robot with me right now so i cant test this for myself....)

Offline Jdog

  • Robot Overlord
  • ****
  • Posts: 259
  • Helpful? 3
Re: Two Sharp IR's mounted on top of each other - good or not?
« Reply #4 on: March 04, 2009, 10:03:54 PM »
I'm not sure exactly what you're saying, I'd need a picture/diagram.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Two Sharp IR's mounted on top of each other - good or not?
« Reply #5 on: March 19, 2009, 03:38:40 AM »
Quote
I noticed that the sharp IR rangefinder would many times "miss" the object it should follow and thus spin in a full circle until it found the object (a cereal box, which I held) again.
This is an inherent flaw in the Stampy algorithm. What happens is that the sensor spins fast and only takes a set amount of readings. If your box is between those two readings, it won't see it.

Several solutions:
slow the sharp IR scanning down
make your robot rotate fast when it sees object, slow when it doesn't
modify sensors

Now your idea of using two sensors will work - it doubles your sensor resolution. You can also use sonar.

Offline Metal Slug 2Topic starter

  • Supreme Robot
  • *****
  • Posts: 333
  • Helpful? 11
Re: Two Sharp IR's mounted on top of each other - good or not?
« Reply #6 on: March 19, 2009, 09:34:20 AM »
Perfect!  ill try experimenting with sonar someday soon...good to know that stacking the IR rangefinders will work as well  :)

Thanks

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics
Re: Two Sharp IR's mounted on top of each other - good or not?
« Reply #7 on: March 19, 2009, 10:23:34 AM »
I noticed that the sharp IR rangefinder would many times "miss" the object it should follow and thus spin in a full circle until it found the object (a cereal box, which I held) again.
This is what it is programmed to do.



Your best chances would be to have the one sharp IR or ultrasonic sonar on a turret (panning servo) and then have stationary sensors mounted all around the robot.

 


Get Your Ad Here