espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
12.95k stars 7.1k forks source link

Measuring DC power usage / voltage /current on Esp32-C6 module (IDFGH-12922) #13881

Open ilker-aktuna opened 1 month ago

ilker-aktuna commented 1 month ago

Is your feature request related to a problem?

Is it possible to measure DC power usage on Esp32-C6 module (esp32-c6-devkit) without any additional hardware or connection ?

Describe the solution you'd like.

No response

Describe alternatives you've considered.

No response

Additional context.

No response

ilker-aktuna commented 3 weeks ago

I'd appreciate any information please.

jpeg2600 commented 3 weeks ago

No, it's not possible

ilker-aktuna commented 3 weeks ago

too bad. On Arduino it is possible with some boards on Arduino.


#include "esp_adc_cal.h"  

 esp_adc_cal_characteristics_t adc_chars;
 if (val_type == ESP_ADC_CAL_VAL_EFUSE_VREF) {
    vref = adc_chars.vref;
  }
  float voltage = analogRead(36) / 4096.0 * 6.566 * (vref / 1000.0);