Shop OBEX P1 Docs P2 Docs Learn Events
USing Ping))) sensor for academic purposes — Parallax Forums

USing Ping))) sensor for academic purposes

stephancstephanc Posts: 2
edited 2014-05-19 09:46 in General Discussion
Dear all,

I wanted to call in your expertise since i'm not getting any further on my own.
I have been working several days now on getting full accuracy out of the ping))) sensors.

I understand i am pushing the sensors kind of to their limit, since I aim to measure water surface heights with millimeter accuracy.
Still , from my experience , it seems the ultrasonic sensor is able of this, beside one very unconvenient behavior , where the sensor values seem to be 'randomly' hopping by 0,4 cm (so about 40 microseconds).

Examples of this behavior can for example be seen at:

http://screencast.com/t/O1coRvv2

2014-05-16_2134.jpg


I added some small 'pipes' in front of the transmitter and receiver, in order to reduce random scatter of falling onto the sensor.
This seemed to be working helping ,but not solving the problem:

http://screencast.com/t/HzktVaVT7
2014-05-16_2133.jpg


As can be seen , the 'hops' now seem to be at a 'fixed' point , further encouraging the thought that there is indeed some kind of echo or geometrical cause. But then why is this 'hop' always constant in size , if it depends on geometrical setup.
I experimented some more with adding some 'pipes' , and tought i solved the issue.
I did some 'long term' experiments with multiple sensors read simultaneously (sensors are all above same flume , but well separated in time , and read with 100 millis delay between , so no interference issues are present). As you can see, they nicely fall toghether in the beginning. Don't mind the measurements in the box, this is where i performed some experiments.
But then after that , you can see the behavior i mean very well. Suddenly the sensor seem to start 'hopping' by 0,4cm , stay at that level for a while , and then 'hop' back.

http://screencast.com/t/O5qASb0EABCu
2014-05-16_2137.jpg


At the location with multiple arrows 2 of the 4 sensors seem to 'hop' to a new equilibrium , being 0,4cm higher then the other 2 (and sometimes fall back to 'base level') for a while.You can see the accuracy is very high for periods with no hopping, but the hopping introduces the inaccuracy.
Since in normal measurements all sensors will read different levels , I will have no idea what the 'base' level is , and i need to be able to trust my calibration , and read all the sensors apart.
I"m out of things to try, and I hope anyone here can help me. I would be very grateful , but I am just out of inspiration.

Thanks in advance,

Stephan
1024 x 468 - 32K
1024 x 519 - 40K
1024 x 566 - 48K

Comments

  • hover1hover1 Posts: 1,929
    edited 2014-05-18 08:27
    Test reply
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-18 09:34
    Stephan,

    This is an interesting topic to consider. Thank you for posting so much information about what you are trying to do.

    Have you tried other ultrasound sensors besides the Ping? I recalling seeing some data suggesting the Maxbotix ultrasound sensors have bit better performance than the Ping. The Maxbotix sensors are more expensive but I'm under the impression, they are more accurate than other hobby grade ultrasound sensors.

    I'm not sure if you're aware or not, but the forum software blocked this thread for a while. I don't know if the moderators ever figured out why the software initially blocked it. I'm glad they were able to get this thread to display. It's very interesting.
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-05-18 11:44
    Stephan,

    I suspect you may be seeing an artifact of how the microcontroller on the Ping measures the delay - either an interrupt response time, or a polling loop length.

    Regards,

    Bill
    stephanc wrote: »
    Dear all,

    I wanted to call in your expertise since i'm not getting any further on my own.
    I have been working several days now on getting full accuracy out of the ping))) sensors.

    I understand i am pushing the sensors kind of to their limit, since I aim to measure water surface heights with millimeter accuracy.
    Still , from my experience , it seems the ultrasonic sensor is able of this, beside one very unconvenient behavior , where the sensor values seem to be 'randomly' hopping by 0,4 cm (so about 40 microseconds).

    Examples of this behavior can for example be seen at:

    http://screencast.com/t/O1coRvv2

    2014-05-16_2134.jpg


    I added some small 'pipes' in front of the transmitter and receiver, in order to reduce random scatter of falling onto the sensor.
    This seemed to be working helping ,but not solving the problem:

    http://screencast.com/t/HzktVaVT7
    2014-05-16_2133.jpg


    As can be seen , the 'hops' now seem to be at a 'fixed' point , further encouraging the thought that there is indeed some kind of echo or geometrical cause. But then why is this 'hop' always constant in size , if it depends on geometrical setup.
    I experimented some more with adding some 'pipes' , and tought i solved the issue.
    I did some 'long term' experiments with multiple sensors read simultaneously (sensors are all above same flume , but well separated in time , and read with 100 millis delay between , so no interference issues are present). As you can see, they nicely fall toghether in the beginning. Don't mind the measurements in the box, this is where i performed some experiments.
    But then after that , you can see the behavior i mean very well. Suddenly the sensor seem to start 'hopping' by 0,4cm , stay at that level for a while , and then 'hop' back.

    http://screencast.com/t/O5qASb0EABCu
    2014-05-16_2137.jpg


    At the location with multiple arrows 2 of the 4 sensors seem to 'hop' to a new equilibrium , being 0,4cm higher then the other 2 (and sometimes fall back to 'base level') for a while.You can see the accuracy is very high for periods with no hopping, but the hopping introduces the inaccuracy.
    Since in normal measurements all sensors will read different levels , I will have no idea what the 'base' level is , and i need to be able to trust my calibration , and read all the sensors apart.
    I"m out of things to try, and I hope anyone here can help me. I would be very grateful , but I am just out of inspiration.

    Thanks in advance,

    Stephan
  • stephancstephanc Posts: 2
    edited 2014-05-19 05:33
    One of the working assumptions I indeed had was the fact that there could be a problem of 'time resolution' of the Ping sensor itself in determining the delay between sending and receiving.
    The thing is, when i very slowly fill the channel , i get a graph like this:
    2014-05-19_1422.jpg


    So on the vertical the distance , on the horizontal the time in microseconds, and in color the different sensors. (filling==negative values)
    You can very nicely see that the sensors 'all together' nicely measure the distance in a continuous way. But individual sensors sometimes have the 'hopping' behaviour.
    I concluded that when it would be an issue of time resolution i could not get continuous lines , but only some constant values in between which the measurements hop.
    Because it's very clear that when you 'move' a wrong stretch of the measurement, it very nicely fits the continuous line.

    I also tought about directly trying to read in the response of the receiver, in order to bypass the processing of the ping sensor itsself, but I don't know what connection I should try and measure.
    If anyone would have an idea how i could achieve this this would already help.

    I did not try other ultrasonic sensors yet , mainly because the sensors I have are already mounted in with some proper protection and means of placing them very precisely above the flume, so If things could work out the way they are it would be convenient.
    I truly believe the sensors have the potential to be very accurate, if i am able to fix the 'hopping' behaviour.

    I also thank anyone who does the effort to help out , and I promise to make a publicly available document on all my findings and work if i manage to solve the issue , so others can use it aswell.
    1024 x 378 - 33K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-05-19 09:43
    The wavelength of a 40 kHz ultrasonic ping in air is 0.84 cm. Your measurement uncertainty is 0.4 cm, or half a wavelength. This seems about right from a physics standpoint. To get rid of unwanted noise from the return pulse in any ultrasonic detector, it has to be bandpass filtered, recitfied, and integrated. (This is the basic principle of AM demodulation.) Every peak and trough of the waveform bumps the computed return energy until it reaches a threshold and the echo timing stops. There is therefore very little chance that the threshold will be breached at the zero points of the waveform. -- only near its extrema. And if one extremum just misses the threshold, the next one might cross it.

    Remember that energy and time are conjugate variables. Reducing the uncertainty of one increases the uncertainty of the other. Since an ultrasonic receiver measures energy, determining the time at which the measured return energy passes a threshold will have an uncertainty attached to it based on its wavelength. So I believe that what you're seeing is a limitation of ultrasonics in general, not of any particular implementation.

    -Phil
  • PublisonPublison Posts: 12,366
    edited 2014-05-19 09:46
    Maybe not directly related to the current problem, but this gentleman did some work on refining the PING's response:

    http://forums.parallax.com/showthread.php/123785-Reflector-to-enhance-PING)))-performance-available
Sign In or Register to comment.