<?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 channel reading values when connected to ground</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64372/adc-channel-reading-values-when-connected-to-ground</link><description>Hi, 
 Hope you are doing good. 
 I run the SAADC signal to from the sdk and observed that when the adc input is connected to ground, the adc reads few random negative value( reference image attached below). is this a common behavior when the analog input</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Nov 2021 10:22:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64372/adc-channel-reading-values-when-connected-to-ground" /><item><title>RE: ADC channel reading values when connected to ground</title><link>https://devzone.nordicsemi.com/thread/340509?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 10:22:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbf45640-d1dd-4156-a580-9175db07bdf5</guid><dc:creator>STE</dc:creator><description>&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Thanks Jared, this is what I wanted to know.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;
&lt;p&gt;F.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC channel reading values when connected to ground</title><link>https://devzone.nordicsemi.com/thread/340507?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 10:20:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b463fe66-376a-4f94-8033-3861cf4f12fb</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="STE"]just know if this offset calibration is done internally the chip by electronically disconnect the input pin of the ADC, so is not requested any external action by me, or if to perform the calibration I&amp;#39;ve to ground externally the ADC pin. [/quote]
&lt;p&gt;&lt;span&gt;No external action is needed for the calibration routine to complete. Which means that you don&amp;#39;t have t&lt;/span&gt;&lt;span&gt;o modify the circuit externally.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jared&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC channel reading values when connected to ground</title><link>https://devzone.nordicsemi.com/thread/340492?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 10:03:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7369b3f2-80d3-4c2b-a9ed-da662eef45a4</guid><dc:creator>STE</dc:creator><description>&lt;p&gt;Dear Jared,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not asking about the internal code used to perform the calibration, just know if this offset calibration is done internally the chip by electronically disconnect the input pin of the ADC, so is not requested any external action by me, or if to perform the calibration I&amp;#39;ve to ground externally the ADC pin. Of course, in this last scenario, this is not practicable in a real usage because the input is connected to the sensor where the signal have to be read and doing such things make the circuit more complicated, hence is mainly for this reason I&amp;#39;ve asked in what way is done the calibration, then kindly note not need to know detail about the code used to perform this task, but essentially from an hardware point of view, sorry if I&amp;#39;ve not specifiede better in my previous request.&lt;/p&gt;
&lt;p&gt;Thanks and best regards.&lt;/p&gt;
&lt;p&gt;F.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC channel reading values when connected to ground</title><link>https://devzone.nordicsemi.com/thread/340487?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 09:55:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:969414b6-8335-440e-8eca-6832e2864b6f</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We do not share information regarding the details of the internal calibration routine. What you might be observing is ground bounce. Have you tried using differential mode, and connecting&amp;nbsp;the second pin directly to the GND of the source that you&amp;#39;re measuring?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think it&amp;#39;s best that you create a new case for discussing your issues.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC channel reading values when connected to ground</title><link>https://devzone.nordicsemi.com/thread/340407?ContentTypeID=1</link><pubDate>Tue, 23 Nov 2021 16:05:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fff474a6-8ca4-417b-86aa-bfc171e494b0</guid><dc:creator>STE</dc:creator><description>&lt;p&gt;Hi Jared, thanks, I&amp;#39;ve succesfully implemented the calibration steps thanks, of course I still get negative value when the input is directly wired to the 0V and as I&amp;#39;m reading through the forum I&amp;#39;m clipping every negative value to 0.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m just curious how the offset calibration work, I think is done completely inside the ADC module by disconnecting the ADC input from the external pin of the chip, I&amp;#39;m right?&lt;/p&gt;
&lt;p&gt;Thanks and best regards.&lt;/p&gt;
&lt;p&gt;F.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC channel reading values when connected to ground</title><link>https://devzone.nordicsemi.com/thread/340243?ContentTypeID=1</link><pubDate>Tue, 23 Nov 2021 07:45:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92c77567-cb88-4d48-892e-bd7c6bc6223e</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How often you should call the calibration routine depends on how often the temperature will change. If you don&amp;#39;t expect any temperature change then it&amp;#39;s enough to do it once at the start.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve updated my previous answer with the correct URL. See the example for a reference on how to implement it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC channel reading values when connected to ground</title><link>https://devzone.nordicsemi.com/thread/340171?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 16:25:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdfa95ad-74fe-4433-a895-71f5389fc25c</guid><dc:creator>STE</dc:creator><description>&lt;p&gt;Thanks Jared,&lt;/p&gt;
&lt;p&gt;actually in my application the &lt;strong&gt;saadc_callback()&lt;/strong&gt; is called every 5 ms from an interrupt.&lt;/p&gt;
&lt;p&gt;Actually my code for this part looks as below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    saadc_sampling_event_init();
    saadc_init();
    saadc_sampling_event_enable();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;it is enough insert the calibration code before call the &lt;strong&gt;saadc_sampling_event_enable()&lt;/strong&gt; function and then manage the &lt;em&gt;NRF_DRV_SAADC_EVT_CALIBRATEDONE&lt;/em&gt; event inside the &lt;strong&gt;saadc_callback()&lt;/strong&gt; function or I can leave all triggered every 5 ms and then insert just some flag to start with the calibration and then when it have finished switch the flag in order to execute the default routine?&lt;/p&gt;
&lt;p&gt;Thanks and best regards.&lt;/p&gt;
&lt;p&gt;F.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC channel reading values when connected to ground</title><link>https://devzone.nordicsemi.com/thread/340121?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 14:19:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3e7854d-122f-4eaf-aa43-d7cdf1550a6e</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Call &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrf__drv__saadc.html#ga75bfde8a2350eb3ccc8892e725a9fb39"&gt;nrf_drv_saadc_calibrate_offset&lt;/a&gt;&lt;span&gt;().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;See the &lt;a href="https://github.com/NordicPlayground/nRF52-ADC-examples/blob/de612912a7e006052e59035adfaf1aa4f06cb1a9/saadc_low_power/main.c#L262"&gt;low power saadc example&lt;/a&gt; for reference.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jared&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC channel reading values when connected to ground</title><link>https://devzone.nordicsemi.com/thread/340014?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 10:46:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47324728-8398-4655-bb97-0c717688bb14</guid><dc:creator>STE</dc:creator><description>&lt;p&gt;Dear Jared,&lt;/p&gt;
&lt;p&gt;there are some particular procedure to doing that or simply collect some value, get the mean value and then use it as offset?&lt;/p&gt;
&lt;p&gt;Thanks and best regards.&lt;/p&gt;
&lt;p&gt;F.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC channel reading values when connected to ground</title><link>https://devzone.nordicsemi.com/thread/262594?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 13:33:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc293f64-0972-444b-a920-f28a72f3ffa0</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is due to noise and offset error. Do a calibration and see if it helps.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>