<?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 value 20% too low.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90251/adc-value-20-too-low</link><description>I am working on a project using the nrf9160DK for initial firmware development. Trying out the SAADC i encountered that the measured values were always about 20% lower then expected. 
 For instance, when the measured inout is connected to 50% vdd, then</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 May 2025 12:51:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90251/adc-value-20-too-low" /><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/534282?ContentTypeID=1</link><pubDate>Wed, 07 May 2025 12:51:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf9c52d9-2392-4f99-a27b-de5150240cbc</guid><dc:creator>maarten v</dc:creator><description>&lt;p&gt;The project is finished. It was decided to use an external ADC.&lt;/p&gt;
&lt;p&gt;For another project using an nrf52840 we experience the same issue. It looks like the nrf9160&amp;nbsp; has the same ADC issues as the nrf52840.&lt;/p&gt;
&lt;p&gt;Turned out that the ADC is just not that accurate, and:&lt;br /&gt;- the ADC calibration is only valid for the exact same settings (gain, resolution), &lt;strong&gt;which is not documented&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;- the gain, especially the high gain (6x) is not llnear in the high value of the range (also not documented).&lt;/p&gt;
&lt;p&gt;- even with 12 bit resultution, the actual accuracy is only 8 bit (this is documented).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For the project with the nrf52840 we now do a &amp;#39;calibration&amp;#39; by&amp;nbsp; measuring the &amp;#39;zero&amp;#39; value configuring the disconnect for the input and a&amp;nbsp; pull-down in the resistor ladder for each required configuration.&lt;/p&gt;
&lt;p&gt;We also&amp;nbsp; avoid the high input values by configuring a lower gain than possible..&lt;/p&gt;
&lt;p&gt;Now we get about 0.5% to 1% accuracy for our measurements, which is good enough, and use oversampling to remove noise.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps. For me, the ticket can ble closed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/534212?ContentTypeID=1</link><pubDate>Wed, 07 May 2025 07:31:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7def934b-7d7b-4874-87d8-f3a5be5e2c2c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What behavior do you observe? Is it a constant offset, or is it proportional to the voltage you are measuring?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/534133?ContentTypeID=1</link><pubDate>Tue, 06 May 2025 14:01:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20fcd4b2-f8cf-4a5e-8a67-9198eba484d9</guid><dc:creator>BartT</dc:creator><description>&lt;p&gt;Hi, Is there any update on the issue yet? We have a similar issue. ADC works fine on VDD_IO 3V, but not on VDD_IO 1,8V.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/401183?ContentTypeID=1</link><pubDate>Mon, 19 Dec 2022 08:12:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7bb7fe4-a578-4aa0-990d-e946f5ebe6a3</guid><dc:creator>maarten v</dc:creator><description>&lt;p&gt;Thanks, i am looking forward to know the actual cause of this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/401029?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2022 11:14:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6855f89d-67b8-4cff-aa5b-b7adb14f7109</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Karl asked if I could take over this ticket, because he will be out of office for a while.&lt;/p&gt;
&lt;p&gt;I have seen something like this before, but that DevZone ticket &amp;quot;died&amp;quot;. I have reported this internally, and I will keep you posted when I receive a reply.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/399096?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2022 07:46:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:167e2706-eed7-4c5e-9f57-bd8dd08f90d6</guid><dc:creator>maarten v</dc:creator><description>&lt;p&gt;I finally got time to take a further look at this. It looks like the measement with the nrf9160dk is off, but only when&amp;nbsp;the&amp;nbsp;vdd_io is set to 1.8V.&lt;/p&gt;
&lt;p&gt;I modified the test program to show this better:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
#include &amp;lt;zephyr.h&amp;gt;
#include &amp;lt;sys/printk.h&amp;gt;
#include &amp;lt;drivers/gpio.h&amp;gt;
#include &amp;lt;drivers/adc.h&amp;gt;
#include &amp;lt;drivers/sensor.h&amp;gt;
#include &amp;lt;nrfx_saadc.h&amp;gt;
#include &amp;lt;string.h&amp;gt;

#include &amp;lt;logging/log.h&amp;gt;


LOG_MODULE_REGISTER(main,LOG_LEVEL_DBG);

#define MY_ADC DT_NODELABEL(adc)
#define ADC_PIN NRF_SAADC_INPUT_AIN3 // P0.16
#define ADC_RESOLUTION 14

const char* err_str(int err)
{
	switch (-err)
	{
		case 0: return &amp;quot;OK&amp;quot;;
		case EINVAL: return &amp;quot;EINVAL&amp;quot;;
		case ENOMEM: return &amp;quot;ENOMEM&amp;quot;;
		case ENOTSUP: return &amp;quot;ENOTSUP&amp;quot;;
		case EBUSY: return &amp;quot;EBUSY&amp;quot;;
		default: return &amp;quot;?&amp;quot;;
	}
}

int read_adc(const char *tag, 
		const struct device *device, 
		uint8_t input,
		enum adc_reference ref,
		bool calibrate )
{
	struct adc_channel_cfg cfg = 
	{
		.gain = ADC_GAIN_1_6, // enough to measure VDD referenced to VDD_1_4 at vdd_io set to 3V
		.reference = ref, 
		.acquisition_time = ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 10),
		.input_positive = input,

		.input_negative = NRF_SAADC_INPUT_DISABLED,
		.differential = 0,
		.channel_id = 0, // just use the first logical channel
	};

	// choosing the correct resolution for the channel is important for accuracy!
	// but changing the resolution between readings can cause offset deviations!
	int32_t err = adc_channel_setup(device, &amp;amp;cfg);
	if( err != 0 )
	{
		LOG_ERR(&amp;quot;ADC channel setup failed with %d: %s.\n&amp;quot;, err, err_str(err));
		return -1;
	}

	int16_t sample_buffer[1] = {0};
	struct adc_sequence sequence = 
	{
		.options = NULL,
		.channels = 0b00000001, // only measuring cfg.channel_id = 0
		.buffer = sample_buffer,
		.buffer_size = sizeof(sample_buffer),
		.resolution = ADC_RESOLUTION,
		.oversampling = NRF_SAADC_OVERSAMPLE_256X,
		.calibrate = calibrate
	};

	if( calibrate )
	{
		LOG_DBG(&amp;quot;calibrate ADC&amp;quot;);
	}

	// Read sequence of channels (fails if not supported by MCU)
	err = adc_read(device, &amp;amp;sequence);
	if (err != 0) 
	{
		LOG_ERR(&amp;quot;ADC reading failed with error %d: %s.&amp;quot;, err, err_str(err));
		return -2; 
	}

	volatile float part_from_range = sample_buffer[0] / (float)(1&amp;lt;&amp;lt;ADC_RESOLUTION);
	#define VDD_IO_mV 3000
	volatile int32_t ref_mv = ref == ADC_REF_VDD_1_4 ? VDD_IO_mV/4 : adc_ref_internal(device);

	int v_meas_mv = sample_buffer[0];
	__unused int result = adc_raw_to_millivolts(ref_mv, cfg.gain, ADC_RESOLUTION, &amp;amp;v_meas_mv);
	__ASSERT( result == 0, &amp;quot;could not convert to millivolts&amp;quot; );

	if (tag)
	{
		LOG_INF(&amp;quot;%s:{adc:%hd, part_range_%%%%:%d, ref_mv:%d, measured_mv:%d}&amp;quot;, 
			tag, sample_buffer[0], 
			(int)(1000*part_from_range), ref_mv, v_meas_mv);
	}

	return sample_buffer[0];
}


void main(void)
{
	char hw_rev[8];
	memcpy( hw_rev, (char*)&amp;amp;NRF_FICR-&amp;gt;INFO.VARIANT, 4);
	hw_rev[4] = 0;
	char hw_type[8];
	memcpy( hw_type, (char*)&amp;amp;NRF_FICR-&amp;gt;INFO.DEVICETYPE, 4);
	hw_type[4] = 0;

	LOG_INF(&amp;quot;nrf91 FICR HW revision: %s, type: %s&amp;quot;, hw_rev, hw_type);

	// see: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/zephyr/build/dts/howtos.html
	const struct device *dev_adc = DEVICE_DT_GET(MY_ADC);
	// or runtime
	//const struct device *dev_adc = device_get_binding(&amp;quot;ADC_0&amp;quot;);

	if (!device_is_ready(dev_adc)) 
	{
		LOG_ERR(&amp;quot;ADC device not found\n&amp;quot;);
		return;
	}

	// calibrate once:
	read_adc(NULL, dev_adc, NRF_SAADC_INPUT_VDD, ADC_REF_INTERNAL, true);

	while (1) 
	{
		LOG_INF(&amp;quot;ADC_reading:&amp;quot;);
		LOG_INF(&amp;quot;{&amp;quot;);
		LOG_INF(&amp;quot;  full_range:%d,\n&amp;quot;, 0x01&amp;lt;&amp;lt;ADC_RESOLUTION);
		
		volatile __unused int vdd_ref_vdd = read_adc(&amp;quot;  vdd_ref_vdd&amp;quot;, dev_adc, NRF_SAADC_INPUT_VDD, ADC_REF_VDD_1_4, false);
		volatile __unused int vdd_ref_int = read_adc(&amp;quot;, vdd_ref_int&amp;quot;, dev_adc, NRF_SAADC_INPUT_VDD, ADC_REF_INTERNAL, false);

		// measure 0.5 Vdd at pin p0.16 (using 2 same resistors in sweries between GND and VDD)
		volatile __unused int p016_ref_vdd = read_adc(&amp;quot;, p0_16_ref_vdd&amp;quot;, dev_adc, ADC_PIN, ADC_REF_VDD_1_4, false);
		volatile __unused int p016_ref_int = read_adc(&amp;quot;, p0_16_ref_int&amp;quot;, dev_adc, ADC_PIN, ADC_REF_INTERNAL, false);

		LOG_INF(&amp;quot;},&amp;quot;);

		k_sleep(K_MSEC(300));
	}
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;With the board set to Vdd_io=3V this logs:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.1.99-ncs1  ***

[00:00:03.074,737] &amp;lt;inf&amp;gt; main: nrf91 FICR HW revision: 0BAA, type: 
[00:00:03.074,768] &amp;lt;dbg&amp;gt; main: read_adc: calibrate ADC
[00:00:03.095,123] &amp;lt;inf&amp;gt; main: ADC_reading:
[00:00:03.095,153] &amp;lt;inf&amp;gt; main: {
[00:00:03.095,184] &amp;lt;inf&amp;gt; main:   full_range:16384,

[00:00:03.098,144] &amp;lt;inf&amp;gt; main:   vdd_ref_vdd:{adc:10957, part_range_%%:668, ref_mv:750, measured_mv:3009}
[00:00:03.101,104] &amp;lt;inf&amp;gt; main: , vdd_ref_int:{adc:13626, part_range_%%:831, ref_mv:600, measured_mv:2993}
[00:00:03.104,095] &amp;lt;inf&amp;gt; main: , p0_16_ref_vdd:{adc:5451, part_range_%%:332, ref_mv:750, measured_mv:1497}
[00:00:03.107,055] &amp;lt;inf&amp;gt; main: , p0_16_ref_int:{adc:6782, part_range_%%:413, ref_mv:600, measured_mv:1490}
[00:00:03.107,086] &amp;lt;inf&amp;gt; main: },
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;With the board set to Vdd_io=1.8V this logs:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.1.99-ncs1  ***

[00:00:00.959,930] &amp;lt;inf&amp;gt; main: nrf91 FICR HW revision: 0BAA, type: 
[00:00:00.959,930] &amp;lt;dbg&amp;gt; main: read_adc: calibrate ADC
[00:00:00.980,316] &amp;lt;inf&amp;gt; main: ADC_reading:
[00:00:00.980,346] &amp;lt;inf&amp;gt; main: {
[00:00:00.980,346] &amp;lt;inf&amp;gt; main:   full_range:16384,

[00:00:00.983,337] &amp;lt;inf&amp;gt; main:   vdd_ref_vdd:{adc:8885, part_range_%%:542, ref_mv:450, measured_mv:1464}
[00:00:00.986,297] &amp;lt;inf&amp;gt; main: , vdd_ref_int:{adc:7597, part_range_%%:463, ref_mv:600, measured_mv:1669}
[00:00:00.989,257] &amp;lt;inf&amp;gt; main: , p0_16_ref_vdd:{adc:4439, part_range_%%:270, ref_mv:450, measured_mv:731}
[00:00:00.992,218] &amp;lt;inf&amp;gt; main: , p0_16_ref_int:{adc:3799, part_range_%%:231, ref_mv:600, measured_mv:834}
[00:00:00.992,248] &amp;lt;inf&amp;gt; main: },
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To me it looks like something is wrong with the nrf9160DK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Our own PCBA works with 3 vdd_io (no defined input here) so executing the above gives:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.1.99-ncs1  ***

[00:00:02.464,172] &amp;lt;inf&amp;gt; main: nrf91 FICR HW revision: 0BAA, type: 
[00:00:02.464,172] &amp;lt;dbg&amp;gt; main: read_adc: calibrate ADC
[00:00:02.484,008] &amp;lt;inf&amp;gt; main: ADC_reading:
[00:00:02.484,039] &amp;lt;inf&amp;gt; main: {
[00:00:02.484,069] &amp;lt;inf&amp;gt; main:   full_range:16384,

[00:00:02.486,968] &amp;lt;inf&amp;gt; main:   vdd_ref_vdd:{adc:10924, part_range_%%:666, ref_mv:750, measured_mv:3000}
[00:00:02.489,837] &amp;lt;inf&amp;gt; main: , vdd_ref_int:{adc:13865, part_range_%%:846, ref_mv:600, measured_mv:3046}
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Conclusion: no problem with the code but with the nrf9160DK PCBA working on vdd_io=1.8V&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/390854?ContentTypeID=1</link><pubDate>Fri, 14 Oct 2022 19:50:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94940f97-484d-4582-b9de-9f3cde4e6893</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
[quote user="maarten v"]&lt;p&gt;We have a simple work-around: just measure the vdd and don&amp;#39;t expect it to be full-range. Then use that to calculate a correction for actual measured value.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll come back later on this topic when i have more time.&lt;/p&gt;[/quote]
&lt;p&gt;While this might be a pragmatic solution - and I completely understand the need to be pragmatic about things like this sometimes - I would want to understand the root cause of this, in order to guarantee that you wont run into any other unexpected issues in the future.&lt;br /&gt;&lt;br /&gt;Please let me know if you get a chance to take a look at the questions in my previous comment, or if you have any updates on this issue.&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: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/388310?ContentTypeID=1</link><pubDate>Wed, 28 Sep 2022 10:00:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e6f80d1-3f98-4307-943d-2d2750aa1b47</guid><dc:creator>maarten v</dc:creator><description>&lt;p&gt;We have a simple work-around: just measure the vdd and don&amp;#39;t expect it to be full-range. Then use that to calculate a correction for actual measured value.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll come back later on this topic when i have more time.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/382990?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2022 06:20:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:278c85df-ac08-4a7a-8888-7684c7f90418</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;Thank you for your extreme patience with this.&lt;br /&gt;&lt;br /&gt;Thank you for confirming regarding the calibration.&lt;br /&gt;This sounds very strange indeed -&amp;nbsp;I too would expect your raw ADC value to come out at the top of the resolution range, in this case.&lt;br /&gt;&lt;br /&gt;Have you had a chance to scope the VDD, using an oscilloscope?&lt;br /&gt;Could you try to short the pin used for measuring to GND directly, and see what the sample reads then? For good measure, could you also check what the&amp;nbsp;&lt;span&gt;PSELP and&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf9160/saadc.html?cp=2_0_0_5_11_9_31#register.CH.CONFIG"&gt;CONFIG&amp;nbsp;register&lt;/a&gt;&amp;nbsp;of the SAADC is set to, right before the sampling is triggered?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/379504?ContentTypeID=1</link><pubDate>Mon, 01 Aug 2022 11:20:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d890b07-be52-49a4-883d-358e717836ca</guid><dc:creator>maarten v</dc:creator><description>&lt;p&gt;I am sorry to respond so slow: i am only working 2 days a week on this project.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/90251/adc-value-20-too-low/379005"]&lt;blockquote class="quote"&gt;&lt;div class="quote-user"&gt;maarten v said:&lt;/div&gt;&lt;div class="quote-content"&gt;I am not sure what you mean: before ADC (offset) calibration the offset error is different but the gain error is not.&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="quote-footer"&gt;&lt;/div&gt;
&lt;p&gt;What do you mean by this, could you provide some examples of what you are seeing with and without the offset calibration at the beginning?&lt;/p&gt;[/quote]
&lt;p&gt;I don&amp;#39;t a an exact output right now. The offset calibration is of no consequence for this mentioned problem: it only differs a few millivolts before and after calibration.&lt;/p&gt;
&lt;p&gt;The gain error i mention was that i assumed that the full ADC range would be from gnd to vdd_io (1.8V) with the chosen reference, but i observe something completely different (as mentioned earlier).&lt;/p&gt;
&lt;p&gt;So when measuring 0.5Vdd_io with 12 bit resolution, i would expect an ADC value of about 2048 but i get something like 1415 (as mentioned in the first post). ADC calibration does not change that significantly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/379005?ContentTypeID=1</link><pubDate>Thu, 28 Jul 2022 02:43:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9d93fec-8cc5-4010-9d9e-9c6966301b45</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="maarten v"]nrfcnonnect SDK version 2.0.0[/quote]
&lt;p&gt;Thank you for confirming this.&lt;/p&gt;
[quote user="maarten v"]I am not sure what you mean: before ADC (offset) calibration the offset error is different but the gain error is not.[/quote]
&lt;p&gt;What do you mean by this, could you provide some examples of what you are seeing with and without the offset calibration at the beginning?&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: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/378834?ContentTypeID=1</link><pubDate>Wed, 27 Jul 2022 07:47:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d928aa4c-fcfe-4e4f-8aa2-7a5031171c61</guid><dc:creator>maarten v</dc:creator><description>&lt;p&gt;&amp;gt; Could you confirm that you saw the same results with the added offset calibration at the beginning?&lt;/p&gt;
&lt;p&gt;I am not sure what you mean: before ADC (offset) calibration the offset error is different but the gain error is not.&lt;/p&gt;
&lt;p&gt;&amp;gt; Could you also let me know which nRF Connect SDK version that this code is made for?&lt;/p&gt;
&lt;p&gt;nrfcnonnect SDK version 2.0.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/378794?ContentTypeID=1</link><pubDate>Wed, 27 Jul 2022 01:34:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d17ab958-f9c4-4db8-a323-aa7444edb48c</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Thank you for providing the code.&lt;br /&gt;&lt;br /&gt;Could you confirm that you saw the same results with the added offset calibration at the beginning?&lt;br /&gt;Could you also let me know which nRF Connect SDK version that this code is made for?&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: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/378631?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 06:54:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:356d7815-5470-45fe-bb3c-b61540bb76ec</guid><dc:creator>maarten v</dc:creator><description>&lt;p&gt;Attached is the code.&lt;/p&gt;
&lt;p&gt;I experimented a bit more the the ADC so the code differs a bit from the code above, but the result is the same: consistent incorrect measurements.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/adc_5F00_tryout.zip"&gt;devzone.nordicsemi.com/.../adc_5F00_tryout.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/378602?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 00:30:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1a8d112-b40a-47a4-8b75-5a61bbeac70a</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;br /&gt;&lt;br /&gt;Thank you for your patience with this. The summer holiday season has begun here in Norway, and so the DevZone forum is operating at reduced capacity for the next couple of weeks.&lt;br /&gt;&lt;br /&gt;Thank you for providing the additional information as well. Did you try to explicitly trigger an offset calibration before you begin the sampling, to see if this had any effect?&lt;br /&gt;Do you have this as a minimal project you could send me, so that I could reproduce this on my end and take a closer look?&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: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/378233?ContentTypeID=1</link><pubDate>Fri, 22 Jul 2022 07:59:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37e3ad89-f0a2-487c-b3c6-87bdb25c561b</guid><dc:creator>maarten v</dc:creator><description>&lt;p&gt;&lt;span style="background-color:#ffffff;color:#222222;float:none;font-family:Arial, Helvetica, sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;"&gt;The board power is just via the usb debug connection J4.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#222222;font-family:Arial, Helvetica, sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;"&gt;Measuring the vdd gives 1.8V and measuring then 5V gives indeed 5V.&lt;/div&gt;
&lt;div style="background-color:#ffffff;color:#222222;font-family:Arial, Helvetica, sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;"&gt;The board version: PCA10090 1.1.0.&lt;/div&gt;
&lt;div style="background-color:#ffffff;color:#222222;font-family:Arial, Helvetica, sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;"&gt;&lt;/div&gt;
&lt;div style="background-color:#ffffff;color:#222222;font-family:Arial, Helvetica, sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;"&gt;I tried this on two nrf9160dk boards with the same result.&lt;/div&gt;
&lt;div style="background-color:#ffffff;color:#222222;font-family:Arial, Helvetica, sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;"&gt;&lt;/div&gt;
&lt;div style="background-color:#ffffff;color:#222222;font-family:Arial, Helvetica, sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;"&gt;Edit: i use a resistor ladder of 2x30k to divide the vdd by 2 to measure the voltage with the board analog input..&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC value 20% too low.</title><link>https://devzone.nordicsemi.com/thread/378219?ContentTypeID=1</link><pubDate>Fri, 22 Jul 2022 06:41:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5748d3ba-5ad7-41e5-bdf5-d9f27ea4c7e0</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;That looks strange indeed - would you mind detailing how you are powering the nRF9160 DK?&lt;br /&gt;Could you also explicitly perform an offset calibration, to see if this has any influence on the measurements you&amp;#39;re seeing?&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></channel></rss>