Shop OBEX P1 Docs P2 Docs Learn Events
PING))) sensor reading same values... — Parallax Forums

PING))) sensor reading same values...

hoxie08hoxie08 Posts: 2
edited 2010-07-19 19:14 in Accessories
I have a PING sensor hooked up on my basic stamp II. I have used the sample code and SOMETIMES the sensor works and will read accurately, but the majority of the time the sensor will just read 5 or 6 inches but will read accurately between the 2-6" range. It is basically useless at such a close range as my robot just crashes into objects before the sensors can detect it. Anyone have any ideas on this? Like I said I have used the code straight from Parallax and those are my results, maybe a faulty chip since it *occasionally* will read correctly? I have tried it in different rooms and locations to see if it was just interference but I get the same results..

Also, there are no objects in the way of the sensor, so I am not quite sure where it comes up with the 6" distance value.. for example if I point it up at the ceiling it will tell me 6" and then intermittently jump to the correct value (114") then go right back to 5-6"

Post Edited (hoxie08) : 7/18/2010 12:06:33 AM GMT

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-07-18 00:22
    Sounds like a loose wire or low batteries. How do you have it connected to the stamp? Could you remake the connections and make sure you have good conductivity?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • hoxie08hoxie08 Posts: 2
    edited 2010-07-19 02:37
    I have tried 3 different batteries straight from the box with no change. I have the bs2 homework board. The ping sensor is in the breadboard and I have it hooked up through single conductor wires. I have tried 20awg and 22awg (if I remember correctly) and there is no change with that either. I am going to try to hook it up through one of my extra servo cables and see if I can get it to work better, i sure hope so, because right now I'm stuck cause of this stupid thing.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-07-19 04:56
    Rest assured that the Ping))) itself is not malfunctioning. It's seeing something that you're not aware is in its field of view.

    -Phil
  • DufferDuffer Posts: 374
    edited 2010-07-19 17:38
    I have found that in several cases (different size/configuration robots), the PING sensor will pick up a reflection from a hard surface 5-6 inches in front of the bot and never see anything out past that. I have had to position the PING sensor higher or angle the sensor slightly upward from level to get accurate readings out to the limit of the sensor's range.

    Good luck,

    Duffer

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Any technology, sufficiently developed, is indistinguishable from magic.· A.C. Clark(RIP)
  • John R.John R. Posts: 1,376
    edited 2010-07-19 19:14
    Do you have a "servo extension cable" that you could use to remove the Ping))) from the homework board?

    This would allow you to at least temporarily mount the Ping elsewhere and verify it's operation.

    I don't know what else you're providing power for, but one of the "features" of the homework board is that it only supports the 9 volt battery. If you have a lot of stuff hanging on the board, or something that draws a lot of current, the power could be (but likely is not) the problem.

    I suspect that your Ping))) is indeed seeing "something". The Ping can only report the closese object it gets an echo from, and ultasonic waves can sometimes be tricky in what they reflect off of, and what kind of interferrence patters are set up by nearby objects.

    If you can re-mount, that would be your best bet for trouble shooting.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.
    Click here to see my Nomad Build Log
Sign In or Register to comment.