<?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 Using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102225/saadc-using-nrf-connect-sdk</link><description>I am trying to evaluate some thermistors using a voltage divider connected to the analog pins on the nRF52DK configured as an nRF52805 MCU. I used the battery example from zephyr as the base to my code and think I have everything configured properly.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Sep 2023 09:52:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102225/saadc-using-nrf-connect-sdk" /><item><title>RE: SAADC Using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/444873?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 09:52:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:179b081c-eb0a-43bd-8522-3bd4c49b60a5</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Taylor,&lt;/p&gt;
[quote user="tayspen72"]I appreciate your experience and support on this. Thank you,[/quote]
&lt;p&gt;I am happy to read that, thank you! :)&amp;nbsp;&lt;/p&gt;
[quote user="tayspen72"]This is what I was missing. I have updated my overlay file to use the 1/6 gain and the values are now reading properly.[/quote]
&lt;p&gt;I am glad that it now is working as intended, great!&lt;/p&gt;
[quote user="tayspen72"]Could you also give me some pointers on how to get the most accurate and consistent reading from the analog input? I&amp;#39;m seeing some slight variation between samples and would like to minimize this as much as possible.&amp;nbsp;[/quote]
&lt;p&gt;How does the signal you will be measuring fluctuate?&lt;br /&gt;To get a good overview of the noise you are seeing you will first need to externally verify the signal you are sampling (such as with an oscilloscope) so that you can compare your SAADC output with the actual signal.&lt;br /&gt;&lt;br /&gt;In general, you will need to expect a couple of LSB of noise in your measurements with the SAADC - the SAADC has roughly 10.5 ENOB - but there are some things that can be done to improve this, such as to use the BURST feature of the SAADC combined with OVERSAMPLING in order to sample a number of samples as quick as possible, and then average over the collected samples before outputting the SAADC result. This will help you suppress white noise on your signal.&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: SAADC Using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/444777?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2023 17:18:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:380de2ca-c43d-4a82-8d1f-867eee3f6719</guid><dc:creator>tayspen72</dc:creator><description>&lt;p&gt;Karl,&lt;/p&gt;
&lt;p&gt;Thanks for the insight here. This is what I was missing. I have updated my overlay file to use the 1/6 gain and the values are now reading properly.&lt;/p&gt;
&lt;p&gt;Could you also give me some pointers on how to get the most accurate and consistent reading from the analog input? I&amp;#39;m seeing some slight variation between samples and would like to minimize this as much as possible.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For reference, one of my analog input channels looks uses this as the config:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	channel@0 {
		reg= 0;
		zephyr,gain = &amp;quot;ADC_GAIN_1_6&amp;quot;;
		zephyr,reference = &amp;quot;ADC_REF_INTERNAL&amp;quot;;
		zephyr,acquisition-time = ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 40);
		zephyr,input-positive = 2; // P0.03, NRF_SAADC_INPUT_AIN1
	};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;My application is setup to read from 3 channels, once every second, and then make the conversion from raw analog to a temperature derived from simple thermistors using a voltage divider.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a few of my thoughts and would appreciate your suggestion based on experience and the part design:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Batch or sequential sample versus running 3 single conversions back-to-back&lt;/li&gt;
&lt;li&gt;Reducing the sample acquisition time&lt;/li&gt;
&lt;li&gt;For the voltage input for each voltage divider per thermisrtor
&lt;ol&gt;
&lt;li&gt;Leave enabled permanantly and take the penalty on battery consumption&lt;/li&gt;
&lt;li&gt;Enable/Disable with delay to stabliize the analog input pin&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I appreciate your experience and support on this. Thank you,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;- Taylor&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/443756?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2023 13:55:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b72a234b-59fb-4d30-a284-b6d7c321f5e5</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Taylor,&lt;br /&gt;&lt;br /&gt;Thank you for your patience with this.&lt;br /&gt;Edvin is out of office, and so I will handle this case in his absence.&lt;/p&gt;
[quote user="tayspen72"]A) Vdd isn&amp;#39;t implemented properly. Knowing that Vdd is Vdd isn&amp;#39;t useful, I would like to somehow use the bandgap voltage or an internal ref to determine battery voltage. The design does not use a Buck or Bust regulator (IE the nRF52805 will be direct powered by the battery).[/quote]
&lt;p&gt;Have you configured the SAADC to use the VDD/4 or the internal 600mV reference?&lt;br /&gt;For battery measurements you should indeed use the internal 600 mV reference, since as you mention &lt;em&gt;measuring VDD against a falling VDD wont be accurate&lt;/em&gt;.&lt;/p&gt;
[quote user="tayspen72"]B) AIN0 is reading a non-stable value. With my scope I was reasing 1.43V on Vout and 2.84 on Vin, I should expect&amp;nbsp;(1.43/2.84) * 0xFFF or 0x80D (or something close with not much noise from sample to sample).[/quote]
&lt;p&gt;Do I understand this correctly that you have verified the voltages to be 1.43 V and 2.84 V using an oscilloscope, and that the SAADC measurements read ~1.15V and 3.30V for the same voltages respectively?&lt;br /&gt;Regarding the expected value &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/saadc.html#concept_kxz_4pp_qr"&gt;the range of the SAADC is reference/gain&lt;/a&gt;, which in your shared project is using a gain of 1 (no gain), along with the internal reference of 600 mV, which I therefore would expect the output to be saturated in your measurements. Could you confirm the SAADC settings that you used during these tests?&lt;/p&gt;
[quote user="tayspen72"]C) AIN1 is not reading properly.[/quote]
&lt;p&gt;Both the VDD and AIN1 measurements seem to be saturated in these measurements - I would also have expected some fluctuations on these if it was close to the top of the SAADC range, but here there seems to be none.&lt;br /&gt;&lt;br /&gt;Do I also understand you correctly that you see a difference in the measurements when you use the same configuration and input signal measured on a different AIN pin?&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: SAADC Using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/441719?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2023 21:15:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b0a5632-16ee-40c8-bb53-22e247027bd9</guid><dc:creator>tayspen72</dc:creator><description>&lt;p&gt;Advin,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not able to replicate what you are seeing. My logs show that the values bounce or report incorrect values. The logs were recorded only after the log readout had stabilized after making a change (connecting pin from power to gnd).&lt;/p&gt;
&lt;p&gt;I repeated the test this morning with the following schematic applied to both AIN0 and AIN1:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/AIN.png" /&gt;&lt;/p&gt;
&lt;p&gt;I measured Vdd to be 2.84V and V_out on both AIN inputs to be ~1.43V. See the logs below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:46:29.394,531] &amp;lt;inf&amp;gt; ADC_Test: Vdd  (0x0FFF): 3.300000
[00:46:29.394,592] &amp;lt;inf&amp;gt; ADC_Test: Ain0 (0x0597): 1.153187V 134240 Ohms
[00:46:29.394,622] &amp;lt;inf&amp;gt; ADC_Test: Ain1 (0x0FFF): 3.300000V 2047500000 Ohms
[00:46:31.894,836] &amp;lt;inf&amp;gt; ADC_Test: Vdd  (0x0FFF): 3.300000
[00:46:31.894,897] &amp;lt;inf&amp;gt; ADC_Test: Ain0 (0x05A3): 1.162857V 135978 Ohms
[00:46:31.894,927] &amp;lt;inf&amp;gt; ADC_Test: Ain1 (0x0FFF): 3.300000V 2047500000 Ohms
[00:46:34.395,141] &amp;lt;inf&amp;gt; ADC_Test: Vdd  (0x0FFF): 3.300000
[00:46:34.395,202] &amp;lt;inf&amp;gt; ADC_Test: Ain0 (0x05A9): 1.167692V 136853 Ohms
[00:46:34.395,233] &amp;lt;inf&amp;gt; ADC_Test: Ain1 (0x0FFF): 3.300000V 2047500000 Ohms
[00:46:36.895,446] &amp;lt;inf&amp;gt; ADC_Test: Vdd  (0x0FFF): 3.300000
[00:46:36.895,507] &amp;lt;inf&amp;gt; ADC_Test: Ain0 (0x05A8): 1.166886V 136706 Ohms
[00:46:36.895,538] &amp;lt;inf&amp;gt; ADC_Test: Ain1 (0x0FFF): 3.300000V 2047500000 Ohms
[00:46:39.395,751] &amp;lt;inf&amp;gt; ADC_Test: Vdd  (0x0FFF): 3.300000
[00:46:39.395,812] &amp;lt;inf&amp;gt; ADC_Test: Ain0 (0x0598): 1.153993V 134384 Ohms
[00:46:39.395,843] &amp;lt;inf&amp;gt; ADC_Test: Ain1 (0x0FFF): 3.300000V 2047500000 Ohms
[00:46:41.896,057] &amp;lt;inf&amp;gt; ADC_Test: Vdd  (0x0FFF): 3.300000
[00:46:41.896,118] &amp;lt;inf&amp;gt; ADC_Test: Ain0 (0x05D6): 1.203956V 143543 Ohms
[00:46:41.896,148] &amp;lt;inf&amp;gt; ADC_Test: Ain1 (0x0FFF): 3.300000V 2047500000 Ohms
[00:46:44.396,362] &amp;lt;inf&amp;gt; ADC_Test: Vdd  (0x0FFF): 3.300000
[00:46:44.396,423] &amp;lt;inf&amp;gt; ADC_Test: Ain0 (0x056E): 1.120147V 128418 Ohms
[00:46:44.396,453] &amp;lt;inf&amp;gt; ADC_Test: Ain1 (0x0FFF): 3.300000V 2047500000 Ohms
[00:46:46.896,667] &amp;lt;inf&amp;gt; ADC_Test: Vdd  (0x0FFF): 3.300000
[00:46:46.896,728] &amp;lt;inf&amp;gt; ADC_Test: Ain0 (0x0587): 1.140293V 131947 Ohms
[00:46:46.896,759] &amp;lt;inf&amp;gt; ADC_Test: Ain1 (0x0FFF): 3.300000V 2047500000 Ohms
[00:46:49.396,972] &amp;lt;inf&amp;gt; ADC_Test: Vdd  (0x0FFF): 3.300000
[00:46:49.397,033] &amp;lt;inf&amp;gt; ADC_Test: Ain0 (0x05BC): 1.183004V 139649 Ohms
[00:46:49.397,064] &amp;lt;inf&amp;gt; ADC_Test: Ain1 (0x0FFF): 3.300000V 2047500000 Ohms
[00:46:51.897,277] &amp;lt;inf&amp;gt; ADC_Test: Vdd  (0x0FFF): 3.300000
[00:46:51.897,338] &amp;lt;inf&amp;gt; ADC_Test: Ain0 (0x05CC): 1.195897V 142036 Ohms
[00:46:51.897,369] &amp;lt;inf&amp;gt; ADC_Test: Ain1 (0x0FFF): 3.300000V 2047500000 Ohms
[00:46:54.397,583] &amp;lt;inf&amp;gt; ADC_Test: Vdd  (0x0FFF): 3.300000
[00:46:54.397,644] &amp;lt;inf&amp;gt; ADC_Test: Ain0 (0x05F7): 1.230549V 148598 Ohms
[00:46:54.397,674] &amp;lt;inf&amp;gt; ADC_Test: Ain1 (0x0FFF): 3.300000V 2047500000 Ohms
[00:46:56.897,888] &amp;lt;inf&amp;gt; ADC_Test: Vdd  (0x0FFF): 3.300000
[00:46:56.897,949] &amp;lt;inf&amp;gt; ADC_Test: Ain0 (0x0682): 1.342564V 171399 Ohms
[00:46:56.897,979] &amp;lt;inf&amp;gt; ADC_Test: Ain1 (0x0FFF): 3.300000V 2047500000 Ohms&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So three issues I see here:&lt;/p&gt;
&lt;p&gt;A) Vdd isn&amp;#39;t implemented properly. Knowing that Vdd is Vdd isn&amp;#39;t useful, I would like to somehow use the bandgap voltage or an internal ref to determine battery voltage. The design does not use a Buck or Bust regulator (IE the nRF52805 will be direct powered by the battery).&lt;/p&gt;
&lt;p&gt;B) AIN0 is reading a non-stable value. With my scope I was reasing 1.43V on Vout and 2.84 on Vin, I should expect&amp;nbsp;(1.43/2.84) * 0xFFF or 0x80D (or something close with not much noise from sample to sample).&lt;/p&gt;
&lt;p&gt;C) AIN1 is not reading properly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any advice is appreciated. Thank you,&lt;/p&gt;
&lt;p&gt;- Taylor&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/440257?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2023 09:17:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:169b219b-14a2-4683-bbfe-da00a4f9dc90</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Taylor. I am struggling to see what you are seeing. Are you able to replicate this on an nRF52832 DK? Without using a voltmeter, and only connecting P0.04 and P0.05 to GND and VDD, the only time I see anything other than 3.3v and 0v (or close to 0) are when the P0.04 and P0.05 are disconnected after being grounded. But at this point the pin is floating, so it doesn&amp;#39;t really have anything to measure.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are you seeing that Ain2 or Ain3, or both are using 5 seconds to reach 0v (or close to 0) after you short it to GND? Can you please try to decrease the sleep time in the adc_thread_handler() and see if the behavior remains?&lt;/p&gt;
&lt;p&gt;&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: SAADC Using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/439718?ContentTypeID=1</link><pubDate>Thu, 03 Aug 2023 13:33:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b0eeec4-6c06-4ef7-9bfe-6195c128353e</guid><dc:creator>tayspen72</dc:creator><description>&lt;p&gt;Edvin,&lt;/p&gt;
&lt;p&gt;Thanks for jumping in and getting involved.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/102225/saadc-using-nrf-connect-sdk/439679"]Is it possible to zip and upload the exact application that you are working on? I don&amp;#39;t have an nRF52805 at hand, but I can try to replicate what you are seeing on an nRF52840 DK to investigate what&amp;#39;s going on.&amp;nbsp;[/quote]
&lt;p&gt;Absolutely. I&amp;#39;ve attached the whole project directory. I was using the nRF52DK configured as an nRF52805 but have seen the same results when using it as an 810 or 832 device.&amp;nbsp;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/102225/saadc-using-nrf-connect-sdk/439679"]I understand that the value doesn&amp;#39;t change when you short the P0.04 to GND or VDD, right? Does the log say anything during the initialization, suggesting there was an issue?[/quote]
&lt;p&gt;The values would change when connected to ground. They would sometimes report the correct value but more often report an incorrect value. For the log above, I would move the jumper wire and allow the device to sit and stabilize for 5 or 10 seconds before clipping out a few values to paste in window here. Note the timestamps above that there is a 5 second gap between the Vdd and GND log output.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;- Taylor&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/SAADC_5F00_Test.zip"&gt;devzone.nordicsemi.com/.../SAADC_5F00_Test.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/439679?ContentTypeID=1</link><pubDate>Thu, 03 Aug 2023 11:22:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf76cbd5-8b64-4b01-86ef-03c1b5d7e964</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We are trying to even out the workload after the summer holidays, so Karl asked me to have a look at this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is it possible to zip and upload the exact application that you are working on? I don&amp;#39;t have an nRF52805 at hand, but I can try to replicate what you are seeing on an nRF52840 DK to investigate what&amp;#39;s going on.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I understand that the value doesn&amp;#39;t change when you short the P0.04 to GND or VDD, right? Does the log say anything during the initialization, suggesting there was an issue?&lt;/p&gt;
&lt;p&gt;&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: SAADC Using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/439127?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2023 19:28:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0925d96f-dccd-4975-b9dd-5d87ada09239</guid><dc:creator>tayspen72</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;Thanks for the response and request for clarity.&amp;nbsp;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/102225/saadc-using-nrf-connect-sdk/438721"]Is &lt;a href="https://docs.zephyrproject.org/latest/samples/boards/nrf/battery/README.html"&gt;this the Battery Example you are referring to here&lt;/a&gt;?[/quote]
&lt;p&gt;Yes, this is the example project I used as a reference.&lt;/p&gt;
&lt;p&gt;The design will ultimate be a simple voltage divider like shown in &lt;a href="https://www.google.com/url?sa=i&amp;amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FVoltage_divider&amp;amp;psig=AOvVaw1IKs1tjF-WCjTnsVhZH0q4&amp;amp;ust=1690911310131000&amp;amp;source=images&amp;amp;cd=vfe&amp;amp;opi=89978449&amp;amp;ved=0CBAQjRxqFwoTCJCG2dG9uYADFQAAAAAdAAAAABAE" rel="noopener noreferrer" target="_blank"&gt;this image&lt;/a&gt;&amp;nbsp;with R1 being fixed and R2 varying. I will convert the raw analog value to a resistance, similar to measuring temperature with a thermistor. The configuration right now is very flexible - I can directly connect the AIN pin to Vdd or GND and observe results. I&amp;#39;ve also built out a simple 1/2 Vdd output circuit where I should expect approimately 1.65V.&lt;/p&gt;
&lt;p&gt;I have verified the voltage on the pin using a multimeter and oscilloscope.&lt;/p&gt;
&lt;p&gt;Because R2 will vary, we can expect the voltage to be between 1.0 and 2.0V in the final design.&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/102225/saadc-using-nrf-connect-sdk/438721"]Could you provide a quick diagram of the voltage divider you are working with? Have you verified with an external device like an oscilloscope or multimeter that the voltage is as expected on the measured pins? -if so, what is the range of the voltage you will be measuring?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When connected to Vdd:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:02:33.060,424] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x0FFF): 3.300000V
[00:02:35.560,699] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x0FFF): 3.300000V
[00:02:38.060,974] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x0FFF): 3.300000V
[00:02:40.561,248] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x0FFF): 3.300000V
[00:02:43.061,523] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x0FFF): 3.300000V
[00:02:45.561,798] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x0FFF): 3.300000V
[00:02:48.062,072] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x0FFF): 3.300000V&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When connected to GND:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:02:53.062,622] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x0001): 0.000806V
[00:02:55.562,896] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0xFFFE): 52.811282V
[00:02:58.063,171] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x0FFF): 3.300000V
[00:03:00.563,446] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x0FFF): 3.300000V
[00:03:03.063,720] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x0FFF): 3.300000V
[00:03:05.563,995] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x06ED): 1.428791V
[00:03:08.064,270] &amp;lt;inf&amp;gt; ADC_Test: Ain2 (0x0004): 0.003223V&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When connected to R1=R2=5k ohm (V_adc = 1.45V) the log looks the same ad the Vdd log above.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The goal of the project is to read each of the 3 ADC channels periodically (once every 2-5 seconds) perform a conversion, then report the value over Bluetooth. I have the ADC sequence set to read channels 0/1/2 in a successive read and manually convert each of the 3 values as needed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me know if I need to provide more clarification in any way. Thanks,&lt;/p&gt;
&lt;p&gt;- Taylor&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC Using nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/438721?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2023 10:24:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dee82a4-2caf-41a4-9e45-291775db3e55</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Thank you for your patience with this.&lt;/p&gt;
[quote user=""]I am trying to evaluate some thermistors using a voltage divider connected to the analog pins on the nRF52DK configured as an nRF52805 MCU. I used the battery example from zephyr as the base to my code and think I have everything configured properly.[/quote]
&lt;p&gt;Is &lt;a href="https://docs.zephyrproject.org/latest/samples/boards/nrf/battery/README.html"&gt;this the Battery Example you are referring to here&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;Could you provide a quick diagram of the voltage divider you are working with? Have you verified with an external device like an oscilloscope or multimeter that the voltage is as expected on the measured pins? -if so, what is the range of the voltage you will be measuring?&lt;/p&gt;
[quote user=""]I can connect the P0.04 pin directly to VDD or GND and am not getting the expected results.&amp;nbsp;When I read the analog pins, the raw vdigital values are not consistent and are often much greater than the 12-bit result I am expecting. Sometimes it matches but will often cycle between 0 and 0xFFFF or something very close.[/quote]
&lt;p&gt;Could you provide some logs of these measurements, so that I can see how this behaves? Do I understand it correctly that it seems the SAADC output is fluctuating over the full range?&lt;br /&gt;&lt;br /&gt;For good measure, could you detail your end goal for the SAADC usage, so that I may best advice on the approach?&lt;br /&gt;I.e do you intend to use the SAADC to sample the battery every 10 minutes, or will you do high-frequency reads that you intend to transfer over BLE, for instance?&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>