☰ Contents FBD
Reading unit with capacitive touch button




The block exists only for the ESP 32 controller.


ESP32 is equipped with 10 tactile sensors (capacitive touch GPIO-contacts). They can "feel" changes in the electrical capacity of the sensory contact that occur in contact with something (like human skin). For example, these changes can be caused by touching the capacitive touch screen. GPIO-contact with your finger. To these contacts, you can connect capacitive "keys" (made, for example, of foil) and then use them instead of mechanical buttons.


This block is used to read information about the current state of such input. In the block settings, you must select the output from which you want to read.




In the list of suggested pins, only those that can work as touch buttons will be presented.

The output of the unit will be a value that displays the current capacitance applied to the selected pin. When you touch this pin, the value at the output of the block decreases. The value of the output of the unit when it is touched depends on the physical characteristics of the sensor.

To detect a touch event, you can use, for example, the following scheme.




The constant at the input of the comparison unit characterizes the physical characteristics of the touch contact, and is selected empirically.