<?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 Level  discharge curve, How can I read?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6914/battery-level-discharge-curve-how-can-i-read</link><description>I found this website. 
 link text 
 curve is shown below. 
 
 There are app_utils.h information below. 
 
 @brief Function for converting the input voltage (in milli volts) into percentage of 3.0 Volts. 
 
 @details The calculation is based on</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 May 2015 05:39:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6914/battery-level-discharge-curve-how-can-i-read" /><item><title>RE: Battery Level  discharge curve, How can I read?</title><link>https://devzone.nordicsemi.com/thread/24391?ContentTypeID=1</link><pubDate>Thu, 07 May 2015 05:39:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a51d6063-8c12-4662-8599-77538ad9950c</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The code above attempts to divide the voltage decline of the battery into several linear sections. Yes you are correct, it is a challange to place those linear sections correctly because apparently they are dependent on both temperature and how fast you drain the battery.&lt;/p&gt;
&lt;p&gt;The nRF51 has an internal temperature meter and you could use that to figure out the battery level relative to the temperature.&lt;/p&gt;
&lt;p&gt;Also, most likely you know how fast you drain your battery since you know what application you are running on the device and approximately know the current consumption of the application.&lt;/p&gt;
&lt;p&gt;The battery voltage to battery level can never be accurate, it will always be an assumption since there are several factors in the battery voltage to battery level transfer function. It is also hard because the voltage decline of the battery is rather slow, especially between ~30%-80% battery level. Anyway, from you &amp;quot;pulse discharge characteristics&amp;quot; graph it seems that the discharge is more vertical (and therefore more managable) when the load is high. Therefore I would recommend to measure the battery voltage when the nRF51 is drawing the most current, i.e. during a radio event. This could be achieved with using radio notifications which signal the application just before BLE radio event. There you could start a timer which would trigger ADC start when the radio is active. Use a PPI channel to connect together the timer event and the ADC start task.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 7.6.2015&lt;/strong&gt;
An example showing timer triggering ADC task through PPI channel is shown &lt;a href="https://github.com/NordicSemiconductor/nrf51-ADC-examples/blob/master/rtc0-triggering-adc-sample/main.c"&gt;here&lt;/a&gt;.  A radio notification example is shared &lt;a href="https://devzone.nordicsemi.com/question/28577/increase-delay-between-radio-event-and-cpu-cycle/?answer=28643#post-id-28643"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery Level  discharge curve, How can I read?</title><link>https://devzone.nordicsemi.com/thread/24390?ContentTypeID=1</link><pubDate>Thu, 07 May 2015 04:18:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae80a9f2-55ac-49d2-90e3-8d2b443c7148</guid><dc:creator>GunMin</dc:creator><description>&lt;p&gt;if (mvolts&amp;gt; = 3000)&lt;/p&gt;
&lt;p&gt;     {&lt;/p&gt;
&lt;p&gt;         battery_level = 100;&lt;/p&gt;
&lt;p&gt;     }&lt;/p&gt;
&lt;p&gt;     else if (mvolts&amp;gt; 2900)&lt;/p&gt;
&lt;p&gt;     {&lt;/p&gt;
&lt;p&gt;         battery_level = 100 - ((3000 - mvolts) * 58) / 100;&lt;/p&gt;
&lt;p&gt;     }&lt;/p&gt;
&lt;p&gt;     else if (mvolts&amp;gt; 2740)&lt;/p&gt;
&lt;p&gt;     {&lt;/p&gt;
&lt;p&gt;         battery_level = 42 - ((2900 - mvolts) * 24) / 160;&lt;/p&gt;
&lt;p&gt;     }&lt;/p&gt;
&lt;p&gt;     else if (mvolts&amp;gt; 2440)&lt;/p&gt;
&lt;p&gt;     {&lt;/p&gt;
&lt;p&gt;         battery_level = 18 - ((2740 - mvolts) * 12) / 300;&lt;/p&gt;
&lt;p&gt;     }&lt;/p&gt;
&lt;p&gt;     else if (mvolts&amp;gt; 2100)&lt;/p&gt;
&lt;p&gt;     {&lt;/p&gt;
&lt;p&gt;         battery_level = 6 - ((2440 - mvolts) * 6) / 340;&lt;/p&gt;
&lt;p&gt;     }&lt;/p&gt;
&lt;p&gt;     else&lt;/p&gt;
&lt;p&gt;     {&lt;/p&gt;
&lt;p&gt;         battery_level = 0;&lt;/p&gt;
&lt;p&gt;     }&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery Level  discharge curve, How can I read?</title><link>https://devzone.nordicsemi.com/thread/24389?ContentTypeID=1</link><pubDate>Thu, 07 May 2015 04:17:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:884e16b1-3d25-4633-af9f-11653acf3915</guid><dc:creator>GunMin</dc:creator><description>&lt;p&gt;Thank you for reply.&lt;/p&gt;
&lt;p&gt;Hi muhkuhns, I don&amp;#39;t understand your answer.&lt;/p&gt;
&lt;p&gt;Do you know this function? --&amp;gt; battery_level_in_percent()&lt;/p&gt;
&lt;p&gt;I see only that graph, I don&amp;#39;t know how to divide sections like battery_level_in_percent function.&lt;/p&gt;
&lt;p&gt;In this function you are being told, &amp;quot;It has been calculated regardless of the temperature and load.&amp;quot;&lt;/p&gt;
&lt;p&gt;But I&amp;#39;d like to know what based on can be divided as follows:&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery Level  discharge curve, How can I read?</title><link>https://devzone.nordicsemi.com/thread/24388?ContentTypeID=1</link><pubDate>Wed, 06 May 2015 15:39:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:812ae9af-929f-4626-a1aa-4d114ac4bed1</guid><dc:creator>muhkuhns</dc:creator><description>&lt;p&gt;I am not quite sure what you want to do. Do you want to convert the measurement of your battery&amp;#39;s voltage to a percentage of the usable capacity left? Something like:&lt;/p&gt;
&lt;p&gt;3V = 100%, 2V = 0% and a function for in between?&lt;/p&gt;
&lt;p&gt;The measurement is no problem. And the conversion neither. Is is never exact.. As the graphics you posted show it is dependent on discharge rate , temperature and so on. For most cases a simple linear function should be enough.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>