<?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>problem with nrf51822 ADC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35963/problem-with-nrf51822-adc</link><description>Hi to all, 
 i am developing a device that in it i need to measure voltage of battery to report percentage of battery to user, but the voltage that i measure with ADC is different with voltage that i measured with multi-meter, for example multi-meter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Jul 2018 11:37:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35963/problem-with-nrf51822-adc" /><item><title>RE: problem with nrf51822 ADC</title><link>https://devzone.nordicsemi.com/thread/138752?ContentTypeID=1</link><pubDate>Tue, 03 Jul 2018 11:37:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffaaa798-beb2-4da7-9c64-e4b1735c00a9</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;The ADC requires a constant reference voltage, so it would not make much sense to use a battery as the the reference voltage. In addition, this&amp;nbsp;is unfortunately not&amp;nbsp;possible.&lt;/p&gt;
&lt;p&gt;Yes, there is an internal regulator that converts the 3.3v battery voltage to 1.2 volts.&lt;/p&gt;
&lt;p&gt;Which Nordic SDK version are you currently using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem with nrf51822 ADC</title><link>https://devzone.nordicsemi.com/thread/138409?ContentTypeID=1</link><pubDate>Sun, 01 Jul 2018 18:18:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cd83865-a1b0-4ac4-98d1-693bf34f97a5</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;Measuring vbat is always troublesome. If you are measuring a coin cell it can be even harder since processor and radio activity heavily influence the instantaneous voltage.&amp;nbsp; This can give you discrepancies when measuring rest voltage with a multimeter.&lt;/p&gt;
&lt;p&gt;To ensure you are measuring at the correct time use radio notifications to let you measure Vbat before the radio goes active.&amp;nbsp; In this manner you will know the battery has rested for a few milliseconds (maybe more depending on your code) and you will get a value closer to the rest voltage.&lt;/p&gt;
&lt;p&gt;Second all ADCs have some amount of DC offset, on nRF52 there is a routine to calibrate this out on nRF51 there is no such routine that I know of.&amp;nbsp; so you just have to come up with a way in code to compensate for the nominal offset.&amp;nbsp; This offset is normally temp dependent so you may have to measure temp then factor offset into your Vbat measurement.&amp;nbsp; I encourage you to thumb through the devzone for solutions on this.&lt;/p&gt;
&lt;p&gt;Some people even go so far as to take several measurements and then average to get a better idea of the real voltage. Functionally your value will always be off by a few quanta just because of how ADCs work.&amp;nbsp; For this reason people normally throw away the bottom two bits or so as an easy way to get more accurate values.&lt;/p&gt;
&lt;p&gt;Yes, VBG is an internal 1.2v reference.&amp;nbsp; Since it will always be 1.2v for Vbat from 2.1 to 3.6v you can always assume it is accurate.&lt;/p&gt;
&lt;p&gt;On our own nRF52 product we use temp and an offset number to measure Vbat.&amp;nbsp; The temp is important for the coin cell which has a rather large correlation with temp and its rest voltage.&amp;nbsp; We measure Vbat hourly 5.5msec before the radio goes active then do a weighted average of the hourly measurements.&amp;nbsp; Thus far it has worked really well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem with nrf51822 ADC</title><link>https://devzone.nordicsemi.com/thread/138402?ContentTypeID=1</link><pubDate>Sun, 01 Jul 2018 11:54:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5453b5e0-c36d-43d3-afbe-cc43168dfc4c</guid><dc:creator>alireza sadeghpour</dc:creator><description>&lt;p&gt;and also another question, is it possible to measure battery accurate voltage when we are using voltage of battery as&amp;nbsp;reference voltage??&lt;/p&gt;
&lt;p&gt;document say that when we set NRF_ADC_CONFIG_REF_VBG in configuration adc will use 1.2v as voltage reference, is there any regulator or something in nrf51822 that convert 3.3v battery voltage to 1.2v and then use from it as reference voltage???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>