Contents

Interfacing 4-bit Button Capacitive Touch Sensor with Arduino

4-bit Button Touch Proximity Sensor Features

This module has 4 fingerprint touch inputs and 4 digital output pins. It also has 5 LEDs. One for power supply and 4 LEDs indicate fingerprint sensors. If you touch each sensor, the output becomes HIGH and the LED turns on. If you don’t touch, the output will be LOW and the LED turns off.

This module can be used on glass, ceramic, plastic and other surfaces.

4-bit Button Touch Proximity Sensor Pinout

This module has 6 pins:

  • VCC: Module power supply – 2-5.5 V
  • GND: Ground
  • OUT1: Digital output 1
  • OUT2: Digital output 2
  • OUT3: Digital output 3
  • OUT4: Digital output 4

You can see the pinout of this module here.

Required Materials

Hardware Components

Arduino UNO R3 × 1
4-bit Button Capacitive Touch Proximity Sensor × 1
Male to Female Jumper wire × 1

Software Apps

Arduino IDE

Interfacing 4-bit Button Touch Proximity Sensor with Arduino

Step 1: Circuit

The following circuit shows how you should connect Arduino to this sensor. Connect wires accordingly.

Step 2: Code

Upload the following code to your Arduino.

/*
  CJMCU-0401-4bit-Touch-ُSensor-Module
  made on 08 Nov 2020
  by Amir Mohammad Shojaee @ Electropeak
  
Home
*/ #define out1 8 #define out2 9 #define out3 10 #define out4 11 void setup() { Serial.begin(9600); Serial.println("begin to touch"); pinMode(out1,INPUT); pinMode(out2,INPUT); pinMode(out3,INPUT); pinMode(out4,INPUT); } void loop() { if(digitalRead(out1)==HIGH){ Serial.println("button1 is touched"); while(digitalRead(out1)==HIGH){} } if(digitalRead(out2)==HIGH){ Serial.println("button2 is touched"); while(digitalRead(out2)==HIGH){} } if(digitalRead(out3)==HIGH){ Serial.println("button3 is touched"); while(digitalRead(out3)==HIGH){} } if(digitalRead(out4)==HIGH){ Serial.println("button4 is touched"); while(digitalRead(out4)==HIGH){} } }

By touching each fingerprint sensor, its digital output becomes HIGH and the phrase “button is touched” appears in the Serial Monitor.

The output is as follows. We accidentally touched 4 sensors.

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 *