Noise on speaker

  • Hello,

    My m5stack core (the mpu9250 version) started to make some clicking noise on the speaker when a sketch is uploading and when is in normal function state some static and a high pitched noise can be heard.
    Also since this noise started the upload process fails sometimes.
    I think it started when I uploaded the FactoryTest example, but im not sure. Uploadin another sketch does not fix the issue.
    Any clues on why this is happening?

  • @shiul93Noise on speaker 中说:

    Also since this noise started the upload process fails sometimes.

    The "one" klicking noise is little to be expected in some situations, but a continous high pitched noise I never observed. Is the base board properly connected to the core module? You would like to double check it and maybe add two M3 screws with proper length (don't use to long ones) to it and test it again.

  • I tried powering the module in three different ways, with the bottom, with the battery module and with the USB cable alone, but the noise persists.
    This noise is like the speaker is stuck on maximum volume, static+high pitched sound like old CRT tv, changing volume with the function M5.Speaker.setVolume(); doesn't change anything.

  • Mine is also producing this high pitch noise.

    I thought a PWM could cause this, so I tried:


    which actually does:

    ledcWriteTone(TONE_PIN_CHANNEL, 0);
    digitalWrite(SPEAKER_PIN, 0);

    I believe it should be enough to prevent the ESP from generating a PWM.

    However the noise was still there !

    I then suspected the LCD backlight so I tried


    That works !

    May be improving the electrical decoupling between the board and the display could enable using the screen without hearing the noise.

  • @donckNoise on speaker 中说:


    for me mute and setBrightness to 0 not solve noise problem,
    I still hear that noise :(

  • Just to be clear, to me there are two types of noises:

    Light white noise : I believe this one is probably due to the quality of the audio amplifier.

    A higher pitched noise, much more annoying.

    On my device (M5Stack limited edition), only the 2nd one is affected by the display setting.

    For that second one, not everybody may be able to hear it, depending on multiple factor including aging (presbycusis).

    Update: I received my M5Stack with PSRAM, it behaves exactly the same.

  • Yes, I hear white noise (I have to put my ear to be heard) + and second one, annoying, audible from a distance.
    I have too M5Stack limited edition

  • I also noticed a lot of noise on the speaker, and I can tell that a large part of it comes from the SPI signal going to the display, from the PWM on the display backlight, from the signal on the UART from uploading, and pretty much from every single thing the module does. The reason for this is probably that the audio lines are not designed and shielded properly, and all sort of electrical activity in the module affects the audio signal.

    I noticed that moving the speaker leads under the PCB affects the intensity of the noise in different situations (probably depends on which part it is closer to).

    This is exceptionally poor design, I'm afraid.

  • @deshipu This is for those who can live without audio and want to safe on power consumption along the way.

    Note that the audio amplifier can be disabled by placing a solder bridge over the two correspondingly marked PCB pads next to the ESP32.

  • @on4aa Hi Serge,

    I haven't had any significant ongoing problem with this....

    Regardless, just to clarify for those playing along at home, I take it this is where you suggest the solder bridge - (Edit: photo deleted as it ultimately did not aid the discussion and added unnecessary additional screen scrolling - JimiT.)

  • No, I am talking rather about this optional solder bridge marked with AMP on the PCB:

    optional AMP solder bridge

  • With respect to the noise, I hear the following:

    1. Interference or capacitor noise on every instance when something on the screen is being drawn,
    2. A very brief high-pitched squeak when the device is connected through USB and the cable temporarily makes a bad contact when being manipulated.

    There is little that can be done about the first source apart from redesigning the PCB and perhaps replacing certain capacitors with more expensive tantalum variants.

    As for the second source, I am wondering if we are dealing here with an undocumented audible brown out (i.e. undervoltage) warning. I am using the optional 850mAh battery and I charged my device well before use. By consequence, I do not hear it that often, only when manipulating the USB cable when connected.

    However, those using the bottom plate battery of a mere 150mAh battery, perhaps without properly charging it, might here the high tone more often or even continuously.

    I am hoping more users and certainly the designers will chime in here (pun intended) to clarify this situation.

  • Here is how the audio amplifier can be disabled:
    AMP power schematic

  • Hi,

    If someone still have the issue these two lines should solve the problem

    pinMode(SPEAKER_PIN, INPUT);

  • The solution is much easyer:

    dacWrite (25,0);

  • @calin Thanks!
    Precision: dacWrite (25,0); must be in the void loop