The difference in readings of the touch sensors between ESP32 and ESP32S3

ghostvisitor
Posts: 5
Joined: Tue Sep 26, 2023 6:40 am

The difference in readings of the touch sensors between ESP32 and ESP32S3

Postby ghostvisitor » Tue Apr 02, 2024 7:01 am

When migrating the controller from ESP32S3 to ESP32, I found that the touch sensor reading on ESP32S3 is 16300 when idle, increasing to 800000 after touch. Using the same program, the touch sensor reading on ESP32 is 76 when idle, decreasing to 7 after touch. What could be the reason for this difference, and is there a way to switch the reading behavior of ESP32 to match that of ESP32S3?


Code: Select all

void setup()
{
  Serial.begin(115200);
  delay(1000); // give me time to bring up serial monitor
  Serial.println("ESP32 Touch Test");
}

void loop()
{
  Serial.println(touchRead(T1));  // get value using T1
  delay(200);
}

liaifat85
Posts: 200
Joined: Wed Dec 06, 2023 2:46 pm

Re: The difference in readings of the touch sensors between ESP32 and ESP32S3

Postby liaifat85 » Wed Apr 03, 2024 4:04 pm

The configuration of touch sensors of ESP32 and ESP32-S3 are different. You can see the following documents here:
https://docs.espressif.com/projects/esp ... h_pad.html
https://docs.espressif.com/projects/esp ... h_pad.html

lbernstone
Posts: 826
Joined: Mon Jul 22, 2019 3:20 pm

Re: The difference in readings of the touch sensors between ESP32 and ESP32S3

Postby lbernstone » Wed Apr 03, 2024 7:47 pm

They are different hardware devices between the original and S series soc's.
https://github.com/espressif/arduino-es ... .h#L51-L57
You can use the macros to have inverted functionality for each type, like in https://github.com/espressif/arduino-es ... .h#L74-L90

Who is online

Users browsing this forum: No registered users and 59 guests