<?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>PPK little negative offset which is breaking AVG value</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18774/ppk-little-negative-offset-which-is-breaking-avg-value</link><description>I use PPK wit ha stardard setup with all switches set to DK. Everything works fine, excepted that I have a little offset and the IDLE state is negative... which make the AVG value to be wrong (negative). See following pictures. 
 
 
 This is more visible</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Sep 2017 11:26:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18774/ppk-little-negative-offset-which-is-breaking-avg-value" /><item><title>RE: PPK little negative offset which is breaking AVG value</title><link>https://devzone.nordicsemi.com/thread/72511?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2017 11:26:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7e76b47-94f8-42a0-87dc-c93c22a9eb0e</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;Hi, I was facing a similar problem by having negative current values. I have connected my connected my PPK to nrf52Dk and have set up all the switches to Dk position. However, when i changed the DK switch to external I am able to read to positive values. But after some time it switches to negative values.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PPK little negative offset which is breaking AVG value</title><link>https://devzone.nordicsemi.com/thread/72513?ContentTypeID=1</link><pubDate>Fri, 06 Jan 2017 12:50:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3b2c3bf-d1ac-4a14-ae2b-098f779aba7e</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;Oh, good catch =D&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PPK little negative offset which is breaking AVG value</title><link>https://devzone.nordicsemi.com/thread/72512?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 16:12:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b38b13b-4bed-48bd-871e-a18228d1c087</guid><dc:creator>ThierryC</dc:creator><description>&lt;p&gt;Was a real leak of current on my setup : the GND of the serial link was causing this little current leak, measured correctly by the PPK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PPK little negative offset which is breaking AVG value</title><link>https://devzone.nordicsemi.com/thread/72509?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 16:11:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b7c80dd-7315-4994-9ca6-e07f7e1362b5</guid><dc:creator>ThierryC</dc:creator><description>&lt;p&gt;OK, I found the cause : was the GND of the serial link I used to monitor my DUT. Connected on same PC as USB, but maybe was not at exact same level and was causing a little current leakage... measured by the PPK. Disconnecting this GND solved the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PPK little negative offset which is breaking AVG value</title><link>https://devzone.nordicsemi.com/thread/72510?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 14:13:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46e035db-9d26-465d-bef4-ab662d4be774</guid><dc:creator>ThierryC</dc:creator><description>&lt;p&gt;Thanks for the hints and the hack, it may help me to adjust the measurements.&lt;/p&gt;
&lt;p&gt;First to answer your question, I use nRF52 DK (PCA 10040 v1.1.1).&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure exactly why, but I think I found the root cause of the errors. Because I need to use a custom board with sensors connected to the DK board (this is the goal on my measurements), I connected the PPK not directly in top of DK, but with some wires. Not sure how, but these wires seems to perturb the offset calibration.&lt;/p&gt;
&lt;p&gt;But I think then it&amp;#39;s just a matter of offset that could be added at the end for calculation, if it&amp;#39;s stable and always the same.&lt;/p&gt;
&lt;p&gt;When I turn the DUT off or switch to external DUT, the AVG is correctly around zero (some noise around zero with peaks at +/- 500 nA).&lt;/p&gt;
&lt;p&gt;Thanks for your quick answer !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PPK little negative offset which is breaking AVG value</title><link>https://devzone.nordicsemi.com/thread/72508?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 12:28:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:972ffdf0-5cb2-429c-9ab0-999486fb0960</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;The startup calibration routine should do this automatically. Can you try to switch the &amp;quot;DUT Select&amp;quot; switch to external (with nothing connected) and see what the measurement says? What if you turn off the DUT by pressing &lt;strong&gt;DUT off&lt;/strong&gt;, what is the measurement then?&lt;/p&gt;
&lt;p&gt;What DK are you using?
The fluctuations you are seeing is looking very much like Segger traffic. The on board debugger is unfortunately pulling some current shown on the ppk measurements. If you want to make very accurate measurements, it is recommended to either use your own hardware which does not have the on board debugger, or cut all lines between the on board debugger and the nRF.&lt;/p&gt;
&lt;p&gt;If you see that the unwanted current draw is stable at all times at e.g 10µA, you can do a little hack and change line 1164 in ppk.py from&lt;/p&gt;
&lt;p&gt;&lt;code&gt;self.global_offset = np.average(PlotData.avg_y[1000:8000])&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;&lt;code&gt;self.global_offset = -10e-6&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Again, if you do not see this offset when using the external DUT connection, then you need to disconnect the Segger lines when using the DK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>