<?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>Understanding SAADC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24657/understanding-saadc</link><description>Hi all, 
 I am trying to use the SAADC to measure battery level. I have a rechargable lithium battery connected to my customed PCB with a NRF52832. The rechargable battery has a max voltage of about 4.2V when charged. 
 I also have a 3.3V voltage regulator</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Apr 2018 21:02:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24657/understanding-saadc" /><item><title>RE: Understanding SAADC</title><link>https://devzone.nordicsemi.com/thread/129852?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 21:02:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f43da36-87f8-46b7-b91e-94b5bd447c24</guid><dc:creator>rdpoor</dc:creator><description>&lt;p&gt;To echo MartinBL&amp;#39;s comment, the input impedance of your multimeter could be skewing the results -- to measure a voltage across a 10M resistor requires a meter with very low leakage current.&lt;/p&gt;
&lt;p&gt;To test that theory: does the ADC reading change when you connect the voltmeter?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding SAADC</title><link>https://devzone.nordicsemi.com/thread/97060?ContentTypeID=1</link><pubDate>Tue, 29 Aug 2017 13:12:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c600936d-dece-47d0-87a7-8e732ed85050</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure if I understand. It sounds like your measurements and ADC results are almost spot on (3.61V vs 3.598V)?&lt;/p&gt;
&lt;p&gt;Have you taken into account the accuracy of your resistors and the dropout voltage of your voltage regulator? Since you are using VDD as a reference voltage your ADC readings will be useless when/if the battery voltage gets so low that the regulator cannot produce 3.3V anymore.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding SAADC</title><link>https://devzone.nordicsemi.com/thread/97057?ContentTypeID=1</link><pubDate>Tue, 29 Aug 2017 00:31:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bad1967-1582-4c7f-b249-f3f85a17a63a</guid><dc:creator>kian79</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I still cannot figure out the problem. Anyone can help?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding SAADC</title><link>https://devzone.nordicsemi.com/thread/97061?ContentTypeID=1</link><pubDate>Sat, 26 Aug 2017 00:39:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae4476bc-5618-48ce-911e-636a7761ff48</guid><dc:creator>kian79</dc:creator><description>&lt;p&gt;Hi Martin,
I don&amp;#39;t know the input impedance of my meter.&lt;/p&gt;
&lt;p&gt;Now, instead of measuring the voltage across the 10MOhm resistor, I measured the voltage across the battery instead.&lt;/p&gt;
&lt;p&gt;And these are my observations:
Battery Voltage/ADC Value&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;3.95/592&lt;/li&gt;
&lt;li&gt;3.79/568&lt;/li&gt;
&lt;li&gt;3.61/541&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There seems to be a consistent pattern.
At 3.95V battery voltage, the theoretical voltage at the 10MOhm resistor should be 3.95*(10/14) = 2.821V&lt;/p&gt;
&lt;p&gt;At 3.79V battery voltage, the theoretical voltage at the 10MOhm resistor should be 3.79*(10/14) = 2.707V&lt;/p&gt;
&lt;p&gt;The difference in voltage is 2.832-2.707 = 0.114V and the difference in ADC result is 592-568 = 24. Therefore the ADC resolution is about 0.114/24 = 0.00475&lt;/p&gt;
&lt;p&gt;Working backwards, with a ADC result of 541, this gives a ADC measured voltage of 541&lt;em&gt;0.00475 =2.57V. Take this result and multiple by 2.57&lt;/em&gt;(14/10) = 3.598V (battery voltage). Which is quite close to what I measured.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding SAADC</title><link>https://devzone.nordicsemi.com/thread/97062?ContentTypeID=1</link><pubDate>Fri, 25 Aug 2017 13:13:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:405689f8-6b83-4483-8a38-fcfd110cee0f</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;You are measuring the voltage across the 10 MOhm resistor with your volt meter right? What is the input impedance of your meter? Could it be related to &lt;a href="https://www.allaboutcircuits.com/textbook/direct-current/chpt-8/voltmeter-impact-measured-circuit/"&gt;this&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding SAADC</title><link>https://devzone.nordicsemi.com/thread/97059?ContentTypeID=1</link><pubDate>Fri, 25 Aug 2017 11:58:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5494513-2848-47ce-9334-14932d60494e</guid><dc:creator>kian79</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;I measured with a voltmeter. My VDD is 3.28V and the voltage I am feeding into AN1 now is 2.22V (after charging the battery). I am getting a converstion result of 592.&lt;/p&gt;
&lt;p&gt;Something still seems wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding SAADC</title><link>https://devzone.nordicsemi.com/thread/97058?ContentTypeID=1</link><pubDate>Fri, 25 Aug 2017 10:44:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5670091b-551f-4d29-9917-ae713bab4903</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In your code you are using the nRF52&amp;#39;s VDD divided by 4 as reference voltage (NRF_SAADC_REFERENCE_VDD4) and a gain of 1/6. If we rearange the equation presentet &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/saadc.html?cp=2_1_0_36_2#saadc_digital_output"&gt;here&lt;/a&gt; we can see that Vin is:&lt;/p&gt;
&lt;p&gt;Vin = ADCresult * Reference /  (Resolution * Gain)&lt;/p&gt;
&lt;p&gt;In your case that should result in:&lt;/p&gt;
&lt;p&gt;Vin = 550 * (VDD/4) / (1024 * (1/6)) = 2.66.&lt;/p&gt;
&lt;p&gt;So something is wrong. Are you sure that VDD is 3.3V?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>