0

I started a project using the arduino uno and as a challenge I'm attempting to make it work with the esp32 but I've run into a roadblock. I may not describe it in proper terms, but I noticed that the analog input signal on the esp32 functions differently from how analog input works on the uno. After some research I found that the esp32 has a default analog width of 12, instead of the default 10 on the uno. This got me wondering what other analog settings (reference voltage, pin attenuation, width, etc.) on the esp32 are different from the uno and how I might go about getting similar results on the esp32. I found this useful page detailing some functions to mess around with the adc channels but, other than analogSetWidth(), I haven't been able to figure out what they do. I tried messing around with the functions mentioned in the linked page, but I ultimately made things worse.

tl;dr What analog input settings (analog width, pin attenuation, etc.) on the esp32 are different from the uno?

2

1 Answer 1

1

Per the advice of @6v6gt, I was able to find this resource and this resource that told me the following information about the ADC configuration for the Uno's MCU (aka ATmega328P):

  • The analog width defaults to 10 bits (** definitely the most important)
  • The reference voltage is determined by the AVCC (power source) by default
  • The ADC clock defaults to a divisor of 128 (assuming 13 ADC cycles per conversion)

Wasn't able to find anything useful about pin attenuation, though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.