These days, glass touch panels are becoming common even for the household switchboards. China worldwide selling units which have touch switch, a remote control, sometimes Wi-Fi with a mobile application for IoT control. Here is how to build ESP32 Arduino glass touch switch with LED. Glass touch panels are electric shockproof and cost of manufacturing total units including relay, SoC (like ESP32) sharply falling. ESP32 is quite powerful SoC with in-built ten pins for capacitive touch sensors. Our guide on Controlling AC Powered Appliances With ESP32 and IBM Watson IoT will give the basic idea to develop digital switch with control over internet and push button. Instead of pushbutton, in glass touch panel the input becoming the capacitive touch sensors. If you use LED backlight indicator, that will need separate coding. This is a basic example of how we use touch sensors with ESP32 Arduino to control a LED :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #define TOUCH_PIN T0 //connected to 4 #define LED_PIN A13 //connected to 15 int touch_value = 100; void setup() { Serial.begin(9600); Serial.println("ESP32 Touch Test"); pinMode(LED_PIN, OUTPUT); digitalWrite (LED_PIN, LOW); } void loop() { touch_value = touchRead(TOUCH_PIN); Serial.println(touch_value); // get value using T0 if (touch_value < 50) { digitalWrite (LED_PIN, HIGH); } else { digitalWrite (LED_PIN, LOW); } delay(1000); } |
It is not difficult to add a remote control! There are a lot of guides on the web to add remote control to Arduino UNO. IR remotes with numerical keys, direction buttons sold. Our guide on Controlling AC Powered Appliances With ESP32 and IBM Watson IoT gives an idea how to code when multiple type of inputs to control is present. It is not difficult to get custom remote fabricated.
Espressif has ESP32-Sense Kit which includes ready to use glass touch panels for development purposes. One of the panels has a basic LED. Espressif has good documentation around how to design the glass panel with a touch switch :
---
1 2 3 4 5 | # https://github.com/espressif/esp-iot-solution/blob/master/documents/touch_pad_solution/touch_sensor_design_en.md # |
Espressif has ESP-TOUCH protocol to help users connect the devices to a Wi-Fi network through simple configuration on a smartphone :
1 2 3 4 5 6 7 | # https://www.espressif.com/en/products/software/esp-touch/overview # |
Glass touch panels can be ordered for custom fabrication. Commonly tempered glass is used. Tempered glass can withstand higher external forces and maintain a long service life. Tempered glass does not make fragments while getting shattered. The tempered glass can be silk printed for logos and buttons. ESP32’s capacitive touch is quite basic. There are backlit projective capacitive glass touch panels, capacitive touch switch button with RGB LED, LED-based touch sensor display.
All of these works being behind a glass surface. Espressif’s ESP32-Sense kit used spring like capacitive sensor with LED inside. AC dimming a bigger topic. We are not going towards how to build touch controlled fan regulator.
Tagged With make a glass capacitative touch pad esp32 , esp32 touch sensor switch code , esp32 touch sensor design , esp32 touch sensor , esp32 touch read through glass , esp32 touch pin bigger value , esp32 capacitive touch through glass , esp capacitive touch example , Arduino touch sensor glas , arduino rocker switch with buildin led