0

STEMMA Speaker Buzzing / Crackling
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

STEMMA Speaker Buzzing / Crackling

by phando on Thu May 06, 2021 2:38 pm

Hey All,
I just picked up a few STEMMA Speakers. They are louder than I expected which is awesome. I have a batter powered application using the Huzzah Feather 32. The project is using two led strips, an mp3 controller and the STEMMA Speaker. When the LEDs are running patterns the speaker crackles and makes noise. I assume I am listening to the signal going to the LEDs. I am hoping I am a capacitor or resistor away from a working project.

Any help would be much appreciated!
Attachments
Screen Shot 2021-05-06 at 10.37.54 AM.png
Screen Shot 2021-05-06 at 10.37.54 AM.png (60.07 KiB) Viewed 66 times

phando
 
Posts: 26
Joined: Wed Apr 11, 2018 1:01 am

Re: STEMMA Speaker Buzzing / Crackling

by mikeysklar on Thu May 06, 2021 6:49 pm

It's hard to know from your schematic what your exact wiring is, but audio interference from running LEDs is a common issue. The key is to make sure the +3v side and GND for the NeoPixels are being powered direct from the battery. Don't let them run through ESP32 and other shared components. These are of course shared lines, but you can control the path to help minimize and isolate noise. Same for the speaker. The output pin will need to be connected to your microcontroller pin, but the otherside high or low can come right off the battery. Does that make sense?

mikeysklar
 
Posts: 4584
Joined: Mon Aug 01, 2016 8:10 pm

Re: STEMMA Speaker Buzzing / Crackling

by phando on Thu May 06, 2021 7:11 pm

Thank you for the response! All power needs to be directly wired to the battery, roger that! The power to the speaker and the LEDs is coming from the bat terminals on the ESP32. Does that count at straight from the battery?

phando
 
Posts: 26
Joined: Wed Apr 11, 2018 1:01 am

Re: STEMMA Speaker Buzzing / Crackling

by mikeysklar on Fri May 07, 2021 10:58 am

No, don't use the ESP32 Vcc/GND pins for the LEDs and speaker. Run the wires back to the battery to avoid noise. Keep them away from the microcontrollers Vcc/GND lines.

mikeysklar
 
Posts: 4584
Joined: Mon Aug 01, 2016 8:10 pm

Re: STEMMA Speaker Buzzing / Crackling

by phando on Fri May 07, 2021 12:38 pm

Thank you for the responses. I wound up rebuilding the whole thing. The 1st improvement was to swap out the STEMMA device for another. Maybe the one I had was damaged (due to user error). The next step was to put everyone on the battery power rail, nothing is being powered from the ESP32 pins. Lastly I added a large cap to the power rail. Now the project is all buttoned up.

https://drive.google.com/file/d/18-56wBHkbwSAq7K1gNeVNukJKILDDZXq/view?usp=sharing

https://drive.google.com/file/d/1aC9Pg5nHlJR_i41vuSakLxeV33n8-79X/view?usp=sharing

phando
 
Posts: 26
Joined: Wed Apr 11, 2018 1:01 am

Re: STEMMA Speaker Buzzing / Crackling

by mikeysklar on Sat May 08, 2021 9:20 am

Nice clean build and beautiful enclosure. Does this do more than sounds and lights? What do you use it for?

mikeysklar
 
Posts: 4584
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.