πŸŽ‰
ESPBoards Store is Now Open! Find the best ESP32, ESP8266 boards & accessories

KY-017 Mercury Tilt Switch Module

KY-017 Mercury Tilt Switch Module image

View on Amazon

Overview

The KY-017 is a mercury tilt switch module that detects changes in orientation. When tilted beyond a certain angle, the internal mercury switch closes, sending a digital signal. It's suitable for projects requiring simple tilt or motion detection.

About KY-017 Mercury Tilt Switch Module

The KY-017 Mercury Tilt Switch Module is a sensor that detects tilt or inclination. It contains a mercury switch that closes the circuit when tilted to a certain angle, allowing current to flow. This module operates at a voltage range of 3.3V to 5.5V and provides a digital output signal. It’s commonly used in applications such as tilt detection, motion sensing, and orientation monitoring.

Where to Buy

Get Your KY-017

KY-017 Mercury Tilt Switch Module

Starting from

1$ per unit

Amazon com
Amazon.com Ships worldwide
Amazon de
Amazon.de Ships to EU
Aliexpress
AliExpress Best value option

πŸ’‘ Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.

Technical Specs

KY-017 Specifications

Complete technical specification details for KY-017 Mercury Tilt Switch Module

πŸ“Š Technical Parameters

Operating Voltage 3.3V - 5.5V
Output Type Digital
Dimensions 31 x 15 x 8 mm
Weight 2 g
Pin Configuration

KY-017 Pinout

The **KY-017** is a 3-pin mercury tilt switch sensor module:

Visual Pinout Diagram

Pinout Diagram Primary
KY-017 Mercury Tilt Switch Module pinout
3
Total Pins

Pin Types

Power
2
Communication
1

Quick Tips

πŸ”Œ

**Interface**: Digital output (tilt/orientation detection),⚠️ **Sensor**: Mercury switch (handle with care - contains mercury)

🎯

**Detection**: Circuit closes when tilted beyond threshold angle,⚑ **Power**: 3.3V to 5.5V operation

πŸ’‘

**Operation**: Simple binary tilt detection (on/off),🎯 **Applications**: Tilt detection, orientation sensing, motion alarms, anti-theft

Pin Descriptions

Pin NameTypeDescriptionNotes
1 Pin (-)
Power

Ground connection

2 Pin (middle)
Power

Power supply

3.3V to 5.5V

3 Pin (S)
Communication

Digital signal output

Changes state when tilted

Connection Guide

Wiring KY-017 to ESP32

To interface the **KY-017** with an **ESP32** for tilt detection:

Visual Wiring Diagram

Wiring Diagram Recommended
KY-017 Mercury Tilt Switch Module wiring with ESP32
3
Connections

Connection Status

Required
3

Protocol

Digital

Pin Connections

KY-017 PinConnectionESP32 PinDescription
1 Pin (-) Required
GND

Ground

2 Pin (middle) Required
3.3V or 5V

Power supply

3 Pin (S) Required
GPIO4

Digital input (any GPIO)

πŸ’‘

**GPIO Selection**: Any digital GPIO pin works, GPIO4 is just an example

⚑

**Voltage**: Use 3.3V for ESP32 compatibility

⚠️

**Safety**: Mercury switch - handle carefully, avoid breaking

🎯

**Binary Output**: Simple HIGH/LOW state based on tilt angle

Help & Support

KY-017 Troubleshooting

Common issues and solutions to help you get your sensor working

Common Issues

Debugging Tips

Code Examples

KY-017 Programming Examples

Ready-to-use code examples for different platforms and frameworks

Summary

Wrapping Up KY-017

The ESP32 KY-017 Mercury Tilt Switch Module is a powerful KY-0xx module sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.

Best Practices

For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.

Safety First

Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.

Ready to Start Building?

Now that you have all the information you need, it's time to integrate the KY-017 into your ESP32 project and bring your ideas to life!