Mod to programmatically disable speaker whine/hiss.
Re: Noise on speaker
I've been working on porting the Teensy Audio Library to M5Stack to allow full (& easy) audio synthesis.
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.
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
BtnAfor manual control so I can at least turn off the noise.
Good luck to anyone else attempting this mod! :)
cbrightly 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?
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;
- I've moved over to
floatdatatype for audio samples (it makes certain audio algorithms so much easier) so I've been slowly porting across the objects when I use them.
- I've added some functionality that lets you get more detailed CPU reporting.
You can see my handy 'Amp on/off' control now:
- I've moved over to
Initial commit of ESP32/M5Stack audio library done. Not that many objects yet, I'll be adding more as time allows.
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.
Calin last edited by Calin
You can mute the speaker very easy from code.
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.
Nifkuzyaire last edited by
Maybe you can port this teensy dalek voice sketch to m5stack
Thank you in advance.
masrodjie 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