DIY Digital Spirit Level




Posted in TechnologyArduino

Introduction: DIY Digital Spirit Level

About: Awesome Electronics Tutorials, Projects and How To´s

In this project we will have a closer look at accelerometer ICs and find out how we can use them with an Arduino. Afterwards we will combine such an IC with a couple of complementary components and a 3D printed enclosure in order to create a digital spirit level. Let's get started!

Step 1: Watch the Video!

The video gives you all the information you need to create your own digital spirit level. During the next steps though I will present you some additional information.

Step 2: Order Your Components!

Here you can find a parts list with example seller:

1x Arduino Nano:

1x MPU9250:

1x Slide Switch:

1x 128x32 SSD1306 OLED Display:

1x LiPo Battery:


1x Arduino Nano:

1x MPU9250:

1x Slide Switch:

1x 128x32 SSD1306 OLED Display:

1x LiPo Battery:

1x Arduino Nano:

1x MPU9250:

1x Slide Switch:

1x 128x32 SSD1306 OLED Display:

1x LiPo Battery:

Step 3: Build the Circuit and Upload the Code!

Here you can find the schematic and code for the circuit. Use them to create your own circuit. Also do not forget to include the SSD1306 Library from Adafruit.

Step 4: 3D Print the Enclosure!

Here you can find the .stl files of my designed enclosure. Feel free to use them to 3D print your own housing.

Step 5: Success!

You did it! You just created your own Digital Spirit Level!

Feel free to check out my YouTube channel for more awesome projects:

You can also follow me on Facebook, Twitter and Google+ for news about upcoming projects and behind the scenes information:



    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Microcontroller Contest

      Microcontroller Contest
    • Space Challenge

      Space Challenge

    We have a be nice policy.
    Please be positive and constructive.


    3 Questions


    Can you recommend a good alternative/equivalent to the IRLZ44N?

    The IRLZ44N is an huge N-Channel transistor in a TO220 package. almost any

    N-Channel TO220 package transistor will do.

    1 more answer

    Research, why ask this here?


    Nice application for the 9250 but I'm also curious about the accuracy. Do you have any meaurements done?


    Because the picture shows 1.16 degrees I would SIMPLY conclude the accuracy to be the nearest 0.01 degree.

    As an engineer the accelerometer in the 9250 can resolve 16 Bits or 32768 bits with sign bit for 180 degrees which resolves .00055 degrees and confirms the 0.001 degree resolution of the spirit level.

    Personally I can't handle more then 1/2 degree in my unskilled construction builds ;-)


    What's the accuracy of this level?


    This is really cool! A project I doubt I'll ever make, but love that its possible!

    Not to put too fine a point on it, but a "spirit" level is so-called because it consists of a partially filled vial of a tinted spirit or alcohol. This is a digital level. No spirits involved, unless of course you consume some while making or using it.

    when I saw this I thought Good, viable alternative to the commercial versions. But after, only, watching the video I gave it a pass, sigh. No bells and whistles - no calibration method or angle transfer or hold or accuracy dampening ability.

    It's a good start, just needs some work. Oh and how do you make the chip and rail parallel, shims?