I have read many comments on the sensitivity of the Sonar sensor, i.e. mainly two types of issues:
-first electromagnetic interferences, electric interferences that impact the distance measurement stability. Especially the sonar sensor should be as far as possible from all magnetic/electric sources (such as the ESCs, the motors, electronics in general).
-second parasitic sound sources, or vibrations (which by definitions creates sound waves in the air) can also impact correct and stable readings of the sonar sensor.
In the pictures below is shown the installation of the XL-MaxSonar-EZL0 sonar sensor:
I have used the 3DR sensor mount that places the sensor in between two arms of the quad copter. On this picture you see that the three wires going from the sensor to the APM are shielded within a metallic plastic sleeve. This was home built from these metal bags that protect electronic boards...
On the following picture you can see a close up of the sensor that I covered with some microphone bonnet. In fact I purchased a microphone bonnet and I cut the tip of it to match the size of the sensor. This improves the sonar not to pick up too much parasitic noises:
This picture shows the microphone bonnet positionned on top of the sonar sensor
This picture shows the system in place, screwed on the sonar mount (fiberglass piece from 3DR store accessories)
On the last picture below you see how the cables passes through the microphone bonnet, by making a little slit into it:
The wires coming out of the sensor are wrapped in this metal plastic foil as explained above. The bonnet holds simply with a touch of hot glue (hot glue guns are great for that) and by the cables going through the slit.
I did not test this setup yet in flight (I just built the quad and am still waiting to get my radio delivered from hobbyking and that takes ages to come from Asia...) but will keep you posted of the results. So far some tests done as inside a cluttered room with PC interferences are promissing.
Happy new year to all