AnsweredAssumed Answered

LED Microphone Noise Interference

Question asked by raminee.jaminee on Aug 9, 2013
Latest reply on Aug 8, 2014 by sung.chen_chung
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

Outcomes