Skip to content

ESP32 Touch Wake Not Working

DodaTech Updated 2026-06-26 1 min read

In this tutorial, you'll learn about ESP32 Touch Wake Not Working. We cover key concepts, practical examples, and best practices.

The Problem

ESP32 configured for touch wake does not wake from deep sleep when touched.

Quick Fix

Wrong

esp_sleep_enable_touchpad_wakeup();  // Not calibrated
Touching the pad does not wake the ESP32.
touch_pad_init();
touch_pad_set_voltage(TOUCH_HVOLT_2V7, TOUCH_LVOLT_0V5, TOUCH_HVOLT_ATTEN_1V);
touch_pad_config(TOUCH_PAD_GPIO4_CHANNEL, 0);
touch_pad_set_thresh(TOUCH_PAD_GPIO4_CHANNEL, touch_pad_read(TOUCH_PAD_GPIO4_CHANNEL) * 0.7);
esp_sleep_enable_touchpad_wakeup();
// On wake:
touch_pad_t touch = esp_sleep_get_touchpad_wakeup_status();
Serial.printf("Woke by touch pad %d\n", touch);
Woke by touch pad 0
(ESP32 wakes when touch sensor on GPIO 4 is activated)

Prevention

Calibrate touch threshold before enabling touch wake. Set threshold to 70% of idle reading. Use touch_pad_init() before configuration. Touch pads work only on specifically designated GPIOs (T0-T9). Keep touch traces short.

DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.

FAQ

### Which GPIOs support touch on ESP32?

GPIOs 0, 2, 4, 12-15, 27, 32, 33 have touch capability (T0-T9). Check your board datasheet.

How do I calibrate touch threshold?

Read the idle value with touchRead() or touch_pad_read(), then set threshold to 70-80% of that value. Calibrate at startup.

Does touch wake work from deep sleep?

Yes. Touch controller runs during deep sleep to detect touches. Current consumption increases to ~50 uA with touch wake.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro