Microphone Outputting Erratic Voltages

Hello,

Having a bit of an issue. I have a NodeMCU driving three NPN mosfets to an RGB LED strip. Powering the LED strip is 12 volts currently, powering the NodeMCU is the Vout from a step down converter of sorts from the 12 volt supply and this is going into the NodeMCU's 3.3v pin. Finally, powering my microphone is a different 3.3v pin. All grounds are connected on the breadboard except I have the microphone grounded to the NodeMCU GND pin.

I am doing beat detection and increasing the brightness of the LED strip when a certain voltage threshold is met.

All of this works well if I power the NodeMCU from my computer's USB port (aka not applying 3.3volts from the step down converter). I get a "silent" reading near zero, and it records sound spikes well when powering via USB.

The issue occurs when I do power it from the step down converter, although I don't think the converter is the issue. I get very erratic voltage readings ranging anywhere from near zero to 3.1 volts even when it is "silent" in the room.

I am guessing there is some sort of "electrical noise" or something due to all of the components together? That would be my first guess. Should I ground the microphone to somewhere other than the NodeMCU? (although I tried this and that alone did not fix the issue)

Any advice on how to get more consistent readings would be greatly appreciated!

Thank you

Switching supplies can be "dirty".

No experience with this NodeMCU, but had a look at the onboard supply diagram here.

http://henrysbench.capnfatz.com/henrys-bench/arduino-projects-tips-and-more/powering-the-esp-12e-nodemcu-development-board/

Seems logical (to me) to adjust the buck converter to 5volt, and connect to the V-in pin.
The onboard regulator will drop it to 3.3volt, and remove some of the hash in the process.
Keep the mic connected to 3.3volt.
Leo..

Wawa:
Switching supplies can be "dirty".

No experience with this NodeMCU, but had a look at the onboard supply diagram here.

capnfatz.com - capnfatz Resources and Information.

Seems logical (to me) to adjust the buck converter to 5volt, and connect to the V-in pin.
The onboard regulator will drop it to 3.3volt, and remove some of the hash in the process.
Keep the mic connected to 3.3volt.
Leo..

Thanks for the reply! I should have been more specific, my converter is this one which does not have a 5v option. I do however have a 7805 voltage regulator I will try out in the morning though. Is "hash" the term for whatever it is (electrical charge/noise?) that could be causing erratic measurements?

Asking the right question is 80% of the answer and I do not know all the proper terminology.

Thanks again

Yes, a microphone amplifier is almost never going to work well from a switch-mode supply, use a linear
regulator.

MarkT:
Yes, a microphone amplifier is almost never going to work well from a switch-mode supply, use a linear
regulator.

Thank you for the advice, the "silent" readings are hovering around 0 again.

Could you possibly explain why the switching supply doesn't work?

I'm back to a previous issue using a 7805, because although I'm currently using 12 volts the end goal is to make it work with a 24 volt supply and I don't know if the 7805 can handle that heat dissipation

Could you possibly explain why the switching supply doesn't work?

It can work if it's well-designed and well-filtered. Microphone preamps have gain somewhere in the ballpark of 100-1000 (depending on the gain/volume control) and if noise gets into the circuit it's going to get amplified. Power supply switching noise is "nasty" because it's (relatively) high-power high-frequency pulses with lots of harmonics and it can get "transmitted" all over the place. But, most of the noise is supersonic and that's a good thing for an audio amplifier. 50/60Hz power line hum can also be an issue with linear power supplies in audio equipment.

I'm back to a previous issue using a 7805, because although I'm currently using 12 volts the end goal is to make it work with a 24 volt supply and I don't know if the 7805 can handle that heat dissipation

If the 7805 is just powering the microphone-board, I'd guess you'll be OK.

DVDdoug:
It can work if it's well-designed and well-filtered. Microphone preamps have gain somewhere in the ballpark of 100-1000 (depending on the gain/volume control) and if noise gets into the circuit it's going to get amplified. Power supply switching noise is "nasty" because it's (relatively) high-power high-frequency pulses with lots of harmonics and it can get "transmitted" all over the place. But, most of the noise is supersonic and that's a good thing for an audio amplifier. 50/60Hz power line hum can also be an issue with linear power supplies in audio equipment.
If the 7805 is just powering the microphone-board, I'd guess you'll be OK.

Thank you for your explanation that is quite helpful. The microphone board is not the only thing being powered, the NodeMCU is also powered by the regulator. From what I have seen the max draw to the board is about 350 mA on startup but goes down significantly during normal operation.

I noticed the 7805 got pretty warm/hot very quickly. That was the purpose of the switching regulator, 91% efficiency and stayed cool. Is the linear my best bet and if so should I just heat sink it?

Thanks again

Hi,
Have you placed bypass capacitors around the LM7805?
Check the data sheet for the LM7805.
You need at least a 0.1uF and 10uF caps on the input and output of the regulator.

Tom.... :slight_smile:

TomGeorge:
Hi,
Have you placed bypass capacitors around the LM7805?
Check the data sheet for the LM7805.
You need at least a 0.1uF and 10uF caps on the input and output of the regulator.

Tom.... :slight_smile:

Thanks for pointing that out. Are the capacitors in regard to electrical noise or the heat issue? (or both)

MarkT:
Yes, a microphone amplifier is almost never going to work well from a switch-mode supply, use a linear
regulator.

Is there any tricks to making it work with a switch mode supply or is it just not an option at all?

bmoe24x:
Thanks for pointing that out. Are the capacitors in regard to electrical noise or the heat issue? (or both)

Both... connect them as close to the regulator as possible.
Tom... :slight_smile: