I'm having problems with audible noise from a VMA306 sensor. Everything is working great apart from the audible low frequency buzz after my code is done running. The sound stops when touching any ground point on the Pi (USB ports etc.)

When powering up the Pi there is no sound until i initialize the GPIO in python, and the noise is persistent even after i power it of. The sound does not stop until i unplug the power-supply of the Pi.

Any tips for isolating the noise other than making a proper ground connection to the wall outlet? I'm aware that i can connect the HDMI to a grounded TV etc. I'm just keen on finding a more compact solution.

  • 1
    you provided very little information .... it sound like the power supply may be getting overloaded
    – jsotola
    Commented Apr 27, 2020 at 17:08
  • 1
    I know it is a ground issue due to noise stopping when touching terminals. I'm using the original power supply. I have nothing else connected to the Pi apart from the ultrasonic distance sensor. I'm certain it's connected properly, I've also made a voltage divider, and measurement/code is working completely fine. When running a continuous measurement there is no noise, i suspect this is due to the noise getting "overpowered" by HIGH signal to the Trigger? I't also seems like a standard 50Hz buzz. I Could try and measure it with an audio recording i guess(No scope atm.). Commented Apr 27, 2020 at 17:24
  • 1
    please post a wiring diagram of your connections
    – jsotola
    Commented Apr 27, 2020 at 17:35
  • 1
  • 1
    Worth mentioning I'm using this particular sensor. Yes i'm aware that the Echo and Trigger has switched places. As mentioned earlier; code and measurements are working flawlessly. Commented Apr 27, 2020 at 18:19

1 Answer 1


It sounds like 50Hz (or 60Hz in USA) power line pickup. If so, this is typically the result of poor wiring practices. To reduce noise pickup in your wiring, there are some common things to try:

  • keep all wiring runs as short as possible.
  • twisting signal wire pairs reduces noise pickupNote 1
  • be mindful that some locations have more noise in the environment (e.g. next to fluorescent fixtures)
  • bypass capacitors and ferrite beads may provide further help if proper wiring doesn't resolve the issue.

This answer is not detailed because your question provides no details - which is understandable in this case. Most problems like this are solved by trial-and-error, and hopefully this gives you enough background to know what things to try.

One point of confusion for me that you might clear up in your question (please edit your question instead of responding with a comment):

*You seem to be saying that the audible noise comes from an ultrasonic sensor - is that correct? Do these devices have an audio transducer built into them?*

Note 1: Twisting wire leads must respect the signals on the wires to be twisted. It would be useless and silly to twist (for example) a supply wire with a signal wire. Twist a signal wire with its return, or twist + and - from your power source to the sensor.

  • 1
    Thanks for the suggestions. I will give an update tomorrow and update the original post accordingly (StackExchange newbie). Commented Apr 27, 2020 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.