<?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>Issue in getting persistent ADC Reading NCS 2.4.1 (nRF52832)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120397/issue-in-getting-persistent-adc-reading-ncs-2-4-1-nrf52832</link><description>Hi, 
 I am using a custom nRF52832 board with multiple ADC channel readings sequentially. I am trying to read thermistor (NTC) value on channel 7 and not getting accurate reading. As soon as I plug the thermistor, the value goes on decreasing/ stabilizing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Apr 2025 14:03:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120397/issue-in-getting-persistent-adc-reading-ncs-2-4-1-nrf52832" /><item><title>RE: Issue in getting persistent ADC Reading NCS 2.4.1 (nRF52832)</title><link>https://devzone.nordicsemi.com/thread/530853?ContentTypeID=1</link><pubDate>Mon, 07 Apr 2025 14:03:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:beb7e03e-6718-43a3-b8db-ef172f49483a</guid><dc:creator>X4ce</dc:creator><description>&lt;p&gt;Thank you for the detailed explanation.&lt;/p&gt;
&lt;p&gt;I have set the reference to VDD/4 instead of Internal. After obtaining the ADC value across the resistor (461/1024), I obtained the VDD value through ADC (822/1024) which gave me correct values and after tested the response using hot air gun upto 125 deg. C.&lt;/p&gt;
&lt;p&gt;It is working satisfactorily now.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue in getting persistent ADC Reading NCS 2.4.1 (nRF52832)</title><link>https://devzone.nordicsemi.com/thread/530695?ContentTypeID=1</link><pubDate>Sat, 05 Apr 2025 15:25:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab0572e3-1a49-4cf8-8813-88da7a6b3095</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;The differential measurement returns a signed value, and 65515 is a small negative number arising partly due to the way the SAADC calibration handles offsets. Keeping both the N-P and the P-N differential measurements as signed results and taking the average signed result requires no fiddling it is a simple sum. Differential measurement gives half the numeric value of single-ended measurement but the sum of the two differential measurements (N-P and P-N) restores that full numeric value in addition to removing any offset.&lt;/p&gt;
&lt;p&gt;Edit: I should add that thermistors are subject to self-heating and it is normal to only energise (turn on power) when taking a reading; often a port output pin would be used instead of the 3.3V supply. This has the added benefit of being closer to the internal VDD from which the ratiometric reference is derived. Ensure the output pin has a H1 setting to minimise Vrdson, drive high just before the SAADC sample is taken then drive low or float afterwards..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue in getting persistent ADC Reading NCS 2.4.1 (nRF52832)</title><link>https://devzone.nordicsemi.com/thread/530693?ContentTypeID=1</link><pubDate>Sat, 05 Apr 2025 14:00:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67c32253-7db3-4c18-8e81-3b002d54f199</guid><dc:creator>X4ce</dc:creator><description>&lt;p&gt;If I account for that gnd offset error i.e. around 21 if I am getting 65515 then it may give somewhat realistic measurement.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue in getting persistent ADC Reading NCS 2.4.1 (nRF52832)</title><link>https://devzone.nordicsemi.com/thread/530692?ContentTypeID=1</link><pubDate>Sat, 05 Apr 2025 13:59:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d4fc41e-8c88-48bf-83c7-c7829abcf481</guid><dc:creator>X4ce</dc:creator><description>&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;I have removed made a similar circuit on breadboard with just resistor &amp;amp; thermistor. But, it still behaves in a similar way.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue in getting persistent ADC Reading NCS 2.4.1 (nRF52832)</title><link>https://devzone.nordicsemi.com/thread/530681?ContentTypeID=1</link><pubDate>Fri, 04 Apr 2025 23:37:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3dccbe2-7ec5-437d-a97b-64fe81230b84</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Remove D26; it is a zener diode and not appropriate for this circuit and will effectively stop any meaningful measurements.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue in getting persistent ADC Reading NCS 2.4.1 (nRF52832)</title><link>https://devzone.nordicsemi.com/thread/530586?ContentTypeID=1</link><pubDate>Fri, 04 Apr 2025 09:58:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2929c13b-4e1d-4964-841e-f74aca35b777</guid><dc:creator>X4ce</dc:creator><description>&lt;p&gt;Is there anything else that I could try in the firmware? My ADC value gradually drops almost 10% then stabilizes but goes below the actual/ desired value.&lt;/p&gt;
&lt;p&gt;Another thing when I place AIN7 to GND, I get adc of 65515 not ideally 0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue in getting persistent ADC Reading NCS 2.4.1 (nRF52832)</title><link>https://devzone.nordicsemi.com/thread/530579?ContentTypeID=1</link><pubDate>Fri, 04 Apr 2025 09:38:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:833829d9-e8a0-4263-95bb-b925a18cda4c</guid><dc:creator>X4ce</dc:creator><description>&lt;p&gt;Thanks for the response.&lt;/p&gt;
&lt;p&gt;What about this dts?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	// Thermistor
	channel@7 {
		reg = &amp;lt;7&amp;gt;;
		zephyr,gain = &amp;quot;ADC_GAIN_1_5&amp;quot;;
		zephyr,reference = &amp;quot;ADC_REF_VDD_1_4&amp;quot;;
		zephyr,acquisition-time = &amp;lt;ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 40)&amp;gt;;
		zephyr,input-positive = &amp;lt;NRF_SAADC_VDD&amp;gt;;
		zephyr,input-negative = &amp;lt;NRF_SAADC_AIN7&amp;gt;;
		zephyr,resolution = &amp;lt;10&amp;gt;;
		zephyr,oversampling = &amp;lt;8&amp;gt;;
	};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Can I use this dts for obtaining voltage across Thermistor?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue in getting persistent ADC Reading NCS 2.4.1 (nRF52832)</title><link>https://devzone.nordicsemi.com/thread/530577?ContentTypeID=1</link><pubDate>Fri, 04 Apr 2025 09:36:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b09212bd-a1bb-4d38-8566-dd056abcd2b2</guid><dc:creator>X4ce</dc:creator><description>&lt;p&gt;Thanks for the response. &lt;/p&gt;
&lt;p&gt;I have tried setting the ADC ACQ time to max i.e. 40us but issue remains the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue in getting persistent ADC Reading NCS 2.4.1 (nRF52832)</title><link>https://devzone.nordicsemi.com/thread/530402?ContentTypeID=1</link><pubDate>Thu, 03 Apr 2025 09:07:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b87a207-2aa3-41dc-9313-0f1acbe89270</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You may try to set the highest acquisition time 40 us.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;zephyr,acquisition-time = &amp;lt;ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 40)&amp;gt;;&lt;/p&gt;
&lt;p&gt;Ok. you mentioned that you have tried different ACQ time; was the source resistance in accordance to the ACQ time?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue in getting persistent ADC Reading NCS 2.4.1 (nRF52832)</title><link>https://devzone.nordicsemi.com/thread/530311?ContentTypeID=1</link><pubDate>Wed, 02 Apr 2025 16:23:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abdb183f-4ae6-4945-b71c-cec48761ac25</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;The starting point is to know that using the internal reference provides an absolute measurement of voltage on AIN7; with a perfect internal reference and perfect ADC with no errors you get a perfect voltage measurement but unfortunately that is not what is required to measure this NTC. Should the 3.3V change by (say) 1% or have noise then that &amp;quot;perfect&amp;quot; voltage measurement will vary accordingly.&lt;/p&gt;
&lt;p&gt;Instead try a ratiometric measurement such that any variation in the 3.3V supply causes an equal variation in the SAADC reference voltage which largely eliminates the effect on the measured voltage. Ironically to get the best results use minimal or no capacitance on the NTC input as the AIN7 input should exactly track the noise on 3.3V rail and not be filtered; ie set the reference to other than ADC_REF_INTERNAL and test both with and without the 10nF capacitor.&lt;/p&gt;
&lt;p&gt;Once you have those results measure using differential mode using AIN7 and (say) AIN6 where AIN6 is connected to the lower end of the 10k. Measure twice with P AIN7, N AIN6 and P AIN6 and N AIN7. The average will give a more accurate reading with residual SAADC offset removed.&lt;/p&gt;
&lt;p&gt;Edit: I wrote some code here which might be informational, though it is bare-metal code:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/116914/seeking-more-information-on-nrf52833-adc-reference-and-buffers"&gt;nrf52833-adc-reference-and-buffers&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Related ticket:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/120220/rtd-measurement-with-wheatstone-bridge-and-adc"&gt;rtd-measurement-with-wheatstone-bridge-and-adc&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>