QtPy ESP32-C3 using SDA as ADC2

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
alpierce
 
Posts: 208
Joined: Mon May 13, 2013 2:44 am

QtPy ESP32-C3 using SDA as ADC2

Post by alpierce »

I am using a QtPy ESP32-C3 with Arduino and according to the pinout section of the learn guide the SDA pin on the Stemma Qt connector can also be used as ADC2.
Would this be A4 when using AnalogRead in Arduino? Is there any disadvantage , like reduced accuracy or not working with WiFi enabled etc.? I am using an ACS758 current sensor, which has a 3 pin male header for Vcc, Gnd, and signal. Using a Stemma Qt to female dupont connector cable makes for a quick test setup. I'll being using one of the other Analog inputs in the final circuit because I also need to use the I2C for a display.

User avatar
alpierce
 
Posts: 208
Joined: Mon May 13, 2013 2:44 am

Re: QtPy ESP32-C3 using SDA as ADC2

Post by alpierce »

Seems there would be problems using ADC2 with WiFi, and I couldn’t get it to work anyway, so just using the normal A0-A3 channels for now. Using A1 is kind of working, 3.3v gives 4095 counts, but 1.66v is giving around 2500 counts instead of 2047. Also reading high at 0v, over 200 counts instead of 0. After reading lots of posts on several different forums, it seems using analog inputs on ESP32s in general is very different than other microcontrollers. Perhaps an external I2C ADC will be the best solution. The main reason for using the ESP32 is to use ESP-NOW so I don’t need a WiFi router to implement a multiple sensor system. Might check out using the ESP8266 also since I have a few extras stashed away.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”