Reading Ping)) Distance
pogertt
Posts: 33
I am trying to read a Ping)) sensor over it's entire sensing range as fast as possible.
The Ping)) documentation gives a tHOLDOFF time of 750 usec.
My sensor has a measured HOLDOFF time of 804 usec.
Trigger to Echo.bmp
The documentation also gives a Echo Return Pulse Maximun of 18.5 msec.
My sensor has a measured Echo Return Pulse Maximun of 21.756 msec.
Echo Maximum.bmp
This is the Spin code used to get the above examples.
Ping_Fast.spin
When I run the program and watch in a Parallax Serial Terminal window, I get the following typical data:
The sensor is looking into space with no object to detect.
1740518
1740500
1740502
1740500
1740488
1740463
1740469
1740488
1740485
1740478
1740484
1740486
1740496
1740444
(1 / 80_000_000) * 1740444 = .02175555 seconds.
This jives with my scope capture,
The readings have been stable over a period of days.
My question is:
What is the tolerance on Ping)) sensor timing?
If I were to run the same code with a batch of 10 sensors, what would be the variations?
The point of this exercise is to find out how fast I can detect an object that passes the sensor from left to right, as opposed to aproaching it straigt on.
If someone else could give values with a different Ping)) that would be great.
Pogertt
The Ping)) documentation gives a tHOLDOFF time of 750 usec.
My sensor has a measured HOLDOFF time of 804 usec.
Trigger to Echo.bmp
The documentation also gives a Echo Return Pulse Maximun of 18.5 msec.
My sensor has a measured Echo Return Pulse Maximun of 21.756 msec.
Echo Maximum.bmp
This is the Spin code used to get the above examples.
Ping_Fast.spin
When I run the program and watch in a Parallax Serial Terminal window, I get the following typical data:
The sensor is looking into space with no object to detect.
1740518
1740500
1740502
1740500
1740488
1740463
1740469
1740488
1740485
1740478
1740484
1740486
1740496
1740444
(1 / 80_000_000) * 1740444 = .02175555 seconds.
This jives with my scope capture,
The readings have been stable over a period of days.
My question is:
What is the tolerance on Ping)) sensor timing?
If I were to run the same code with a batch of 10 sensors, what would be the variations?
The point of this exercise is to find out how fast I can detect an object that passes the sensor from left to right, as opposed to aproaching it straigt on.
If someone else could give values with a different Ping)) that would be great.
Pogertt