Touch Enabled Deep Sleep Power is too high; please help

FluxGS
Posts: 25
Joined: Sun Mar 18, 2018 7:01 am

Touch Enabled Deep Sleep Power is too high; please help

Postby FluxGS » Sun Mar 18, 2018 7:39 am

Hello,
I am using an ESP32 WRoom module for a control application which needs to wake from deep sleep by one of two configured touch sensors and perform a brief update task then go back to deep sleep.

My module has:
1.) 5K ohm resistor connected from IO0 to VDD33
2.) 5K ohm resistor connected from IO2 to Vss
3.) 12K ohm resistor connected from EN to VDD33
4.) Isolated touch pads are connected to GPIO12 and 14, which are RTC_Touch 5 & 6.

VDD = 3.3
Along with all of the recommended capacitors.

When entering deep sleep mode and not enabling touch, my current reads at 5-6 uA. As expected!

However, by just adding a few lines of code to enable / configuring touch, my current jumps to 360uA.

********Code body*********
wakeup_time_sec = 10;

//touch enable code section (if omit this section, current during timer deep sleep is 5-6uA.
//with this section included, deep sleep current is 360 uA. Datasheet page 8-9 indicates 150uA
touch_pad_init();
touch_pad_config(TOUCH_PAD_NUM5, wakeup_right_val); //Right Touch
touch_pad_config(TOUCH_PAD_NUM6, wakeup_left_val); //Left Touch
printf("Enabling touch pad wakeup\n");
esp_sleep_enable_touchpad_wakeup();
//end of touch enable code

printf("Enabling timer wakeup, %ds\n", wakeup_time_sec);
esp_sleep_enable_timer_wakeup(wakeup_time_sec * 1000000);

//Setting deep sleep power down options
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_AUTO);

printf ("Touch Sleep On\n");
printf("Entering deep sleep\n");
esp_deep_sleep_start();
********End Code************

Any thoughts on what is using this current?

Flux Confused

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Touch Enabled Deep Sleep Power is too high; please help

Postby WiFive » Sun Mar 18, 2018 8:24 pm

Have you played with touch_pad_set_meas_time

FluxGS
Posts: 25
Joined: Sun Mar 18, 2018 7:01 am

Re: Touch Enabled Deep Sleep Power is too high; please help

Postby FluxGS » Sun Mar 18, 2018 8:42 pm

WiFive,
No I have not. I have simply used the code presented with the difference being the FSM starting for touch detection.
It is interesting that with an O-Scope, each RTC_Touch pin can be observed with a pulse. Even though I am only looking at two pins for touch detection, all of the touch pins are being actively measured by the FSM / ADC detection function.

I am trying to learn how to configure this activity to only stimulate and measure the two configured touch pins and also how actively these are done.

Because the datasheet indicates 100uA (1% duty cycle) and 150uA. I am most interested in how to achieve this and also wonder how to enable 1% duty cycle.

WiFive can you tell me more on how to do this and what effect it would have?

FluxGS
Posts: 25
Joined: Sun Mar 18, 2018 7:01 am

Re: Touch Enabled Deep Sleep Power is too high; please help

Postby FluxGS » Sun Mar 18, 2018 10:44 pm

You are a rockstar WiFive!
I did play with the measure timing and duty cycle and now have a responsive touch sensor on both inputs with only 10uA current.
I hope to now understand how to make the FSM stop stimulation on the pins which I am not using.
This must be a bit level register configuration.

If anyone knows, please share. I wish to only stimulate for touch sensing Touch 5 and Touch 6.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Touch Enabled Deep Sleep Power is too high; please help

Postby WiFive » Mon Mar 19, 2018 4:27 am


FluxGS
Posts: 25
Joined: Sun Mar 18, 2018 7:01 am

Re: Touch Enabled Deep Sleep Power is too high; please help

Postby FluxGS » Mon Mar 19, 2018 4:17 pm

Thank you for the helpful link of the previously reported problem on ADC stimulation on non configured touch pins.
SENS.sar_touch_enable.touch_pad_worken = 0; prior to touch_init (); cleared this up for me as well.
Thank you!

dave111
Posts: 45
Joined: Fri Mar 03, 2017 1:37 am

Re: Touch Enabled Deep Sleep Power is too high; please help

Postby dave111 » Thu Jun 21, 2018 7:41 am

FluxGS wrote:I did play with the measure timing and duty cycle and now have a responsive touch sensor on both inputs with only 10uA current.
May I ask what values you are now using with touch_pad_get_meas_time(sleep_cycle,meas_cycle)?

Default values appear to be 4096 (=0,027ms) and 65535 (=0,008ms) on my device. Thanks.

mezzynine
Posts: 12
Joined: Fri Feb 07, 2020 8:05 am

Re: Touch Enabled Deep Sleep Power is too high; please help

Postby mezzynine » Wed Sep 22, 2021 1:45 am

hi, did you ever get a response for this? what are good parameters for

Code: Select all

touch_pad_get_meas_time()
that would make current consumption low?
dave111 wrote:
Thu Jun 21, 2018 7:41 am
FluxGS wrote:I did play with the measure timing and duty cycle and now have a responsive touch sensor on both inputs with only 10uA current.
May I ask what values you are now using with touch_pad_get_meas_time(sleep_cycle,meas_cycle)?

Default values appear to be 4096 (=0,027ms) and 65535 (=0,008ms) on my device. Thanks.

Who is online

Users browsing this forum: No registered users and 113 guests