<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MEMS microphone via PDM is noisy</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44146/mems-microphone-via-pdm-is-noisy</link><description>Hello, 
 I am trying to build a device that can detect the surrounding sound level and display it on the screen. For this I am using this MEMS microphone in conjunction with the Nordic PDM interface . 
 The problem 
 It seems that the noise floor is very</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Sep 2023 13:49:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44146/mems-microphone-via-pdm-is-noisy" /><item><title>RE: MEMS microphone via PDM is noisy</title><link>https://devzone.nordicsemi.com/thread/446304?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2023 13:49:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48665263-1960-4d16-b470-02ab2e3ff0dc</guid><dc:creator>NewtoM</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;one more thing that can bring you some extra dBs in terms of SNR is to set &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/pdm.html?cp=5_0_0_5_14_6_13#register.RATIO" rel="noopener noreferrer" target="_blank"&gt;NRF_PDM-&amp;gt;RATIO&lt;/a&gt;=&amp;nbsp;&lt;a class="el" href="https://infocenter.nordicsemi.com/topic/drivers_nrfx_v2.3.0/group__nrf__pdm__hal.html#ggaa440ffa5a57cc209736e6d66ff1b9088a7751765dfa324acc1a8ab08bf340f0f1"&gt;NRF_PDM_RATIO_80X&lt;/a&gt;&lt;span&gt;&amp;nbsp;during PDM init. (The default value is&amp;nbsp;&lt;a class="el" href="https://infocenter.nordicsemi.com/topic/drivers_nrfx_v2.3.0/group__nrf__pdm__hal.html#ggaa440ffa5a57cc209736e6d66ff1b9088aa165fd177221dc7be65cf727fd8be40a"&gt;NRF_PDM_RATIO_64X&lt;/a&gt;).&amp;nbsp;For this you&amp;#39;ll need to sacrifice some of the sampling rate, though. (But there are&amp;nbsp;pretty high sampling rates that are known to work, so it should not be a problem, see&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/15150/single-pdm-microphone-at-higher-pcm-sampling-rate"&gt;Single PDM microphone at higher PCM sampling rate&lt;/a&gt;&amp;nbsp;.)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Tamas&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MEMS microphone via PDM is noisy</title><link>https://devzone.nordicsemi.com/thread/440403?ContentTypeID=1</link><pubDate>Wed, 09 Aug 2023 07:09:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7b13e66-0a42-4156-b7d7-5bd950871d5f</guid><dc:creator>Karl</dc:creator><description>&lt;p&gt;Hi Jason,&lt;/p&gt;
&lt;p&gt;I was talking about calibration because I was building a sound level meter to measure surrounding noise levels in decibels. In my code above&amp;nbsp;I am calculating how loud the incoming audio is. The result however is relative and therefore has to be&amp;nbsp;offset&amp;nbsp;by comparing it to a measurement of another audio meter. However the reference audio meter I used showed wrong results. As I calibrated my readings to&amp;nbsp;it&amp;nbsp;by&amp;nbsp;adding a 130 dB offset in the code, my readings for the noise floor were quite high.&lt;/p&gt;
&lt;p&gt;In other words, I never had noise issue, I just had a bad reference device to compare and align my readings to.&lt;/p&gt;
&lt;p&gt;If you are recording audio and are unhappy with how noisy the recording is, then I am afraid that you have a different problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MEMS microphone via PDM is noisy</title><link>https://devzone.nordicsemi.com/thread/433279?ContentTypeID=1</link><pubDate>Tue, 27 Jun 2023 13:51:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4f3304e-449b-4021-8964-dc310ad9a10c</guid><dc:creator>irarykim</dc:creator><description>&lt;p&gt;Hi, Karl,&lt;/p&gt;
&lt;p&gt;Can you tell more about the &amp;quot;code calibration&amp;quot;?&lt;/p&gt;
&lt;p&gt;I am facing similar problem that PDM mems MIC brings a lot of noise while recording voice.&lt;/p&gt;
&lt;p&gt;I am using nRF52840.&lt;/p&gt;
&lt;p&gt;Jason&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MEMS microphone via PDM is noisy</title><link>https://devzone.nordicsemi.com/thread/262546?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 10:50:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fddd6962-fc5f-4653-a6df-14105f9b51bc</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I do not see any reason why not. But please make another thread if you have questions about that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MEMS microphone via PDM is noisy</title><link>https://devzone.nordicsemi.com/thread/262530?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 09:01:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d1df442-eb9e-4924-8528-ad9a6aaf6f5a</guid><dc:creator>juu</dc:creator><description>&lt;p&gt;Do you know if it can work with the Thingy 52 ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MEMS microphone via PDM is noisy</title><link>https://devzone.nordicsemi.com/thread/193361?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 09:32:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46ce4f48-be28-48fd-be5e-627c41b1da0d</guid><dc:creator>Karl</dc:creator><description>&lt;p&gt;So it turned out that the issue I was seeing was merely related to a broken reference device, to which my code had been calibrated. After calibrating it to a new device I was seeing a noise floor around 34 dB SPL, which I am happy with. Thanks for the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MEMS microphone via PDM is noisy</title><link>https://devzone.nordicsemi.com/thread/173925?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 10:31:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df30fc38-6966-4c3e-96c2-9100744abce6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Writing 1 to the&amp;nbsp;TASKS_HFCLKSTART register like you do here will ensure that the HFXO is started. However, the SoftDevice will only start the HFXO when needed by the radio and disable it immediately after (so the RC is running instead). It is your responsibility to start it when you need a high accuracy clock for other peripherals. If you start it with direct register access like this, then enable the SoftDevice, it will turn it off again after the first radio event. You should use the SoftDevice API function &lt;a href="https://www.nordicsemi.com/DocLib/Content/SoftDevice_API_Doc/S132/v6-1-1/group_nrf_soc_functions?1829#ga3e5afb495a1b0307c749cc268df94a74"&gt;sd_clock_hfclk_request()&lt;/a&gt;&amp;nbsp;(or even better &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-3-0/hardware_driver_clock"&gt;clock driver&lt;/a&gt;, which in turn use the SoftDevice API) after enabling the SoftDevice to prevent this from happening.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MEMS microphone via PDM is noisy</title><link>https://devzone.nordicsemi.com/thread/173744?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 14:53:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0bcdef3-6d38-476d-842e-36bf6c106252</guid><dc:creator>Karl</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;In the project the clocks are managed by the soft device. The sdk_config.h is based on the ble_app_template example and configures this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// RC 
// XTAL 
// Synth 
#define CLOCK_CONFIG_LF_SRC 1 
#define NRF_SDH_CLOCK_LF_SRC 1 
#define NRFX_CLOCK_CONFIG_LF_SRC 1Code&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I could not find anything&amp;nbsp;that starts the&amp;nbsp;high frequency oscillator. I tried to disable the soft device and manually start LF and HF clocks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
int main(void)
{

/* Start 16 MHz crystal oscillator */
NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;

/* Wait for the external oscillator to start up */
while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0)
{
// Do nothing.
}

/* Start low frequency crystal oscillator for app_timer(used by bsp)*/
NRF_CLOCK-&amp;gt;LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal &amp;lt;&amp;lt; CLOCK_LFCLKSRC_SRC_Pos);
NRF_CLOCK-&amp;gt;EVENTS_LFCLKSTARTED = 0;
NRF_CLOCK-&amp;gt;TASKS_LFCLKSTART = 1;

while (NRF_CLOCK-&amp;gt;EVENTS_LFCLKSTARTED == 0)
{
// Do nothing.
}

// ...
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In this case the noise issue is still exists though and I also do not know if the HF clock is based on xtal or RC, as I could not find the way how this would need to be configured.&lt;/p&gt;
&lt;p&gt;By the way I also thought that there might be some noise induced by the board being connected to the computer so I hooked it up to a battery and ran the firmware, but it is still the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MEMS microphone via PDM is noisy</title><link>https://devzone.nordicsemi.com/thread/173282?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 14:36:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12532d91-94b7-405a-9658-30150b81f86a</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you started the high frequency xtal oscillator, or are you using the RC? If so, can you test again with the xtal oscillator started?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>