Stufin
Home Quick Cart Profile

Tap sensor module

Buy Now on Stufin

Operating Voltage

3.3V to 5V

Current Consumption

<10mA (average), <50mA (peak)

Detection Range

1-100 Hz (adjustable)

Sensitivity

10-100 mV/g (adjustable)

Output Signal

Digital (TTL) or Analog (0-5V)

Communication Interface

IC, SPI, or UART (depending on the specific module variant)

Operating Temperature

-20C to 70C

Dimensions

15mm x 10mm x 2.5mm (L x W x H)

Applications

  • Smart Home Automation: Tap sensors can be used to detect and respond to door knocks, window taps, or other events in smart home systems.
  • Industrial Monitoring: Tap sensors can be used to detect equipment faults, monitor machine vibration, or track product movement in industrial settings.
  • Healthcare Devices: Tap sensors can be used in healthcare devices to monitor patient activity, detect falls, or provide feedback in rehabilitation systems.
  • Wearable Devices: Tap sensors can be used in wearable devices to detect user input, monitor activity, or provide haptic feedback.

Certifications and Compliance

CE Certification

Compliant with EU health, safety, and environmental protection standards

FCC Compliance

Compliant with US Federal Communications Commission regulations

RoHS Compliance

Compliant with EU Restriction of Hazardous Substances directive

Ordering Information

The Tap Sensor Module is available in various packages, including
TSM-101Basic module with analog output
TSM-102Module with digital output and IC interface
TSM-103Module with analog output and UART interface
TSM- Eval KitEvaluation kit including the TSM-101 module, breakout board, and accessories

Please contact our sales team for pricing, availability, and custom orders.

Pin Configuration

  • Tap Sensor Module Documentation
  • The Tap Sensor Module is a digital sensor that detects tapping or vibration on its surface. It is commonly used in IoT projects, robotics, and automation systems to detect user input, monitor machine vibrations, or track object movements. This documentation provides a detailed explanation of the module's pins and their connections.
  • Pin Description:
  • The Tap Sensor Module typically has 4-6 pins, depending on the specific model. The standard pinout is as follows:
  • 1. VCC (Power Supply):
  • Pin Function: Power supply input
  • Pin Type: Power
  • Description: Connect this pin to a 3.3V or 5V power supply, depending on the module's specifications.
  • Connection: Connect to a power source (e.g., Arduino, Raspberry Pi, or a dedicated power supply).
  • 2. GND (Ground):
  • Pin Function: Ground connection
  • Pin Type: Ground
  • Description: Connect this pin to a common ground point in your circuit.
  • Connection: Connect to a ground pin on your microcontroller, a breadboard, or a dedicated ground point.
  • 3. OUT (Digital Output):
  • Pin Function: Digital output signal
  • Pin Type: Digital
  • Description: This pin provides a digital output signal that indicates the detection of a tap or vibration.
  • Connection: Connect to a digital input pin on your microcontroller (e.g., Arduino, Raspberry Pi, or a dedicated digital input).
  • 4. TH (Threshold Adjustment):
  • Pin Function: Threshold adjustment input
  • Pin Type: Analog
  • Description: This pin allows you to adjust the sensitivity of the tap sensor by applying an analog voltage.
  • Connection: Connect to an analog output pin on your microcontroller or a potentiometer to adjust the sensitivity.
  • 5. EN (Enable) (Optional):
  • Pin Function: Enable input
  • Pin Type: Digital
  • Description: This pin, if available, allows you to enable or disable the tap sensor module.
  • Connection: Connect to a digital output pin on your microcontroller to control the module's enable state.
  • Connection Structure:
  • To connect the Tap Sensor Module to your microcontroller or project, follow this structure:
  • Connect VCC to a 3.3V or 5V power supply.
  • Connect GND to a common ground point.
  • Connect OUT to a digital input pin on your microcontroller.
  • Connect TH to an analog output pin on your microcontroller or a potentiometer.
  • If available, connect EN to a digital output pin on your microcontroller.
  • Example Connection Diagram:
  • Here's an example connection diagram for an Arduino project:
  • Tap Sensor Module VCC Arduino 5V
  • Tap Sensor Module GND Arduino GND
  • Tap Sensor Module OUT Arduino Digital Pin 2
  • Tap Sensor Module TH Arduino Analog Pin A0
  • (If available) Tap Sensor Module EN Arduino Digital Pin 3
  • Note:
  • Make sure to check the specific pinout and voltage requirements for your Tap Sensor Module, as they may vary depending on the manufacturer and model.
  • Use proper voltage regulators and decoupling capacitors to ensure stable power supply to the module.
  • Adjust the threshold voltage on the TH pin to optimize the sensor's sensitivity for your specific application.
  • By following this documentation and connecting the pins correctly, you can integrate the Tap Sensor Module into your IoT project and start detecting taps and vibrations.

Code Examples

Tap Sensor Module Documentation
Overview
The Tap Sensor Module is a compact, low-power device designed to detect taps or vibrations on a surface. It is commonly used in IoT applications such as smart home systems, wearables, and industrial automation. The module consists of a sensitive piezoelectric sensor, an amplifier, and an analog-to-digital converter (ADC).
Pinout
The Tap Sensor Module has the following pins:
VCC: Power supply (3.3V or 5V)
 GND: Ground
 OUT: Analog output (0-1023)
 INT: Interrupt pin (optional)
Code Examples
### Example 1: Basic Tap Detection using Arduino
In this example, we will use the Tap Sensor Module with an Arduino board to detect taps on a surface.
```c
const int tapPin = A0;  // Analog input pin for tap sensor
int tapValue = 0;
void setup() {
  Serial.begin(9600);
}
void loop() {
  tapValue = analogRead(tapPin);
  if (tapValue > 500) {  // Adjust the threshold value as needed
    Serial.println("Tap detected!");
  }
  delay(20);
}
```
### Example 2: Tap Counting using Raspberry Pi (Python)
In this example, we will use the Tap Sensor Module with a Raspberry Pi to count the number of taps on a surface.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
tap_pin = 17  # GPIO pin for tap sensor
GPIO.setup(tap_pin, GPIO.IN)
tap_count = 0
while True:
    if GPIO.input(tap_pin) == GPIO.HIGH:
        tap_count += 1
        print("Tap detected! Count:", tap_count)
    time.sleep(0.02)
```
### Example 3: Interrupt-based Tap Detection using ESP32 (MicroPython)
In this example, we will use the Tap Sensor Module with an ESP32 board to detect taps on a surface using an interrupt.
```python
import machine
import time
tap_pin = machine.Pin(32, machine.Pin.IN)  # GPIO pin for tap sensor
def tap_detected(pin):
    print("Tap detected!")
tap_pin.irq(trigger=machine.Pin.IRQ_RISING, handler=tap_detected)
while True:
    time.sleep(0.1)
```
Note: The code examples above are for illustration purposes only and may require modifications to suit your specific project requirements. The tap detection threshold value may need to be adjusted based on the environment and surface being monitored.