letscontrolit / ESPEasy

Easy MultiSensor device based on ESP8266/ESP32
http://www.espeasy.com
Other
3.29k stars 2.22k forks source link

[BUG][P097] Touch isn´t working on ESP32-s3 #5164

Open chromoxdor opened 4 hours ago

chromoxdor commented 4 hours ago

Testet with "ESP_Easy_mega_20240822_collection_A_ESP32s3_4M316k_CDC.bin" and later on GPIO 7 and others on ADC1

The touch values are always to high (above 10000) and therefore touch is triggering constantly. When touched the value goes up to almost 30000.

TD-er commented 4 hours ago

Can you remove -DBOARD_HAS_PSRAM from the board definition. https://github.com/letscontrolit/ESPEasy/blob/35afc25b30a4bc3c60f8604ff48c673c5aacd401/boards/esp32s3cdc-qio_qspi.json#L8

The 4M build is using esp32s3cdc-qio_qspi as board definition.

I never tested the touch plugin on ESP32-S3 since upgraded to IDF 5.x Do these also trigger an event? If so, then the event queue will just fill up as it cannot handle so many events in a short time.

chromoxdor commented 4 hours ago

Do these also trigger an event?

They do...

chromoxdor commented 4 hours ago

Can you remove -DBOARD_HAS_PSRAM from the board definition.

I will try it...

TD-er commented 4 hours ago

Do these also trigger an event?

They do...

So you're essentially running out of memory...

chromoxdor commented 4 hours ago

So you're essentially running out of memory...

this could cause the reboots.. but as i wrote in the forum it doesn´t have anything to do with the WiFi issue..

TD-er commented 4 hours ago

Ah OK, now I get it... I think. Values are too high, so you can't do anything with them.

chromoxdor commented 4 hours ago

Ah OK, now I get it... I think. Values are too high, so you can't do anything with them.

exactly :)

chromoxdor commented 3 hours ago

Can you remove -DBOARD_HAS_PSRAM from the board definition.

This didn´t do anything...

tonhuisman commented 2 hours ago

Not sure if there's something wrong with this plugin 🤔 I get all the events that I've enabled, and only a new event if the threshold (+ or -) since the last value is exceeded.

There's a base-pressure, on my S3 board without any wires connected to the pin it's roughly in the 10000 to 20000 range, depending on the touch pin used, and when touching the GPIO pad, a few-hundred is changed in the value and only a single, or sometimes double, touch-event is generated. So the default threshold of 20 seems to work fine. Maybe if you have a (long) wire connected to the GPIO pad, it will work like an antenna, and pick up interference, f.e. from the WiFi signal, close-by?

Edit: I'm on the latest mega code, and using a LittleFS build, so latest IDF 5.3.x framework build.

chromoxdor commented 1 hour ago

There's a base-pressure, on my S3 board without any wires connected to the pin it's roughly in the 10000 to 20000 range,

So maybe it is my understanding of the plugin that is buggy... I thought, the base pressure (i assume its the same as theCurrent Pressure)must be below the Touch Threshold. I have nothing connected to the pin and all I get is this with default settings:

6202: Touch : ADC1 ch6 (T7): 11548
6402: Touch : ADC1 ch6 (T7): 11994
6702: Touch : ADC1 ch6 (T7): 11535
7002: Touch : ADC1 ch6 (T7): 11544
7402: Touch : ADC1 ch6 (T7): 11535
7902: Touch : ADC1 ch6 (T7): 11501
8302: Touch : ADC1 ch6 (T7): 11540
9202: Touch : ADC1 ch6 (T7): 11529

So no events i guess. I thought these where the events but i think i am mistaken. Mhmmmm strange

Edit: I'm on the latest mega code, and using a LittleFS build, so latest IDF 5.3.x framework build.

And you have no WiFi issues?

tonhuisman commented 1 hour ago

And you have no WiFi issues?

No, not with this unit.

On my S3-zero board (similar to what you showed in the forum) WiFi is working OK, and I haven't checked touch yet, but the board get really hot, not yet sure what is causing that. Still investigating.

chromoxdor commented 1 hour ago

but the board get really hot, not yet sure what is causing that. Still investigating.

Mine is around 60°C and with ECO mode it´s around 40°C which is fine i guess...

So no events i guess. I thought these where the events but i think i am mistaken. Mhmmmm strange

Oh man, i forgot to enable rules again. 🤦‍♂️

So to get a Touch event the "touch value" needs to be higher than Current Pressure + Touch Threshold?