DIY Tilt Switch.

Introduction: DIY Tilt Switch.

About: I'm an electronic engineering student. I don't usually have much spare time but I like to work on random projects to keep myself entertained. I hope you like them!

In this instructable I'll show you how to make a simple tilt switch, this tilt switch works best with microcontrollers that can debounce the signal and overcome interferences produced by vibrations.

There are many ways to make a tilt switch, this one is a cheap and easy way to do one.



-Easy to make.

-Extremely cheap.

-Perfect for small projects with microcontrollers.


-Vulnerable to vibrations.

-Not really suitable for 3d motion (might activate at different angles depending on how it's placed).

-Quite exposed to the elements, might not have a very long life under rough conditions.


  • Shrink tube (5mm - 3/16inches Ø).
  • Bearing ball ( 3mm Ø) (or many of a smaller size).
  • Male pin strip.

Step 1:

Bend the pins until the ball fits nicely between them, this will prevent unstable connections, don't bend them too much, just the right angle so the pins fit inside the shrink tube.

You can also use 2 pairs or pins and make a bi directional tilt switch.

Step 2:

Cut about 2cm (0,8 inches) of shrink tube and place the pins inside it, leave about 1mm of separation between the end of the shrink tube and the black plastic that holds the pins, then proceed to heat that part until the tube contracts and can hold the piece by itself, be careful when you heat the part near the long pins, too much heat applied near the end of the pins and the gap won't be enough for the ball to touch them, try to heat only near the base.

Step 3:

Add the ball, if you want more stable connections you can try to put many balls with a smaller diameter.

Close the end by heating the tube, if you want to close it completely you can heat it and melt the end pressing it with pliers.

If all has gone right you should have a functional tilt switch.

Sensors Contest

Participated in the
Sensors Contest

Be the First to Share


    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020

    6 Discussions

    Bosun Rick
    Bosun Rick

    5 years ago on Introduction

    Would a plastic soda straw of the proper size keep this from shrinking too much and trapping the ball? would a 'BB' (177 cal airgun) work?

    Aryan 733
    Aryan 733

    Reply 3 years ago

    bb is plastic it will not work it is insulater


    Reply 5 years ago on Introduction

    Sorry for not replying to your comment after all this time, I guess a soda straw could help. A bb would work, but only if it's stainless steel, if it's made out of lead it will rust (turn black) and won't work anymore.


    Reply 4 years ago

    Lead can not rust.....


    Reply 4 years ago

    That's strange, because I used to fish with lead weights, and after some use they were coated in some kind of dark oxide layer, when scraped with a knife you could see the shiny surface again.