Stufin
Home Quick Cart Profile

Tilt Sensor Module

Buy Now on Stufin

Sensor Type

Accelerometer or Tilt Sensor

Measurement Range

Typically 30 to 360

Resolution

0.1 to 1

Output Type

Analog (Voltage or Current) or Digital (I2C, SPI, or UART)

Supply Voltage

3.3V or 5V

Current Consumption

<10mA

Operating Temperature

-20C to 80C

Dimensions

Typically 10mm x 10mm x 5mm

Applications

The Tilt Sensor Module is suitable for a wide range of applications, including

Robotics and automation systems

Industrial control systems

IoT devices (e.g., smart home systems, wearables)

Medical devices (e.g., patient monitoring systems)

Aerospace and defense systems

Gaming and simulation systems

Conclusion

The Tilt Sensor Module is a versatile and accurate component for measuring tilt angles in a wide range of applications. Its low power consumption, compact design, and simple interface make it an ideal choice for IoT and other applications where size and power efficiency are critical.

Pin Configuration

  • Tilt Sensor Module Documentation
  • The Tilt Sensor Module is a compact and versatile sensor designed to detect tilt angles and orientations. This module is commonly used in various IoT applications, such as robotics, automation, and motion detection systems.
  • Pin Configuration:
  • The Tilt Sensor Module has a total of 4 pins, which are labeled as follows:
  • Pin 1: VCC
  • Function: Power Supply
  • Description: This pin is used to supply power to the module. Typically, a voltage range of 3.3V to 5V is recommended.
  • Connection: Connect to a power source, such as a battery or a voltage regulator output.
  • Pin 2: GND
  • Function: Ground
  • Description: This pin is used as a reference ground for the module.
  • Connection: Connect to the ground of the power source or the circuit's ground.
  • Pin 3: OUT
  • Function: Output Signal
  • Description: This pin provides a digital output signal indicating the tilt status of the sensor. The output is usually an open-drain transistor output, which can be connected to a microcontroller or other digital logic circuits.
  • Connection:
  • + Connect to a pull-up resistor (e.g., 10k) to a positive voltage supply (VCC) if not using an internal pull-up resistor.
  • + Connect to a digital input pin of a microcontroller or other digital logic circuits.
  • Pin 4: NC
  • Function: No Connection
  • Description: This pin is not connected internally and should be left unconnected.
  • Connection Structure:
  • To connect the Tilt Sensor Module to a microcontroller or other digital logic circuits, follow this structure:
  • VCC (Pin 1) Power Source (e.g., Battery or Voltage Regulator Output)
  • GND (Pin 2) Ground (e.g., Power Source Ground or Circuit Ground)
  • OUT (Pin 3) Pull-up Resistor (e.g., 10k) VCC
  • OUT (Pin 3) Digital Input Pin of Microcontroller or Digital Logic Circuits
  • NC (Pin 4) Leave Unconnected
  • Note:
  • Ensure proper voltage supply and grounding to avoid damage to the module.
  • Use a suitable pull-up resistor value based on the specific microcontroller or digital logic circuit's input impedance.
  • Consult the datasheet for specific operating conditions, temperature range, and tilt sensitivity for your particular Tilt Sensor Module.

Code Examples

Tilt Sensor Module Documentation
Overview
The Tilt Sensor Module is a digital tilt angle sensor that measures the inclination of an object or surface. It is commonly used in IoT applications such as robotics, automation, and motion detection. This module provides a digital output indicating the tilt angle, making it easy to interface with microcontrollers and other devices.
Technical Specifications
Supply Voltage: 3.3V - 5V
 Output: Digital (0V or VCC)
 Sensitivity: 10 - 80 (adjustable)
 Accuracy: 5
 Response Time: 10ms
Pinout
VCC: Power supply (3.3V - 5V)
 GND: Ground
 OUT: Digital output (0V or VCC)
Example 1: Basic Tilt Detection with Arduino
This example demonstrates how to use the Tilt Sensor Module with an Arduino board to detect tilts.
```cpp
const int tiltPin = 2;  // Connect the OUT pin of the tilt sensor to digital pin 2 of the Arduino
void setup() {
  pinMode(tiltPin, INPUT);
  Serial.begin(9600);
}
void loop() {
  int tiltState = digitalRead(tiltPin);
  if (tiltState == HIGH) {
    Serial.println("Tilt detected!");
  } else {
    Serial.println("No tilt detected.");
  }
  delay(50);
}
```
Example 2: Using the Tilt Sensor with Raspberry Pi (Python)
This example shows how to use the Tilt Sensor Module with a Raspberry Pi to control an LED based on the tilt angle.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
tilt_pin = 17  # Connect the OUT pin of the tilt sensor to GPIO 17 of the Raspberry Pi
led_pin = 23  # Connect an LED to GPIO 23 of the Raspberry Pi
GPIO.setup(tilt_pin, GPIO.IN)
GPIO.setup(led_pin, GPIO.OUT)
while True:
    tilt_state = GPIO.input(tilt_pin)
    if tilt_state:
        GPIO.output(led_pin, GPIO.HIGH)
        print("Tilt detected! LED on.")
    else:
        GPIO.output(led_pin, GPIO.LOW)
        print("No tilt detected. LED off.")
    time.sleep(0.5)
```
Example 3: Using the Tilt Sensor with ESP32 (MicroPython)
This example demonstrates how to use the Tilt Sensor Module with an ESP32 board to send tilt detection data to a web server.
```python
import machine
import urequests
tilt_pin = machine.Pin(15, machine.Pin.IN)  # Connect the OUT pin of the tilt sensor to GPIO 15 of the ESP32
while True:
    tilt_state = tilt_pin.value()
    if tilt_state:
        print("Tilt detected!")
        urequests.post("http://example.com/tilt_detected", data="tilt_detected=true")
    else:
        print("No tilt detected.")
        urequests.post("http://example.com/tilt_detected", data="tilt_detected=false")
    machine.sleep(0.5)
```
Note: In all examples, ensure that the tilt sensor module is properly connected to the microcontroller or single-board computer according to the pinout specifications.