The SW-420 Vibration Sensor is a device designed to detect vibrations and shocks. It is commonly used in security systems, industrial applications, and various projects requiring motion detection. This sensor is highly sensitive and can detect even minor vibrations, making it ideal for applications where precise motion detection is crucial.
Parameter | Value |
---|---|
Operating Voltage | 3.3V - 5V |
Output Type | Digital (High/Low) |
Sensitivity | Adjustable via potentiometer |
Dimensions | 32mm x 14mm x 8mm |
Operating Temperature | -10°C to +70°C |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V - 5V) |
2 | GND | Ground |
3 | DO | Digital Output (High/Low) |
Arduino UNO SW-420 Vibration Sensor
----------- -----------------------
5V -> VCC
GND -> GND
Digital Pin 2 -> DO
// SW-420 Vibration Sensor Example Code
const int sensorPin = 2; // Pin connected to DO pin of SW-420
const int ledPin = 13; // Onboard LED pin
void setup() {
pinMode(sensorPin, INPUT); // Set sensor pin as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int sensorState = digitalRead(sensorPin); // Read sensor state
if (sensorState == HIGH) {
digitalWrite(ledPin, HIGH); // Turn on LED if vibration detected
Serial.println("Vibration Detected!");
} else {
digitalWrite(ledPin, LOW); // Turn off LED if no vibration
}
delay(100); // Small delay to debounce sensor
}
No Output Signal:
False Triggers:
Intermittent Output:
Q1: Can the SW-420 Vibration Sensor detect continuous vibrations?
Q2: How do I adjust the sensitivity of the sensor?
Q3: Can I use the SW-420 Vibration Sensor with a 3.3V microcontroller?
By following this documentation, users can effectively integrate the SW-420 Vibration Sensor into their projects, ensuring reliable motion detection and optimal performance.