Shop OBEX P1 Docs P2 Docs Learn Events
speed of sound — Parallax Forums

speed of sound

computer guycomputer guy Posts: 1,113
edited 2007-04-04 07:37 in BASIC Stamp
How would i use the ping sensor and a bs2/prop to measure the speed of sound, in e.g meters/second?
Preferably a BS2.

Thank you smile.gif

Comments

  • LSBLSB Posts: 175
    edited 2007-04-03 10:54
    In order to measure the speed of sound (or anything) You need to know how far it went and how long it took to do it. If the PING sensor will return data in the form of time (msecs or such)--and I don't know that it will (check the data sheet--you need to know how to configure it anyway)-- you would then "PING" a known distance, say 1 meter. If the sound takes 8 msecs to travel the 2 meters (out and back), then the spreed of sound is figured by dividing distance by time--factored to scale. In our poor example: 2 meters in 8 msecs = 4 msecs/ meter. There are 250 (4 msecs) in a second so... our calculations reveal that sound travels 250 meters per second.
  • computer guycomputer guy Posts: 1,113
    edited 2007-04-03 21:36
    The ping returnes a measurement in us(microseconds). So would i use for example
    0.54milliseconds / 1meter
    to work out the speed of sound.

    Thank you smile.gif
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-04-04 00:14
    Of course, you realize that the 'ping' measurement is the time for the pulse to travel the meter, reach the far end, 'bounce', and come back again. Thus, if your 'fixed' target is at 1 meter, the time will be for 2 meters of distance -- there and back again.
  • computer guycomputer guy Posts: 1,113
    edited 2007-04-04 00:37
    Yes i do realise that.

    Thank you smile.gif
  • computer guycomputer guy Posts: 1,113
    edited 2007-04-04 07:37
    How do i set a VAR (variable) as a decimal. say 0.003 for example. On the BS2.

    Thank you smile.gif

    Post Edited (computer guy) : 4/4/2007 7:54:28 AM GMT
Sign In or Register to comment.