AED 5.25
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: