🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Mod to programmatically disable speaker whine/hiss.

    Scheduled Pinned Locked Moved PRODUCTS
    10 Posts 8 Posters 30.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      Macaba
      last edited by

      Re: Noise on speaker

      Hi all,

      I've been working on porting the Teensy Audio Library to M5Stack to allow full (& easy) audio synthesis.

      0_1539790993131_IMG_0656-2.JPG

      However the background whine/hiss from the speaker when no audio is being played is very annoying (and quite loud on my M5Stack).

      My suggested modification in this case is to put a wire from Pin 1 of the speaker amplifer to GPIO5.

      0_1539790903732_IMG_0655-2.JPG

      Then it's just a simple case of digitalWrite(5, HIGH); to turn on the amplifier, and digitalWrite(5, LOW); to turn off the amplifier.

      There seems to be a 30-100ms delay for the amplifier to turn on, and very little delay for it to turn off so I sadly can't get my audio library to automatically turn the amplifier on/off because I would miss the beginning of any new audio playback.

      So I've just attached the amplifier control to BtnA for manual control so I can at least turn off the noise.

      Good luck to anyone else attempting this mod! :)

      C M 2 Replies Last reply Reply Quote 0
      • C Offline
        cbrightly @Macaba
        last edited by

        @macaba I will have to look into this! Do you plan on sharing any of your work porting the audio libraries from the Teensy over to the M5Stack / ESP32?

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          Macaba
          last edited by

          Yep! It'll be going on GitHub at some point.

          It won't be compatible with the the original audio objects from the Teensy library;

          1. I've moved over to float datatype for audio samples (it makes certain audio algorithms so much easier) so I've been slowly porting across the objects when I use them.
          2. I've added some functionality that lets you get more detailed CPU reporting.

          You can see my handy 'Amp on/off' control now:
          0_1539868916364_adaacef8-3324-46f7-a94e-ae38e249f3e7-image.png

          1 Reply Last reply Reply Quote 0
          • M Offline
            Macaba @cbrightly
            last edited by

            @cbrightly https://github.com/macaba/ESP32AudioLibrary

            Initial commit of ESP32/M5Stack audio library done. Not that many objects yet, I'll be adding more as time allows.

            1 Reply Last reply Reply Quote 0
            • C Offline
              ChrisMicro
              last edited by

              Hello, I just flashed it and it works. Thankx :-)
              Do you use a software sigma-delta-DAC or the internal 8 Bit DAC?
              Probably you can add a second example which shows a little bit of the sound qualities of the lib.

              1 Reply Last reply Reply Quote 0
              • C Offline
                Calin
                last edited by Calin

                You can mute the speaker very easy from code.
                Just call
                dacWrite (25,0);

                1 Reply Last reply Reply Quote 0
                • P Offline
                  PlayTheGame
                  last edited by

                  @Calin Hold your ear on the "mute" speaker. There is still noise with your code.

                  THX for the hardware mod suggestion.

                  1 Reply Last reply Reply Quote 1
                  • N Offline
                    Nifkuzyaire
                    last edited by

                    Hello,
                    Maybe you can port this teensy dalek voice sketch to m5stack
                    Thank you in advance.

                    https://pastebin.com/dYf49wp5

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      masrodjie @Macaba
                      last edited by

                      @macaba Nice. I was trying all the way to avoid noise on speaker and none of luck. Then trying using this method and it's works! Thanks

                      1 Reply Last reply Reply Quote 0
                      • F Offline
                        funghy
                        last edited by

                        It is probably better not to connect PIN 1 of the NS4148 but pin 3 the buck converter EA3036 to pin 5 since otherwise you have a bigger power consumption. You could also remove R23 in that case.

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post