Shop OBEX P1 Docs P2 Docs Learn Events
Ping problem ranging — Parallax Forums

Ping problem ranging

Neon KennyNeon Kenny Posts: 2
edited 2005-09-29 22:33 in BASIC Stamp
Hi,

All seems well & working except that readings are erratic and unreliable beyond 2 feet or so away. If I carefully stand directly in line with the most sensitive point and I hold a solid piece of wood in front of me and carefully step back I can't seem to reliably detect beyond a couple of feet. The readings jump to maximum.

I'm presently grabbing power for the Ping from the Stamp and I'm wondering if there is a power drain. Or is this an issue with reflectivity?

All I want to do is be able to walk toward & away and have a smooth reading of these events.
Works great in the very low ranges.

Any ideas??

Thanks.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-29 18:03
    Kenny,

    ·· If nothing else is being powered off the Stamp Vdd pin, and there is no current draw from any I/O pins, then it should be able to handle it.· What happens if you power it from a separate 5V P/S?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Neon KennyNeon Kenny Posts: 2
    edited 2005-09-29 18:23
    Thanks for the swift reply.

    Haven't had a chance to try yet. Now I'm seeing that if I place a large sheet of plexi in front of me it's working more as expected. So my assumption is that the human body and cotton clothes is too soft for proper reflection at medium to high range??

    Any suggestions as to the ideal "soft" material?

    Kenny
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-29 18:57
    That is correct.· People are not very reflective.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-29 20:13
    Indeed, the Ping))) is not good for people ranging, but can be used as a beam-break detector. I'm working of a bit of code for a BS1 that will be used in a haunted house to detect people when the get to the end of the corridor (interfering with the Ping "seeing" the other wall). The code is self-calibrating so it measures the distance to the wall when it turns on. Any significant variation from that initial value is interpreted as a human and SURPRISE! ... alligator attack

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • TINkER_MANTINkER_MAN Posts: 3
    edited 2005-09-29 21:11
    HI JON

    Any significant variation from that initial value is interpreted as a human and SURPRISE! ... alligator attack.....That cool can you also write the code for a
    BS2 also Thanks

    SAM
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-29 22:33
    Sure I can ... can't you? tongue.gif

    Here's the process:

    -- Take initial range reading
    -- Take secondary range reading (in Main loop)
    -- Subtract secondary from initial (use ABS, just in case)
    -- If difference is less than appropriate threshold (I'm using 80%), spring the prop

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.