<?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>Difference in SAADC with softdevice and without softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54594/difference-in-saadc-with-softdevice-and-without-softdevice</link><description>Hello Nordic team, 
 
 I am using SAADC in order to read values coming out of my current sense amplifier [INA180]. I am sensing the current through a fan which takes up to 0.27A. I basically want to detect when there is no current flowing through the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Nov 2019 09:38:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54594/difference-in-saadc-with-softdevice-and-without-softdevice" /><item><title>RE: Difference in SAADC with softdevice and without softdevice</title><link>https://devzone.nordicsemi.com/thread/221259?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2019 09:38:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2302d255-ed54-4c6a-a58f-9b093ede9d76</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;The radio can induce a small amount of noise in the SAADC, but other than that there&amp;#39;s no difference in blocking vs non-blocking. If you&amp;#39;re experiencing vastly different behavior then there&amp;#39;s something wrong in the way the sampling is set up.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;If you&amp;#39;re okay with blocking mode then there&amp;#39;s no real reason to investigate any further.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difference in SAADC with softdevice and without softdevice</title><link>https://devzone.nordicsemi.com/thread/221135?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2019 15:20:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02d65456-93cb-45c8-8676-4450690d662f</guid><dc:creator>Tandon</dc:creator><description>&lt;p&gt;This is my SAADC config:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    //Configure SAADC
    saadc_config.low_power_mode = false;                                                  //Disable low power mode.
    saadc_config.resolution = NRF_SAADC_RESOLUTION_12BIT;                                 //Set SAADC resolution to 12-bit. This will make the SAADC output values from 0 (when input voltage is 0V) to 2^12=2048 (when input voltage is 3.6V for channel gain setting of 1/6).
    saadc_config.oversample = SAADC_OVERSAMPLE;                                           //Set oversample to 4x. This will make the SAADC output a single averaged value when the SAMPLE task is triggered 4 times.
    saadc_config.interrupt_priority = APP_IRQ_PRIORITY_LOW;                               //Set SAADC interrupt to low priority.&lt;/pre&gt;This is my channel config:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;//Configure SAADC channel
    channel_config.reference = NRF_SAADC_REFERENCE_INTERNAL;                              //Set internal reference of fixed 0.6 volts
    channel_config.gain = NRF_SAADC_GAIN1_6;                                              //Set input gain to 1/6. The maximum SAADC input voltage is then 0.6V/(1/6)=3.6V. The single ended input range is then 0V-3.6V
    channel_config.acq_time = NRF_SAADC_ACQTIME_40US;                                     //Set acquisition time. Set low acquisition time to enable maximum sampling frequency of 200kHz. Set high acquisition time to allow maximum source resistance up to 800 kohm, see the SAADC electrical specification in the PS. 
    channel_config.mode = NRF_SAADC_MODE_SINGLE_ENDED;                                    //Set SAADC as single ended. This means it will only have the positive pin as input, and the negative pin is shorted to ground (0V) internally.
    channel_config.pin_p = NRF_SAADC_INPUT_AIN7;                                          //Select the input pin for the channel. AIN7 pin maps to physical pin P0.31.
    channel_config.pin_n = NRF_SAADC_INPUT_DISABLED;                                      //Since the SAADC is single ended, the negative pin is disabled. The negative pin is shorted to ground internally.
    channel_config.resistor_p = NRF_SAADC_RESISTOR_DISABLED;                              //Disable pullup resistor on the input pin
    channel_config.resistor_n = NRF_SAADC_RESISTOR_DISABLED;                              //Disable pulldown resistor on the input pin&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;What are the two different voltage levels when the fan is on and off?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Now, when the fan is running I see hex codes ranging from 0x003A - 0x004A. When the fan is unplugged I see 0xFFFF and the occasional 0x0000.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please note that switching to a blocking mode is giving me far better results, than non-blocking mode. I have opted to go with that. Using a timer - every 6 seconds I am to read the SAADC input.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;What do you mean by this statement, what are your observations?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;What I meant by this was that when I am using just the peripherals/saadc example under non-blocking mode and I was seeing values as described above. But when included with my main project that doesn&amp;#39;t seem to be the case. With fanOFF i see 0xEB and with fanON i see a value lesser than that. Which doesn&amp;#39;t make much sense&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Anyhow, blocking mode operations seems to be working fine for this application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difference in SAADC with softdevice and without softdevice</title><link>https://devzone.nordicsemi.com/thread/220999?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2019 09:44:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae285308-dfc2-448e-b15e-e83e36dd2fa4</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;How have you configured the SAADC?&lt;br /&gt;&lt;br /&gt;&amp;quot;&lt;span&gt;A very small voltage count is detected when the fan is connected.&amp;quot;&lt;/span&gt;&lt;br /&gt;What are the two different voltage levels when the fan is on and off?&lt;br /&gt;&lt;br /&gt;&amp;quot;I&lt;span&gt;&amp;nbsp;am planning on using this in non-blocking mode. Does using blocking mode make more sense?&amp;quot;&lt;br /&gt;That has no impact on the SAADC, the only impact is whether you block the CPU or not.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;quot;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/54594/difference-in-saadc-with-softdevice-and-without-softdevice"&gt;Difference in SAADC with softdevice and without softdevice&lt;/a&gt;&amp;quot;&lt;br /&gt;What do you mean by this statement, what are your observations?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>