Table of Contents

lamaPLC project: Arduino - Vibration sensors

LDTM 028K A vibration sensor is a device that detects mechanical oscillations and transforms them into electrical signals to measure displacement, velocity, or acceleration. They are vital for predictive maintenance, enabling teams to identify machine issues, such as misalignment or bearing wear, before failures become catastrophic.

Common Types of Vibration Sensors

Selecting a sensor depends on the frequency range and whether your measurement target is displacement (position), velocity (speed), or acceleration.

Sensor TypeBest ForTypical Use CaseKey Benefit
PiezoelectricHigh frequencies (>1 kHz)Bearing monitoring, gearboxes, turbinesExtremely robust, wide frequency range
MEMS (Capacitive)Low frequencies (0–1 kHz)Imbalance, misalignment, loosenessLow cost, low power, long battery life
Eddy-CurrentShaft displacementNon-contact monitoring of rotating shaftsMeasures distance without physical contact
Velocity (Electrodynamic)Machinery protectionHeavy industrial machines, pumps, fansSelf-powered and less prone to overload
Laser DisplacementDelicate/Hot surfacesPrecision measurement in clean or harsh environmentsHigh precision, non-contact measurement

Key Applications

If you'd like to support the development of the site with the price of a coffee — or a few — please do so here.

Here's a handy tip: you can quickly save this page as a PDF by clicking “export to PDF” in the menu on the right side of the screen.

2026/02/14 22:38

Comparison: GXFM0459 vs. LDTM-028K

FeatureGXFM0459 (Ceramic Module)LDTM-028K (Film Sensor)
Physical FormRigid ceramic disk on a PCBFlexible thin polymer film
Detection TypeBest for knocks, taps, or high-impact shocksBest for continuous vibration and low-frequency motion
Wiring 3-pin(VCC, GND, OUT)2-pin (Raw AC output)
Signal HandlingBuilt-in amplifier/comparatorRequires external resistor/circuit

LDTM-028K (Film Sensor)

LDTM 028K

The LDTM-028K is a piezoelectric film vibration sensor.

It specifically features a cantilever beam design with an integrated mass (the “M” in the name) to increase its sensitivity, especially at lower frequencies.

LDTM 028K Key Characteristics

LDTM 028K Technical Specifications

Wiring the Standalone LDTM 028K Sensor (Raw Element)

The standalone LDTM-028K features only two crimped contacts. Since piezoelectric elements can produce very high voltage spikes (AC), they need a dedicated circuit to protect your microcontroller and ensure the signal remains stable.

Parallel Resistor: Attach a 1 MΩ resistor across the sensor's two pins. It functions as a pull-down resistor, helping to dissipate static charge.

Microcontroller Connection

Protection (optional but recommended): To prevent voltage spikes from damaging the pins, some designers install a Schottky diode or a Zener diode across the terminals to clamp the voltage to the supply level.

Arduino example code for the LDTM 028K Standalone Sensor

Connect a 1 MΩ resistor in parallel with the sensor's two pins to prevent the analogue input from “floating” and to dissipate static charges, reducing the risk of false readings or excessive voltage.

This sketch uses a “hardware interrupt” to promptly detect vibrations, even when the main program is busy with other tasks.

/* 
 * LDTM-028K Interrupt-Driven Detection
 * Connect sensor to Digital Pin 2 with a 1M Ohm resistor to GND.
 */
 
const byte PIEZO_PIN = 2;       // Interrupt-capable pin (Uno/Nano: Pin 2 or 3)
const byte LED_PIN = 13;        // Built-in LED
 
// 'volatile' is required for variables shared between main loop and interrupt
volatile bool vibrationDetected = false; 
 
void setup() {
  Serial.begin(115200);         // Higher baud rate for fast events
  pinMode(LED_PIN, OUTPUT);
  pinMode(PIEZO_PIN, INPUT);    // Sensor acts as a digital pulse generator
 
  // Trigger the 'vibrationISR' function when Pin 2 goes from LOW to HIGH (RISING)
  attachInterrupt(digitalPinToInterrupt(PIEZO_PIN), vibrationISR, RISING);
 
  Serial.println("System Armed. Waiting for vibration...");
}
 
void loop() {
  if (vibrationDetected) {
    Serial.println("!!! IMPACT DETECTED !!!");
 
    // Visual feedback
    digitalWrite(LED_PIN, HIGH);
    delay(500);                 // Short pause to show the LED lit
    digitalWrite(LED_PIN, LOW);
 
    // Reset the flag so we can catch the next one
    vibrationDetected = false;
  }
 
  // Your main code can do other things here without missing the sensor trigger
}
 
// The Interrupt Service Routine (ISR) - Must be fast and short
void vibrationISR() {
  vibrationDetected = true;
}

Why use this method?

GXFM0459 (Ceramic Module)

The GXFM0459 is a standard alphanumeric SKU for an Analog Piezoelectric Ceramic Vibration Module. It is designed to detect mechanical stress (taps, knocks, or vibrations) and convert it into an electrical signal proportional to the impact strength.

GXFM0459 Technical Specifications

The module typically integrates a ceramic piezo disk with a basic buffering circuit on a small PCB.

ParameterValue
Operating Voltage3.3V to 5V DC
Working Current< 1mA
Output TypeAnalog voltage (and sometimes TTL Digital)
Operating Temperature-10 .. 70 °C

GXFM0459 Pinout and Connectivity

Most modules use a 3-pin or 4-pin header for easy integration with microcontrollers like Arduino.

GXFM0459 Key Features

Arduino - GXFM0459 Module Wiring Diagram

If your module has 4 pins, follow this standard setup:

Module PinArduino PinDescription
VCC / +5VPower supply for the module.
GND / -GNDGround connection.
A0 / SAnalog A0Raw signal for measuring vibration intensity.
D0 / LDigital D2(Optional) Threshold-based high/low trigger.

Arduino - GXFM0459 Example Code

This sketch monitors the analog value to detect the “strength” of a knock while also using the digital pin to trigger an alert instantly.

/* 
 * GXFM0459 Ceramic Vibration Sensor Example
 * Reads analog intensity and digital hit detection.
 */
 
const int ANALOG_PIN = A0;  // Connect to A0 for intensity
const int DIGITAL_PIN = 2;  // Connect to D2 for quick trigger
const int LED_PIN = 13;     // Built-in LED for feedback
 
void setup() {
  Serial.begin(115200);     // High baud rate for fast vibration data
  pinMode(DIGITAL_PIN, INPUT);
  pinMode(LED_PIN, OUTPUT);
 
  Serial.println("GXFM0459 Ready. Tap the sensor!");
}
 
void loop() {
  // 1. Read Analog Intensity (0-1023)
  int intensity = analogRead(ANALOG_PIN);
 
  // 2. Read Digital Trigger (0 or 1)
  bool hitDetected = digitalRead(DIGITAL_PIN);
 
  // Only print if there is actual movement to avoid flooding the monitor
  if (intensity > 5 || hitDetected == HIGH) {
    Serial.print("Intensity: ");
    Serial.print(intensity);
 
    if (hitDetected == HIGH) {
      Serial.println(" | *** DIGITAL TRIGGERED ***");
      digitalWrite(LED_PIN, HIGH); // Light up on hit
      delay(50);                   // Brief flash
      digitalWrite(LED_PIN, LOW);
    } else {
      Serial.println();
    }
  }
 
  delay(10); // Small delay for stability
}

Sensor topics on lamaPLC

PageDateTags
2026/02/12 22:14, , , , , , , , ,
2026/04/15 13:42, , , , , , , , ,
2026/04/11 14:50, , , , , , , , , ,
2026/04/15 16:59, , , , , , , , ,
2026/02/14 22:31, , , , , , , , , ,
2026/03/21 19:20, , , , , , ,
2026/02/15 20:33, , , , , , , , ,
2026/02/14 23:38, , , , , , , , , , , ,
2026/02/14 22:24, , , , , , , , , , , , ,
2026/03/28 22:50, , , , , , ,
2026/02/15 20:40, , , , , , , , , , , , , ,
2026/02/14 23:36, , , , , , , ,
2026/02/14 23:37, , , , , , , , , , ,
2026/02/14 22:40, , , , , , , , , ,
2026/02/14 22:39, , , , , , , , , , ,
2026/02/14 23:39, , , , , , , , , , , , ,
2026/02/14 22:16, , , , , , , , , , , , ,
2026/03/21 22:25, , , , , , , , , , ,
2026/02/14 22:55, , , , ,
2026/02/14 18:19, , , , , , , , , , ,
2026/02/15 20:42, , , , , , , , ,
2026/02/14 18:11, , , , , , , ,
2026/02/15 20:44, , , , , ,
2025/05/31 21:32, , , , , , , ,
2026/02/14 19:29, , , , , , , , , , , , , ,
2026/03/21 20:45, , , , , , , , ,
2023/07/01 15:29, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/14 22:18, , , , , , , , , , , , , , , , , , , ,
2026/03/22 00:26, , , , , , , , ,
2026/02/14 22:19, , , ,
2026/02/14 22:09, , , , , , , , , , , , , , , ,
2026/02/14 21:54, , , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/15 23:59, , , , , , , , , , ,
2026/03/28 18:02, , , , , , , , , , , , , , , , , , ,
2026/02/14 23:58, , , , , , , , , , ,
2026/02/14 23:35, , , , ,
2026/02/14 22:24, , , ,
2026/02/14 23:38, , , , , , ,
2026/02/14 17:38, , , , , , , , , ,
2026/02/15 17:35, , , , , , , , , , ,
2026/02/15 20:20, , , , , , , , , , , , , , , , , ,
2026/03/22 01:24, , , , , , , , , , , ,
2026/02/14 21:17, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/15 16:39, , , , , , , ,
2026/02/14 22:23, , , , , , , ,
2025/09/23 16:59, , , , ,
2026/02/14 17:42, , , , , , ,
2026/02/14 22:33, , , , , ,
2026/02/14 22:33, , , , , , , , , , ,
2026/02/15 20:27, , , , , , , , , , , , , , , ,
2026/02/15 20:29, , , , , , , , , , , , , ,
2026/02/15 22:34, , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/14 22:22, , , , , , , , , , , , ,
2023/06/24 22:43, , , , , ,
2026/02/14 22:21, , , , , , , , , , ,
2026/02/14 22:22, , , , , , , ,
2026/02/14 22:32, , , , ,
2026/02/14 23:00, , , , , , , , ,
2026/03/05 20:19, , , , , , , , , , , , , , , , ,
2026/02/14 17:49, , , , , ,
2025/12/10 17:50, , , ,
2025/11/09 17:38, , , , , , , ,

This page has been accessed for: Today: 1, Until now: 28