Author Topic: Sharp GP2Y0A21YK0F Stable?  (Read 1896 times)

0 Members and 1 Guest are viewing this topic.

Offline jocatchTopic starter

  • Jr. Member
  • **
  • Posts: 29
  • Helpful? 0
Sharp GP2Y0A21YK0F Stable?
« on: September 01, 2010, 11:46:18 AM »
Just got my robot rolling around for the first time using the Sharp GP2Y0A21YK0F mounted on a servo which sweeps 110 degrees. If it detects something close it stops and backs up. The thresholds is 1.1 volts. It works most of the time but alot of the times, when nothing in front if it, it stops and backs up. Thinking that one reading may be off, I now take 10 readings and find the average and then decide what to do. I also added some caps across the power supply for noise reduction. But it still seems to now and then gives me a false detection.

So I was thinking about removing from the servo which is mounted on the top center and mounting two Sharp IR units at the top two corners and mounting a sonar ranger on the servo and use it to sweep instead of the IR unit. I haven't played with the sonar unit yet but from what I have read, you need to average its readings too.

Lastly, wheels and legs on chairs are bad as the sensor can't detect so I was planning on adding an IR sensor below the robot to catch things like chair wheels and anything else that is only a few inches high.

Photos of the robot are at:  http://www.joecool.org/arty_the_robot.htm

P.S. Looking at the spec sheet, it looks like one can not take a new reading quicker than about every 55 ms. So I need to ensure I am waiting enough time before taking readings.
« Last Edit: September 01, 2010, 12:35:11 PM by jocatch »

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
Re: Sharp GP2Y0A21YK0F Stable?
« Reply #1 on: September 01, 2010, 02:19:49 PM »
You kinda answered your own question in the 'P.S.' - you need to wait between taking readings to allow all the reflected 'light' to disappear. Else your current reading gets the reflection from the previous light pulse - and you get wrong readings. Same is true with sonars (ultra-sound).

If you have more than one Sharp sensor then don't forget that the same is true across sensors - ie avoid sensor2 seeing the reflections from sensor1.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk


Get Your Ad Here