Tilt Sensor Vibration Alarm Vibration Switch Module for Arduino COM44, R36

Fr2,000

Tilt Sensor switch is an electronic device that detects the orientation of an object and gives its output High or Low accordingly. Basically, it has a mercury ball inside it which moves and makes the circuit. So tilt sensor can turn on or off the circuit based on the orientation.

In stock

SKU: SEN760 Category:

Description

Tilt Sensor switch is an electronic device that detects the orientation of an object and gives its output High or Low accordingly. Basically, it has a mercury ball inside it which moves and makes the circuit. So tilt sensor can turn on or off the circuit based on the orientation.

Description

Tilt Angle Module Vibration Sensor Module for Arduino STM32 AVR,Pic
Working Voltage: 3.3-12V
Use:
All kinds of products tilt, dumping trigger alarm, dumping power sensor, tilt sensor. (can only perceive the angle changed)
Module features:
1. Using high sensitive angle switch SW-520D as the sensor.
2. The comparator output, the signal is clean, the waveform is good, the driving ability is strong, more than 15mA.
3. Working voltage 3.3V-5V

Interfacing the module with arduino

To connect the module the arduinoas show in circuit below requires to connect its pins collectly to arduino repactively by connecting its Vcc to +5V, GND to GND and choose one between two data pins either Analog or digital.

circuit

 

After finishing to connect your sensor module and components to arduino as shown above, copy and paste the codes below to arduino IDE and upload it to microcontroler. when you try to incline your tilt sensor at any angle you may hear the buzzer sounding or see the LED lighting.

void setup() {
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, INPUT);

}

void loop() {
  if (digitalRead(4) == 1)
  {
  digitalWrite(2, HIGH);   
  digitalWrite(3, HIGH);
  delay(300);                       
  digitalWrite(2, LOW);    
  digitalWrite(3, LOW); 
  delay(300);  
  }

}