Shop OBEX P1 Docs P2 Docs Learn Events
Sensing direction vs. speed with PING — Parallax Forums

Sensing direction vs. speed with PING

BruceCapeBruceCape Posts: 3
edited 2011-06-25 08:40 in Accessories
Has anyone used phase shift to measure the direction vs. speed of motion with PING?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-09-26 08:39
    A PING cannot measure phase shift. All it can do is produce a pulse of ultrasonic sound and measure the time to the first received echo to give an estimate of the distance to the nearest object in the field of view.

    If you could measure phase shift, that would give you a relatively fine-grained distance measurement, not a measure of speed. Frequency shift would give you a measure of the Doppler effect which would give you an estimate of speed. Neither would give you direction information. To use phase shift to infer direction, you need multiple readings across a plane. The PING is a single transmitter / receiver. You'd need a receiver array.
  • BruceCapeBruceCape Posts: 3
    edited 2010-09-26 23:54
    Thanks for the perspective Mike.
  • BruceCapeBruceCape Posts: 3
    edited 2011-06-25 03:45
    Re-reading your response, I'm thinking you may have thought I was thinking of "bearing" when I said direction. All I want to do is measure if an object is moving towards or away from me. I'd guess you could compare distance changes as going +/- ? But thought there might be a more elegant method?
  • Zap-oZap-o Posts: 452
    edited 2011-06-25 07:37
    Could this be done using 2 perhaps 3 speakers and some comparators? I imagine the frequency would have to be known.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-06-25 08:40
    The only thing you can do, as you suggested, is to take successive distance measurements at intervals and see if (and by how much) the measurements are changing. If the object is moving slowly enough to get a series of measurements, you would be able to estimate the speed of the object towards or away from the PING.
Sign In or Register to comment.