SW-520D Ball Tilt Sensor Module for Angle and Vibration DetectionThe SW-520D Tilt Sensor module is a ball-switch angle and vibration detector. When the module is tilted past its trigger direction,…
The SW-520D Tilt Sensor module is a ball-switch angle and vibration detector. When the module is tilted past its trigger direction, the internal metal ball changes contact state, allowing a controller to detect orientation, shake, movement, or anti-tamper events.
The module provides a simple digital signal, making it easy to use in Arduino and robot projects. It is not a precision inclinometer; it is a reliable low-cost switch for detecting whether the board has crossed a mechanical tilt threshold.
Use it for wake-up triggers, fall detection demos, object orientation checks, toy interactions, and safety interlocks where a digital tilt state is enough.
| Parameter | Value |
|---|---|
| Sensor model | SW-520D ball tilt switch |
| Sensor type | Single-direction ball tilt / vibration switch |
| Output type | Digital switch signal |
| Typical trigger angle | About 10 degrees in the sensitive direction |
| Contact behavior | Ball contact opens or closes based on orientation |
| Operating voltage | 3.3 V / 5 V module use typical |
| Pinout | GND, VCC, S |
| Recommended input | Microcontroller digital GPIO |
| Measurement style | Tilt state, vibration, or movement event |
| Precision note | Not an absolute angle sensor |
| Development support | Arduino, ESP32, STM32, Raspberry Pi Pico GPIO |
Read the digital output from SW-520D Tilt Sensor and print its trigger state for threshold adjustment.
const int SENSOR_PIN = 2;void setup() { pinMode(SENSOR_PIN, INPUT); Serial.begin(115200);}void loop() { int state = digitalRead(SENSOR_PIN); Serial.println(state == LOW ? “triggered” : “normal”); delay(100);}
Mirror the sensor trigger to an LED, buzzer driver, or relay input.
const int SENSOR_PIN = 2;const int ALARM_PIN = 8;void setup() { pinMode(SENSOR_PIN, INPUT); pinMode(ALARM_PIN, OUTPUT);}void loop() { bool triggered = digitalRead(SENSOR_PIN) == LOW; digitalWrite(ALARM_PIN, triggered ? HIGH : LOW);}
Count stable trigger events with a debounce delay for tilt, temperature, or comparator modules.
const int SENSOR_PIN = 2;unsigned long events = 0;unsigned long lastEvent = 0;void setup() { pinMode(SENSOR_PIN, INPUT); Serial.begin(115200);}void loop() { if (digitalRead(SENSOR_PIN) == LOW && millis() – lastEvent > 300) { events++; lastEvent = millis(); Serial.println(events); }}
Q: Is it a precision angle sensor?
A: No. It is a digital tilt switch, not an accelerometer or inclinometer.
Q: Can it detect vibration?
A: Yes. Movement can cause repeated contact changes that firmware can count.
Q: Does orientation matter?
A: Yes. Test the trigger direction before mounting.
Q: Can it work with Arduino?
A: Yes. Read the signal pin with a digital input on an Arduino-compatible board or OpenELAB UNO R3 Intermediate Kit V2.
Q: Why does it bounce?
A: The metal ball contact is mechanical, so debounce logic is expected.
Q: Can it detect exact degrees?
A: No. Use an accelerometer for precise tilt angle measurement.
Q: Is it active-low?
A: Many module circuits output low on trigger, but verify with your board and code.
Q: Where is it useful?
A: Anti-tamper switches, toys, fall demos, wake triggers, and simple orientation detection.
We offer fast and reliable shipping worldwide. All orders are carefully packaged and shipped within 1–3 business days after payment confirmation.
Standard shipping, expedited shipping and express delivery options are available at checkout. Delivery time depends on your destination country and local logistics.
Only logged in customers who have purchased this product may leave a review.
Add Related products to weekly line up
Special Ofers For Subscribers