This is the metal touch sensor module. This sensor is an electronic switching device. Basically, it will operate when touched by a charged any part of the body it triggers a high frequency which is generated by the transistor that conducts an electrical pulse when to receive an electromagnetic signal. See below for the wiring guide.
Required Components.
- Arduino UNO, MEGA, DUE, LEO, NANO, PRO, ESP8266 13, 12, 7, 11.
- LED (Any Color)
- Resistor 200 Ohms
- Solder Less Bread Board
- Jumper Wire
Wiring Diagram
Source Codes / Sketch Code for Digital
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 27 28 29 30 31 32 33 34 35 36 37 38 39 |
/* 14CORE Test Code for: Metal Touch Sensor .:+osysso++:` `+yhs/-` `-+s+` `:/+++++++++` .:/++ooo++/-` .ooooooooooo+: :///////////- `odh/` `:y+` /ddhsooooooo+ /hddhsooooydddh sdddoooooosdddy` `////////////` -hds` `sy. +ddy` .ddd: sddy.dddo +ddd- .-----------` `hds :sssss/ -ossssso-yy` `hdd: oddy `ddd/oddd:......+dddo .++++++++++++ +dd` :sdddh` :ydddddddo +y/ .ddd+........ `hddy:.....:yddy.hdddddddddddy+. ```````````` ydy .hddd/+hdddhydddh/.+yo /hdddddddddd. :shddddddddhs/`+ddd:````-yddy- :ooooooooooo+ odh` sdddooyyyyyhddddyy.sy+ ` `......... ``.... ....` ```...` ` `` `` ` -dd+`::::` .:::- /yy. -oos+:-oos+--oos+: /o `+y o/: o:+/ h:`yos /+-`/+/+ s:y/y. /dd/ `+yy: +//+ +/:+ +/:+ -. `/ -:o.:/:`//+- + +:- :`-+:`://: +`o`+. -yds. `/yys- .`-.. .``` ```` .`` ` ` ``` ``-..` ` :ydy/.`````.-/oyhs: `+++oo+oo+:.+-++/-/ooo+o +:o/oo///:+/ .:oyhhhhhhhso:` `. ``` */ int MyLedOutput = 12 ; // Define as Output Interface (Optional) int MySensor = 2; // Define as the REED sensor digital pin 2 on microcontroller int Value ; // Define as numeric value to hold the sensor input void setup () { pinMode (MyLedOutput, OUTPUT) ; // Define as digital output (LED which is connected to pin 12) pinMode (MySensor, INPUT) ; // Define as digital input } void loop () SunFounder{ Value = digitalRead (MySensor) ; // Reads the state value of digital input in pin 2 if (Value == HIGH) // If sensor reads pin 2 is HIGH then turn the LED pin 12 ON { digitalWrite (MyLedOutput, HIGH); } else { digitalWrite (MyLedOutput, LOW); // Otherwise turn off or LOW } } |
Source Code / Sketch Code for Analog
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 27 28 29 30 31 32 33 34 35 36 37 38 39 |
/* 14CORE Test Code for: Metal Touch Sensor .:+osysso++:` `+yhs/-` `-+s+` `:/+++++++++` .:/++ooo++/-` .ooooooooooo+: :///////////- `odh/` `:y+` /ddhsooooooo+ /hddhsooooydddh sdddoooooosdddy` `////////////` -hds` `sy. +ddy` .ddd: sddy.dddo +ddd- .-----------` `hds :sssss/ -ossssso-yy` `hdd: oddy `ddd/oddd:......+dddo .++++++++++++ +dd` :sdddh` :ydddddddo +y/ .ddd+........ `hddy:.....:yddy.hdddddddddddy+. ```````````` ydy .hddd/+hdddhydddh/.+yo /hdddddddddd. :shddddddddhs/`+ddd:````-yddy- :ooooooooooo+ odh` sdddooyyyyyhddddyy.sy+ ` `......... ``.... ....` ```...` ` `` `` ` -dd+`::::` .:::- /yy. -oos+:-oos+--oos+: /o `+y o/: o:+/ h:`yos /+-`/+/+ s:y/y. /dd/ `+yy: +//+ +/:+ +/:+ -. `/ -:o.:/:`//+- + +:- :`-+:`://: +`o`+. -yds. `/yys- .`-.. .``` ```` .`` ` ` ``` ``-..` ` :ydy/.`````.-/oyhs: `+++oo+oo+:.+-++/-/ooo+o +:o/oo///:+/ .:oyhhhhhhhso:` `. ``` */ int SensorAnalogPin = A0; //Adjust the pontensionmeter to change the Analog input DEC value int MyLedOut = 13; // Define as Output which is connected to Digital pin 12 int Value = 0; // Define as to hold the value of SensorAnalogPin which is connected to A0 void setup () { pinMode (MyLedOut, OUTPUT); //Set the digital pin 12 as output Serial.begin (9600); //Start serial communication to get the DEC value from the sensor Serial.print("14CORE | SENSOR TEST CODE") } void loop () { Value = analogRead (SensorAnalogPin); digitalWrite (MyLedOut, HIGH); delay (Value); digitalWrite (MyLedOut, LOW); delay (Value); Serial.println (Value, DEC); } |
Wiring the Metal Touch Sensor Module with MCU