Electronics

Tilt Mercury Switch Module KY-017

AED 5.25

1

Description

The KY-017 mercury Module switch is used to detect small inclinations of a large angle. A mercury switch (also known as a mercury tilt switch) is an electrical switch that opens and shuts a circuit using a small amount of liquid mercury.

Package Includes:

  • 1 x KY-017 mercury tilt switch sensor

Features:

  • Outputs logic is HIGH or LOW depending on how the module is tilted.
  • Built-in 10K pull-up resistor
  • LED indicates state
  • 3.3 and 5V compatible
  • The sensor is easy to interface with microcontrollers.
  • Cheap and reliable
  • It has a great durability rate.

Description:

In a glass container, this module contains a small amount of conductive liquid mercury. As the module is tilted, the ball of mercury rolls through the enclosure, making or breaking contact with switch electrodes. The contacts are open, and a 10K pull-up resistor pulls the output HIGH with the glass end of the module held low. When the module's glass end is elevated, the mercury shuts the connections, and the output is grounded and becomes LOW. When the output is set to LOW, an on-board LED illuminates.

Principle of Work:

 

Mercury touches two electrodes inside the glass bulb when the sensor is tipped backward, allowing current to pass between them. Mercury loses touch with one of the electrodes when the sensor is tipped forward, which causes the current to stop flowing.

 

Pinout of the Module:

Pin Name Description
(-) GND or Ground
middle Vcc which can be connected to 5 or 303v
S The output of the module which is digital Hiigh or Low

 

Applications: 

  • Robotics makes extensive use of it.
  • It can also be applied to automobiles.
  • to determine the direction.
  • to be aware of the desire.

Circuit:

Assemble the Tilt Sensor using the Arduino UNO by connecting an LED to pin 12 with a 220ohm resistor also the other Led same on pin 11 and connect the sensor to pin 10. Now, When the sensor is tilted forward, the red LED should turn on when you connect the tilt sensor and LEDs to the Arduino and upload the code. The green LED ought to come on when the sensor is turned backward:

 

 

Library:

 No Library is needed for this module to function

Code: 

 

 

int sensorPin = 10;
int forwardLED = 12;
int reverseLED = 11;

void setup() {
  pinMode(sensorPin, INPUT);
  pinMode(forwardLED, OUTPUT);
  pinMode(reverseLED, OUTPUT);
}

void loop() {
  int read = digitalRead(sensorPin);

  if (read == HIGH) {
    digitalWrite(forwardLED, HIGH);
    digitalWrite(reverseLED, LOW);
  }

  if (read == LOW) {
    digitalWrite(reverseLED, HIGH);
    digitalWrite(forwardLED, LOW);
  }
}

Technical Details:

  • The tilt sensor consists of 3 pins: GND, VCC, DO (Output Signal)
  • Operating Voltage: 3.3 V to 5 V
  • Maximum output current: 15mA

Resources:

Comparisons:

Switch-Based Tilt Sensors: These switch sensors determine if the system is slanted or not, as the name implies. Switch-based sensors are the most basic forms, having only two output states. The sensors can be divided into two more categories:
 
Switches with a metallic ball inside a cage are known as "ball in a cage structure switches" and they use a metal ball in place of mercury. The ball's design is extremely important since it must be resistant to stress and vibration. As a result, a solid, thick structure rather than a hollow one is employed.
 
Mercury Tilt Switch: When tilted, a mercury bead links the switch's terminals. These tilt switches are among the earliest varieties, and their response time is slow. Depending on how many contacts are utilized, mercury tilt switches come in SPST and SPDT varieties.
 Mercury, being a liquid metal can flow down and establish contact between the switch's leads. The blob of mercury is able to provide resistance to vibrations as mercury is a dense liquid metal. Using mercury is discouraged as it is a toxic metal and poses a potential hazard to the user when the glass casing breaks and metal spillage take place.