Thursday, November 28, 2024

Smart Inclinometer & Multi-Purpose Measurement Device

Today, we are going to make an ‘all-in-one’ measurement device/instrument, which consists of a digital inclinometer, compass and protractor. It also includes a health monitoring system that can provide data about temperature, oxygen levels and heartbeat.

All these features come in a very small form factor for ease of use and portability. 

For inclinometer and smart protractor, we are going to use a tiny mpu6050 sensor. It can also be used to collect temperature-related information. For health monitoring, a MAX30100 sensor is used. It’s red and IR lights along with photosensors can determine heartbeat and oxygen levels. 

- Advertisement -

[defineweblang title=”Change Video Language” language=”English,Hindi”]

[getvideolang url= “https://www.youtube.com/embed/ZKg1jObK2Ws” language=”English”][/getvideolang]

- Advertisement -

[getvideolang url= “https://www.youtube.com/embed/VcB2BsmycYk” language=”Hindi”][/getvideolang]

[/defineweblang]

So, let’s start our project by collecting the following components.

Bill Of Materials

Pre-requisites 

Assuming that you already have the Arduino IDE installed in your computer and connected to the internet as well, go to the sketch menu and click on the library manager. A window having a list of different libraries shows up. Now search the following libraries and install them one by one. (Refer fig 2).

  • Arduino MPU6050
  • U8g2 
  • MAX30100
Fig 2.

Coding

Firstly, we will include the required libraries in the code. (Refer fig 3)

Secondly, we will create a setup function to initialize the I2C-based sensors and OLED display .(Refer fig 4)

Thirdly, we will create a loop function that will convert x,y,z axes readings of the accelerometer into angle of rotation. By writing a set of code, this result can be displayed on an OLED screen. The readings from the MAX30100 sensor can also be displayed on the OLED screen. (Refer fig 5)

Lastly, we will write a code that will create a rectangular frame and a small circle within that. The y-axis of the circle is mapped with the angle at y-axis of mpu6050 reading. This will allow the circle to move according to the angle of inclination. (Refer fig 6)

Now our code is ready, which you can download and upload to Arduino.

Fig 3.
Fig 4.
Fig 5.
Fig 6.

Connections

After uploading the code, make the following connections. (Refer fig 7)

 

Arduino Pro Micro MPU6050,Max30100,SSD1306
SCL(Pin 2 ) SCL
SDA(Pin3) SDA
VCC VCC
GND GND

 

Connect the +ve terminal of the 3.3V – 5V battery to the VCC pin and -ve to the GND pin.

Fig 7. Circuit diagram made in Fritzing

Testing 

To measure the inclination of any surface or to determine whether it is perfectly flat or not, place the measuring device on that surface. If x = 0 and y=0 readings are obtained, then the  surface is flat. 

If the surface is inclined, the circle moves accordingly and displays the angle of inclination. At the same time, the device displays the surrounding temperature. 

In order to get a reading of your health, put your finger on the MAX sensor and wait a few seconds. After calculating the readings from the sensor, the device will now show your heartbeat in BPS and oxygen level in percentage.

 

Download Source Code: click here

Ashwini Sinha
Ashwini Sinha
A tech journalist at EFY, with hands-on expertise in electronics DIY. He has an extraordinary passion for AI, IoT, and electronics. Holder of two design records and two times winner of US-China Makers Award.

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Electronics News

Truly Innovative Electronics

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics