The SW-420 vibration sensor, manufactured by Arduino, is a compact and reliable device designed to detect and measure vibrations or oscillations in an object or environment. It is widely used in applications such as security systems, industrial monitoring, and automation. The sensor outputs a digital signal when vibrations exceed a certain threshold, making it ideal for detecting motion, impacts, or disturbances.
The SW-420 vibration sensor is designed for ease of use and integration into various electronic systems. Below are its key technical details:
Parameter | Specification |
---|---|
Operating Voltage | 3.3V to 5V DC |
Output Type | Digital (High/Low) |
Sensitivity Adjustment | Adjustable via onboard potentiometer |
Output Signal Voltage | 0V (Low) or Vcc (High) |
Dimensions | 32mm x 14mm x 10mm |
Operating Temperature | -40°C to +85°C |
The SW-420 vibration sensor module has three pins for easy interfacing:
Pin | Name | Description |
---|---|---|
1 | VCC | Connect to the positive supply voltage (3.3V–5V). |
2 | GND | Connect to the ground of the power supply. |
3 | OUT | Digital output pin. Outputs HIGH when vibration is detected. |
Below is an example of how to use the SW-420 vibration sensor with an Arduino UNO:
// SW-420 Vibration Sensor Example Code
// Connect the OUT pin of the sensor to Arduino digital pin 2
const int sensorPin = 2; // Pin connected to the sensor's OUT pin
const int ledPin = 13; // Built-in LED pin for visual feedback
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 sensorValue = digitalRead(sensorPin); // Read the sensor output
if (sensorValue == HIGH) {
// Vibration detected
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Vibration detected!");
} else {
// No vibration
digitalWrite(ledPin, LOW); // Turn off the LED
}
delay(100); // Small delay to stabilize readings
}
No Output Signal
False Triggers
Sensor Not Responding
Erratic Behavior
Q1: Can the SW-420 detect small vibrations?
A1: Yes, the sensitivity can be adjusted using the onboard potentiometer to detect small or large vibrations.
Q2: Is the SW-420 suitable for outdoor use?
A2: The sensor is not waterproof or weatherproof. For outdoor use, ensure it is enclosed in a protective casing.
Q3: Can I use the SW-420 with a 3.3V microcontroller?
A3: Yes, the sensor operates within a voltage range of 3.3V to 5V, making it compatible with 3.3V systems.
Q4: How do I know if the sensor is working?
A4: When vibrations are detected, the OUT pin will output a HIGH signal, which can be monitored using an LED or a microcontroller.
By following this documentation, you can effectively integrate the SW-420 vibration sensor into your projects and troubleshoot any issues that arise.