Tilt Alarm with the SW-520D Ball Switch

Tilt Alarm with the SW-520D Ball Switch

The SW-520D is a ball-type tilt and vibration switch, not a mercury switch. A conductive ball moves inside and opens or closes the contact with orientation and vibration.

Wiring

Read the switch with an internal or external pull-up, or use a breakout that includes a comparator. Check whether the module output is active-high or active-low because boards differ.

Programming

Apply time debouncing and require a stable state before driving an LED or buzzer. It is not an angle sensor; its trigger orientation depends on mounting and vibration.

Use

It suits approximate tilt/opening alarms and simple shock detection. Use a calibrated accelerometer for quantitative angle or motion measurement.

Engineering review: verify the library version, module operating voltage, and the actual board pinout before wiring; visually similar breakout boards can differ.

اترك تعليقا

*
*
يمكن للأعضاء المسجلين فقط ترك تعليقات.