All About Tilt Switches

What is Tilt Switch?

Tilt switches are instruments that can detect orientation or inclination. They are digital sensors which only turn on/off by tilting to one side and the other. As Adafruit stated, tilt switches are “poorman’s accelerometer”, meaning they are inexpensive, small, low-power, and easy-to-use. Since tilt switches are digital sensors, they are not as complex as accelerometer which can detect more motion and orientation. But the simplicity makes them quite popular for toys, gadget, and other appliances.

They are usually made in cylindrical shape (although not always) with a conductive free mass inside, such as a blob of mercury or one or more rolling balls inside. Inside the cavity, there are two conductive poles functioned as the switch. When the sensor is oriented so that that end is downwards, the mass rolls onto the poles and shorts them, acting as a switch throw.


How It Works

Tilt switches are easy to use since the mechanism is very simple. Inside the cavity, when the sensors are tilted towards at the end of the tube, the ball will touch the conductive pole and makes the switch to turn on. This schematic applies to most type of tilt switches. Even though the sensitivity might depends on the length and materials of the sensors.

Tilt Scheme


Types of Tilt Switches

There are numerous type of tilt switches. The most common one is the tilt ball switch. In the past, they used to be made of mercury since it the blob is dense enough that it doesn’t bounce and so the switch isn’t susceptible to vibrations. But mercury is very hazardous because it is extremely toxic.


Tilt Mercury Switch

Tilt switches used to be made from mercury. This switch opens and closes the circuit as the mercury blob touches the electrical pole. There are several designs including the length of the tube, but they all work the same. The tube may contains air, inert gas, or vacuum. When the switch is tilted in the appropriate direction, the blob touches the pole and closes the circuit. Tilting it in the opposite direction which moves the blob away to the poles will open the circuit.

Nowadays, the mercury switches are rare to find since it’s a poisonous heavy metal. It must be treated as hazardous waste for disposal. That way, using tilt ball switch is environmentally safe.

The Datasheet

  • Maximum included Angle: 11º
  • Max Switching Voltage: 240V
  • Max Switching Current: 120VAC / 7A, 240VAC / 5A : 120VDC / 5A, 240VDC / 4A : Tungsten 240V / 700W: 0.33HP / 480VAC, 0.25HP / 240 VDC
  • Initial Contact Resistance (Max): 3 milli Ohms
  • Stand Off Voltage (contact to contact) (contact to ground): 1500V, 5000V
  • Operating Temperature: -38º to 220ºF / -38º to 105ºC
  • Storage Temperature: -40º to 356ºF / -40º to 180º C
  • Typical number of operations at specified load: 10,000,000
  • G-Force Activation G-Level/Range: N/A


Tilt Ball Switch

Tilt ball switches work exactly like mercury switches which will close the circuit when the ball inside the tube touches the pole. The difference is just the material of the balls are safe and not toxic.

The Datasheet

  • Maximum switch rating: <6mA 24VDC
  • Electrical life endurance: >50000 cycles
  • Contact Resistance: 2Ω (measured at 45° tilt)
  • Differential angle: 30° max.
  • Operation temperature: 0°C ~ 100°C
  • Soldering Temperature: 250°C, 3 seconds (Can be soldered by hand only.)
  • Switch housing: Copper coated with nickel (10μ)
  • Terminal: Brass coated with nickel
  • Rolling ball: Brass coated with nickel, Ball weighted 0.25g


Vibration Switch

The spring-vibration switches, or just vibration switches, are high sensitivity non-directional vibration induced trigger switches. Inside is a very soft spring coiled around a long metal pin. When the switch is moved, the spring touches the center pole to make contact. So, when there’s motion, the two pins will act like a closed switch. When everything is still, the switch is open.

There are three types of vibration switches: slow, medium, and fast. Slow vibration switches are hard to be triggered, while the fast switches are easy to be triggered.

From left to right: slow, medium, fast
Soft Spring Inside Vibration Switch


  • Maximum Voltage: 12V
  • Contact Resistance: <10 ohm
  • Contact Time: 2 ms
  • Maximum Current: 20mA
  • Insulation Resistance: >10M ohm
  • Temperature Range: -40 to 80ºC
  • Operating lifespan: 100,000 cycles
  • Diameter: 5mm/0.2″
  • Height (w/ pins): 21mm/0.8″
  • Height (w/o pins): 11mm/0.4″
  • Weight: 0.30g



  • Maximum Operating Temperature: 260°C ± 10°C
  • Contact Time: 2 – 2.5ms
  • Diameter: 5mm / 0.2″
  • Height (w/ pins): 23mm / 0.9″
  • Height (w/o pins): 11mm / 0.4″
  • Weight: 0.2g



  • Maximum Voltage: 12V
  • Contact Resistance: <10 ohm
  • Contact Time: 2 ms
  • Maximum Current: 20mA
  • Insulation Resistance: >10M ohm
  • Temperature Range: -40 to 80ºC
  • Operating lifespan: 100,000 cycles
  • Diameter: 5mm/0.2″
  • Height (w/ pins): 25mm/1″
  • Height (w/o pins): 15mm/0.6″
  • Weight: 0.3g


Example Uses

Tilt Ball and Mercury Switches

Even though tilt ball and mercury switches work similarly, but as you can see from the video above, they have different sensitivity. The ball switch is more bouncy, meaning it’s more sensitive than the mercury switch. The mercury switch is made from mercury blob which are dense enough that it is less bouncy than the ball switch. For both tilt ball and mercury switches are still bouncy. That way, to make it more stable you might want to do debouncing.


Vibration Switches

The slow vibration switch is the hardest to be triggered, meanwhile the fast vibration switch is the easiest to be triggered. Each vibration switch has different sensitivity. So, the usage of them might be depend on how hard the interaction would be. If you need to trigger the switch with hard shake, you might consider using the slow vibration switch. But the slow vibration is almost impossible (very hard) to be triggered. The fast vibration switch is too sensitive. And the medium vibration switch is just right. But again, it depends on how do you want to interact with it.


Tilt Mercury and Ball Switches

This clock uses a tilt sensor to set the alarm. To snooze, tilt it over.


Vibration Switches

Source: Shake Up a Gift Box


Strengths and Weaknesses

Tilt Mercury Switches


  • Cheap
  • Even a small drop of mercury has low resistance, so switches can carry useful amounts of current in a small size
  • Sensitivity of the drop to gravity provides a unique sensing function, and lends itself to simple, low-force mechanisms for manual or automatic operation
  • The switches are quiet, as no contacts abruptly snap together
  • The mass of the moving mercury drop provides an over center effect to avoid chattering as the switch tilts
  • Use low power
  • Easy-to-use


  • Toxic
  • Their relatively slow operating rate (due to the inertia of the mercury drop) makes them unsuitable for applications that require many operating cycles per second
  • Glass envelopes and wire electrodes may be fragile and require flexible leads to prevent damage to the envelope
  • The mercury drop forms a common electrode, so circuits are not isolated from each other in a multi-pole switch
  • Their sensitivity to gravity may make them unsuitable in portable or mobile devices that can change orientation or vibrate


Tilt Ball Switches


  • Cheap
  • Safe
  • Small in size, very usable for wearable, toys, gadgets, and appliances
  • Easy-to-use
  • Use low power


  • More bouncy than mercury switches, that way to make it more stable use debouncing
  • Noisy, since there are one or more conductive balls inside
  • Similar to mercury switches, it’s not suitable for vibration applications


Vibration Switches


  • Cheap
  • Small, very usable for wearables, toys, and small gadgets
  • Come with three different types, depends on how hard the interaction would be
  • Easy-to-use
  • Use low-power


  • The slow vibration switch is almost impossible to be triggered just from the shaking, meanwhile the fast vibration is too sensitive
  • Need to be soldered or wire up perfectly, since the metal pins are soft


Example Circuit Schematic

Example Microcontroller Code

void setup() {
  pinMode(3, INPUT); // Digital input from sensor
  pinMode(5, OUTPUT); // Digital output to LED

void loop() {
  int sensorValue = digitalRead(3); // Reading value from sensor
  if (sensorValue == 1) {
    digitalWrite(5, HIGH); // Turn on led
  } else {
    digitalWrite(5, LOW); // Turn of led



Tilt Sensor

Fast Vibration Sensor

Medium Vibration Sensor:

Slow Vibration Sensor

Mercury Tilt Switch

Leave a Reply

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