Mercury Switch Module KY-017

Mercury Switch Module KY-017

Components
DET567
Part.No: KY-017
€2.75
In Stock
Immediate Dispatch
KY-017 Mercury Tilt Switch Module — 3-pin digital output sensor (3.3V–5.5V) compatible with Arduino, ESP32 and Raspberry Pi. Detects tilt and orientation changes using a sealed mercury capsule. Part of the popular 37-in-1 sensor kit.

 

The KY-017 Mercury Tilt Switch Module (MPN: KY-017) is a compact, 3-pin digital sensor that detects tilt and orientation changes using a sealed glass mercury capsule. When the module is level, the liquid mercury bridges the two internal contact points, closing the circuit and pulling the signal pin HIGH. When tilted beyond its threshold angle, the mercury flows away from the contacts, opening the circuit and driving the signal LOW. This simple, passive mechanism makes the KY-017 ideal for detecting basic movement, orientation, or position changes without any complex signal processing.

Key Features

  • Mercury Tilt Detection: Uses a sealed glass mercury switch — provides reliable ON/OFF response to tilt without moving mechanical parts exposed to the environment → long service life under normal conditions
  • Digital Output: Outputs a clean HIGH/LOW signal readable directly by any microcontroller GPIO pin → no ADC or special library needed
  • Wide Supply Voltage: Operates from 3.3V to 5.5V → compatible with both 5V Arduino boards and 3.3V platforms like ESP32 and Raspberry Pi
  • Ultra-Low Current Draw: Only 0.3 mA working current → negligible impact on battery-powered projects
  • 3-Pin Interface: Standard GND / VCC / Signal pinout → plug-and-play with Arduino sensor shields and 37-in-1 kits

Pinout & Wiring

PinSymbolDescription
Pin 1GND (−)Connect to ground of your microcontroller board
Pin 2VCCConnect to 3.3V or 5V supply rail
Pin 3S (Signal)Digital output — read with any digital GPIO pin

Wiring note: Connect S to a digital input pin (e.g. Arduino pin 2 or 3 for interrupt-driven detection). Use pinMode(pin, INPUT) and read with digitalRead(pin). No pull-up resistor is required as the module includes onboard circuitry.

Compatibility

  • Arduino UNO / Nano / Mega (5V): Connect VCC to 5V — fully compatible; read S directly on any digital pin.
  • ESP32 / ESP8266 (3.3V): Connect VCC to 3.3V — operating voltage range confirmed; do not connect S directly to 5V-only pins.
  • Raspberry Pi (3.3V GPIO): Connect VCC to 3.3V pin; read S via any GPIO input pin.

Typical Applications

  • Tilt alarms & anti-tamper systems: Detect if an enclosure or device has been moved or tilted — ideal for security boxes and equipment monitoring.
  • Orientation-triggered events: Change an LED colour, play a sound, or switch a relay based on module angle — great for interactive art and education projects.
  • Shake & gesture detection: Combine with a timer to detect repeated tilting (shaking) for simple gesture input in maker projects.
  • Level indicator systems: Use as a basic electronic spirit level to warn when a surface deviates from horizontal.
  • Arduino & ESP32 learning kits: Standard component in 37-in-1 sensor kits — perfect for students learning digital input, interrupts and sensor integration.

Technical Specifications

InterfaceDigital Output
Operating Voltage3.3V – 5.5V
Working Current0.3 mA
Number of Pins3 (GND, VCC, Signal)
MPNKY-017

FAQ

Q: Does the KY-017 output HIGH or LOW when flat (level)?
A: When the module is level, the mercury bridges the internal contacts (circuit closed) and the signal output is HIGH. When tilted, the mercury moves away and the output goes LOW.

Q: Is the mercury capsule safe to handle?
A: The mercury is sealed inside a glass capsule under normal conditions. Avoid dropping or breaking the module. Handle with care and dispose of according to local regulations for hazardous materials.

Package Contents: 1 × KY-017 Mercury Tilt Switch Module

Warning: This module contains a small sealed glass capsule with liquid mercury. Do not break or crush the capsule. Keep away from children. Dispose of responsibly in accordance with local environmental regulations for hazardous waste.
16 other products in the same category:
Product added to wishlist
Product added to compare.