Page 1 of 1

ADC Support for ESP8684-WROOM-05 H2 Module

Posted: Mon Jun 03, 2024 11:15 am
by Ritesh
Hello Team,

We are using ESP8684-WROOM-05 H2 module for one of our product developments in which we are going to read ADC values using one shot read example.

We are using ADC1 Channel 4 as per our requirement in which getting 0 values when I connect GND to that PIN which is correct.

But, When I connect with 3.3V High at that time I am getting below output accordingly.
I (64484) EXAMPLE: ADC1 Channel[4] Raw Data: 3427
I (64484) EXAMPLE: ADC1 Channel[4] Cali Voltage: 3303 mV
I think when I give 3.3V then it should give maximum RAW Data as 4096.

Below are code configuration for the same.

Code: Select all


#define EXAMPLE_ADC_ATTEN           ADC_ATTEN_DB_11

    //-------------ADC1 Init---------------//
    adc_oneshot_unit_handle_t adc1_handle;
    adc_oneshot_unit_init_cfg_t init_config1 = {
        .unit_id = ADC_UNIT_1,
    };
    ESP_ERROR_CHECK(adc_oneshot_new_unit(&init_config1, &adc1_handle));

    //-------------ADC1 Config---------------//
    adc_oneshot_chan_cfg_t config = {
        .bitwidth = ADC_BITWIDTH_12,
        .atten = EXAMPLE_ADC_ATTEN,
    };
    ESP_ERROR_CHECK(adc_oneshot_config_channel(adc1_handle, EXAMPLE_ADC1_CHAN0, &config));
    ESP_ERROR_CHECK(adc_oneshot_config_channel(adc1_handle, EXAMPLE_ADC1_CHAN1, &config));

    //-------------ADC1 Calibration Init---------------//
    adc_cali_handle_t adc1_cali_chan0_handle = NULL;
    adc_cali_handle_t adc1_cali_chan1_handle = NULL;
    bool do_calibration1_chan0 = example_adc_calibration_init(ADC_UNIT_1, EXAMPLE_ADC1_CHAN0, EXAMPLE_ADC_ATTEN, &adc1_cali_chan0_handle);
    bool do_calibration1_chan1 = example_adc_calibration_init(ADC_UNIT_1, EXAMPLE_ADC1_CHAN1, EXAMPLE_ADC_ATTEN, &adc1_cali_chan1_handle);
So, would you please check and let me know that I am missing anything into above or any hardware configurations are missing for the same?

Let me know if need anything else from my end.

Re: ADC Support for ESP8684-WROOM-05 H2 Module

Posted: Mon Jun 03, 2024 12:33 pm
by Ritesh
Hello Espressif Team,

I have also found one comment over Espressif Manual.

So, we have set Attenuation as 12 DB and we can't apply more that 2800 mV?

Also, do we require to connect capacitor as per recommended value?

So, If I calculate Voltage Data as per formula then it would give us following output Voltage Data.

Vdata = (Vref/4095) * Raw Data

Vdata = (1100/4095) * 3432

Vdata = 919 mV

But, we are getting Vdata as 3300 mV as per actual input voltage given.

So, would you please check from your end and help us for the same?

Re: ADC Support for ESP8684-WROOM-05 H2 Module

Posted: Tue Jun 04, 2024 5:26 am
by Ritesh
Hello ESP_Sprite,

Would you please check from your end if possible and let us know feedback with input from your end?

Let me know if need anything else from my end.

Re: ADC Support for ESP8684-WROOM-05 H2 Module

Posted: Wed Jun 05, 2024 1:20 pm
by Ritesh
Hello Espressif Team,

I have checked same on ESP8684-MINI-1 Development kit and getting same results like which I am getting on ESP8684 Module itself.

So, would you please help me to understand it like is it accurate results or I am missing anything?

Re: ADC Support for ESP8684-WROOM-05 H2 Module

Posted: Sat Jun 08, 2024 4:32 am
by Ritesh
Hello Espressif Team,

Is there any update from your end? I am looking at-least feedback or response from your end which would be helpful to me to move further accordingly?