<?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>NRF52840 ADC noise</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76444/nrf52840-adc-noise</link><description>I am currently evaluating nrf52840 - CDSENET E73-2G4M08S1C module with installed CircuitPython 7.0.0-alpha.3. Unfortunately the ADC readings are quite noisy. For example for 256 consecutive readings of a DC signal (0.120V) from a potentiometer the stdev</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Jul 2021 11:12:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76444/nrf52840-adc-noise" /><item><title>RE: NRF52840 ADC noise</title><link>https://devzone.nordicsemi.com/thread/319765?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 11:12:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1fbdcc5-8e7c-4d5a-840d-2147144e0ba6</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I am glad to hear that you are able to reduce the noise you are seeing when switching to Micropython, though I have never heard about Micropython personally.&lt;br /&gt;Are you now measuring the reference voltage with an oscilloscope?&lt;br /&gt;&lt;br /&gt;Enabling burst and oversampling should decrease the effects of noise on your output, since it then takes multiple samples in a row and averages them before outputting a single sample.&lt;/p&gt;
[quote user="Mtk"]The mainstream micropython ADC implementation &lt;a href="https://github.com/micropython/micropython/blob/master/ports/nrf/modules/machine/adc.c"&gt;adc.c&lt;/a&gt; is not using oversampling, calibration[/quote]
&lt;p&gt;It is recommended to perform calibration upon initializing the SAADC, and whenever the ambient temperature has changed by more than 10 C since the last calibration.&amp;nbsp;&lt;/p&gt;
[quote user="Mtk"]… As well as I was not able to find more advanced example configurations. Wondered if you could recommend some ?[/quote]
&lt;p&gt;I am not exactly sure what I should point you to when you ask for more advanced configurations, but please have a look at&amp;nbsp;&lt;a href="https://github.com/NordicPlayground/nRF52-ADC-examples"&gt;this repository&lt;/a&gt; for multiple SAADC examples using different configurations.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 ADC noise</title><link>https://devzone.nordicsemi.com/thread/319508?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 04:58:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b29df250-3f1d-4454-8da8-c45c0e4dfb53</guid><dc:creator>Mtk</dc:creator><description>&lt;p&gt;Switched to &lt;a href="https://github.com/micropython/micropython"&gt;Micropython&lt;/a&gt;, as well as disabled the int. DC-DC regulator and used the following settings:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;.burst = NRF_SAADC_BURST_ENABLED&lt;/p&gt;
&lt;p&gt;&amp;hellip;..&lt;/p&gt;
&lt;p&gt;nrfx_saadc_simple_mode_set((1 &amp;lt;&amp;lt; adc_obj-&amp;gt;id), NRF_SAADC_RESOLUTION_14BIT, SAADC_OVERSAMPLE_OVERSAMPLE_Over8x, NULL);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/ADC3.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The results (measuring 1.406 V) seems better &amp;ndash; stdev = 4. The mainstream micropython ADC implementation &lt;a href="https://github.com/micropython/micropython/blob/master/ports/nrf/modules/machine/adc.c"&gt;adc.c&lt;/a&gt; is not using oversampling, calibration &amp;hellip; As well as I was not able to find more advanced example configurations. Wondered if you could recommend some ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 ADC noise</title><link>https://devzone.nordicsemi.com/thread/316398?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 07:59:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d4863bf-3890-40df-a171-6d7bca1e0027</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="Mtk"]With 47uF capacitor on the input ? Using the same LDO with STM32WB55 I get about 11 ENOB in 12-bit mode (no oversampling), deviation about 1 LSB. In the nrf52840 case what is the measured ENOB – 8 ?[/quote]
&lt;p&gt;Unfortunately you must expect a couple of LSB deviation with the SAADC. Please see the replies by my colleagues in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/12287/nrf52-saadc-noise#post-id-70166"&gt;this&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/14583/nrf52832-saadc-sampling"&gt;this&lt;/a&gt; ticket for more information.&lt;br /&gt;However, I would also say as @awneil already has; A multimeter is not suited to measure/identify noise, because of its averaging. Do you have access to an oscilloscope with which you could perform these measurements?&amp;nbsp;&lt;/p&gt;
[quote user="Mtk"]Have some questions: I was trying different boot loaders including open_bootloader from nRF5_SDK_17.0.2_d674dde.[/quote]
&lt;p&gt;You likely will have to make some modifications to make it work with your CDSENET module, thought I have no personal experience with this exact module.&lt;br /&gt;I would ask that you open a separate ticket for the bootloader issues since it diverges from the original ticket, in order to keep the forum tidy and easy to navigate for other users.&lt;/p&gt;
[quote user="Mtk"]Also, is there any ready firmware that can use nrf52840 as regular Bluetooth adapter for testing other BLE devices etc. ?[/quote]
&lt;p&gt;Yes, please check out the &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver"&gt;pc-ble-driver&lt;/a&gt; and pc-ble-driver-py. These will let you create a desktop application using either cpp or python.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 ADC noise</title><link>https://devzone.nordicsemi.com/thread/316250?ContentTypeID=1</link><pubDate>Mon, 21 Jun 2021 11:35:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5ac1dc6-2dfe-4979-b9ae-c6eeb880eb9c</guid><dc:creator>Mtk</dc:creator><description>&lt;p&gt;With 47uF capacitor on the input ? Using the same LDO with STM32WB55 I get about 11 ENOB in 12-bit mode (no oversampling), deviation about 1 LSB. In the nrf52840 case what is the measured ENOB &amp;ndash; 8 ?&lt;/p&gt;
&lt;p&gt;Have some questions: I was trying different boot loaders including open_bootloader from nRF5_SDK_17.0.2_d674dde. Non of them worked, except &lt;a href="https://github.com/adafruit/Adafruit_nRF52_Bootloader"&gt;Adafruit_nRF52_Bootloader&lt;/a&gt;. With Nordic tools get errors like:&lt;/p&gt;
&lt;p&gt;Failed to upgrade target. Error is: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)&lt;/p&gt;
&lt;p&gt;Any specifics ?&lt;/p&gt;
&lt;p&gt;Also, is there any ready firmware that can use nrf52840 as regular Bluetooth adapter for testing other BLE devices etc. ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 ADC noise</title><link>https://devzone.nordicsemi.com/thread/316216?ContentTypeID=1</link><pubDate>Mon, 21 Jun 2021 09:36:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36514bb5-3e34-424e-a31d-fd4c692263cd</guid><dc:creator>awneil</dc:creator><description>[quote userid="105424" url="~/f/nordic-q-a/76444/nrf52840-adc-noise/315958#315958"]a multimeter measured a stable value 120 mV, which it is a prove that the noise is in uV region[/quote]
&lt;p&gt;Not really.&lt;/p&gt;
&lt;p&gt;A multimeter will do a lot of averaging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 ADC noise</title><link>https://devzone.nordicsemi.com/thread/315958?ContentTypeID=1</link><pubDate>Thu, 17 Jun 2021 17:01:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c640fc1-4d5a-45b7-9847-bdfc9760072f</guid><dc:creator>Mtk</dc:creator><description>&lt;p&gt;The input voltage is supplied from ultra-low noise LDO (TPS79933 &amp;ndash; output noise voltage 34.65 uV). Also, I have a 47 uF capacitor on the input, as you can see from the picture it is high-frequency noise. In addition, a multimeter measured a stable value 120 mV, which it is a prove that the noise is in uV region. The measures from the internal ADC are in the range: 114.947 mV - 123.851 mV (-5.053 mV to +3.851 mV&amp;nbsp;deviation from the average measure), which I consider not acceptable for the intended application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 ADC noise</title><link>https://devzone.nordicsemi.com/thread/315779?ContentTypeID=1</link><pubDate>Thu, 17 Jun 2021 08:12:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01418965-fbb7-47e2-8a59-cc69423960cc</guid><dc:creator>awneil</dc:creator><description>[quote userid="105424" url="~/f/nordic-q-a/76444/nrf52840-adc-noise"]Unfortunately the ADC readings are quite noisy[/quote]
&lt;p&gt;How do you know it&amp;#39;s not just your input signal that&amp;#39;s noisy?&lt;/p&gt;
&lt;p&gt;Your readings seem to be around 2375 +/- 75; ie, a variation of ~ 3% - which is actually not so bad, unless you&amp;#39;ve taken very great care over your analogue front-end, supply, layout, grounding, shielding, etc ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>