cancel
Showing results for 
Search instead for 
Did you mean: 

LED Microphone Noise Interference

raminee
Associate
Posted on August 09, 2013 at 23:41

Hi,

I am working on a simple custom HW design based on the STM32L SoC.

The STM32L is connected to several LEDs as well as a microphone along with other external devices like batteries, switches etc .. 

The firmware is written from scratch that collects the sound through the ADC via the DMA and into a pre-defined local buffer of the memory. At the same time the LEDs are programmed to be ON or OFF with a predefined duty cycle.

Everything seems to work well except that I get noise spikes through the sound samples from the microphone when the duty cycle is anything but 0% or 100%.

The noise seems to be related to LEDs switching from ON to OFF or vice versa. Whether this is through the PWM or manually turning the LEDs on or OFF by firmware. Every time LEDs switch I get spikes showing in the background noise samples through the microphone.

I have 8 LEDs in total and I turned half of the them off and the spike amplitude reduces as the number of LEDs are turned off. 

I really like to get a clean sound through the microphone but each time LEDs come On or OFF I get these annoying spikes.

Any ideas as to why this is happening ?

Happy to share schematics if you think you can help.

Many Thanks

Raminee

#stm32l
5 REPLIES 5
emalund
Associate III
Posted on August 10, 2013 at 14:20

I am working on a simple custom HW design

 

The noise seems to be related to LEDs switching from ON to OFF or vice versa.

 

Any ideas as to why this is happening ?

 

 

do you have a solid ground plane?

do you have enough decoupling caps?

are the traces to those less than 5mm?

Happy to share schematics if you think you can help.

 

schematics will not help, this is a layout problem

Erik
raminee
Associate
Posted on August 10, 2013 at 18:22

Since my posting we found the problem to be with the 3.3v rail.

When the LEDs turn ON the power source (3.3v in this case) dips slightly.

The audio amplifier is on the same 3.3v voltage rail and when the voltage dips the amplifier causes the spike in the signal that is then fed to the ADC of the SoC.

R.

jj2
Associate II
Posted on August 10, 2013 at 19:10

While you fault the 3V3 rail - other areas bear exploration:

a) Led is human - not machine read/recognized - thus avoidance of ''common toggling (multiple Leds) will reduce noise spikes.  You'll never note the slight delay.

 

b) Dialing in ''slew-rate'' will further reduce.  (even when 3V3 rail is proper)

c) Modern Leds (decent ones) illuminate brightly (widely too - if properly chosen) at reduced currents when compared to older/lesser devices

d) Ground plane (as other poster suggested) is important - and your circuit path to the microphone should avoid higher current and/or any switching signals/traces/components. 

Suggestions here should benefit - flow into all of your low-level, analog signal handling...

boxchatter007
Associate
Posted on August 07, 2014 at 19:07

In Reference to your noise problem you must have a shield wire around your audio wire in order to catch all noise from both led lights and audio output also must have your ground from audio and led lights grounded in different locations this will stop all your problems hope i was of help i know cause i have a product and had the same problems now they are resolved.

chen
Associate II
Posted on August 08, 2014 at 10:34

Hi

''I am working on a simple custom HW design based on the STM32L SoC.''

Wow, I did not know they did that.

Depending on the STM32 core that you are using, check if the ADC has a Vref input.

If it does, use a different supply (different voltage rail/regulator - call this 'analogue supply'). This may help decouple the digital switching noise from the analogue.