<?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 on the 9160dk</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101812/saadc-on-the-9160dk</link><description>Hello, I am working with the ADC on the nRF 9160dk as a way to read the voltage from a load sensor. I have been struggling to understand how to configure the ADC on the board. I am assuming that I am working with the ADC that is part of the 9160SiP and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Jul 2023 21:19:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101812/saadc-on-the-9160dk" /><item><title>RE: SAADC on the 9160dk</title><link>https://devzone.nordicsemi.com/thread/436566?ContentTypeID=1</link><pubDate>Fri, 14 Jul 2023 21:19:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:519a538f-41b5-4330-9e9f-d258cb97c0a3</guid><dc:creator>pdj1183</dc:creator><description>&lt;p&gt;I figured out the issue, A0 on the GPIO Board Control corresponds to AIN1 not AIN0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC on the 9160dk</title><link>https://devzone.nordicsemi.com/thread/436335?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 17:56:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d021dc4b-4ed0-40cd-9448-651be4dd4855</guid><dc:creator>pdj1183</dc:creator><description>&lt;p&gt;Ok so I have changed the uint so that issue is fixed, but I still cannot see any difference in voltage applied to the ADC through the serial terminal. Is there something I should change with the gain, resolution, or reference?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC on the 9160dk</title><link>https://devzone.nordicsemi.com/thread/436327?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 16:38:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4e339f4-5379-48c1-8de4-a8e6b2d3b5f2</guid><dc:creator>pdj1183</dc:creator><description>&lt;p&gt;Oh ok that definitely makes sense about the uint vs int I will check that out. I have been using usb to power the board but I believe that SW9 is set at 1.8v for the VDD. That would mean that my maximum would be 1.8V for the ADC?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC on the 9160dk</title><link>https://devzone.nordicsemi.com/thread/436244?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 12:06:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f31bb6a7-315f-4e0e-af0e-23ece070f297</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]That is the file that I am using for my application that has been adapted from sample projects. When sitting at idle with no power going to the ADC I will get very sudden power spike where the ADC value is 65535. Is this due to a short or the reading overlapping with a CPU cycle or something?[/quote]
&lt;p&gt;This happens because you have used the wrong datatype for the SAADC sample buffer. The samples are stored as 16-bit 2&amp;#39;s complement values, which corresponds to int16_t data type. You are using uint16_t for your buffer. The SAADC is a differential implementation, which means it can have negative values. In single-ended mode, the negative input of the SAADC is connected to GND, but due to noise, samples can still be slightly negative. -1 in 2&amp;#39;s ccomplement form corresponds to&amp;nbsp;&lt;span&gt;65535 decimal in the uint16_t variable.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user=""]When using a programmable power supply to test the ADC it only reads the difference between 2.4v to 2.5v and has some strange characteristics within that range. From 2.40v to 2.46v the ADC value doubles with each 0.01v increment and then begins to lower as you go from 2.46v to 2.50v. Is this expected? I believe that the reference voltage and the ADC gain control the range the ADC can read. Is there a formula where I can&amp;nbsp;test&amp;nbsp;different values for each to find the range that I need? Also at 2.45v the ADC value is between 518 - 526 and the calculated mV is around 1830mV which is much lower than expected.&amp;nbsp;[/quote]
&lt;p&gt;The input range of the SAADC is from 0 to VDD. What voltage are you supplying the nRF9160 at? You should not input any signals above the supply voltage, this will give unpredictable results. Also, the&amp;nbsp;&lt;a title="Absolute maximum ratings" href="https://infocenter.nordicsemi.com/topic/ps_nrf9160/abs_max_ratings.html?cp=2_0_0_11"&gt;Absolute maximum ratings&lt;/a&gt;&amp;nbsp;of the GPIOs are VDD + 0.3V.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>