KY017 Mercury Tilt Switch module
The KY-017 Mercury Tilt Switch Module is a simple yet effective sensor designed to detect tilt, angle changes, and motion in electronic projects. The module is built around a sealed glass mercury switch that contains a small amount of liquid mercury. When the sensor is tilted beyond a certain angle, the mercury flows inside the capsule, closing the electrical circuit and sending a signal output to the connected microcontroller.
This module provides reliable motion detection and is widely used in DIY electronics, robotics, and automation projects. It can detect orientation changes of objects and trigger specific actions such as turning on lights, sounding alarms, or activating motors. The KY-017 is highly compatible with development platforms like Arduino, Raspberry Pi, and ESP32, making it a great tool for both hobbyists and professionals. Its compact size, easy wiring, and low power consumption make it an ideal choice for portable and embedded systems.
How It Works
The KY-017 Mercury Tilt Switch works on the principle of liquid mercury conductivity. Inside the sensor’s glass tube, mercury acts as a conductive element. When the module is in a horizontal position, the mercury moves to complete the circuit, allowing current to flow. When tilted beyond a certain angle, the mercury shifts away, breaking the circuit and producing an open signal.
The module provides a digital output that can be read directly by microcontrollers. This simple ON/OFF response makes it useful for detecting basic movement or changes in orientation. It can act as a trigger for alarms, motion-activated systems, or even game controllers.
Key Features
Simple and cost-effective tilt detection module
Uses a sealed glass mercury switch for reliable performance
Digital ON/OFF signal output
Long lifespan with stable switching operation
Low power consumption
Compact PCB design for easy integration
Compatible with Arduino, Raspberry Pi, ESP32, and other microcontrollers
Specifications
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V – 5V DC |
| Output Signal | Digital (ON/OFF) |
| Sensor Type | Mercury tilt switch |
| Module Dimensions | Approx. 30 mm × 15 mm |
| Operating Angle | Detects tilt beyond threshold |
| Compatibility | Arduino, Raspberry Pi, ESP32 |
Pin Configuration
| Pin Label | Description |
|---|---|
| VCC | Power supply (3.3–5V) – |
| GND | Ground |
| D0 | Digital output signal |
Applications
Motion and orientation detection systems
Tilt-sensitive alarms and security devices
Position monitoring in robotics
Gaming and interactive controllers
Automatic lighting based on tilt or movement
Industrial machines requiring orientation sensing




























