<?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>Yet another ADC question</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15213/yet-another-adc-question</link><description>Hello,
My device is based on nRF51822 SD110 v8.0. Softdevice is enabled, but no BT functionality used. I measure 2 different voltages with ADC each second with two channels. It works, but after each 4096 seconds it measure incorrect (lowered) values</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Jul 2016 09:10:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15213/yet-another-adc-question" /><item><title>RE: Yet another ADC question</title><link>https://devzone.nordicsemi.com/thread/58094?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 09:10:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3bdafde-3d03-49da-8044-dacba09e182a</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Since it looks like this is connected to the RTC I have a few question about that:&lt;/p&gt;
&lt;p&gt;With prescaler equal to 7 the RTC will overflow after 4096 seconds. Do you do anything in your code when the RTC overflows or when the RTC counter is equal to compare value CC[1]?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Yet another ADC question</title><link>https://devzone.nordicsemi.com/thread/58093?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 11:12:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e436b9cb-1d7c-485e-8996-bd833f2cf1e7</guid><dc:creator>Valer_I</dc:creator><description>&lt;p&gt;Yes, and it really defferent, sometimes) I measured voltage by the multimeter directly on battery.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Yet another ADC question</title><link>https://devzone.nordicsemi.com/thread/58092?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 10:34:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:864983a7-22be-4585-9678-60c40377ca2f</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Ok, then I understand the your setup. Have you measured the battery with an external tool (like multimeter) to see if the voltage is as the ADC measures or not?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Yet another ADC question</title><link>https://devzone.nordicsemi.com/thread/58091?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 09:02:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:139b745f-4cc9-4d55-8dd9-c025a26e3c66</guid><dc:creator>Valer_I</dc:creator><description>&lt;ol&gt;
&lt;li&gt;Ok thanks, I&amp;#39;ll try HFCLK&lt;/li&gt;
&lt;li&gt;You are right, it is battery discharge graph. I use nrf51822 as test equipment to measure battery discharge with specified load. (Battery is not connected to board except ADC IN pin).&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Yet another ADC question</title><link>https://devzone.nordicsemi.com/thread/58090?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 08:55:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:090a72c9-da5c-418b-be48-a7b30bda76be</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Ok, then that is not the case.&lt;/p&gt;
&lt;p&gt;Could you try to not put the device to sleep (not call sd_app_evt_wait()) and see if the result is the same. You can also try to keep the HFCLK on all the time with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t p_is_running = 0;
sd_clock_hfclk_request();
while(! p_is_running) {                             //wait for the hfclk to be available
    sd_clock_hfclk_is_running((&amp;amp;p_is_running));
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And see if the result is still the same.&lt;/p&gt;
&lt;p&gt;Just wondering: You say that you use line adaptor, but the graph looks very much like the discharge curve of a battery (if you don&amp;#39;t look at the erroneous measurements). You are sure that the graph is not when measuring battery?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Yet another ADC question</title><link>https://devzone.nordicsemi.com/thread/58089?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 08:44:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8a71486-120d-409a-8de2-58a84d703b44</guid><dc:creator>Valer_I</dc:creator><description>&lt;p&gt;No, we developed our own device. It is battery powered, but for the test I used wire connection to AC-DC adaptor + 3.3V LDO regulator. So I continue investigation)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Yet another ADC question</title><link>https://devzone.nordicsemi.com/thread/58088?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 08:41:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:449073c1-b66a-4a23-921d-5cf31e795b69</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Sorry for confusing you, I meant the diode on the nRF51 DK. On the nRF51 DK there is a diode between the supplies (pin, battery or 3.3V regulator) and the Vdd, see the schematics in the &lt;a href="https://www.nordicsemi.com/eng/nordic/download_resource/38675/6/17135683"&gt;nRF51 DK Hardware Files&lt;/a&gt;. Are you using nRF51 DK or other hardware?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Yet another ADC question</title><link>https://devzone.nordicsemi.com/thread/58087?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 07:30:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac5dfe0a-adeb-439f-a4f2-e95978b434c4</guid><dc:creator>Valer_I</dc:creator><description>&lt;p&gt;Hi, the logics is simple, at least I didn&amp;#39;t find anything current consuming. I configured ADC for Vbg reference and 1/3 prescalling. So it should measure up to 3.6v input voltage. What link with protection diode drop? I will measure VDD to check, but only thing I could imagine is if it heating much and Vbg zenner drifts.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Yet another ADC question</title><link>https://devzone.nordicsemi.com/thread/58086?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2016 11:34:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cae90d5-9db8-4c78-bf8c-d0d0a381159c</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Do you do anything in the code when the counter reaches CC[1]? Possible reason for the wrong measurements could be that system draws more current and the diode between the supply and Vdd has higher voltage drop. Have you measured Vdd to see if this is also constant?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>