<?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>nrf52832 adc wrong value</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40646/nrf52832-adc-wrong-value</link><description>Hi, 
 I try to read analog voltage over P28. Digital value(result variable in the code) always 238 as decimal. 
 What is the missed thing in the code? 
 Voltages supplied with power supply(as 0.5V,1V,2V) 
 
 Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Nov 2018 06:44:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40646/nrf52832-adc-wrong-value" /><item><title>RE: nrf52832 adc wrong value</title><link>https://devzone.nordicsemi.com/thread/158098?ContentTypeID=1</link><pubDate>Tue, 20 Nov 2018 06:44:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcbb16b7-06e9-4ab3-a94f-147200f431c9</guid><dc:creator>Berker</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can use internal reference and gain(1/6) to measure between 0 to 3.6V.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For example&lt;/p&gt;
&lt;p&gt;ADC range = 0.6V/(1/6) = 3.6V&lt;/p&gt;
&lt;p&gt;ADC range = 0.6V/(1/2) = 1.2V, you change it as desired&lt;/p&gt;
&lt;p&gt;You may not use external regulator or reference,there is internal one. It is possible to adjust gain 1/2,1/3,1/4,1/5,1/6,1,2,4 using CONFIG register directly or SDK convenient function.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 adc wrong value</title><link>https://devzone.nordicsemi.com/thread/158094?ContentTypeID=1</link><pubDate>Tue, 20 Nov 2018 06:19:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bac7062-516d-47ed-9b4c-49a1e5483214</guid><dc:creator>Sunil vignesh</dc:creator><description>&lt;p&gt;Hi Berger,&lt;/p&gt;
&lt;p&gt;I will check the link sir. but by using this. How to set the voltage reference sir. we need to put one voltage regulator to give voltage reference value as constant one right?. or we can use SAADC to measure (0-VDD), without any voltage divider..!.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 adc wrong value</title><link>https://devzone.nordicsemi.com/thread/158063?ContentTypeID=1</link><pubDate>Mon, 19 Nov 2018 18:25:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6af94894-edb0-4b1b-8de8-b79c11b94504</guid><dc:creator>Berker</dc:creator><description>&lt;p&gt;Thanks, it works as expected now.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 adc wrong value</title><link>https://devzone.nordicsemi.com/thread/157952?ContentTypeID=1</link><pubDate>Mon, 19 Nov 2018 12:50:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0757228f-f820-4496-a74c-44ba36279f7e</guid><dc:creator>Berker</dc:creator><description>&lt;p&gt;Hi Sunil,&lt;/p&gt;
&lt;p&gt;Look at this link:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/b/blog/posts/measuring-lithium-battery-voltage-with-nrf52"&gt;https://devzone.nordicsemi.com/b/blog/posts/measuring-lithium-battery-voltage-with-nrf52&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can do simple voltage divider and add one capacitor. I think, reading battery can done with voltage similar above example. &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 adc wrong value</title><link>https://devzone.nordicsemi.com/thread/157930?ContentTypeID=1</link><pubDate>Mon, 19 Nov 2018 12:07:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4444662e-eeb9-4632-8bb8-d18183db14bc</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It seems that you have mistaken the SAADC channels for analog inputs. Any analog input can be assigned to any channels, i.e. channel 4 is not hardwired to AIN4 (P0.28). What you are actually reading is the VDD voltage that you have assigned as the positive input for channel 4 on line 17:&amp;nbsp;SAADC_CH_PSELP_PSELP_VDD.&lt;/p&gt;
&lt;p&gt;If you want to measure AIN4 (P0.28), you need to change this to&amp;nbsp;&lt;span&gt;SAADC_CH_PSELP_PSELP_AnalogInput4.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 adc wrong value</title><link>https://devzone.nordicsemi.com/thread/157926?ContentTypeID=1</link><pubDate>Mon, 19 Nov 2018 11:58:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32248508-2544-4893-b521-58ce35433003</guid><dc:creator>Sunil vignesh</dc:creator><description>&lt;p&gt;Hi Berker,&lt;/p&gt;
&lt;p&gt;I also need to read the battery value. but with out adc is it possible to read the battery level with internal registers. If adc is used means can you give any schematic related to ADC connection. It will be helpful for my project.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>