กลับไปหน้ารวมไฟล์
tilt-sensor-alarm-en.md

Motion Detection: The Tilt Sensor

The Tilt Sensor Alarm is a simple yet effective security project. It uses a small mechanical switch to detect when an object is moved or tilted, making it ideal for protecting discrete items or creating an earthquake detector.

button_led_basic_interaction_1772681969235.png

How It Works: The Mechanical Ball

Inside a standard tilt sensor (like the SW-520D), there is a small metal ball (or mercury in older models).

  1. Vertical: When the sensor is upright, the ball bridges two contacts, completing a circuit.
  2. Tilted: When tipped over 15-45 degrees, the ball moves away, breaking the circuit.
  3. The Trigger: The Arduino detects this digital "break" and triggers a buzzer or an LED instantly.

Components Needed

  • Arduino Uno/Nano: The logic brain.
  • SW-520D Tilt Sensor: The mechanical motion trigger.
  • Piezo Buzzer: For the alarm sound.
  • LED and 220-ohm Resistor: For visual alerts.

arduino_blink_header.png

Practical Use

This type of sensor is commonly found in industrial equipment (to detect if a machine has fallen) and in children's toys to trigger sound effects when the toy is picked up. It's a great introduction to digital inputs and mechanical switch logic.

ข้อมูล Frontmatter ดั้งเดิม

title: "Tilt Sensor Alarm"
description: "Detect motion instantly! Use a simple tilt switch and an Arduino to build a basic security alarm for jewelry boxes or valuable items."
category: "Security"
difficulty: "Easy"