Stufin
Home Quick Cart Profile

Vibration Sensor Module

Buy Now on Stufin

Supply Voltage

3.3V to 5V

Current Consumption

10mA to 20mA

Sensitivity

10mV/g to 100mV/g (adjustable)

Frequency Range

0Hz to 5kHz

Resolution

10-bit to 16-bit (depending on the output format)

Communication Interface

Digital output (I2C, SPI, or UART)

Operating Temperature

-20C to 80C

Storage Temperature

-40C to 125C

Applications

  • Industrial Automation: Monitor and analyze vibration patterns in machinery, motors, and pumps to predict maintenance needs and prevent failures.
  • Condition Monitoring: Track vibration changes in structures, bridges, and buildings to detect potential issues and ensure safety.
  • Predictive Maintenance: Use vibration analysis to identify anomalies and schedule maintenance in industrial equipment, reducing downtime and costs.
  • Robotics and mechatronics: Integrate the module into robotic systems to detect and respond to vibrations, ensuring stable and precise operation.

Conclusion

The Vibration Sensor Module is a versatile and accurate component for detecting and measuring vibrations in various applications. Its compact design, low power consumption, and adjustable sensitivity make it an ideal choice for IoT projects and industrial automation systems.

Pin Configuration

  • Vibration Sensor Module Documentation
  • Pin Description:
  • The Vibration Sensor Module has a total of 3 pins, which are used to connect the module to a microcontroller or other devices. Below is a detailed description of each pin:
  • 1. VCC Pin:
  • Function: Power Supply Pin
  • Description: This pin is used to supply power to the Vibration Sensor Module. It should be connected to a voltage source between 3.3V to 5V.
  • Connection: Connect the VCC pin to the 3.3V or 5V output of a power supply or a microcontroller's VCC pin.
  • 2. GND Pin:
  • Function: Ground Pin
  • Description: This pin is used to provide a ground connection to the Vibration Sensor Module. It should be connected to the ground of the power supply or microcontroller.
  • Connection: Connect the GND pin to the GND pin of the power supply or microcontroller.
  • 3. OUT Pin:
  • Function: Output Pin
  • Description: This pin is used to send the vibration signal to a microcontroller or other devices. The output is an analog signal that varies in voltage based on the vibration detected.
  • Connection: Connect the OUT pin to an Analog Input pin of a microcontroller or other devices that can read analog signals.
  • Connection Structure:
  • To connect the Vibration Sensor Module to a microcontroller or other devices, follow the below structure:
  • | Vibration Sensor Module Pin | Microcontroller/Device Pin |
  • | --- | --- |
  • | VCC | 3.3V or 5V Power Supply |
  • | GND | GND Pin |
  • | OUT | Analog Input Pin (e.g., A0, A1, etc.) |
  • Important Notes:
  • Make sure to connect the power supply pins (VCC and GND) correctly to avoid damaging the module.
  • The OUT pin should be connected to an analog input pin that can read the voltage signal.
  • The vibration sensor module may require additional components, such as resistors or capacitors, depending on the specific application and microcontroller being used.
  • Refer to the datasheet of the microcontroller or device being used to determine the correct pin connections and voltage levels.
  • By following this documentation, you should be able to connect the Vibration Sensor Module to a microcontroller or other devices and start detecting vibrations in your IoT projects!

Code Examples

Vibration Sensor Module Documentation
Overview
The Vibration Sensor Module is a compact, low-cost sensor designed to detect vibrations or shocks in a variety of applications, including industrial automation, robotics, and IoT projects. This module is based on a piezoelectric sensor that generates an electrical signal in response to mechanical stress, such as vibrations or impacts.
Pinout and Specifications
Operating Voltage: 3.3V - 5V
 Detection Range: 0.5g - 10g
 Sensitivity: 100mV/g
 Output Signal: Analog (0-5V)
 Dimensions: 12mm x 12mm x 5mm
Code Examples
### Example 1: Basic Vibration Detection with Arduino
In this example, we'll use an Arduino Uno board to read the vibration sensor's output and trigger an LED when a vibration is detected.
```c
const int vibrationPin = A0;  // Analog input pin for vibration sensor
const int ledPin = 13;       // Digital output pin for LED
void setup() {
  pinMode(vibrationPin, INPUT);
  pinMode(ledPin, OUTPUT);
}
void loop() {
  int sensorValue = analogRead(vibrationPin);
  if (sensorValue > 500) {  // Adjust this threshold value based on your application
    digitalWrite(ledPin, HIGH);
  } else {
    digitalWrite(ledPin, LOW);
  }
  delay(50);  // Debouncing delay
}
```
### Example 2: Vibration Monitoring with Raspberry Pi (Python)
In this example, we'll use a Raspberry Pi to read the vibration sensor's output and display the vibration intensity on a GUI using Python and Matplotlib.
```python
import RPi.GPIO as GPIO
import matplotlib.pyplot as plt
import time
# Set up GPIO mode
GPIO.setmode(GPIO.BCM)
# Define vibration sensor pin
vibration_pin = 17
# Set up vibration sensor as an analog input
GPIO.setup(vibration_pin, GPIO.IN)
while True:
    # Read vibration sensor value
    sensor_value = GPIO.input(vibration_pin)
    # Convert sensor value to a meaningful vibration intensity
    vibration_intensity = sensor_value  5 / 1024  # Assuming 5V analog output
    
    # Display vibration intensity on GUI
    plt.plot(vibration_intensity)
    plt.xlabel('Time')
    plt.ylabel('Vibration Intensity (g)')
    plt.show(block=False)
    plt.pause(0.1)
    plt.cla()
    time.sleep(0.1)
```
### Example 3: Vibration-based Alarm System with ESP32 (MicroPython)
In this example, we'll use an ESP32 board to create a vibration-based alarm system that sends an SMS notification when a vibration is detected.
```python
import machine
import urequests
import time
# Set up vibration sensor pin
vibration_pin = 32
# Set up vibration sensor as an analog input
adc = machine.ADC(vibration_pin)
while True:
    # Read vibration sensor value
    sensor_value = adc.read_u16()
    if sensor_value > 500:  # Adjust this threshold value based on your application
        # Send SMS notification using urequests library
        urequests.post('https://api.example.com/send_sms', json={'message': 'Vibration detected!'})
        print('Vibration detected! SMS sent.')
        time.sleep(10)  # Debouncing delay
    time.sleep(0.1)
```
These examples demonstrate the basic usage of the Vibration Sensor Module in various contexts. Please adjust the threshold values and sensor calibration based on your specific application requirements.