Sonar Noise

I know this is discussed in many places with lots of different solutions

I have

1) resistor / capacitor as per the instructions

2) APM, RC receiver, sonar, Xbee etc powered from a seperate 6A BEC

3) tightly twisted wires to reduce noise

4) mounted on the nose away from ESC's Xbees etc.

and i still have lots of big spikes and the climb rate is constantly noisy from this.

Have a look at the log file and you will see what i mean.

2012-04-29 01-37 1.log

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • 100% better results now! soldered the wires directly from the apm to the sonar, because when i was trying something else I noticed there was no power going to the capacitor bank I was trying to use. so made me a bit sus if there was a bad connection and cutting power while moving.

    check out the results in the log file! almost perfect, the first half is with the motors running full speed and tilting up and down at the walls to get changes in height. then where the spikes are is where i was banging the metal booms with a screwdriver to see how physical noise effected it. then the last half is with the motors off to compare.




    If it wasnt so windy outside i would go and try it out.

    2012-06-05 12-12 6.log

  • Ok so ive changed a couple of things in my quad to try and sort this sonar out.

    Ive installed a 0.1uF cap at the analogue input pin right next to the IC on the APM and installed a 100k resistor at the analogue out of the sonar. looking at the logs now i see the spikes are much wider than before. each spike is measured over 3 or 4 samples instead of just 1.

    Here is a pic with the pad i made next to the IC

    3692434956?profile=originalHere is the 0.1uF cap installed

    3692434915?profile=originalAnd the jumper wire from the IC to the cap (i cut off the excess after i soldered it)


    On to plan #59614836

  • How often is the sonar input actually measured by the APM? will adding a 50ms delay change anything? it only measures every 99ms anyway.


    I will give it a go with the 0.1uF cap on the apm and a 10k to start with and then the 100k to see how much difference it makes. ill see how it looks and post the logs if it makes a difference.


    Shame i wont be home for about a month :(

  • I have also been having problems and have tried all the suggested filters. It holds altitude better with the sonar off than with it on. I am about ready to just take it off and give up. Are there any other brands of sonar that would be better suited for outdoor use?

    Maybe the problem is the analog interface. If we could use the digital interface maybe that would help but I don’t know how to do that.



  • I have been considering putting a cap on the signal line, but havent seen that fix anywhere before. What value is recomended? Does it go between the signal wire and earth or will it be inline to decouple?

    I have the cable twisted tightly then wrapped with aluminium foil with a braid around that from some coax then heat shrunk. the braid is connected to the same earth pin as the sonar and only at the apm end. I am going to change that to USB cable when i get home from offshore.

    The nose puts it 110mm clear of the apm board and with a very clear view of the ground. Have a look at my pics on page 6 of the share your drone thread, although i have changed the mounting screws to nylon and put spacers between the carbon fibre sheet and the board and also added the reststor/cap since then.
  • I've had good success with mine:

    • used resistor / capacitor on both supply voltage and signal line, as per the Maxbotix FAQ.
    • used multicore shield cable to connect it to the APM.  The shield is only connected to earth at the APM end - a separate earth wire is run through the cable to earth the sensor.
    • mounted it on an arm out about 50 cm out from the body and well away from any wires with an absolutely clear view of the ground.
This reply was deleted.


Laurie J. Troy liked Jasper Kueppers's profile
Apr 1
Timothy Miller liked Joseph Udofia's profile
Mar 18
Joseph Udofia liked Joseph Udofia's profile
Mar 3