This is an update on my last post here regarding the repeatability of the sensor.
The first thing that I did was to modify the ping() routine to stop returning zero when it detects something funny. I used negative values to indicate each of the three detected problems. I also removed the “return 0” before the break what the distance reads excessively high. This was just to let me know if the routine was detecting anything funny.
Note that I am using the new command processor that I have posted on github.
Next I positioned Hexy about 40cm from a door at the end of a narrow hall. There was more than 6.5m to the other end behind Hexy so there there should not be much multi-path reflection. I expect this situation to provide a reasonably repeatable reading in the range of 30-50cm.
I then issued the command: #1mMMMMM a few different times. This causes 5 successive ping results to be reported. The first set of readings was:
10.17, 32.41, 85.17, 31.55, 31.55 which would have resulted in a multi-ping result of 31.55cm.
The second set returned a similar pattern of results. Interesting to note is the very low first reading. Future commands did not repeat this low first reading, but the readings continued to span 30 to 100cm.
I then tried #5mMMMMMMMMMM to take 10, 5-point, multi-ping readings. The results were:
19.31, 31.55, 87.93, 19.48, 75.52, 5.17, 13.62, 32.93, 32.93, 31.55
I acknowledge that I do not know exactly the correct reading, my ruler could be off by as much as a full CM, due to lack of knowledge of the exact location of the reference plane.
Looking at the readings I expect that the correct readings would be 31.5cm. I moved to about 100cm and got something that looked more like 70cm but the variation was still very significant.
Does anybody else see this type of variation in repeatability?