Contents

Interfacing OE-TP Light Touch Switch Module with Arduino

OE-TP Light Touch Switch Module Features

This module has a fingerprint sensor that can control the digital output voltage. So The output voltage will change with each touch. The operating voltage is 5 to 20 V (recommended 12 volts) and operating current is up to 3 A (peak 10 A). It also has two red and blue LEDs. The blue LED indicates the module is powered on and the red LED indicates touch detection.

This type of sensor is widely used in home lighting, motor speed control, toys, etc.

OE-TP Light Touch Switch Module Pinout

This Module has 3 pins:

  • VCC: Module power supply – 5 to 20 V
  • GND: Ground
  • OUT: Digital output

You can see the pinout of this module in the image below.

Required Materials

Hardware Components

Arduino UNO R3 × 1
OE-TP Light Touch Switch Module × 1
Male to Female jumper wire × 1

Software Apps

Arduino IDE

Interfacing OE-TP Light Touch Switch Module with Arduino

Step 1: Circuit

The following circuit shows how you should connect Arduino to OE-TP module. Connect wires accordingly.

Note
For easier connection, use pin header to interface the module.

Step 2: Code

Upload the following code to Arduino.

    /*
    OE-TP-Capacitive-Touch-Button-Light-Switch-Module  
    made on 19 oct 2020
  by Amir Mohammad Shojaee @ Electropeak
  
Home
*/ int pin = 7; unsigned long duration; void setup() { Serial.begin(9600); pinMode(pin, INPUT); } void loop() { duration = pulseIn(pin, HIGH); Serial.println(duration); }

When the red LED is on, the digital signal is LOW meaning no touch has been detected. When you touch the switch, the red light gradually turns off after a few moments, and the digital pulse is placed on the output. The pulseIn command was used to read this output. The output of this command shows how long the the pulse has been on in microseconds. This value can be changed.

The code output is as follows. This time is approximately 7500 microseconds.

Liked What You See?​
Get Updates And Learn From The Best​

Leave a Reply

Your email address will not be published. Required fields are marked *