ESP32C6 ADC not working properly

rafael.04694
Posts: 1
Joined: Wed Apr 05, 2023 7:25 pm

ESP32C6 ADC not working properly

Postby rafael.04694 » Wed Apr 05, 2023 11:02 pm

Sorry in advance in case this post is repeated.

I'm trying to read voltages using the ESP ADC, but something weird happens.

I'm using the one shot example from ESP-IDF.

When the pin with the used channel is connected to 3.3V it returns a raw reading of 4081, giving me a V = 4081 * 3V3 / 4095 = 2.28 V which is pretty good. However, when I connect the pin to GND, the raw value is 2144, which gives me something like 1.7V.

I'm using the new C6, and I know its calibration is still not available, but shouldn't the method I'm using work? Considering it works for 3V3?

(The code is the one bellow, with an addition of a printf that prints the voltage using the formula above).

Code: https://github.com/espressif/esp-idf/bl ... ead_main.c

ESP_Sprite
Posts: 9709
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32C6 ADC not working properly

Postby ESP_Sprite » Fri Apr 07, 2023 12:48 am

Wondering if it is because you're witching between two channels all the time. Does it still does that if you only measure one channel?

aenapple
Posts: 1
Joined: Mon Aug 28, 2023 4:37 pm

Re: ESP32C6 ADC not working properly

Postby aenapple » Mon Aug 28, 2023 4:40 pm

I have the same issue - higher bit from 12-bits ADC value always is '1'.

rkit2134
Posts: 6
Joined: Mon Sep 14, 2020 5:54 am

Re: ESP32C6 ADC not working properly

Postby rkit2134 » Wed Aug 30, 2023 9:39 am

I have the same problem. Adc always reads exactly 4081.

lhns_esp
Posts: 1
Joined: Tue Feb 27, 2024 11:53 pm

Re: ESP32C6 ADC not working properly

Postby lhns_esp » Tue Feb 27, 2024 11:58 pm

Hello! I am experiencing the same issue.
If I connect the pin to GND I get the following ADC output: 0b0000100001110001
If I connect it to 3.3V I get: 0b0000111111110001
Is this a hardware bug?

phemmer
Posts: 1
Joined: Mon Mar 04, 2024 1:17 pm

Re: ESP32C6 ADC not working properly

Postby phemmer » Wed Mar 06, 2024 12:44 am

I'm getting the same thing on 2x ESP32-C6-DevKitM-1, and also on a ESP32-H2-DevKitM-1. To get the same thing on H2 and C6, I'm dubious of a hardware bug.

For me I'm working in rust. And this is my first time working with ESP32 units, so I'm inclined to think I'm doing something wrong. However I've basically got the same code as in the example on https://docs.rs/esp32c6-hal/latest/esp3 ... index.html. So I can't see how it would be a software issue either. Unless there's some prerequisites that I've missed.

Also, to note, I do get a signal. When the input voltage changes, so does the value read. But it's nowhere near what it's supposed to be. When pulled to ground, I get ~2144 (bounces around a bit), and when floating it goes to 4081. When I have an input voltage of 0.307v and 0dB attenuation, I should read a value of about 1571, but instead get 3297.

bjozwicki
Posts: 1
Joined: Fri Jun 09, 2023 10:45 am

Re: ESP32C6 ADC not working properly

Postby bjozwicki » Fri May 24, 2024 10:56 am

Same problem here one year later, any update on that? Surprisingly I have tested oneshot read from Arduino and it worked fine...

yeohwaisiang
Posts: 2
Joined: Fri Jun 07, 2024 1:34 pm

Re: ESP32C6 ADC not working properly

Postby yeohwaisiang » Fri Jun 07, 2024 1:42 pm

still no one can resolved the ADC-4081 issue?
where are their engineers?

Who is online

Users browsing this forum: Bing [Bot] and 287 guests