Piezo Element


Piezo Element [Product link] is used as a pressure sensor to detect vibrations like a knock on a door, table, or other solid surface.


Piezo Element
Piezo Element
  • Model: 7BB-27-4L0
  • Plate Material: Brass
  • Resonant Frequency: 4.6 ± 0.5kHz
  • Resonant Impedence: 300 ohm max
  • Capacitance: 20.0 ± 30% nF [1kHz]
  • Plate Diameter: 27mm
  • Element Diameter: 19.7mm



Positive connection of the Piezo Element (red wire) is attached to an analog pin in Arduino UNO.
Negative connection of the Piezo Element (black wire) is attached to GND pin.
1M ohm resistor attached from the positive pin to negative pin of the Piezo Element.

//Written by Lakshay Chutani and Jasmeet Singh for http://Wiki.JMoon.co

#define threshold 50 // threshold value to decide weather the detected value will be displayed or not.

int piezoPin = A0; // the positive pin of piezo is connected to analog pin 0
int sensorReading = 0; // variable to store the value read from the sensor pin

void setup() {

void loop() {
sensorReading = analogRead(piezoPin);
// If the sensor reading is greater than the threshold
if (sensorReading >= threshold) {

When you knock on the Piezo Element the analog value (0-1023) of the applied pressure will be displayed on the Serial Monitor only if that value is greater than the specified threshold. Values less than specified threshold won’t be displayed. You can change the value of the threshold if you desire.

Possible Application Areas

1. Motion Detection Security [Link]
2. Knock Sensor [Link]


So empty here ... leave a comment!

Leave a Reply

Your email address will not be published. Required fields are marked *