Shop OBEX P1 Docs P2 Docs Learn Events
Ping question 2 - time between querying — Parallax Forums

Ping question 2 - time between querying

gbravettigbravetti Posts: 8
edited 2009-09-01 18:14 in BASIC Stamp
Ping question 2 - time between querying

Is there a time limitation to re-query a Ping?

Thanks!

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-08-31 14:53
    You have to wait for the reply from the ping, but AFAIK you can pulsout right after that. However, if you got a valid reading before, you may want to delay so that any echoes can die off and you don't get a false reading the second time.
  • gbravettigbravetti Posts: 8
    edited 2009-08-31 14:59
    Thanks SRLM, and the reply from the Ping will be received immediately after the echo arrives? Or it is some extra delay involved on the distance calculation inside Ping?

    I'm asking because I want to know how many measurements by second I can achieve, for an object that is at max 50cms from Ping.

    Thanks again
  • allanlane5allanlane5 Posts: 3,815
    edited 2009-08-31 15:04
    I believe the 'ping' sensor uses the width of a 'pulsin' signal to communicate to the BS2 the distance. And that happens after the pulse has been sent, then recieved, then the delay expressed as a pulse-duration.

    But I thought all of this could happen within a millisecond -- but I'll have to look that up again. This IS travelling at the speed of sound, after all, which is 'slow' compared to RF or electrical impulses.

    And, having looked it up, it looks like the max pulse-width is like 18.5 mSec.· I'm not sure how long "echoes" would bounce around after that, confusing the next measurement.· At the very least it looks like 20 mSec to ping and get a measurement.

    The Javelin example uses 1/2 second of 'silence' between pings -- but most of the other BS2 examples use 100 mSec of silence between pings.· Some experimentation is in order here, I think.

    Post Edited (allanlane5) : 8/31/2009 3:14:55 PM GMT
  • gbravettigbravetti Posts: 8
    edited 2009-09-01 00:33
    Thanks!

    I think I will buy one then perform some tests.

    I want to build a d-beam like MIDI controller, and I thought that PING could be more accurate than IR distance sensors, the problem is that I need a fast refresh, at least one measurement each 20 or 30ms, anyway I will test!

    Thanks
  • SRLMSRLM Posts: 5,045
    edited 2009-09-01 02:07
    You may want to take a look at these IR sensors if you haven't already. Their datasheet is floating off somewhere on the web, but if I remember right it has a faster update rate than the ping. They also wouldn't interfere with each other (since they shine a little dot).
  • gbravettigbravetti Posts: 8
    edited 2009-09-01 02:15
    great link!
    that are the IR sensors I was thinking on use, I have some data-sheets already, but the info on that link is very useful!

    thanks SLRM!
  • SRLMSRLM Posts: 5,045
    edited 2009-09-01 03:38
    Also, depending on how you want to do things, a linear camera might work too. It could do multiple binary channels or a single channel with a few bits of accuracy.

    www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/566/Default.aspx?txtSearch=linear+camera
  • gbravettigbravetti Posts: 8
    edited 2009-09-01 08:07
    SRLM, is there any sample code on image analisis using this camera?
  • SRLMSRLM Posts: 5,045
    edited 2009-09-01 14:18
    Yes, there are several threads, including anything on the product page.
    http://forums.parallax.com/showthread.php?p=812333
    http://forums.parallax.com/showthread.php?p=814265

    Of particular interest is the second. I think what you want to do is make one of those "virtual harp" type setups. If so, it would be fairly easy to replace the string with a hand.
  • gbravettigbravetti Posts: 8
    edited 2009-09-01 18:14
    wow thanks!
Sign In or Register to comment.