Simple Inclinometer With Arduino

335

3

2

I'm Mechanical Engineer and an enthusiastic Maker. I like to create my projects using the Arduino.

This project is about a simple inclinometer featuring auto rotation of display.

This inclinometer can be rotated in any position keeping the digits readable even upside down!

It is controlled by an Arduino 101 driven by accelerometers to read the tilt angle of X-Y axes.

Additionally, there is a feature to show the ambient temperature in Celsius or in Fahrenheit degrees.

The assemble is very simple and I hope you have fun using it!

Step 1: Material List

Arduino 101:

This version of the Arduino is no longer produced despite having interesting features such as temperature sensor, 6-axis accelerometer, gyroscope, temperature sensor and bluetooth on board.

It is very useful for this project avoiding an external MPU.

Multi-Function Shield (MFD):

The MFD can simplify and speed up the prototype development.

Main features:

  • 4 digit 7-segment LED display module driven by two serial 74HC595's
  • 4 x surface mount LED's in a parallel configuration
  • 10K adjustable precision potentiometer
  • 3 x independent push buttons
  • Piezo buzzer
  • DS18B20 temperature sensor interface
  • LM35 temperature sensor interface
  • Infrared receiver interface
  • Serial interface header for convenient connection to serial modules such as Bluetooth, wireless interface, voice module, a voice recognition module, etc.

Step 2: Assembly

The assembly is very simple and it is not necessary any schematics.

Just insert the multi-function shield into Arduino taking care with the pinouts to avoid any demage during insertion.

Note: This project can be updated to any Arduino model using an external MPU-6050 breakout.

Step 3: Setup

There are 3 buttons to setup the inclinometer:

  • Left button: Select the working mode.

a) Auto axis - In this mode, the axis (X or Y) to measure the inclination degrees is selected automatically by the internal gyroscope.

b) X-Axis - Show only the angles of axis X.

c) Y-Axis - Show only the angles of axis Y.

d) Temperature - Show the ambient temperature in Celsius or Fahrenheit.

  • Center button: Set the zero degree reference of X and Y axis. When Temperature Mode is selected, this button set the temperature scale (ºC or ºF).
  • Right button: Reset the reference of axis to original angles.


Note:

The X-axis is indicated in the display by the char "=" and the Y-axis by the char "| |".

The range of angles for tilt reading is -90° to + 90°.

Step 4: Transfer Function

The main functions of code are:

  • Reading of accelerometers inclination angles.
  • Calculation of the transfer function of upside down effect for the 7-seg LED display.

With the angles is possible to detect the spacial position of the device to decide what routine will be released:

  • Front View - Inclinometer Stand Up
  • Front View - Inclinometer Upside Down

The transfer function for the display of 7-seg (A to F) works as follows:

A to D, B to E, C to F, D to A, E to B, F to C, G to G

To complete the upside down effect is necessary to invert the sequence of characters on the display:

From: 1, 2, 3, 4

To: 4, 3, 2, 1

Step 5: The Code

For another version of Arduino, some code update is required and also use an external breakout of the MPU-6050 for accelerometers.

Share

    Recommendations

    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • Plastics Contest

      Plastics Contest
    • Optics Contest

      Optics Contest

    2 Discussions

    0
    None
    AdamB147

    4 weeks ago on Step 5

    Hello,

    Thanks for the upload, super cool <3 !!

    Questions:

    1. Is it possible to use a bigger display to show X and Y axis at the same time?

    2. Is it possible to use a code that uses a range of values of X/Y axis and either light up a green or red bulb. (i.e. would like to zero the reference at an inclination of X + Y axis and when brought back to those co-ordinates +-0.1 degrees to light green, anything else red.

    3. Is it possible to have this bulb + sensors wireless to the board?

    Sorry if these questions seem stupid, really not my field of study :)

    Thanks,

    Adam

    1 reply
    0
    None
    lagsilvaAdamB147

    Reply 4 weeks ago

    Hello, Adam,

    Tks!!

    Answers:
    1. Yes. An option of double display is shown below.
    2. Yes, it is possible to add these features.
    3. I think you don't, but I am not sure if I understood very well your question.

    Cheers,
    LAGSILVA

    IMG_20160701_111229597.jpg