In this Illustration we will going to wire the mercury switch module is a family of the tilt switching sensor, and it has an on-board LED as indicator as power status it can be used to build a simple circuit to produce tilt warning. The mercury tilt sensor interface has 3 pin the signal pin, ground pin and to voltage supply pin, if the signal pin detect a HIGH state the OUTPUT status will be HIGH.

Tilt-Sensor-Mecury-Module

Required Component

  • Arduino Board
  • Mercury Tilt Sensor
  • LED Any Color
  • Resistor
  • Jumper / DuPont Wires
  • Solder Less Bread Board

Wiring Diagram

Mercury-Tilt-Sensor-Module-Schematics-Diagram-Pinout-Schematics

Arduino Sketch

 

 

Wiring the Mercury Type Tilt Sensor
Facebooktwittergoogle_plusredditpinterestmail

5 thoughts on “Wiring the Mercury Type Tilt Sensor

  • at
    Permalink

    im a noob so probably wrong but the wiring diagram has 2 pin 13’s is that correct ?

    Reply
  • at
    Permalink

    int MyLed = 13 ;// Define MyLed interface 13 as OUTPUT
    int MyMercury = 3; // define the mercury tilt switch sensor interface
    Actually the diagram is wrong, Mercury should connected to pin digital pin3 on your Arduino and the output will be in the pin13.
    —————————————————————————————————
    See the code below the coe you can used this code as you can see instead using a
    relay change it to LED as the output.

    /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    14CORE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    TEST CODE FOR SOUND DETECTION SWITCH
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

    int MyRelay = 8; //Relay Module to drive the output device
    int MySensor = 9; // Sound Detection Sensor at pin 9
    boolean SensorState = false; // Detect the if its true or false

    void setup()
    {
    pinMode(MyRelay, OUTPUT); // Relay mode as output
    pinMode(MySensor, INPUT); // Sensor mode as input
    }

    void loop()
    {
    if (digitalRead(MySensor) == LOW) //If Sound sensor detect a sound
    //ll enabled the relay output
    {
    delay(100); //Delay as 1 micro second
    SensorState = !SensorState;
    digitalWrite(MyRelay, SensorState); //If Sound sensor detect a
    //und will enabled the relay output
    }
    }

    Reply
  • Pingback:Wiring the 14CORE 37 Sensors for Arduino & Raspberry Pi | 14Core.com

Leave a Reply

Your email address will not be published. Required fields are marked *