<?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>Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10413/why-vsupply-measurement-is-inaccurate-in-nrf51</link><description>Hello all, to optimize the BOM and size of our device(Tag based on nRF51822), the external divider was replaced by software configuration to measure the battery voltage. In our design the CR2032 cell was used and connected to nRF51 directly.
We have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Feb 2016 15:50:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10413/why-vsupply-measurement-is-inaccurate-in-nrf51" /><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38666?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2016 15:50:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38676bd0-8f39-4498-b551-172bd9bfe67d</guid><dc:creator>MARTIN FR</dc:creator><description>&lt;p&gt;i would like to measure the battery voltage and advertise it and i can be visible in the MCP Control panel as i have checked my vdd pin it shows 2.89v but i wanted to measure that batttery voltage value via ADC configuration in order to make sure whatever battery percentage visible in MCP are true value  so i need your help in order to measure the ADC VALUE to determine the Battery percent&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38665?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2016 15:22:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72a09bfb-ee54-4360-ad90-5dc718093660</guid><dc:creator>Valer_I</dc:creator><description>&lt;p&gt;Hi, this thread is about measuring Vsupply not on pin but inside of chip using &amp;quot;SupplyOneThirdPrescaling setting&amp;quot;. You should start from example. My problem is that ADC measurement provides voltage drop on the battery, so measured value is lowered. Could you describe your problem into more details?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38664?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2016 13:16:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b42ff08-ae5b-449f-abef-980b9327cb43</guid><dc:creator>karan</dc:creator><description>&lt;p&gt;Hello Valeur, could you please describe me the steps how did you manage o find the voltage present on the ADC pin because am also facing similar kind of situation providing2.89volt to he DK and trying to find out how much voltage present on the adc pin any suggesion or ideas would be helpful for me&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38663?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2016 12:39:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:647c4111-0405-4f5c-8ccb-215cc1ef435d</guid><dc:creator>Valer_I</dc:creator><description>&lt;p&gt;Next time reviewed my code and have some result.
For device powered from CR2032 the ADC measurement depend on what clock used when ADC conversion occured. Here I read that ADC conversion accuracy is as in specification only when HF clock used. I tried this and ADC result was worse (delta 0.3V  compated to multimeter) than at LF clock. At LF clock delta is about 0.1-0.18V compated to multimeter. I took all batteries on the table and compared them all. (
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ADCmeasureCoef.tif"&gt;Plot&lt;/a&gt;).
The liniar dependence noticed (VMM- multimeter voltage, VADC- voltage measured by ADC of nRF51). To make voltage be equal to the multimeter (Agilent U1253A) I use formula
Vbat= Vadc*1000/988 and it&amp;#39;s work. The pin+ of battery connected directly to Vcc pin.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38662?ContentTypeID=1</link><pubDate>Tue, 15 Dec 2015 11:57:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49744f8e-feed-435a-b996-08b06fb47bca</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Could you post an answer with the added stuff, and accept and close it, so that other people can see what the solution was?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38655?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2015 15:57:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:152e7d35-352e-4506-b3b8-6ed991608161</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;The CPU is probably running (forgot about that), this requires additionally 4.1 mA + HFCLK current (800-900uA). The ADC requires only HFCLK and 1V2 to run which will result in 260uA+880uA=1140uA. You can trigger the ADC to start from a timer using PPI and then only wake up the CPU after the sample to read the data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38656?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2015 14:24:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbbb1da1-548b-4fbc-955e-2b72e1898c85</guid><dc:creator>Valer_I</dc:creator><description>&lt;p&gt;Yes, but 4mA for single ADC conversion (measured with new cr2032) is quite strange for me. Is my ADC configuration wrong?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38660?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2015 14:05:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb041d08-8cfb-432a-98e0-13860742fc6f</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Good you found the cause, I was running out of options. Your battery is old, and coin cell batteries will have higher internal resistance at end of life, but this would mean a resistance of almost 1K which is very high. A capacitor will work, do a search for &amp;quot;coin cell internal resistance&amp;quot; on google. However using a new battery should be adequate, if the battery voltage is too low you should change the battery anyhow.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38661?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2015 08:39:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3c543c3-06ca-47df-b0e6-64ee561f4184</guid><dc:creator>Valer_I</dc:creator><description>&lt;p&gt;Hi Ole, I edited the question a little. We are using dev. board only as power supply (3V) and for programming our devices (tags with nrf chip and a few external parts). Now I measured the VDD, AVDD pins and the battery holder they shown the same voltage. The problem is that ADC measurement shows correct values when the board is powered with external supply (3V from dev board pca10000). After I power the board with the battery the adc values become significantly lower than ones measured by the multimeter on VDD pins. The battery and external supply nonnected in the same point of the board and VDD has capacitors connected as described in PS. The lower battery voltage is the bigger differentce in measurements onserved. For example:  Mulimeter - 2.95V -&amp;gt; ADC 2.86 (delta = 90mV),   Mulimeter - 2.77V -&amp;gt; ADC 2.32 (delta = 450mV!!). Currently I have no idea what to try next(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38659?ContentTypeID=1</link><pubDate>Fri, 27 Nov 2015 13:37:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67427d17-d193-471e-b06d-768897643299</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;I was measuring with a bad multimeter, now I get the same measurements on the ADC as on the multimeter. If I understood you correct you are using nRF51 DK? When you measured with battery did you measure Vdd or directly from the battery with the multimeter/oscilloscope, this was somewhat unclear in the question. Between the battery and vdd there is a diode which cause a voltage drop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38657?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2015 10:19:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d96a7a1-2b4b-499d-a14a-395bbe5034d0</guid><dc:creator>Valer_I</dc:creator><description>&lt;p&gt;Yes,the walues are signed. However, I think the reason caused such ADC error is different. I read about divider impedance compensation &lt;a href="https://devzone.nordicsemi.com/question/21653/how-to-calibrate-the-nrf51-adc-to-correct-offset-and-gain-error/"&gt;here&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/question/1524/analog-prescale-question/"&gt;here&lt;/a&gt;. In my configuration there is no input pin used.
My next question is how to use compensation capacitor with this design?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38653?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2015 17:17:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a01d5bc-4c53-4ad5-a007-9373414cc66f</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;The numbers are signed (int8_t), I have updated the post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38654?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2015 16:34:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fd1554f-c1e0-4d33-a013-cb87a85a069e</guid><dc:creator>Valer_I</dc:creator><description>&lt;p&gt;Hi Ole, thank you for advice! I have rev.3 chip and got GAIN_ERROR and OFFSET_ERROR values. However, they are negative and if I use correction formula&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; ADCcorrected = ADCmeasured * (1024+GAIN_ERROR) / 1024 + OFFSET_ERROR - 0.5 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;the result voltage values are even farther from those I&amp;#39;ve measured by multimeter on IC pins. What can you advice?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why Vsupply measurement is inaccurate in nRF51?</title><link>https://devzone.nordicsemi.com/thread/38658?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 12:03:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2664502-aac6-41c5-aee5-f3748f224563</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;I tested reading the VCC the same way as you do and I get a contstant offset error in both cases which is the same. Offset and gain errors can be read from the FICR if you have rev. 3 chips, see &lt;a href="https://devzone.nordicsemi.com/question/21653/how-to-calibrate-the-nrf51-adc-to-correct-offset-and-gain-error/?answer=21654#post-id-21654"&gt;here&lt;/a&gt;. You are sure the power from the dev board is 2.95V? I have about 3.06V from the dev board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>