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.


Required Component

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

Wiring Diagram


Arduino Sketch



Wiring the Mercury Type Tilt Sensor

5 thoughts on “Wiring the Mercury Type Tilt Sensor

  • at

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

  • at

    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 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    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

  • Pingback:Wiring the 14CORE 37 Sensors for Arduino & Raspberry Pi |

Leave a Reply

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