I'm having issues with sampling audio with a microphone and NodeMCU v3. I realize this is the Arduino section so if NodeMCU running the Arduino IDE is not meant for this forum, let me know.

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)*(a 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) * (a few hundred mA). I really do not think this 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. Even 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 tricks I can use to limit whatever interference is occurring? 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 that's 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, it's the NodeMCU v3.


  • NodeMCU v3
  • Adafruit Electret Mic (won't let me post more links... it's the adj. gain one)
  • Switching Regulator
  • N Type Mosfets
  • RGB LED strip (currently a 5 meter 12 volt 5050 leds, future: 10 meter 24 volt)

If there is something that will solve my issue, I am not worried that it costs $5 versus the linear regulator being

I 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!

 Project Diagram

1 Answer 1


The problems mentioned probably result from electrical interference, and as such might be better addressed in Electronics Stackexchange. But here is a quick overview of how to ameliorate the problem: add shielding and filtering.

For shielding, add a housing or braided-wire cable sleeves. To shield against electrical fields, the housing should be conductive and have no openings larger than the wavelength of the electrical interference you wish to suppress. To shield against magnetic fields, it should be made of a ferromagnetic material. You should have a housing around the switching supply, and can also add housings around any sensitive amplifier circuits.

For filtering, you can add an output filter with a few thousand microfarads of capacitance. For better filtering, use several large capacitors, with a choke (inductor) to connect each capacitor to the next. Add ferrite beads on each of the wires out of the power supply. Besides the large capacitors, add a couple of small ones, eg 0.01 and 0.1 μF before the chain of large filter capacitors, ie, close to the output terminals of the switching supply. Small capacitors generally have smaller self-inductance and can be more effective than large ones at suppressing high frequency hash. The big capacitors effectively smooth out lower frequency ripple but if they have much self-inductance may fail to suppress high frequencies.

  • Thank you for the information! I will try to see if it helps!
    – Brandon
    Commented Jan 13, 2017 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.