<?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>How to measure Lithium battery voltage with low-power mode 1.8V</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2574/how-to-measure-lithium-battery-voltage-with-low-power-mode-1-8v</link><description>Hey everyone. Found this thread about measuring the voltage on lipo battery:
 devzone.nordicsemi.com/.../how-to-measure-lithium-battery-voltage</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 May 2014 13:26:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2574/how-to-measure-lithium-battery-voltage-with-low-power-mode-1-8v" /><item><title>RE: How to measure Lithium battery voltage with low-power mode 1.8V</title><link>https://devzone.nordicsemi.com/thread/10218?ContentTypeID=1</link><pubDate>Wed, 21 May 2014 13:26:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c6593dd-f39c-488a-a225-9a669d988533</guid><dc:creator>Michal Zacharias</dc:creator><description>&lt;p&gt;Ooooh, yes, sure.. stupid me :) Thank you Stefan for your awesome and VERY useful advice. Those 46 or 185 levels are probably more than enough. I guess changing the voltage divider would consume more power and we don&amp;#39;t want that :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to measure Lithium battery voltage with low-power mode 1.8V</title><link>https://devzone.nordicsemi.com/thread/10217?ContentTypeID=1</link><pubDate>Wed, 21 May 2014 06:03:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34507638-920e-46d2-8b69-00ca9cf56d88</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Michal&lt;/p&gt;
&lt;p&gt;Thank you for your question.&lt;/p&gt;
&lt;p&gt;Actually, with 1/1 prescaling and reference voltage set to VBG = 1.2V, the range of the ADC is 0V - 1.2V.&lt;/p&gt;
&lt;p&gt;If you choose 8-bit resolution, which is 256 bits, you get 1 bit output change when you change the input voltage with 1.2V/256=0.004688V.
If you choose 10-bit resolution, which is 1024 bits, you get 1 bit output change when you change the input voltage with 1.2V/1024=0.001172V.
When the input goes above 1.2V, the ADC output will saturate and show value 255 for 8-bit configuration, or 1023 for 10-bit configuration.&lt;/p&gt;
&lt;p&gt;For the Lithium battery setup and 8 bit resolution, ADC will output following value when the battery is flat: 0.54/1.2&lt;em&gt;255=115
For the Lithium battery setup and 8 bit resolution, ADC will output following value when the battery is fully charged: 0.76/1.2&lt;/em&gt;255=161
Result is that you will have 161-115=46 bit resolution in the Lithium battery voltage range when using 8-bit ADC configuration. So you could in principle utilize up to 46 different battery levels. However, I assume that the discharge curve of the Lithium battery is not linear between 3.0V and 4.2V, so you would most likely need to implement a transfer function to convert the ADC output to battery level percentage.&lt;/p&gt;
&lt;p&gt;For the Lithium battery setup and 10-bit resolution, ADC will output following value when the battery is flat: 0.54/1.2&lt;em&gt;1023=461
For the Lithium battery setup and 10-bit resolution, ADC will output following value when the battery is fully charged: 0.76/1.2&lt;/em&gt;1023=646
Result is that you will have 646-461=185 bit resolution in the Lithium battery voltage range when using 10-bit ADC resolution.&lt;/p&gt;
&lt;p&gt;Let me know if you have further questions on the topic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to measure Lithium battery voltage with low-power mode 1.8V</title><link>https://devzone.nordicsemi.com/thread/10216?ContentTypeID=1</link><pubDate>Tue, 20 May 2014 13:02:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:247b9b42-1474-4925-b3bb-da8831a28691</guid><dc:creator>Michal Zacharias</dc:creator><description>&lt;p&gt;Ok, let&amp;#39;s says I&amp;#39;ll use this combination:
VDD 1.8V, prescaling 1/1 then AIN_MAX is 2.1V&lt;/p&gt;
&lt;p&gt;V_AIN_MIN = 2200 / (2200+10000) * 3.0 = 0.54V
V_AIN_MAX = 2200 / (2200+10000) * 4.2 = 0.76V&lt;/p&gt;
&lt;p&gt;And I&amp;#39;ll use 8 bits resolution. So I get:
(0.76 - 0.54) / 256 = 0.00086&lt;/p&gt;
&lt;p&gt;It&amp;#39;s quite small number, will I be able to determine at least 10 different battery levels?&lt;/p&gt;
&lt;p&gt;Or should I change the divider, so it has bigger &amp;quot;spread&amp;quot;?&lt;/p&gt;
&lt;p&gt;Sorry for probably very basic question. I&amp;#39;m quite new to this :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to measure Lithium battery voltage with low-power mode 1.8V</title><link>https://devzone.nordicsemi.com/thread/10215?ContentTypeID=1</link><pubDate>Tue, 20 May 2014 12:37:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b942cdb2-0a8e-4024-9c5f-0aa5ea6b8ca0</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Michal&lt;/p&gt;
&lt;p&gt;When using low-voltage-mode, supply voltage is ~1.8V. You should not expose higher voltage to GPIO or AIN pins than the supply voltage. More information on the ADC input voltage limitations are on &lt;a href="http://devzone.nordicsemi.com/index.php/what-voltage-range-can-be-measured-with-the-adc#reply-103"&gt;this thread&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The voltage-divider setup for lithium battery is valid for low-voltage mode because the maximum voltage exposed through the voltage divider to the ADC AIN input pin is V_AIN = 2200 / (2200+10000) * 4.2 = 0.76V.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>