I saw your forum post and have review your issue.Causes of Incorrect range readings (with a properly installed and properly powered sensor)Multiple Sensor Applications (Cross Talk)
Ultrasonic Sensors output and receive sound information when taking a range reading. If multiple sensors are operational in the same environment this may cause one sensor to receive information sent by another sensor. To eliminate interference, we recommend running sensors in sequence. Refer to the examples of the three recommended ways to chain the sensors together.http://www.maxbotix.com/uploads/Chaining_Application_Notes__AN_Output_Commanded_Loop_.pdfhttp://www.maxbotix.com/uploads/Chaining_Application_Notes__AN_Output_Constantly_Looping_.pdfhttp://www.maxbotix.com/uploads/Chaining_Application_Notes__AN_Output_Simultaneous_Operation_.pdfExternal acoustic noise
External acoustic noise sources may cause false range readings, that make phantom objects appear (i.e. readings are too close). Soft or angled targets
Also soft targets or angled targets can be missed occasionally. That is, there must be a return of sufficient amplitude for detection and if enough energy is not returned then the target is missed. This missed target issue can be exacerbated up close, where the returning energy must be detected in the presence of very high energy ring-down, so soft targets, or off axis targets, may not be detected easily. (We will set the sensor to optimize for this... but the rules of physics will still apply.)Filtering in General
For filtering, do not average. Do not average. Do not average. (Did I say, do not average?) We have a lot of internal filtering in our products and if you receive readings that you feel must be filtered, do not use averaging. Instead, throwing out the incorrect range values will produce the best results. Averaging valid and invalid readings together will provide incorrect data. Filtering
The filtering that works best, is either a Mode filter or a Median filter. (Did I forget to say, "Do not average the readings"?) The Median Filter
The median filter would take the last group of readings and first sort them and then pull out the center reading. Here one might take three or more readings (up to say about 11 for people sensing) and after sorting the readings in order of range, pull out and use only the middle (median) reading. Fairly good filtering.The Mode Filter
The mode filter would take the largest group of the same readings out of a set of even larger readings. Very robust filtering.
Filtering for most applications, the Very Simple Mode Filter
The simplest mode filter, is simple as this question, "Do the last two readings agree?" (with in a certain distance, and the certain distance depends upon how much variation one expects in the actual use. Even so most use the logic of "are these readings exactly the same")? If so, use the readings, otherwise throw away to oldest reading, and compare the next reading with the most current reading and do this again. Obviously with very noisy data, one might have to sample a larger group of readings, and pull out the most common reading, but for most applications, this simple two reading filter works very well.
Even so, for specific cases, one has to try and find out what works best.
Please let us know if you have any further questions. I request that you email me any questions at firstname.lastname@example.org
Technical Support & Sales
of MaxBotix Inc.
Phone: (218) 454-0766 Ext. 2
Fax: (218) 454-0768