3.3V to 5V
3.3V to 5V
<10mA (average), <50mA (peak)
1-100 Hz (adjustable)
10-100 mV/g (adjustable)
Digital (TTL) or Analog (0-5V)
IC, SPI, or UART (depending on the specific module variant)
-20C to 70C
15mm x 10mm x 2.5mm (L x W x H)
Applications
Certifications and Compliance
Compliant with EU health, safety, and environmental protection standards
Compliant with US Federal Communications Commission regulations
Compliant with EU Restriction of Hazardous Substances directive
Ordering Information
| The Tap Sensor Module is available in various packages, including | |
| TSM-101 | Basic module with analog output |
| TSM-102 | Module with digital output and IC interface |
| TSM-103 | Module with analog output and UART interface |
| TSM- Eval Kit | Evaluation kit including the TSM-101 module, breakout board, and accessories |
Please contact our sales team for pricing, availability, and custom orders.
Tap Sensor Module DocumentationOverviewThe 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).PinoutThe 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 ArduinoIn 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 timeGPIO.setmode(GPIO.BCM)
tap_pin = 17 # GPIO pin for tap sensor
GPIO.setup(tap_pin, GPIO.IN)tap_count = 0while 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 timetap_pin = machine.Pin(32, machine.Pin.IN) # GPIO pin for tap sensordef 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.