Hello folks! In attempting to get sound reactivity working,

Hello folks! In attempting to get sound reactivity working, I’m running into some noise issues with my mic + MSGEQ7. In short, I’m seeing a lot of additional high frequency noise when the LEDs are on. More specifically, I see this noise most prominently when outputting to a second strip on a second data channel, even when the total number of LEDs on is the same.

Some more details: I’m using an ESP8266 NodeMCU with a sparkfun MEMs mic (https://www.sparkfun.com/products/9868) and an MSGEQ7 for frequency analysis. The board and LEDs are all powered via 5V from the wall, and the mic+MSGEQ7 are powered from the 3V out of the ESP. I’ve tried a simple decoupling cap with 3V power from the ESP, and a “T-filter” (https://electronics.stackexchange.com/questions/306242/why-does-my-electret-microphone-amplifying-and-filtering-circuit-output-so-much) to clean up the power going into the mic+MSGEQ7, but neither have helped too much.

Below are two pictures of the issue. In the first, I am outputting to a single strip (GPIO5) of 240 LEDs. Blue is low frequencies, red is mids, green is highs. It’s noisier than when the LEDs are totally off, but it’s perfectly usable. The second picture is the same music but outputting to a second strip (GPIO4), each strip with 120 LEDs on (so same number of LEDs, same current draw). The mids and highs here are totally unusable, with a higher baseline.

It’s clear that there’s some PWM noise getting in when the LEDs are on, but I’m not sure why it changes when outputting to a second strip. If anyone has ideas on circuitry to eliminate the noise, or ideas on why this is happening, it would be greatly appreciated. Thank you!

Have you tried a different power supply?

@James_G I have with one other power supply. Same issue unfortunately.

Hey I have dealt with these kind of issues before,

i added 2 100uf capacitors in parallel on analog in and out on the msgeq7 board. It helped to fix the noise issues on the esp8266, but for the esp32, I still have noise issues.

https://oshpark.com/shared_projects/5khRyYrx

Is there a sensitivity adjustment for the SparkFun MEMS mic?

I added an inline cap between the mic and the msgeq7, that solved a similar problem for me. Got the idea from RGB shades documentation, I think

@Tommy_Sciano Hmm. I tried adding a 100uF in parallel with GND on the output of the MSGEQ7 but I only see noise now, no audio response at all. I added another 100uF in parallel with GND on the input (there’s already a 10nF here as the wiring diagram suggests too) but now I see no response at all, not even noise. Did you mean a cap in parallel with GND, or something else?

@Jeremy_Spencer On the wiring diagram there is a 10nF cap in series between the mic output and the input of the MSGEQ7. I’ve already included this. Is this what you’re referring to, or did you add something in addition?

Thank you both for the suggestions!

@James_G There’s no sensitivity adjust, but I’m not sure that would solve the noise issue as it seems to be related to power rather than external sound.

@Dylan_Lovinger

@Tommy_Sciano Thank you for the diagram! I just tried this and while it works to reduce noise, I’m no longer getting separate frequencies out of the MSGEQ7. Even playing a tone generator of a specific frequency, I see the highs, mids, and lows all peak at the same amplitude. Any thoughts on this?

@Dylan_Lovinger on my diagram for the MSGEQ7 I didnt put that it was using a breakout board for the msgeq7. Do you have it wired up on a breakoutboard with the correct resistors and caps?

also maybe you could post a gist of your msgeq7 code.

pretty sure I used @Jason_Coon @Garrett_Mace 's
(stefan patrick renditions https://plus.google.com/u/0/115124694226931502095)

And here is basically my fork of it

@Tommy_Sciano I do have the MSGEQ7 wired up with everything it needs. On a little temp breadboard, so there could be loose connections, but I believe it’s working properly as it picks up the proper frequencies from a tone generator when the LEDs are off. It’s once the LEDs are on and more current is drawn that the noise increases and the MSGEQ7 picks up music much more poorly.

Thanks for linking your code. I actually was playing around with Jason’s initially and trying it out. Still had the same issue. I’ve also been using Nicohood’s code, which seems to be a pretty simplified method of reading the MSGEQ7: GitHub - NicoHood/MSGEQ7: Library for Musicvisualization with MSGEQ7. Same issues with noise when LEDs are on though.

The code I’m using to test is here, basically just working with some of Nico’s functions and outputting to serial + LEDs

@Dylan_Lovinger this is all on an esp8266 correct? I know some people have had issues with bad chips in the past.
Have you tried it on an Uno with multiple led strips?

It could just be a flaw in the esp8266, or the IC you are using. Let me know if you have noise issues on the Uno as well. Could help to pinpoint where this is all rising from.

@Tommy_Sciano Yep this is all on an ESP8266. I actually don’t have any UNOs lying around, but it could be a good idea to grab one and try it out. You may be onto something, as I find it very strange that the noise changes when outputting on a second pin even when the power draw is the same. I’ll try out some other chips I have lying around and see what happens.

@Dylan_Lovinger When i was first working with the msgeq7 I was worried my chip was bad because of the weird noise readings on the esp8266 wemos d1 mini and did a test on the Uno and confirmed that the chip was fine before i tried to figure out what else was wrong with it. in my case adding the caps worked out well, but I wasn’t using a mems. ( I also have the same MEMS as you do , and when I get back on the 30th to my work station, Ill try and do a test if you haven’t been able to solve it by then!)
Cheers

@Tommy_Sciano Good to know. That would certainly be helpful to have another data point with the MEMS mic. Thanks for all the advice, happy holidays!