I am using touch sensor ttp223 on my ESP32. Touch sensor I/O PIN is connected to GPIO14 (I also tried GPIO27).
Here is my ESPHome config for the touch sensor.
# Touch Pad
esp32_touch:
setup_mode: true
binary_sensor:
- platform: esp32_touch
name: "Touch Pad GPIO27"
pin: GPIO14
threshold: 1000
In can see in terminal window that the output is always 0:
[20:43:15][D][esp32_touch:126]: Touch Pad 'Touch Pad GPIO27' (T6): 0
[20:43:15][D][esp32_touch:126]: Touch Pad 'Touch Pad GPIO27' (T6): 0
When I disconnect the touch sensor wire from GPIO14 I can see State goes to OFF. When I reconnect the wire I can see State goes to ON.
When the wire is disconnected, values are reported for threshold and when I touch the GPIO14 values change as they should. But when I reconnect touch senor it always shows 0.
My ttp223 touch sensor is the small red one, not the blue one. Currently both its A/B pins are open.
Could the switch be faulty or am I doing something wrong?
The esp 32 touch component is not meant to be used with other active touch sensors like the TTP223. It is a touch sensor already. All you need is to connect a small conductive plate that you can touch.
Thank you for the quick response. Your answer pointed me in the right direction and I was able to add it as a basic touch sensor for ON and OFF and it works well now:
i want to make a diy touch sensor switch board but the twist is i want 9 channels to oprate because my laboratory has total 5 lights and 4 fans can i integrate 9 touch sensors with the esp 32 ?