Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32S3/S2 RISC-V ULP touch read example (IDFGH-9077) #10480

Closed
MacWyznawca opened this issue Jan 3, 2023 · 9 comments
Closed

ESP32S3/S2 RISC-V ULP touch read example (IDFGH-9077) #10480

MacWyznawca opened this issue Jan 3, 2023 · 9 comments
Assignees
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Feature Request Feature request for IDF

Comments

@MacWyznawca
Copy link

Is your feature request related to a problem?

The ESP32S3 and S2 are unable to support wake-up with more than one touchpad.

Describe the solution you'd like.

However, the ULP RISC-V is able to read Touch registers and wake up the chip when any of them are touched.

An example with such a solution would be very helpful.

Describe alternatives you've considered.

No response

Additional context.

No response

@MacWyznawca MacWyznawca added the Type: Feature Request Feature request for IDF label Jan 3, 2023
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 3, 2023
@github-actions github-actions bot changed the title ESP32S3/S2 RISC-V ULP touch read example ESP32S3/S2 RISC-V ULP touch read example (IDFGH-9077) Jan 3, 2023
@espressif-bot espressif-bot added Status: Selected for Development Issue is selected for development and removed Status: Opened Issue is new labels Apr 13, 2023
@MacWyznawca
Copy link
Author

Hi! @sudeep-mohanty! Any progress with this example? Please!!! ;-)

@sudeep-mohanty
Copy link
Collaborator

Hello @MacWyznawca,
Apologies for a delayed response. We have this task in our plans and will work on it asap! Apologies again for the delay.

@MacWyznawca
Copy link
Author

Thank you @sudeep-mohanty.
This is very important for our company LuON.me, because handling touch wake-up with only one input heavily complicates the code, if we need to handle multiple touch fields.
This increases response time and decreases repeatability.
That's why we're so looking forward to an example of Touch support in ULP to speed up and stabilize battery-powered touch buttons

@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Selected for Development Issue is selected for development labels May 24, 2023
@sudeep-mohanty
Copy link
Collaborator

sudeep-mohanty commented May 24, 2023

Hello @MacWyznawca,
Apologies once again for a delayed reply. We have started work on adding touch sensor driver support for the ULP RISC-V. In the meantime, please find attached a basic example of the touch sensor working with the ULP RISC-V core. This hasn't been tested thoroughly and is likely to have changes before it is upstreamed to GitHub but it would present the idea of how the touch peripheral would work with the ULP RISC-V core. I would encourage you to try it out and let us know your feedback on it. Thanks!
ulp_touch.zip

@MacWyznawca
Copy link
Author

Thank you very much @sudeep-mohanty, the example works. I thought it would be more difficult (reading registers directly).
However, there is another problem. The current consumption is at a suspiciously high level. It is ~300 uA.
Our projects with ULP analog measurement and Touch Sleep enabled draw ~80-100uA in total (ESP32-S3 with other components and sensors).
Where to look for a solution?

@sudeep-mohanty
Copy link
Collaborator

Hi @MacWyznawca, The feature hasn't been tested thoroughly so I'm not sure why the current consumption is high. It could possibly depend on how the charge/discharge times are configured for the touch pads. The reference for this is here.

@MacWyznawca
Copy link
Author

OK, I understand @sudeep-mohanty
For now, I'm coping by using TOUCH_FSM_MODE_SW and starting the reading before the measurement. I've managed to get down to 70-90uA (standard Touch sensor settings), because waiting for the readout also costs some energy.
If you have a better idea, I'll be glad ;-)

@leeebo
Copy link
Contributor

leeebo commented Jun 7, 2023

Hi @MacWyznawca Back to the original question The ESP32S3 and S2 are unable to support wake-up with more than one touchpad. there is another solution to work around it, you can call touch_pad_config to enable the channels you want to use for deep/light sleep wakeup and call esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON); to enable the power for touch, then all the channels you configured can wakeup the chip

Do not call xx_sleep_channel_xx at all in this solution, and please keep in mind the more channels enabled, the more frequent the overall external charge and discharge, resulting in higher power consumption.

@MacWyznawca
Copy link
Author

Thanks @leeebo, I have already tested this approach. Unfortunately, the use of triggering Touch timer measurements, results in power consumption of several hundred uA. Even a single measurement of 4 channels using ULP measure triggered manually 10 times per second causes a large increase in power consumption. I still have to use interpenetrating electrodes (one over the entire surface for wake-up, another in the corresponding fields is the location of touch)

Translated with www.DeepL.com/Translator (free version)

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: In Progress Work is in progress labels Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Feature Request Feature request for IDF
Projects
None yet
Development

No branches or pull requests

4 participants