Vibration Analysis with Piezo Sensor

Introduction

This experiment shows how to detect vibrations using a piezoelectric sensor with Arduino.

Piezo Sensor

Components Needed

Circuit Setup

  1. Connect the piezoelectric sensor to the analog input pin (e.g., A0) on the Arduino.
  2. Connect VCC and GND to the Arduino's 5V and GND pins.

The piezoelectric sensor generates a voltage signal in response to vibrations.

Vibration Circuit Setup

Code for Vibration Analysis

Upload the following code to your Arduino to detect vibrations:


const int piezoPin = A0;
int vibrationLevel = 0;

void setup() {
  Serial.begin(9600);
}

void loop() {
  vibrationLevel = analogRead(piezoPin);
  Serial.print("Vibration Level: ");
  Serial.println(vibrationLevel);
  delay(100);
}
            

Explanation

The piezoelectric sensor produces a voltage proportional to the vibration intensity, which is read by the Arduino and output to the Serial Monitor.

Troubleshooting