Please let me know if this is not the right section
The problem: I am sampling audio for an sound reactive RGB LED strip with the NodeMCU v3. When I use USB power from my computer, everything works well. If I power the NodeMCU from a 7805 linear regulator (5v) to Vin, it works fine. "Silent" conditions hang around 0 volts and audio levels show up clearly. When I power the NodeMCU with a 3.3v switching regulator (with the microphone grounded on the NodeMCU and VCC coming from the 3v3 pin) this is where the problem starts. If I have the LED strip unconnected, it detects the sound find (although my "silent" conditions hover more around .1 volts but for my purposes that wouldn't be an issue).
The problem is powering the board and subsequent microphone from the switching regulator with the lights connected I get very erratic voltage readings that are all over the place. You might be asking why not just use the linear regulator then? Well, even at 12 volts the (12v-5v)*( few hundred mA) is a decent amount of heat to dissipate but sure I could get a heat sink and control it but the end goal for this project is to power my 10m strip which is 24 volts and the linear regulator would have to dissipate (24v-5v) * (few hundred mA) which I really do not think is sustainable which is why I got the switching regulator in the first place.
I was told that these switching regulators do not play nicely with microphones but with the LED strip unconnected it wasn't as consistent as USB or linear regulator power but it still worked perfectly fine.
Could anybody explain why this issue arises and hopefully a way to fix it? Are there a series of tricks I can use to limit whatever interference is occuring? Should I give up on trying to make the switching regulator work? Would capacitors/resistors solve this?
I really would prefer to use the switching regulator for efficiency reasons, my second option wouldn't be the linear regulator it would be powering the Node from a wall adapter and USB cable to be honest. This is getting quite frustrating, one problem's fix causes another but I suppose thats how things go sometimes.
I am including a diagram of my setup. Please note the linear regulator should actually be a switching regulator and the board I am using is not the Huzzah, its the NodeMCU v3.
Components:
-NodeMCU v3
-N Type Mosfets
-RGB LED strip (currently a 5 meter 12 volt 5050 leds, future: 10 meter 24 volt)
For any suggestions if there is something that will solve my issue, I am not worried if it costs $5 versus the linear regulator being <$1. I am more worried about space, amount of cords, and relative efficiency.
Would really really appreciate any help in solving this issue, this is pretty much the last part of a pretty big and feature rich controller.
Hopefully I have included as much information as is needed.
Thank you and feel free to ask any questions!
Diagram: https://postimg.org/image/6qcxxpaf1/