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.
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.
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
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!
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).
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.
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.
Comments
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
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
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
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!
www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/566/Default.aspx?txtSearch=linear+camera
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.