52833 adc deviation

Hi

   We are using 52833 adc, but the actual value of the adc is not within our expected value. We want to know the adc accuracy, can you give us some advice? Thanks

sdk: sdk17.1.0

adc: 12bit  NRF_SAADC_REFERENCE_INTERNAL NRF_SAADC_GAIN1_4

real voltage range: 0v - 1.5v
config
    nrf_drv_saadc_config_t p_config = {
        .resolution = (nrf_saadc_resolution_t)NRF_SAADC_RESOLUTION_12BIT,
        .oversample         = (nrf_saadc_oversample_t)SAADC_CONFIG_OVERSAMPLE,
        .interrupt_priority = SAADC_CONFIG_IRQ_PRIORITY,
        .low_power_mode     = SAADC_CONFIG_LP_MODE
    };
    nrf_saadc_channel_config_t channe1_config =
        NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN0);
    channe1_config.gain = NRF_SAADC_GAIN1_3;        
    nrf_saadc_channel_config_t channe2_config =
        NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN1);
    channe2_config.gain = NRF_SAADC_GAIN1_3;
    APP_ERROR_CHECK(nrf_drv_saadc_channel_init(1, &channe1_config));
    APP_ERROR_CHECK(nrf_drv_saadc_channel_init(2, &channe2_config));
start collect 
 APP_ERROR_CHECK(nrf_drv_saadc_buffer_convert(m_buffer_pool, SAMPLES_IN_BUFFER));
 nrf_drv_saadc_sample();
process adc value
static void mt_saadc_callback(nrf_drv_saadc_evt_t const *p_event)
{
    if (p_event->type == NRF_DRV_SAADC_EVT_DONE) {
        m_adc_buff[m_adc_collect_times].channel1 = m_buffer_pool[0];
        m_adc_buff[m_adc_collect_times].channel2 = m_buffer_pool[1];
        nrf_saadc_task_trigger(NRF_SAADC_TASK_STOP);
    }
}
Below is my circuit diagram, We only use adc to calculate the resistance of 1MΩ to avoid power supply voltage fluctuations.
But it seem no effect,the adc value changes of ain0 and ain1 are not synchronized sometimes.

R = 27kΩ * (ain1adc / ain0adc -ain1adc)
The attachment is the result of my test and calculation, Can you give me some advice? Thanks
  • Hi Hieu,

        Maybe I didn't express my thoughts clearly. For example, I want to know the deviation value of 1/6 parameter adc without considering the temperature.

    My code get adc value I called it adc_value.

    adc_value = 628 

    The allowable deviation is adc_value * 6% = 37.68 right? 

    By the way, is power consumption a concern in your application? Or perhaps is this just a test for the accuracy of SAADC?

    Yes we need low power, we have to find a balance between power consumption and accuracy.

  • Hi Август,

    Август said:
    Maybe I didn't express my thoughts clearly. For example, I want to know the deviation value of 1/6 parameter adc without considering the temperature.

    If you have an actual adc_value == 628, then the ideal ADC reading would be between 609.71 (628/1.03) and 647.42 (628/0.97).

    As another example, supposed the ideal ADC reading would be 1000, the actual ADC reading would be between 970 and 1030.

    Август said:
    Yes we need low power, we have to find a balance between power consumption and accuracy.

    You might want to take a look at our low-power ADC example then. It is last updated for nRF5 SDK v17.0.2, but it should work for v17.1.0 without much modification.
    It can be found here: https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/saadc_low_power.

Related