<?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>SAADC wrong readings &amp;amp; impossible to calibrate</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21439/saadc-wrong-readings-impossible-to-calibrate</link><description>Hi, 
 I am having hard times to make SAADC working on DK-52, SDK13, S132. I need to perform a voltage measurement on command received from a connected device. 
 AIN pin is connected as in the following picture: 
 
 I also have a digital multimeter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 May 2017 07:05:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21439/saadc-wrong-readings-impossible-to-calibrate" /><item><title>RE: SAADC wrong readings &amp; impossible to calibrate</title><link>https://devzone.nordicsemi.com/thread/84101?ContentTypeID=1</link><pubDate>Tue, 02 May 2017 07:05:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57c0cfe1-ec7b-47c8-a42a-33b53ad51950</guid><dc:creator>fab</dc:creator><description>&lt;p&gt;The offset is not constant but 0.015 provides pretty good readings at least rounding to 2 decimal places.
Since I have to read voltages in range 0-5v, I added a voltage divider and this probably increased the noise, the offset increased and is not more constant across the range. To overcome this issue, I measured the offset in 15 points across the range 0-5, I have interpolated the deltas with a 4 grade polynomial and now I get pretty good readings.
Last issue I have is that when the voltage is 0 (pin grounded), the readings are completely off value. Probably because the device is measuring only the noise. In my device, voltages never gets close to 0 but I have not figured how to overcome this issue.
I should try a active low-pass filter at ADC pin, but I am not sure that it could help. Any suggestion will be appreciated.
Thank you for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC wrong readings &amp; impossible to calibrate</title><link>https://devzone.nordicsemi.com/thread/84100?ContentTypeID=1</link><pubDate>Thu, 27 Apr 2017 12:11:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1fc3ba9-e812-4f14-8695-d1627846f5f4</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;If oversampling and offset calibration does not help, I don&amp;#39;t have any good advice to come with. You will allways have some noise in such applications, as described in multiple cases here on DevZone. Are you seeing a constant offset of 0.015 V?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC wrong readings &amp; impossible to calibrate</title><link>https://devzone.nordicsemi.com/thread/84099?ContentTypeID=1</link><pubDate>Sun, 23 Apr 2017 14:09:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27a5ee10-9e2d-467a-8c21-c728f7afe433</guid><dc:creator>fab</dc:creator><description>&lt;p&gt;I played around with the SAADC parameters (resolution, oversample, acq_time) without much success. I still have an offset of about 0.015 v.
A took a look with my scope and apparently there is a lot of noise at the SAADC pin (see the update at my question). Shown measurements are using the DK-52 powered via USB but I have almost the same situation with a third party module powered by battery.
Have you any suggestion on how to reduce the noise?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC wrong readings &amp; impossible to calibrate</title><link>https://devzone.nordicsemi.com/thread/84098?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2017 11:08:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bdf6df4-54a5-4a67-a92f-3e302eda058b</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Your results does not look too far off to me. See &lt;a href="https://devzone.nordicsemi.com/question/70115/nrf52-saadc-noise/?answer=70166#post-id-70166"&gt;this&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/question/48969/nrf52-adc-enob/?answer=49644#post-id-49644"&gt;this&lt;/a&gt; thread about expected deviation.&lt;/p&gt;
&lt;p&gt;The reason why you get &lt;code&gt;NRF_ERROR_BUSY&lt;/code&gt; when trying to calibrate is most likely that you have a buffer setup for sampling. The SAADC is considered sampling when &lt;code&gt;nrf_drv_saadc_buffer_convert&lt;/code&gt; have been called. You will have to abort any ongoing buffer conversions using &lt;code&gt;nrf_drv_saadc_abort&lt;/code&gt;, or wait to the operation is finished before starting calibration (when you get the &lt;code&gt;NRF_DRV_SAADC_EVT_DONE&lt;/code&gt; event). Note that if you use double buffering, you need to call &lt;code&gt;nrf_drv_saadc_abort&lt;/code&gt; or wait for two &lt;code&gt;NRF_DRV_SAADC_EVT_DONE&lt;/code&gt; events without setting up a new buffer for sampling, before calling the calibration task.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>