DIY Inclinometer

3,662

19

7

Introduction: DIY Inclinometer

About: I am a student studying engineering. Although I study mechanical engineering, I equally love electronics and electricity. I hope to post a few more of my projects and would be happy to help if you get stuck.

As you might have guessed by looking at the photos, this device helps you measure the angle of a surface with respect to earth's gravitational field. In a nutshell, if i=the device measures an angle of 0.0something degrees it means you have done a nice job at leveling the desk.

In this instructable I will take you through the steps that I followed to make this awesome project.

I hope you will like it.

Step 1: Watch the Video

Checkout the video on YouTube for the same project. Do like the video if you GENUINELY like it.

In this video I have mentioned the steps for making this project.

Step 2: Components-

The list of components is fairly straight forward. A simple arduino, (Nano in my Case), MPU 9250 IC, and an OLED display to output the data. As usual, having the monitor is not mandatory but thinking of a laptop eveytime you want to test a surface might be a bit absurd.

I got the MPU 9250 from Ali Express for about $3.5. This is not the cheapest IC but the noise levels were considerably lower. I highly recommend this IC

There's nothing special about the arduino or the wood. Arduino is a clone and works great. Just make sure to use some descent quality wood that will not chip off every single time.

Step 3: The Body

For the main body, I took some simple square wood and cut it to a rough length of around 10cm. I then marked two holes in length of the IC. It is important that you fit the IC correctly. Also, if you do go wrond, please use some other side or even better, use another wood. Do not try to correct a missed hole. The screw may not hold good grip on such hole.

I then cut female headers on appropriate lengths and pasted them with two component adhesive. Once everything fit in place, I was pretty happy with the looks.

Step 4: Adding the Wires

I then started tinning the wires and the female headers. The wiring is very very simple.

SDA- A4

SCl- A5

Vcc- 5V

GND-GND


Also, to save your effort, mark the pins on arduino and pretin only those 4 wires.

Also, make sure that you have enough lengths for your wires, and also make sure that no wires run below the flat surface as that surface is super important to us.

This is the time you make sure that the IC fits perfectly as the next step would be calibration and if you don't place the IC correctly, you will calibrate the project wrong and you may have to start form scratch.

Step 5: Proramming

e is the GitHub link-

https://github.com/bolderflight/MPU9250

Download the file and add the library to your arduino IDE.

Once I uploaded the code I found that there were some calibration issues as the IC gave an acceleration of -11.4 m/s^2. This is not possible for a stationary object. On the earth's surface, the value has always tobe smaller than

9.81m/s^2 in magnitude.

So, I used plain old map function in the arduino sketch to compensate for that and this seems to work fine.

I have discussed this theory in my YouTube video.

Also, if you're calibrating again by yourself, make sure that you check the surface with a spirit level if you have one or else a simple ball will also do the job. Just make sure the ball doesn't roll of your calibration desk.

Step 6: Enjoy Your Project

You can now use your project to make perfect shelfs. Happy Doing It Yourslef.

As always, if you need any sort of help feel free to message me directly or comment down below.

Build a Tool Contest

Participated in the
Build a Tool Contest

Be the First to Share

    Recommendations

    • Microcontroller Contest

      Microcontroller Contest
    • Automation Contest

      Automation Contest
    • Make it Glow Contest

      Make it Glow Contest

    7 Comments

    0
    timbmd
    timbmd

    Question 3 months ago

    I'm a ham radio operator and I want to build a 2-meter antenna mount with adjustable elevation (using a linear actuator) for satellite tracking. I need an inclinometer with a remote display in my radio room about 70 feet away, so I can measure antenna elevation remotely. How long can the wires be between the sensor and the microprocessor/display? Would CAT6 cable with twisted pairs work best? Is there a better way?

    0
    cascadiaweasel
    cascadiaweasel

    Answer 6 weeks ago

    First off, I would call this more of a "Tilt Sensor" used for static measurements because a true Inclinometer can be used while being moved (i.e. airplane navigation). This can not. This project should work just fine for you, just don't trust the reading while the antenna is actually moving.

    Second, it looks like the communications is occurring through the I2C bus so lets take a look at the I2C spec that is most likely to kill your idea.

    For a normal "slow speed" I2C bus (100kHz speed), the MAXIMUM capacitance on the line is rated at 400pF. The overall capacitance of the circuit is fairly small but your 70 feet of wire is going to kill you.

    CAT6 cable is rated at 5600 pF per 100 meters (about 17pF per foot). 70 feet would be about 1170 pF. You might be able to find some "I2C to RS-232" project (or any number of other communication projects). Convert it on one end and convert it back on the other end.

    0
    HarshadB9
    HarshadB9

    Reply 2 months ago

    Using CAT 6 cable will probably work. Let me know how your project turns out.
    Also another way of communicating over 70 feet would be using some wireless transmitter(NRF24 or LoRa). But wiring would be straight forward.
    Stay in touch

    0
    blanka9
    blanka9

    Answer 1 year ago

    I managed to upload the project to the device but it doesn't work

    0
    HarshadB9
    HarshadB9

    Reply 3 months ago

    I am so sorry that I am answering your question so late.
    Here are few things I recommend trying:
    1. Try uploading the same code to arduino mega /Uno. It sometimes works better.
    2. Try using another nano.

    If they both fail, please send the the error pic with language set to english. I will certainly try to help you out!
    have a good day!

    0
    blanka9
    blanka9

    Answer 1 year ago

    I managed to upload the project to the device but it doesn't work