Altimeter (altitude Meter) Based on Atmospheric Pressure

1,968

23

10

Introduction: Altimeter (altitude Meter) Based on Atmospheric Pressure

[Edit]; See version 2 in step 6 with manually baseline altitude input.

This is the building description of an Altimeter (Altitude Meter) based on an Arduino Nano and a Bosch BMP180 atmospheric pressure sensor.

The design is simple but the measurements are stable and quite accurate (1m precision).

Every second ten pressure samples are made and the average of these ten is calculated. This pressure is compared to a baseline pressure and is used to process the altitude. The baseline pressure is measured at the moment the altimeter is powered on so this represents an altitude of zero meter. If necessary the baseline pressure can be reset by pushing the button.

[Edit]: Version 2 has manually baseline altitude input. See description in Step 6

During setting the baseline (power on or button push) the current atmospheric pressure is displayed for one second. After this the altitude is on the 4-digit display and this will update about every second.

A red led is used for negative altitudes when going down-hill after setting the baseline.

[Edit]: With Version 2 this represents negative altitudes so below sea level.

The altimeter is powered by an USB cable so can be used in a car, motorcycle or on every other place with USB or a power bank.

Two special libraries are used. One for the BMP180 that can be found here. And one for the TM1637 4-digit display that can be found here.

The BMP180 is not the newest version. It seems to be
replaced by the BMP280. It should be simple to replace the BMP180 with the BMP280 in this design.

Parts of the sketch are based on the “BMP180_altitude_example.ino” delivered with the BMP180 library.

Step 1: Breadboard to Test the Design

I started with an Arduino Uno to test the design. In the final version I used a Nano because it's smaller.

Step 2: Board Creation and Housing

One single board is used. The cover of the housing holds the button, the led and the 4-digit display.

Step 3: Arduino Pin Connections

Connections for BMP180:
GND - GND
VCC - 3.3V (!!)
SDA - A4
SCL - A5

Connections for 4-digit TM1637 display:
GND - GND
VCC - 5V
CLK - D6
DIO - D8

Led voor negative values - Down-hill: D2

Button for reset baseline pressure: D4

Step 4: The Arduino Sketch

Step 5: Final

This is the result...

Step 6: Version 2 With Manually Baseline Altitude Input

In this version one extra button is introduced. Button 1 (black) is to start manually baseline altitude input. Button 2 (white) is to increase the value per digit.

Sequence during altitude input is:

Button 1 pushed - Led flashes 1 time - button 2 can be used to increase x digit in 000x

Button 1 pushed again - Led flashes 2 times - button 2 can be used to increase x digit in 00x0

Button 1 pushed again - Led flashes 3 times - button 2 can be used to increase x digit in 0x00

Button 1 pushed again - Led flashes 4 times - button 2 can be used to increase x digit in x000

Button 1 pushed again - Led flashes 5 times - button 2 can be used to change the sign: led_on=negative (below sea level), led_off=positive (above sea level)

Button 1 pushed again - Led flashes 1 time long - baseline altitude input ready

Step 7:

Sketch of version 2.

Arduino Contest 2017

Participated in the
Arduino Contest 2017

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    10 Discussions

    0
    k3po.mcdonald
    k3po.mcdonald

    Question 5 months ago on Introduction

    I want to build this but also have the display show density altitude based off a calculation involving the dew point and relative humidity. would love to learn the source for components such as the sensor, and cabinet.

    0
    k3po.mcdonald
    k3po.mcdonald

    Reply 5 months ago

    Thank you for responding. I ordered a BME280 and a project box off of Amazon. Did you by chance post the example code? I'll obviously have some mods I will need to do but I'd love to have a headstart. I'm also going to be using a different display. Long-term goal is to display altitude, density altitude, Outside Air Temp and rate of change over time (ft per minute rise or fall) . This is all to be put on an experimental aircraft.

    0
    jaapdubbelaar
    jaapdubbelaar

    Reply 5 months ago

    Hello, Your project sounds very interesting. What kind of aircraft is it? Do you have any info online I can see?
    You asked for the example code. This is on the Instructable page. See Step 4 (the initial version) and Step 7 ( Version 2 With Manual Baseline Altitude Input).

    0
    k3po.mcdonald
    k3po.mcdonald

    Reply 5 months ago

    The second version will not open in IDE. can you post somewhere the text?

    0
    jaapdubbelaar
    jaapdubbelaar

    Reply 5 months ago

    I added also .txt versions of the codes to Step 4 and Step 7. Does this help you?

    0
    k3po.mcdonald
    k3po.mcdonald

    Reply 5 months ago

    Yes perfect! Thank you. I now have something to understand coding to change the base. I also will have to figure out how to modify it from the display you used to the one im using and the BME280. Also want to factor in the variometer coding as well.

    0
    MikeL90
    MikeL90

    3 years ago

    This really is of no use at all. It must be able to manually set the current height above sea level when it is powered on, otherwise it only works when you live by the sea!!

    0
    jaapdubbelaar
    jaapdubbelaar

    Reply 3 years ago

    Hello Mike,

    Version two is ready!
    You can manually set the current altitude now.
    Please take a look here

    What do you think?

    0
    jaapdubbelaar
    jaapdubbelaar

    Reply 3 years ago

    Thanks for your reply, Mike.
    You are right but a do live about at sea level in the Neherlands :-)
    Manually setting the current height is a good idea for version two.