<?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 offset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/31143/adc-offset</link><description>Dear Sirs! 
 On one from 25 boards there is offset in ADC input about 30 ADC units. Vref = 0.6 V, Gain=6, 12 Bit ADC, oversampling 256 sample. 
 In other devices I do not see this problem. 
 My questions: 
 1. If it is a possible offset or there is a</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Sep 2018 20:41:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/31143/adc-offset" /><item><title>RE: ADC offset</title><link>https://devzone.nordicsemi.com/thread/147445?ContentTypeID=1</link><pubDate>Wed, 05 Sep 2018 20:41:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5a6f726-3b9b-4ca6-8980-4220b11223a5</guid><dc:creator>PMichael</dc:creator><description>&lt;p&gt;Addtional question.&lt;/p&gt;
&lt;p&gt;Can I perform calibration each time after I init SAADC device before channel initialization?&lt;/p&gt;
&lt;p&gt;Can it cause any problem except issue that calibration takes time?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;nrf_drv_saadc_init(NULL, AD_saadc_callback);&lt;br /&gt;&lt;br /&gt;nrf_drv_saadc_calibrate_offset ();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(!AD_CalibrationDone);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_saadc_event_clear(NRF_SAADC_EVENT_CALIBRATEDONE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_saadc_int_disable(NRF_SAADC_EVENT_CALIBRATEDONE);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;nrf_saadc_channel_config_t channel_config_bat = NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN0);&lt;br /&gt;&amp;nbsp; nrf_drv_saadc_channel_init(&amp;amp;channel_config_bat);&lt;/p&gt;
&lt;p&gt;void AD_saadc_callback(nrf_drv_saadc_evt_t const * p_event)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; // set calibration flag if is calibration event&lt;br /&gt;&amp;nbsp; if(p_event-&amp;gt;type==NRF_DRV_SAADC_EVT_CALIBRATEDONE)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AD_CalibrationDone = true;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC offset</title><link>https://devzone.nordicsemi.com/thread/122907?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2018 12:53:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f92379f9-c2c6-4883-bb79-811027727435</guid><dc:creator>PMichael</dc:creator><description>&lt;p&gt;Problem solved. Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC offset</title><link>https://devzone.nordicsemi.com/thread/122906?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2018 08:48:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c097dddd-c4a6-4cb6-969b-aaa2c4abd710</guid><dc:creator>PMichael</dc:creator><description>&lt;p&gt;Additional question. If I want to perform calibration after power up, will it be correct sequence?&lt;/p&gt;
&lt;p&gt;It is before any ADC initialization.&lt;/p&gt;
&lt;p&gt;volatile unsigned long i;&lt;br /&gt;&amp;nbsp;err_code=nrf_drv_saadc_calibrate_offset ();&lt;br /&gt;&amp;nbsp;for(i=0;i&amp;lt;256000; i++); wait for finish calibration&lt;/p&gt;
&lt;p&gt;nrf_drv_saadc_init(NULL, AD_saadc_callback);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC offset</title><link>https://devzone.nordicsemi.com/thread/122905?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2018 13:40:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:310a8858-2a60-499f-a35a-1479b3c230f9</guid><dc:creator>PMichael</dc:creator><description>&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC offset</title><link>https://devzone.nordicsemi.com/thread/122904?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2018 10:05:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29da0393-c772-4c52-a20b-931d60521a10</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Hey Michael,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;This sounds a lot like an offset, but we can not rule out a HW issue either.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;If it&amp;#39;s an offset issue then calibration&amp;nbsp;should&amp;nbsp;be the solution. The SAADC is temperature dependent and you should calibrate the offset&amp;nbsp;every few centigrade. Using differential inputs with offset calibration will yield the best results.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Max time for calibration is determined by the acquisition time of channel 0. At 3µs the calibration time will be ~102µS. See this post for more information.&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/30042/saadc-offset-calibration-for-each-input/119389#119389"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/30042/saadc-offset-calibration-for-each-input/119389#119389&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Håkon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>