<?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>Calculating battery remaining capacity</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43707/calculating-battery-remaining-capacity</link><description>Hi, I am currently working on calculating a Li-ion battery;s remaining capacity. As far as I know, I should read the raw value via SAADC. then convert the value back to voltage and calculate with the battery&amp;#39;s discharging settings. From the SAADC_LOW_POWER</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Feb 2019 11:45:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43707/calculating-battery-remaining-capacity" /><item><title>RE: Calculating battery remaining capacity</title><link>https://devzone.nordicsemi.com/thread/171607?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 11:45:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a9bd7fd-23a3-471d-a6ac-b4fc66456f66</guid><dc:creator>awneil</dc:creator><description>[quote userid="7377" url="~/f/nordic-q-a/43707/calculating-battery-remaining-capacity/171605"]use a multimeter or similar?[/quote]
&lt;p&gt;Also check with a scope - to see if there is any noise, etc ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculating battery remaining capacity</title><link>https://devzone.nordicsemi.com/thread/171605?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 11:40:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf546706-34a9-427d-95a0-62ee79250174</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I see. Then the only other explanation I can think of at the moment is if you use inaccurate resistors in the voltage divider and have had a bit of bad luck. Could that be the case? Which voltage do you measure at the AIN point (between the resistors) if you use a multimeter or similar?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculating battery remaining capacity</title><link>https://devzone.nordicsemi.com/thread/171528?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 01:15:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4ed4c04-9017-434b-acc9-2c4eac03f40e</guid><dc:creator>evanshwu</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I did calibrated my SAADC, my program executes the calibration function every few SAADC measurements.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;About the hardware design - I did not modify anything yet. The circuitry for converting the voltage from my battery was the same as the post&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/b/blog/posts/measuring-lithium-battery-voltage-with-nrf52"&gt;Measuring Lithium battery voltage with nRF52&lt;/a&gt;, and plugged in to the VDD for measurement.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculating battery remaining capacity</title><link>https://devzone.nordicsemi.com/thread/171319?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 10:08:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79366bc3-0da3-4056-93bd-fa344f0c1284</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;You really need to have the hardware (Coulomb Counter) to do it with any useful accuracy.&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t have, and can&amp;#39;t add, that hardware then it&amp;#39;s probably best not to pretend that you can do it at all.&lt;/p&gt;
&lt;p&gt;Rather than try to predict remaining capacity, just do a &amp;quot;low battery&amp;quot; alert when the voltage falls right at the end of the battery life.&lt;/p&gt;
&lt;p&gt;You might want to feed this back to the device manufacturer ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculating battery remaining capacity</title><link>https://devzone.nordicsemi.com/thread/171314?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 09:50:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25eebfa1-932b-480a-9378-0f5b4bd007b1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you calibrated the SAADC?&lt;/p&gt;
[quote user="evanshwu"]Is this because&amp;nbsp;the VDD value was influenced by the USB power input?[/quote]
&lt;p&gt;That is possible, but it is difficult to say without knowing anything about your HW design.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculating battery remaining capacity</title><link>https://devzone.nordicsemi.com/thread/171286?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 07:33:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:856f1275-bc72-4207-9988-2109ca6b508d</guid><dc:creator>evanshwu</dc:creator><description>&lt;p&gt;Hi, thank you for the reply!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am aware that calculating the remaining capacity of the battery using voltage is not the best way, but my project was very limited on hardware layouts. I am actually developing programs for an off-the-shelf Bluetooth tag device, which I planned to download the program to the chip via JLink.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The tag device was powered by a Li-ion battery pack, and since I am planning not to modify the hardware design of the tag, one easy method I found was to measure the voltage to calculate the remaining battery. Can you suggest other methods of calculating the remaining capacity of the battery without hardware modification? One alternate option I think I can do is to measure the power usage of my device and calculate the estimated hours, but this may also be inaccurate after hundreds of charging cycles.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculating battery remaining capacity</title><link>https://devzone.nordicsemi.com/thread/171274?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 05:30:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbb65cc7-3633-4a06-9997-bd86f2f6d28a</guid><dc:creator>evanshwu</dc:creator><description>&lt;p&gt;Hi, thank you so much for the reply!&lt;br /&gt;I have followed the guide from the link you provided, but somehow I am still getting incorrect ADC values:&lt;br /&gt;&lt;br /&gt;The discharge curve of my Li-ion battery is from 4.2V (100%) to 3V (0%). I have used capacitor 2.2M and 0.82M to convert my input voltage. Which will be:&lt;br /&gt;&lt;br /&gt;Max. Voltage = 4.2V * (2.2/(2.2+0.82)) = 3.05928V&lt;br /&gt;Min. Voltage = 3V *&amp;nbsp;&lt;span&gt;(2.2/(2.2+0.82)) = 2.1852V&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;then&amp;nbsp;calculate to ADC value at both 4.2V and 3V:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ADC value at 4.2V = 3V * (1/6)/0.6V * 2^10 = 853.33&amp;nbsp;&lt;br /&gt;ADC value at 3V = 2.18V&amp;nbsp;* (1/6)/0.6V * 2^10 = 620.088&lt;br /&gt;=&amp;gt;So now the ADC value should be between 853 and 620&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I plugged in the wire to the VDD port on my nRF52 DK, and I got the value around 860 from the com port. Measuring the voltage of my battery with a voltage meter, I got 3.42V. I now calculate the voltage into ADC value:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3.42V *&amp;nbsp;(2.2/(2.2+0.82))&amp;nbsp;* (1/6)/0.6V * 2^10 = 708.58&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The ADC output should be around 708, but the output was very different from the actual result I got, which is around 860. While I was doing this measurement, my board was plugged in to my computer via Micro USB, and I access the board with Putty through COM connection.&amp;nbsp;Is this because&amp;nbsp;the VDD value was influenced by the USB power input?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculating battery remaining capacity</title><link>https://devzone.nordicsemi.com/thread/171088?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 10:48:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce9e18e1-46da-4705-936e-1391e577ade5</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Battery terminal voltage is a &lt;em&gt;&lt;strong&gt;very&lt;/strong&gt; &lt;/em&gt;&lt;strong&gt;poor&lt;/strong&gt; indicator of remaining capacity for lithium batteries.&lt;/p&gt;
&lt;p&gt;Search the forum for the many times this has come up before!&lt;/p&gt;
&lt;p&gt;eg,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/20389/battery-level-check/79486#79486"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/20389/battery-level-check/79486#79486&lt;/a&gt;&amp;nbsp;- with graphs to show you why.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculating battery remaining capacity</title><link>https://devzone.nordicsemi.com/thread/171072?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 10:13:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4c34830-41a1-4e7e-aa1e-31da58637954</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You cannot supply a nRF52832 directly for a typical&amp;nbsp;lithium battery, as the maximum voltage is too high (max supply voltage for the nRF52832 is 3.6 V). Therefor you need an external regulator, and because of that, the VDD voltage on the nRF32832 does not reflect the battery voltage.&amp;nbsp;I recommend you refer&amp;nbsp;to &lt;a href="https://devzone.nordicsemi.com/b/blog/posts/measuring-lithium-battery-voltage-with-nrf52"&gt;Measuring Lithium battery voltage with nRF52&lt;/a&gt;, which describes how you properly measure the voltage of a lithium battery.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>