<?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>Battery percentage level</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24824/battery-percentage-level</link><description>Hello, 
 I am using a Nrf52382 custom board and want to know the Vbattery so I used below code 
 #define MIN_BATTERY_ADC_VALUE (int16_t)11295 //(min_voltage_on_analog_pin *4551) 2.48*4551 = 11295
#define MAX_BATTERY_ADC_VALUE (int16_t)15391 //(max_voltage_on_analog_pin</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Apr 2018 06:19:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24824/battery-percentage-level" /><item><title>RE: Battery percentage level</title><link>https://devzone.nordicsemi.com/thread/129863?ContentTypeID=1</link><pubDate>Thu, 26 Apr 2018 06:19:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1b5f4ea-3fe4-426d-aa72-ad5a4bbb484c</guid><dc:creator>Prashant Singh</dc:creator><description>&lt;p&gt;Hi Renato,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;Attach output from the voltage divider to one of your Analog pins from AN0 to AN7.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery percentage level</title><link>https://devzone.nordicsemi.com/thread/129405?ContentTypeID=1</link><pubDate>Mon, 23 Apr 2018 16:11:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:173814fb-4495-4976-bf46-63b0f1338847</guid><dc:creator>Renato Silva</dc:creator><description>&lt;p&gt;Hi, Did anyone resolve this question?&lt;/p&gt;
&lt;p&gt;I am using the nrf52832/52840 and I wanna measure the battery level but I am not sure wich pins I must use to make a voltade divisor.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;div id="selenium-highlight"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery percentage level</title><link>https://devzone.nordicsemi.com/thread/97733?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2017 04:39:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cdd9417-caaa-49a3-9abf-74f20d7b62b7</guid><dc:creator>Prashant Singh</dc:creator><description>&lt;p&gt;Hi, Jorgen it seems there is no connection from battery and analog input so unable to take readings.
Thanks for your support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery percentage level</title><link>https://devzone.nordicsemi.com/thread/97734?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2017 13:13:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d21af847-854b-4ae1-804a-ddaf2d5b32a6</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I don&amp;#39;t understand your comment. Have you connected any of the analog inputs to the battery voltage? You need to create voltage divider, as described in the blog post I linked, to make sure the max input voltage does not exceed VDD (3 V). You should then be able to calculate the battery percentage from the read analog value, and the calculations from the voltage divider.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery percentage level</title><link>https://devzone.nordicsemi.com/thread/97732?ContentTypeID=1</link><pubDate>Mon, 04 Sep 2017 09:00:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:669e70aa-050c-442b-8efd-159c904a93c9</guid><dc:creator>Prashant Singh</dc:creator><description>&lt;p&gt;Observed that AIN0, AIN1, AIN2, AIN7 are not connected to any thing. AINVDD is connected to VCC3 which is the output from TPS62233 AIN3 is connected to VBUS of USB. AIN4, AIN5, AIN6 are connected to RGB LED. so while taking the reading from AINVDD the result is coming 2.99v.From AIN0, AIN1, AIN2, AIN7 readings are some negative value. And if 4, 5, 6 analog pins are used they are giving 1.50v. How can I calculate battery percentage?
Will AINVDD  provide the constant voltage all the time or it will drop as battery drops.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery percentage level</title><link>https://devzone.nordicsemi.com/thread/97735?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2017 07:45:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:804db391-ba18-42a9-b8a9-7431d572f4f3</guid><dc:creator>Prashant Singh</dc:creator><description>&lt;p&gt;Hi, Jorgen Thanks for your input, VCC3 from TPS62233 is provided to MCU.So max voltage that I can get is 3v on analog pins?&lt;/p&gt;
&lt;p&gt;Result Recieved is coming around 6536,if divided by 4551.1, will give me voltage at analog pin 1.4v which is quite low
// GAIN/REFERENCE * 2^(RESOLUTION) = 4551&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery percentage level</title><link>https://devzone.nordicsemi.com/thread/97731?ContentTypeID=1</link><pubDate>Thu, 31 Aug 2017 13:18:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f9c47d5-9b97-4907-a30d-2e70c6f37584</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;It seems you are using a TPS62233 for regulating the voltage to 3 V to the chip. Note that the analog inputs of the nRF52832 support full scale input from 0 to VDD, and cannot measure inputs above VDD. If you input 3.38 V, you will get false readings. I can&amp;#39;t see from your schematics how you are connecting the battery to the analog inputs. Please have a look at this blog post about &lt;a href="https://devzone.nordicsemi.com/blogs/943/measuring-lithium-battery-voltage-with-nrf52/"&gt;measureing Lithium battery voltage using the SAADC of the nRF52832&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>