When will ESP32 ADC2 "bug" be resolved ? #19098
-
We are developing around ESP32-32 series chipsets, and using ESP32_WROOM-32 devkits. We took this approach as need multiple ADC inputs including a fast interrupt based one. The ESP32 multiplexes the pins to the ADC's. The plan was to use fast interrupt on ADC1 and the other ADC inputs on ADC2. However on reading of posts ADC2 is disabled in Tasmota due to conflicts with WiFi ? Unfortunately, ADC1 does not have a full complement of ADC pins anyway (ADC1_1 and ADC1_2 don't exist in the architecture of the devkits) so not possible to only rely on ADC1. We can try slow multiplex some of the pins in the hardware but ideal would be to have Tasmota implement ADC2. Is this complicated and any idea of timelines if it is planned ? Any other workarounds the community can suggest? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 7 replies
-
It is a hardware limitation of the ESP32 that ADC2 does not work with Wifi, not a bug. Tasmota cannot do anything about that. |
Beta Was this translation helpful? Give feedback.
-
There are ways to mitigate these issues with ADC2, not sure if tasmota uses any of them, but either way you cannot get the full channel or more than a couple reads, without sleeping wifi afaik, and adcs are only useful if oversampling most of the time especially on the ESP32 with its crappy adcs. You should really consider solutions and tests in the ESP lib and SDK resources and not tasmota though, but I don't recall seeing anything groundbreaking. I am dealing with this right now, I have voltage dividers on adc2 pins, to use another pin would require a pcb respin |
Beta Was this translation helpful? Give feedback.
-
Yeah I think ANY solution would be have to be rolled into a tasmota fork as eperimental, I have not looked for discussion on this in esp32 github or espressif forums, but I am sure there is plenty discussion on this elsewhere |
Beta Was this translation helpful? Give feedback.
-
Most probably we will not add code to use the crappy ADC2. One thing is sure we will not invest time in this. |
Beta Was this translation helpful? Give feedback.
-
It is even output in debug logging in esp32 when you use these pins |
Beta Was this translation helpful? Give feedback.
-
Anyone roll their own ADC2 reads? the ESP32-CAM boards only expose ADC2, I am working on making sure I can read at least one channel |
Beta Was this translation helpful? Give feedback.
Most probably we will not add code to use the crappy ADC2. One thing is sure we will not invest time in this.