<?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>Odd SAADC readings</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43634/odd-saadc-readings</link><description>Hello, I am using the heart rate collector example on one NRF52 DK (central), and the heart rate service example on another NRF52 DK (peripheral). 
 I replaced the sensor sim on the peripheral, and replaced it with saadc to send actual readings to the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 16 Feb 2019 18:33:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43634/odd-saadc-readings" /><item><title>RE: Odd SAADC readings</title><link>https://devzone.nordicsemi.com/thread/171509?ContentTypeID=1</link><pubDate>Sat, 16 Feb 2019 18:33:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63275011-f5b1-4d9f-b9f1-c89958de8a97</guid><dc:creator>JPMorganJeremy</dc:creator><description>&lt;p&gt;Thank you Einar, I wasn&amp;#39;t aware that the initial drop was that steep. I will adjust the battery level in percent function to better represent the actual value.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Odd SAADC readings</title><link>https://devzone.nordicsemi.com/thread/171303?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 08:51:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b646247d-23cf-49b5-8452-ad1170319ef7</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The discharge curve for typical CR2032 batteries is such that there is a steep decline in battery voltage initially, then the voltage is quite stable, before it starts to fall of rapidly again. You can for instance refer to the &lt;a href="https://www.digikey.com/en/articles/techzone/2014/jul/tiny-voltage-regulators-meet-wearable-electronics-space-constraints"&gt;graph here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If your firmware is not power optimized, then it might draw a couple of mA on average, and that together with the typical discharge curve and a bad discharge curve model probably explain what you are seeing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Odd SAADC readings</title><link>https://devzone.nordicsemi.com/thread/171265?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 02:00:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc621d50-b05a-4718-af0c-2c54361c8454</guid><dc:creator>JPMorganJeremy</dc:creator><description>&lt;p&gt;So I checked the voltage on SB10 of the USB powered DK and got 3.3v, just to confirm i got the right reading.&lt;/p&gt;
&lt;p&gt;Then I measured the voltage of SB11 on the peripheral that was powered by a cr2032. My multi-meter read 2.64V (the battery_level_in_percent() was returning &lt;strong&gt;13&lt;/strong&gt;%).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If we plug 2.64 into the &amp;quot;else if (mvolts &amp;gt; 2440)&amp;quot; :&lt;/p&gt;
&lt;p&gt;battery_level = 18 - ((2740 - 2640) * 12) / 300 = &lt;strong&gt;14&lt;/strong&gt;.... so only one percent off.&lt;/p&gt;
&lt;p&gt;Then i took the coin cell out of the peripheral and measured it&amp;#39;s voltage at 2.70V. It had previously measured 3.1V only a couple hours before use.&lt;/p&gt;
&lt;p&gt;So it seems that saadc is relatively accurate, but I just don&amp;#39;t understand how a cr2032 could go from 3.1V to 2.7V in less than an hour. Then not drain any further (at the same rate), running the heart rate sampler example. This scenario can be duplicated with any new cr2032 I put into the DK.&lt;/p&gt;
&lt;p&gt;Any ideas as to what could be going on?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Odd SAADC readings</title><link>https://devzone.nordicsemi.com/thread/171058?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 09:35:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3368dc64-1d5e-442f-a9f7-1a03d5595ebd</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I see your point. It might be that the battery is depleted quickly for some reason, and probably the discharge curve used in&amp;nbsp;battery_level_in_percent() does not match the battery. Can measure some points with a multimeter as well, and do the&amp;nbsp;battery_level_in_percent() calculations to see if you get the same numbers?&lt;/p&gt;
&lt;p&gt;The only other factor I can think of is that you have not calibrated the SAADC, but that should just give you a fixed offset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Odd SAADC readings</title><link>https://devzone.nordicsemi.com/thread/170957?ContentTypeID=1</link><pubDate>Wed, 13 Feb 2019 15:57:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f08459e6-234b-446b-90bb-408394a3ca5c</guid><dc:creator>JPMorganJeremy</dc:creator><description>&lt;p&gt;Thanks for the reply Einar.&lt;/p&gt;
&lt;p&gt;That makes sense that the default value is used until an actual reading is given. What still doesn&amp;#39;t make sense is that the first saadc reading starts around 90% and reaches about 16% in a matter of minutes (what appears to be a rapid drain), yet doesn&amp;#39;t drain any further than that point. I don&amp;#39;t see how this could ever actually occur.&lt;/p&gt;
&lt;p&gt;Are the new battery&amp;#39;s I&amp;#39;m buying actually that depleted, and it&amp;#39;s taking saadc a few minutes to give the accurate representation of their battery percentage, or could something be off with the way I&amp;#39;m implementing the saadc reading?&lt;/p&gt;
&lt;p&gt;Going from 90% to 16% in a matter of minutes, but not draining any further doesn&amp;#39;t make sense.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Odd SAADC readings</title><link>https://devzone.nordicsemi.com/thread/170895?ContentTypeID=1</link><pubDate>Wed, 13 Feb 2019 13:18:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d8d853b-6ceb-44a6-a120-4a76048a2eea</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The proximity example (which you have based the battery measurement code on) does not meassure the battery immediately, but rather waits until the first app timer timeout. Until then, the default value (&lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-2-0/structble__bas__init__t#a22993ab4d63fdbd764624856605d1b7f"&gt;initial_batt_level&lt;/a&gt;) of 100% is used. The subsequent percentage number is calculated from the SAADC measurements by&amp;nbsp;battery_level_in_percent(), so this has to be updated to match your battery.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>