ESP32-C6 ADC problem
Posted: Fri Mar 27, 2026 6:56 am
Dear ESP Technical Support,
I am developing a FireBeetle2 ESP32-C6 Board.
https://www.dfrobot.com/product-2771.html
I tested the ADC on Pin 1 (set up as attachment). The output is far from the allowed 4095 value.
Here are the official example codes of Arduino IDE v2.3.8 to test the ADC of ESP32-C6, with ESP32 SDK v3.3.7:
--------------------------------------------------------------------
void setup() {
// initialize serial communication at 115200 bits per second:
Serial.begin(115200);
// ESP32-C6 ADC resolution is 12-bit (0-4095)
analogReadResolution(12);
}
void loop() {
// read the analog / millivolts value for Pin 1
int analogValue = analogRead(1);
int analogVolts = analogReadMilliVolts(1);
// print out the values you read:
Serial.printf("ADC analog value = %d\n", analogValue);
Serial.printf("ADC millivolts value = %d\n\n", analogVolts);
delay(100); // delay in between reads for clear read from serial
}
------------------------------------------------------
And the output from terminal are:
=============================
ADC analog value = 3262
ADC millivolts value = 3337
ADC analog value = 3269
ADC millivolts value = 3339
ADC analog value = 3256
ADC millivolts value = 3344
ADC analog value = 3275
ADC millivolts value = 3341
======================
What is the cause? How should I improve and utilise the full ADC width?
Yours faithfully.
I am developing a FireBeetle2 ESP32-C6 Board.
https://www.dfrobot.com/product-2771.html
I tested the ADC on Pin 1 (set up as attachment). The output is far from the allowed 4095 value.
Here are the official example codes of Arduino IDE v2.3.8 to test the ADC of ESP32-C6, with ESP32 SDK v3.3.7:
--------------------------------------------------------------------
void setup() {
// initialize serial communication at 115200 bits per second:
Serial.begin(115200);
// ESP32-C6 ADC resolution is 12-bit (0-4095)
analogReadResolution(12);
}
void loop() {
// read the analog / millivolts value for Pin 1
int analogValue = analogRead(1);
int analogVolts = analogReadMilliVolts(1);
// print out the values you read:
Serial.printf("ADC analog value = %d\n", analogValue);
Serial.printf("ADC millivolts value = %d\n\n", analogVolts);
delay(100); // delay in between reads for clear read from serial
}
------------------------------------------------------
And the output from terminal are:
=============================
ADC analog value = 3262
ADC millivolts value = 3337
ADC analog value = 3269
ADC millivolts value = 3339
ADC analog value = 3256
ADC millivolts value = 3344
ADC analog value = 3275
ADC millivolts value = 3341
======================
What is the cause? How should I improve and utilise the full ADC width?
Yours faithfully.