<?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 over BLE sanity check</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53367/saadc-over-ble-sanity-check</link><description>Hi, 
 I merge saadc and ble_uart together in order to send send sensor output(now just analog voltage) to mobile app. I want to check weather the ADC is working properly or not. Digital values for same voltage are very different from each other and it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Oct 2019 13:12:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53367/saadc-over-ble-sanity-check" /><item><title>RE: Saadc over BLE sanity check</title><link>https://devzone.nordicsemi.com/thread/215724?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2019 13:12:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13ae495b-f20c-4426-bf16-b302e2530bcd</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;No, it can never be FFFF. It looks a bit strange for a few reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It is a &lt;em&gt;signed&lt;/em&gt; integer, so if the most significant bit was 1, this would be a negative number (and that will only happen with low values samples when there is a DC offset)&lt;/li&gt;
&lt;li&gt;The highest bit is in the second byte (reading from the left), due to endianness&lt;/li&gt;
&lt;li&gt;The sample is not 16 bit, so the upper bits (except for the last sign bit), are not used (depending on configuration, can be 8, 10 or 12 bits).&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saadc over BLE sanity check</title><link>https://devzone.nordicsemi.com/thread/215717?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2019 12:51:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ede2a578-2ccb-43ad-8e0f-5a198dcc36d2</guid><dc:creator>karoun</dc:creator><description>&lt;p&gt;Thank you for your suggestions, I will try that. also when pin is connected to VDD the highest value after conversion is FF0F and it is not changing. shouldn&amp;#39;t it be FFFF?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saadc over BLE sanity check</title><link>https://devzone.nordicsemi.com/thread/215716?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2019 12:43:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:802e7edb-8a5d-4d38-b590-7d34f0460531</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It looks like the samples are around 0 (remember that it is integers), so if you have a DC offset or a bit of noise when measuring 0 V, then you can get negative numbers. You should calibrate to correct any DC offset (difficult to say if there is any or not), and you could teak measures to reduce the noise. Both in HW if possible, and also by using oversampling (essentially just averaging of multiple samples).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saadc over BLE sanity check</title><link>https://devzone.nordicsemi.com/thread/215553?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 13:58:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd8501a9-99f4-4625-8b1c-e01f237209e0</guid><dc:creator>karoun</dc:creator><description>&lt;p&gt;Hi Einar, Thank you for your reply.&lt;/p&gt;
&lt;p&gt;I apply the changes you recommend but still results are different for same voltage. For example here is the result for ground pin.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot_5F00_20191017_2D00_154645_5F00_nRF-Toolbox.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saadc over BLE sanity check</title><link>https://devzone.nordicsemi.com/thread/215538?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 13:19:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19ee795a-638e-40b3-a08f-6fb87444df80</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Kosar,&lt;/p&gt;
&lt;p&gt;The simplest sanity check is to ground the pin, you are measuring. If you get something other than 0, you have a DC offset and should calibrate the SAADC (by calling nrf_drv_saadc_calibrate_offset() if you are using the SDK driver). If you get different measurement results depending on supply voltage, that indicates to me that you are using VDD as reference. You should probably use the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/saadc.html?cp=3_0_0_5_22_1#unique_1891067092"&gt;internal 0.6 V reference&lt;/a&gt; instead to make the measurement results independent of the VDD voltage.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>