Stduino Learning - Metal Touch Module

What are you developing?
Post Reply
jacobli
Posts: 42
Joined: Fri Jun 11, 2021 3:40 am

Stduino Learning - Metal Touch Module

Post by jacobli »

Description
This module is a capacitive pointing type touch switch module based on touch detection. This means that the metal touch module is responding through the capacitance of the human body.
Because it is monitoring capacitance, it can also be covered with non-metallic materials such as wood, paper, plastic, and other insulating materials on the surface of the module to detect human touch can be made into a hidden button on the wall, desktop, and other places. Therefore, the metal touch module is particularly suitable for places that do not require force to press and so on only need to touch to sense.

Experimental Objective
Build a simple circuit with a metal touch module and a digital 13 interface self-contained LED to make a touch cue light.

Equipment
Stduino UNO/Nano; DuPont cable; metal touch module

Circuit connection
1.1.png
1.1.png (92.42 KiB) Viewed 1642 times
Code
Digital Signal DO Monitoring

Code: Select all

int LED = 13;
int BUTTON = 3;
int val;

void setup()
{
  // put your setup code here, to run once:
    pinMode(LED,OUTPUT);
    pinMode(BUTTON,INPUT);
    Serial.begin(9600);

}
void loop()
{
  // put your main code here, to run repeatedly:
    val = digitalRead(BUTTON);
    if(val == HIGH)
    {
        digitalWrite(LED,LOW);
    }
    else
    {
        digitalWrite(LED,HIGH);
    }
}
Analog signal AO monitoring

Code: Select all

int metal = A0; //define metal touch sensor interface
void setup()
{
pinMode(metal,INPUT_ANALOG);//define metal as input interface
Serial.begin(9600);//set the baud rate to 9600
}
void loop()
{
Serial.println(analogRead(metal));//output the analog value and print it out
delay(100);
}
Experimental effect

The upper side is when it is not touched. The lower side is after touching the metal wire, you can see the module comes with the LED light up.
1.3.jpg
1.3.jpg (56.44 KiB) Viewed 1641 times
1.2.jpg
1.2.jpg (32.06 KiB) Viewed 1641 times
Post Reply

Return to “Projects”