Shop OBEX P1 Docs P2 Docs Learn Events
Very specific PING))) questions! — Parallax Forums

Very specific PING))) questions!

Ted HayesTed Hayes Posts: 4
edited 2007-02-07 14:54 in General Discussion
Hi guys! I'm a bit new to basic stamp and parallax products, and I have some very specific questions about the PING))) ultrasonic distance sensor.

I am designing an (art) installation where I need to measure the height (y) position of the surface of a water table, ideally at a precise point, so I can (hopefully) ultimately obtain a signal representing the surface's motion over time at a single point. I want to use the sensor's output to create a continuous signal that I can use as an input parameter for a synthesizer. I've been looking into ultrasonic sensors since it seems like the only even remotely accurate way of sensing I've come across for this purpose so far.

Now, I'm aware of the problems inherent in this project with a sensor like this, so I'm not too concerned about x/z accuracy. But my main question for you guys is, what's the maximum temporal resolution I should be able to achieve with this sensor? If I'm reading the documentation correctly, the total time it takes to make one reading is (roughly) 5+750+115+200 = 1070 microseconds. So I'd be able to make almost 1000 readings per second. If this is true, it'd just make my day! My theoretical ideal temporal resolution would be like 44.1khz, but I certainly don't expect to get that kind of performance. My plan at the moment is to just use quadratic interpolation to rough out a continuous signal from the sensor's output.

So! If anyone has any experience with these sensors, they seem like my best bet so far. Although I read somewhere that the distance resolution is 5mm -- can anyone verify that? That definitely puts a dent in my plan but I'm learning to relax my expectations [noparse];)[/noparse]

Thanks so much in advance for any insight you can provide!
--Ted

Comments

  • John AbshierJohn Abshier Posts: 1,116
    edited 2007-02-06 17:56
    Min time is 2 (t_out) + 750 (t_holdoff) + 115 (t_min) + 200 (reset time) = 1076 uSec
    Max time is 2 + 750 + 200 + 18500 (t_max) = 19457 uSec
    Max rate will depend on how far you are measuring.
    1 uSec = 0.007 inches. The minimum resolution of a BS2 is 2 uSec. However, this is a maximum resolution. Noise in the system will degrade this number.
  • Ted HayesTed Hayes Posts: 4
    edited 2007-02-06 18:09
    Thank you for your reply! The measurement distance will only be about 3' and I can vary that to suit.

    So now my big question is, is there a way to tweak the sensor to increase its distance resolution? I think I was reading that the measurement errors come from picking up echoes, is there a way to just read only the first echo and ignore everything else?

    Thanks again!
  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-06 19:26
    The PING isn't just the sensor, it includes a microprocessor that does the pulse generation and the timing. The specification says maximum width of the timing pulse is 18.5ms. I assume this is a true maximum since you would not want a controller to hang up waiting for the trailing edge of the echo detect pulse if it never comes. If you want to play around with increased range, you'd have to make your own PING, maybe using an SX or Propeller or find a commercial device specified for more range.
  • PARPAR Posts: 285
    edited 2007-02-06 20:57
    Ted Hayes said...
    ...
    I am designing an (art) installation where I need to measure the height (y) position of the surface of a water table, ideally at a precise point, so I can (hopefully) ultimately obtain a signal representing the surface's motion over time at a single point. I want to use the sensor's output to create a continuous signal that I can use as an input parameter for a synthesizer. I've been looking into ultrasonic sensors since it seems like the only even remotely accurate way of sensing I've come across for this purpose so far.

    Now, I'm aware of the problems inherent in this project with a sensor like this, so I'm not too concerned about x/z accuracy.· ...·My theoretical ideal temporal resolution would be like 44.1khz, but I certainly don't expect to get that kind of performance. My plan at the moment is to just use quadratic interpolation to rough out a continuous signal from the sensor's output.

    So! If anyone has any experience with these sensors, they seem like my best bet so far. Although I read somewhere that the distance resolution is 5mm -- can anyone verify that? That definitely puts a dent in my plan but I'm learning to relax my expectations [noparse];)[/noparse]
    A few more specs, perhaps?

    How will the surface's surface change in shape (e.g., will it remain plane, or will it be "wavy", "choppy", periodically so, erratically so)?

    How far up/down will the surface move (you state that it will be about 3 feet away from the sensor, and that you will want a "resolution" of 5mm)?

    How fast does the surface change height?

    Can you insert sensor(s) into/below the surface?

    By "water table" surface, do you mean the surface of free water in a pan/tank, or do you mean the water table in the earth (ground)?

    PAR
  • Ted HayesTed Hayes Posts: 4
    edited 2007-02-06 21:08
    Hi! Thanks for the replies!

    It is a fairly shallow "pan" of water. The dimensions are variable but I was imagining something about .5' deep. The water's surface will be available for interaction, so somebody could drop a penny in, splash a little bit, make large waves. I'm anticipating a displacement range of something like, say, .5mm to 3cm, from smallest wave to biggest. The sensor can be any height necessary above the surface of the water.

    The surface will change rapidly (observe the movement of the water's surface when you throw a pebble in a pond). For the project to work I'd need a high-resolution representation of the movement of the water's surface at a single point. I know my temporal resolution is limited by the physical nature of the ultrasonic sensor, so I was anticipating using some kind of interpolation on the data to give me a rough estimation of the actual movement. Basically, as long as a big change in the water results in a big change in the signal(s), it will work.

    Yes, sensors could certainly be placed in the water if necessary.

    I am aware of the many limitations of using ultrasonic sensors in this scenario, so I'm also researching alternatives (like low friction rotary potentiometers / RVDTs). Thanks again for any additional insights you have!
  • PARPAR Posts: 285
    edited 2007-02-07 04:39
    Ted Hayes said...
    ...
    It is a fairly shallow "pan" of water. The dimensions are variable but I was imagining something about .5' deep. The water's surface will be available for interaction, so somebody could drop a penny in, splash a little bit, make large waves. I'm anticipating a displacement range of something like, say, .5mm to 3cm, from smallest wave to biggest. The sensor can be any height necessary above the surface of the water.

    The surface will change rapidly (observe the movement of the water's surface when you throw a pebble in a pond). For the project to work I'd need a high-resolution representation of the movement of the water's surface at a single point. I know my temporal resolution is limited by the physical nature of the ultrasonic sensor, so I was anticipating using some kind of interpolation on the data to give me a rough estimation of the actual movement. Basically, as long as a big change in the water results in a big change in the signal(s), it will work.

    Yes, sensors could certainly be placed in the water if necessary.

    I am aware of the many limitations of using ultrasonic sensors in this scenario, so I'm also researching alternatives (like low friction rotary potentiometers / RVDTs). Thanks again for any additional insights you have!
    I didn't ask how large the pan of water will be (length/width).

    Seems that the surface disturbances will take on a variety of shapes as well as magnitudes. In addition, they might be "small" or "large" in extent (depending both on the nature of the disturbance and on how large (l/w, and depth for that matter) the pan is).

    So, the sensor which must detect a nearly-point-source disturbance of the surface may need to have quite a narrow field of detection (mere fractions of a sq. in. in area) to sufficiently characterize the disturbance. That plus the near instantaneous sensor·reaction time and high frequency of sampling which some types of surface disturbances would best be characterized with, makes for an interesting problem.

    (It will be interesting to learn what intensity of sampling and spatial resolution of "height" will permit the music to most "accurately" (subjective, of course) characterize the water surface movement in the listener/observer opinion.· "Does that water surface disturbance sound "wavy", "splashy", "sloshy", "rhythmic", "stormy", ·......·· :>)

    PAR
  • Ted HayesTed Hayes Posts: 4
    edited 2007-02-07 14:54
    Yes, that will be one of the most interesting parts of the experiment, presuming I can figure out a way to observe the water's motion accurately. If I wasn't trying to track water, a laser transducer would be completely ideal. As it is, the best I can hope for, I think, are highly sensitive, super low friction rotary potentiometers attached to arms, kind of like an inverse seismographer.
Sign In or Register to comment.