• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Tilt Switch Interfacing Circuit with Arduino Uno

Tilt Switch Interfacing Circuit with Arduino Uno

Last updated on 24 June 2026 by Admin-Lavi Leave a Comment

The tilt sensor acts like a small switch and changes its state when we tilt or move it; it also detects direction, movement and vibration.

Here we used Arduino Uno with tilt sensor, buzzer and one LED and when sensor tilt, Arduino see it and then Arduino make buzzer ON and LED ON.

Arduino Code:

int tiltPin = 2;
int buzzer = 3;
int led = 4;
int tiltState = 0;

void setup() {
pinMode(tiltPin, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(led, OUTPUT);
}

void loop() {
tiltState = digitalRead(tiltPin);
if (tiltState == HIGH) {
digitalWrite(buzzer, HIGH);
digitalWrite(led, HIGH);
} else {
digitalWrite(buzzer, LOW);
digitalWrite(led, LOW);
}
}

Coding Explanation:

  • Tilt sensor pin connected to digital pin 2.
  • Buzzer to pin 3 and LED to pin 4.
  • Setup define input output pins.
  • Loop read sensor value.
  • If sensor state is HIGH then buzzer and LED is ON.
  • Else buzzer and LED is OFF.

Circuit Working:

Tilt Switch Interfacing Circuit Diagram with Arduino Uno

Parts List:

ComponentsQuantity
Resistors
220Ω 1/4 watt1
Semiconductors
Arduino UNO1
Tilt Sensor Module1
Buzzer 5V1
LED any color1

In the above circuit diagram we have connected Tilt sensor with Arduino UNO and also we have control LED and buzzer by sensor output.

When sensor gets tilt alarm turns ON and then LED and buzzer both are ON.

The tilt sensor remains open or closed depending on its position, when the sensor tilts, it sends a digital HIGH or LOW signal to Arduino pin 2.

Arduino checks this signal and when it detects a tilt, it sends a HIGH signal to pins 3 and 4, this action turns ON the buzzer and LED

When it is not tilt then Arduino send LOW and buzzer and LED is OFF.

Formulas with Calculations:

Formula for Tilt Switch Interfacing Circuit is:

Current for LED = V/R

Arduino supplies 5V, the LED drops approximately 2V and the circuit uses a 220Ω resistor.

So current = (5 – 2) / 220 = 13.6 mA approx.

Safe for LED and Arduino pin, buzzer also runs on 5V from Arduino pin and current under 20 mA is safe.

Therefore, an Arduino digital pin can supply up to 40 mA, but designers recommend limiting the current to 20 mA.

How to Build:

To build a Tilt Switch Interfacing Circuit with Arduino Uno follow the below steps:

  • First, gather all the parts as shown in circuit diagram.
  • Next, Arduino 5V pin connect to sensor VCC pin.
  • After that, Arduino GND pin connect to sensor GND pin.
  • Then Arduino digital pin 2 connect to sensor signal pin.
  • Now Arduino digital pin 3 connect to buzzer positive pin.
  • Also, buzzer negative pin connect to GND.
  • Further, connect Arduino digital pin 4 to LED anode pin through resistor 220 ohm and connect LED cathode to GND.

Conclusion:

To conclude, Tilt Switch Interfacing Circuit with Arduino Uno is simple project; it detect tilt motion and gives alarm.

Moreover, its useful for anti theft alarm, orientation detection, vibration alert and also circuit is easy to build and it code are simple.

Filed Under: Arduino Projects, Automation Circuits, Mini Projects, Security and Protection, Sensors and Detectors

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « Interfacing Hall Effect Magnetic Sensor Circuit with Arduino
Next Post: Whistle Controlled Light Circuit using Arduino »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • 555 Timer Projects (137)
  • Alarm Circuits (81)
  • Amplifier Circuits (94)
  • Arduino Projects (103)
  • Audio Circuits (189)
  • Automation Circuits (150)
  • Automobile Circuits (40)
  • Battery Charger Circuits (88)
  • DIY Projects (435)
  • Free Energy (12)
  • Heater and Temperature Controllers (32)
  • High Voltage (24)
  • Hobby Circuits (241)
  • Indicator Circuits (63)
  • Inverter Circuits (17)
  • IoT projects (12)
  • LDR Circuits (47)
  • LED and Lamps (201)
  • Meters and Testers (44)
  • Mini Projects (390)
  • Motor Controllers (26)
  • Oscillator Circuits (70)
  • Power Supply Circuits (244)
  • Radio Frequency (8)
  • Remote Control Circuits (12)
  • Renewable energy (20)
  • Security and Protection (128)
  • Sensors and Detectors (236)
  • Solar Circuits (31)
  • Timer Circuits (63)
  • Transistor Circuits (178)
  • Transmitter Circuit (19)
  • Tutorials (33)
  • Voltage Regulator (55)
  • Water Level Controller (10)

Recent Posts

  • Low Current Controlled Battery Charger Circuit using LM723 IC
  • 741 Op-Amp Treble Booster Circuit
  • Simple Diode and Transistor Based Audio Limiter Circuit
  • Simple 500mW Speaker Driver Circuit
  • Easy DIY LM386 Audio Amplifier Circuit

Recent Comments

  1. Admin-Lavi on High Voltage Fence Charger Circuit
  2. etere on High Voltage Fence Charger Circuit
  3. Admin-Lavi on High Voltage Fence Charger Circuit
  4. egidio grzinic on High Voltage Fence Charger Circuit
  5. Logic OR Gate Circuit using Transistors - Circuit Ideas for You on Automatic Street Light Circuit using LDR

Copyright © 2026 | New Circuit Ideas