<?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>ADC measurement is not good.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47826/adc-measurement-is-not-good</link><description>Hi, 
 I am using nrf52832_AA, SDK 15.0.0, s132. 
 I am using an ADC and it does not seem to be measured correctly. The value is shaken. 
 The AIN2 pin is used, and when the voltage is measured by the multimeter, a constant voltage of 3.5 V is input. </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 May 2019 07:41:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47826/adc-measurement-is-not-good" /><item><title>RE: ADC measurement is not good.</title><link>https://devzone.nordicsemi.com/thread/190019?ContentTypeID=1</link><pubDate>Thu, 30 May 2019 07:41:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9561f58e-7d78-4daa-9401-a92d020bdfea</guid><dc:creator>powerup</dc:creator><description>&lt;p&gt;Much better after averaging ADC values!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC measurement is not good.</title><link>https://devzone.nordicsemi.com/thread/190011?ContentTypeID=1</link><pubDate>Thu, 30 May 2019 02:35:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8562679-10f7-4472-be5f-7988d3162cd2</guid><dc:creator>powerup</dc:creator><description>&lt;p&gt;I set&lt;strong&gt; NRFX_SAADC_CONFIG_RESOLUTION&amp;nbsp; 1&lt;/strong&gt; //(10bit)&lt;/p&gt;
&lt;p&gt;And converts the values ​​obtained by the ADC.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrf_drv_saadc_sample_convert(0, &amp;amp;adc_value);&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;adc_value = adc_value*360/1023;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This ensures that the ADC value is a three-digit integer.&lt;/p&gt;
&lt;p&gt;Hundred digits, decimal digits are good.&lt;br /&gt;However, the value of the first digit constant changes.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="tw-swapa"&gt;
&lt;div class="DHcWmd"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="oSioSc"&gt;
&lt;div id="tw-target"&gt;
&lt;div class="gsrt tw-nfl tw-ta-container" id="tw-target-text-container"&gt;[For example]&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;adc_value = adc_value*&lt;strong&gt;36&lt;/strong&gt;/1023;&lt;/p&gt;
&lt;p&gt;3.35V input -&amp;gt;&amp;nbsp; 33 (good)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;adc_value = adc_value*&lt;strong&gt;360&lt;/strong&gt;/1023;&lt;/p&gt;
&lt;p&gt;3.35V input -&amp;gt; 334~336 (bad)&lt;/p&gt;
&lt;p&gt;I want to get the correct value.&lt;br /&gt;Is it impossible?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC measurement is not good.</title><link>https://devzone.nordicsemi.com/thread/189628?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 12:10:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c87bd50-2973-4671-b012-282e64be3d8a</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Please use batteries (not a steady power supply) as I suggest for both analog input and VDD when possible. A starting example may be:&amp;nbsp;\nRF5_SDK_15.3.0_59ac345\examples\peripheral\saadc&lt;/p&gt;
&lt;p&gt;The maximum analog input depends on VDD, it can not be above VDD. You may also need to adjust the gain setting when measuring the analog input, to ensure that it is below the reference voltage (which internally is 0.6V). So a gain setting of 1/6 ensure that the analog input signal is divided by 6 and is less than the reference voltage.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s possible to change the resolution yes, please look at the SAADC chapter in the nRF52832 Product Specifications and the parameters when calling&amp;nbsp;nrfx_saadc_init() in the above example (e.g. see NRFX_SAADC_CONFIG_RESOLUTION in the sdk_config.h).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC measurement is not good.</title><link>https://devzone.nordicsemi.com/thread/189596?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 11:22:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fddc9124-1d85-4dd5-a9c0-f1f9f59877c1</guid><dc:creator>powerup</dc:creator><description>&lt;p&gt;Thank you for answer.&lt;/p&gt;
&lt;p&gt;Is the code okay?&lt;br /&gt;I am using a 3.7V lithium polymer battery with a zener diode.&lt;br /&gt;Let&amp;#39;s test it with a power supply instead of a battery.&lt;/p&gt;
&lt;p&gt;-&amp;gt;&lt;/p&gt;
&lt;p&gt;Can I increase the resolution of the ADC?&lt;br /&gt;Where can I change to 8/10/12-bit?&lt;/p&gt;
&lt;p&gt;Also, when the direct power supply was connected to the pin, voltages above 3.5V were not measured accurately.&lt;br /&gt;Is the maximum input voltage 3.5V correct?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;Have a nice day.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC measurement is not good.</title><link>https://devzone.nordicsemi.com/thread/189577?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 10:51:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d39dd6d3-31fa-4dba-a956-6f37d08fe8bd</guid><dc:creator>Kenneth</dc:creator><description>[quote user=""]shaking when reading the adc_value value[/quote]
&lt;p&gt;It would be helpful to understand what you mean by &amp;quot;shaking&amp;quot;, since at the LSB level there is typically always some sort of noise unless you have an ideal input and VDD.&amp;nbsp;The closest you may get to an&amp;nbsp;ideal source can be to connect 1x AAA batteries for input, and 2x AAA batteries for VDD. So I suggest&amp;nbsp;to try&amp;nbsp;that to narrow down the source of the noise you see.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>