





- Stock: In Stock
- Model: T837.SW-520D
SW-520D Tilt Sensor Module Switch 🌐
The SW-520D Tilt Sensor Module is a compact, reliable angle/tilt detection solution for Arduino, Raspberry Pi, and other microcontroller platforms. It uses a rolling-ball SW-520D tilt switch and an on-board LM393 comparator to provide a clean, logic-level digital output for motion, orientation, and anti-tamper applications in your electronics projects and modules.
How It Works 🔍
Inside the SW-520D are conductive balls that make or break contact depending on orientation:
Upright position: balls contact the electrodes, the switch closes.
- Tilted past a threshold: balls separate, the switch opens.
The on-board LM393 comparator converts this behavior into a stable digital signal. The trip point is adjustable via the on-board potentiometer (threshold tuning), and status LEDs indicate power and output state.
Key Features ✅
- Uses the highly sensitive SW-520D tilt switch as the angle sensor.
- On-board LM393 comparator provides a clean, well-defined output signal.
- Digital output (DO): logic 0/1, suitable for direct connection to a microcontroller.
- Adjustable threshold via potentiometer for sensitivity tuning.
- Comparator output drive capability: > 15 mA (open-collector sink).
- Wide working voltage: 3.3 V–5 V (ideal for Arduino, Raspberry Pi, ESP32, etc.).
- Integrated status LEDs for quick visual diagnostics.
- Compact PCB: 3.2 cm × 1.4 cm with a fixed mounting hole for easy installation.
Electrical Behavior ⚡
- When the angle switch is OFF (tilted/open): DO = HIGH.
- When the angle switch is ON (upright/closed): DO = LOW.
- Output topology: LM393 open-collector with onboard pull-up (logic-ready).
Pinout & Wiring 🔌
- VCC: 3.3 V–5 V
- GND: Ground
- DO: Digital output to a microcontroller GPIO
Connect DO to a digital input on your Arduino, Raspberry Pi, or other microcontroller module. Monitor the pin for HIGH/LOW to detect tilt events. For detailed wiring, refer to the wiring diagram below.
Typical Applications 💡
- Device orientation and tilt detection
- Anti-tamper and motion alarms
- Automatic power cut-off on excessive tilt
- Robotics, toys, and DIY electronics components projects
Driving External Loads 🧰
The comparator can sink over 15 mA, suitable for LEDs and logic inputs. To switch larger loads, connect the module’s DO to a relay module or drive a relay/transistor stage. This enables a high-power tilt-activated switch for protecting electrical equipment by cutting power at a set angle.
Compatibility 🤝
- Works with Arduino, Raspberry Pi, ESP32, STM32, and most 3.3 V/5 V microcontrollers.
- Ideal for breadboards, prototyping, and embedded electronics modules.
Specifications 📐
- Sensor: SW-520D ball tilt switch
- Comparator: LM393 (wide-voltage)
- Supply Voltage: 3.3 V–5 V
- Output: Digital (0/1), open-collector with pull-up
- Output Drive: > 15 mA sink capability
- Indicators: Power LED, Output/Status LED
- Mounting: Fixed bolt/mounting hole
- PCB Size: 3.2 cm × 1.4 cm
Note: Adjust the potentiometer to set the desired tilt activation threshold. For best results, mechanically mount the board so the sensor’s “upright” orientation matches your application’s reference position.