loading

Please vote for this Instructable if you think it deserves it! Thanks!

The Ultimate Altimeter is a super-compact, Arduino controlled altimeter capable of measuring the altitude with an accuracy of 0.3 meters, and saving the highest and lowest values it has measured. It is powered by a 40 mAh Lithium Polymer battery, uses a tiny LCD Bubble Display, and measures altitude with a MPL3115A2 Altitude Sensor. It's very simple and fairly easy to build with just six major components. Additionally, an optional 3D printed case can house the Altimeter.

The Altimeter has a couple of different modes: current altitude, highest altitude, lowest altitude, difference in altitude (highest minus lowest), and standby (turns display off to save power for ~6 hr battery life, not shown in video).

The entire build adds up to around $30, but you may have some or most of the parts lying around already.

You can make this! It is not a very difficult project, and could be good practice for through-hole soldering, and coding (if you want to do modifications). Read on and create!

Step 1: Materials List

Parts:

Arduino Pro Mini

MPL3115A2 Altitude Sensor

Bubble Display

40 mAh LiPo battery

Button

Switch

JST connector

Tools and other materials:

Soldering iron

Solder

Flush cutters or wire cutters

Wire strippers

Electrical tape

Liquid electrical tape or other insulative paint (you could also use regular electrical tape or heat shrink tubing)

24 guage stranded wire

Hot glue gun

FTDI Basic

Step 2: Solder the Bubble Display

The Bubble Displays are set up to be put into a breadboard, but since we will be soldering it directly onto the pins on the back of our Arduino, the leads need to be bent flat with a pair of pliers. Once bent, rest the display on a flat surface, and make sure it lays flat and all of its leads touch the surface. This will ensure that they will make good contact with the pins on the Arduino.

Next, put down a piece of electrical tape as shown in order to prevent unwanted connections between the board and the display.

Temporarily tape the display down to the Arduino in order to keep it in place while you solder the leads to the corresponding pins on the Arduino. The leads don't actually go through the holes; they can just rest on top and be connected with solder.

Step 3: Add the Button

Bend out two of the adjacent leads on the button and snip them off. Then solder the remaining leads to GND and PIN 3 on the Arduino.

You can trim the button shaft to the length of your liking. If you a snipping device, the shaft will break uncleanly. I used a thin saw to cut it, and then filed it smooth.

Step 4: Add the JST Connector and Switch

IMPORTANT:Read this whole step before starting it. It is put together strangely because I had to change and fix the project as I built it. Also, there are some things in the photos that haven't been covered yet because the order in which I built it is different from the order of this Instructable.

Solder the JST connector into the GND and RAW pins on the Arduino. Then, cut the lead that goes to RAW in half. This is where the switch circuit will be added so we can turn the device on and off

Glue the switch into place. Push it right up against the button so there is enough space to program the Arduino with FTDI later. I used superglue to stick it in place. We won't be using any of the pins that it is covering up so you can glue it right onto the board.

Next, twist the JST connector so it is facing the rest of the board instead of the switch. This will allow the battery to plug in (there wasn't enough space before). Only one of the leads of the connector is in the Arduino now, so it should be easy to twist. You may need to do some supergluing to get the metal pins that stick into the plastic part of the JST connector to stay in place.

Solder the button into the cut lead of the JST connector as shown in the picture, and you are done with the power circuit!

Step 5: Connect the Altitude Sensor

Connect the Altitude Sensor's SDA, SCL, VCC, and GND pins to the Arduino's A4, A5, VCC, and GND pins respectively with stranded wire. This can be tricky. I looped all the wires but the ground wire around underneath the sensor board to make it easier to work with as well as providing extra support to the board to keep it from rocking. I routed the ground wire directly from one GND pin to the other.

Make sure nothing is shorted. If there are any exposed wires that are close to each other, you can slip a piece of electrical tape between them and make sure it sticks.

After testing that your sensor is working and connected properly with some example code, glue it in place with hot glue. The sensor uses air pressure to detect altitude to make sure to leave space for air to reach the sensor. I just glued under each corner.

Step 6: Prepare and Install the Battery

Next, the battery's wires need to be made much shorter so it will fit in the remaining space we have. Strip, cut and re-solder the wires so that they are very short.

Because of the short length of the wires that you are stripping, the rubber casing of the wire may come off completely. To fix the now-bare wires, I used liquid electrical tape, an insulative paint type material. This will keep the wires from shorting. You could also use heat-shrink tubing or regular electrical tape.

Now, all the electronics are in place. The last thing to do is the code.

Step 7: Upload the Code

Download the code for the Ultimate Altimeter here, and check the README to download the required Libraries.

Once you have that ready, set up your uploading hardware. You will need a 3.3v FTDI Basic Breakout board, a right angle header, and a USB to USB Mini

Hold the pin header into the Arduino's FTDI pins – no need to solder because you (hopefully) will only need to upload the code once – and use the Arduino IDE to upload the "Ultimate_Altimeter" sketch to the Arduino.

Your Ultimate Altimeter should be fully operational, but you might still want a case...

Step 8: Make a Case

You can 3D print case using the attached STL file, make your own case, or go without one.

You can also modify the attached file using TinkerCAD here, just make sure to share your improvements with me and others!

If you yearn for a 3D printed case either of mine or your own design, but don't have a 3D printer, head over to the 3Dprintmything subreddit on reddit and make a [WANT] post. Someone there will print one for you for a couple of bucks and ship it to you! Don't be scared because it's reddit. We are nice!

The printed case includes a slot above the hole for the switch. This is to aid in the inserting of the Altimeter into the case by making room for the movable plastic part of the switch. Push the switch to the middle in order to insert the Altimeter into the case. Once the Altimeter is in place in the case, hot glue it in there.

Step 9: Done!

Congratulations! You are done!

Here is a User's Manual I wrote up. It is included in the file downloadable from Github, and should answer most basic questions about the altimeter:

Ultimate Altimeter Users Manual

1. Battery and Charging

A. The battery of the Ultimate Altimeter is a 40 mAh, Lithium Polymer (or LiPo) battery. It should last around 1 hour during normal use, last about 6 hours in Standby mode (see 2. B.), and should charge in around 30 minutes using the provided Mini-USB to JST charger. When not in use for long periods of time, store the battery at around half charge to keep it in good condition.

B. Due to the fragile nature of the battery's short wires (between the white JST connector and the rest of the battery), it is recommended that the JST connector never be fully inserted into the Mini-USB to JST charger. If it is fully inserted, it can be difficult to remove because of the tightness of the JST connectors on the battery and charger. In the event of this happening, use pliers or a similar tool to safely remove the JST connector. DO NOT pull on the battery's wires. The battery is charging if a red light is on on the charger. When the red light turns off, the battery is done charging.

C. If a battery breaks, is lost, or becomes unusable for any other reason, an extra can be purchased at this link: https://www.sparkfun.com/products/11316

2. Operating Instructions

A. The a Ultimate Altimeter has different modes with different functions.

I. "Alt" (Altitude mode) - Shows the current altitude.

II. "HiGH" (High mode) - Shows the highest altitude that the altimeter has been.

III. "Lo" (Low mode) - Shows the lowest the altimeter has been.

IV. "diFF" (Difference mode) - Shows the altitude you have covered ("High" - "Low").

V. "Stby" (Standby mode) - Turns the display off to save power. This mode could be used for a longer activity such as hiking where saving power is more important. It is not needed for RC Airplane flights because of their short duration.

B. Input Mechanisms

I. The button on the back of the Ultimate Altimeter is used to change modes. Press it once to cycle through to the next mode.

II. The switch on the Ultimate Altimeter turns it on and off.

C. Because the altitude sensor uses air pressure to measure altitude, strong winds or gusts may affect the readings on the Ultimate Altimeter. This can be seen by turning on the Ultimate Altimeter and blowing on it. The reading for current altitude should drop. This happens because the strong gust of air creates a negative pressure. This can be avoided in flight by placing the Ultimate Altimeter in a cargo compartment or other wind-protected area to keep it out of strong gusts of wind. This is not a necessity though; in test flights with no wind protection, measurements only wavered a couple of feet, and the "Difference Mode" was not affected.

The Ultimate Altimeter was designed and created by qubist (/u/qubist1 on reddit).

Share your creation with the world! It would make me smile to see others' Ultimate Altimeters.

Have fun!

<p>Neat project! But, what are you using to charge the battery?</p>
<p>Or maybe this one from Sparkfun: https://www.sparkfun.com/products/10217 I think they both work.</p>
<p>We have a bunch Adafruit lipo chargers lying around. I think we probably use this one: https://www.adafruit.com/products/1304</p>
<p>How accurate is this altimeter?</p>
<p>Here's the spec sheet: <a href="http://www.nxp.com/assets/documents/data/en/data-sheets/MPL3115A2.pdf" rel="nofollow">http://www.nxp.com/assets/documents/data/en/data-s...</a></p><p>It says .1m resolution. But I'm sure accuracy depends on calibration.</p>
<p>Bubble display is no longer available, and there are no other 4 digit 7 segment displays the same size that I could find. I have it built except for the display, does anyone know where I can get a similar sized display?</p>
<p>Also you can find it on ebay search for qdsp6064</p>
<p>Looks like you can still get it here: https://shop.pimoroni.com/products/retro-4-digit-led-display</p>
<p>How much does it weigh i want to put it on a weather balloon and need to know</p>
<p>Hey man.. nice job!<br><br>Just one bit of feedback.. you're using an LED bubble display.. not LCD.<br><br>Tweeks<br></p>
<p>Great project! Did anyone try to add a BLE module in order to pair the sensor with android devices?</p>
<p>I made it using a BP180 instead of the MPL3115A2 and added in a charge cable. Works well! I also added in a calibration offset and am working on making this adjustable without reprogramming.</p>
<p>hello please do we have to connect anything to bmp 180 pressure sensor 3.3v hole? please can someone help me. </p>
No, power to VCC.
<p>hello sir thx for the reply but sir can u tell me in detail like in the step above it says vcc, gnd,scl,sda connected to a4,a5,vcc and Gnd respectively so where do we connect the 3.3 v hole . Please help me sir will truly appreciate your help</p>
<p>You do not need to connect anything to the 3.3V hole.</p>
<p>hello thx sir for the reply . Sir how can i know wether the display is working without uploading code?</p>
Hello sir thx for the reply how to know the display is working without uploading the code .
<p>Had a few requests for my code using the BP180,</p><p><a href="https://drive.google.com/file/d/0BzWffzyOLS1vWERUd3I2c1NVX28/view?usp=sharing" rel="nofollow">https://drive.google.com/file/d/0BzWffzyOLS1vWERUd...</a></p>
<p>Hi StephenC15.</p><p>I would like to build using the BMP180. Could you share your code?</p><p>Thanks!</p>
<p>Just finished to build and calibrate my second one using BMP180 sensor and StephenC15's code. I wanted to build cheaper using the BMP180 sensor to gift to my RC buddies, and StephenC15's code was the solution.</p><p>Thanks a lot Stephen, and Qubist for the original idea.</p>
<p>All of the original libraries for the code seem to be missing on the github page. Does anyone have a working copy of these?</p>
<p>I created this project with my son using a 7 segment display (COM-10931) however now I am trying to the display to work correctly. Has anyone done this?</p>
<p>Is it possible to do with some other display instead of the bubble display? The bubble display is quite expensive.</p>
<p>For those of us that live in high elevation, would this work for a five digit display?</p>
<p>Also, also want to have the display in feet. For us american folk.</p>
<p>I placed my Spark fun order. I added a DeadOn RTC <a href="https://www.sparkfun.com/products/10160" rel="nofollow">https://www.sparkfun.com/products/10160</a> and an OpenLog https://www.sparkfun.com/products/9530</p><p>I'm making a HUD altimeter for skydiving. I'll post back as I make progress.</p>
<p>Hey Richard,</p><p>I know it is a year or so later, but found this info as I am looking for a HUD for skydiving. Did you manage to get some kind of HUD working for skydiving. I would be interested.</p><p>Regards</p><p>Trevor.</p>
I have built out the hardware and developed the software and made several jumps (and skiing, and downhill mountain biking) with it. However, as of yet I've only ever had it safely tucked away in my pocket. I have never managed to figure out to get the optics set up to allow me to actually READ the display when it is in close proximity to my eye. I have done much experimentation and tried to talk to many people about it. I've even tried getting my question answered on the weekly Ask An Engineer program done by Adafruit. They have never taken my question. I haven't updated my Open Source project because I ran out of storage space on the Atmel and had to do a lot of hacking to get it to fit. I'm planning to rewrite it for the Particle Photon https://store.particle.io/?product=particle-photon but without the optics, I'm kind of stalled.
Did you get anywhere with you HUD project, as I am currently working on a very similar project
<p>Hey Dominic,</p><p>I am looking for a HUD for skydiving. What have you done so far?</p><p>Thanks</p><p>Trevor.</p>
<p><strong>Dude! </strong>This sounds soooooo awesome! Definitely share how this goes. I've always thought about having an Arduino turn itself off/on with code and it seems like this is the way to do it! Can't wait to see the end result!</p>
<p>Excellent project... I am gathering the parts now to build it for some balloon tests I am running... I do have one question - would a 3.7V 600mAH Lipo work in place of the 40mAh one?</p>
<p>Here is my setup in a small plastic bottle that was utilized for eye drops...</p>
<p>COOL man I think I may go that route, I have several of those type bottles.</p>
<p>Just returned from our trip to the Custer Battlefield in MT, and Yellowstone Ntl Park in Wyoming. An altimiter would have been a nice addition to our Motor Home sensor setup. You haven't done anything till you are guiding a 36 foot Class A motor home through Yellowstone, on under contruction highways, and your breaks fail! As we used to say when I was a kid, WHAT A TRIP MAN! Everything came out OK other then the 1800 dollar bill for new front breaks, and later on 360 dollars for two blown tires (on the rear, thank God) and 160 bucks for new exhaust pipes where the blown tires blew the old ones off! Going to make one of these for my next trip. I have the bubble display that I purchased for another project, then blew the wearable arduino before getting them soldered on. Thanks a MILLION for the DIY, it is exactly what I wanted. I have a 3 volt arduino on order, but am considering going forward with a 5-3.3 volt board.</p>
<p>An excellent project!</p><p>The use of the bubble display is inspired. According to the sevSeg cpp </p><p>&quot; //Each digit is displayed for ~2000us, and cycles through the 4 digits<br> //After running through the 4 numbers, the display is turned off &quot;</p><p>So no continuous current demand to damage parts at 8mS per display. As the cpp advises repeatedly call the library to continue viewing the displayed items.</p><p>I did find a bug in the SevSeg library- if you want a decimal point at the 3rd digit you have to specify 4. (strange multiple decimal points appear when specifying for digits 2 and 3)</p><p>I built the hardware in a similar manner to the instructable. I opted for a more standard radio control type single cell lipo with two wires from the raw and gnd to a miniature trailing 1.25mm plug. I have some indoor planes and already have the tiny lipos and charger. I made the enclosure with balsa, resulting in an all up mass of 10g (The same mass as a standard rc plane servo).</p><p>I found the MPL3115A2 library to be a bit buggy and have rewritten the code without the sensor and debounce libraries.</p><p>I have added pressure calibration by using the base altitude to reverse calculate the pressure at sea level. This pressure must be correct for accurate altitude fixes.</p><p>As the fix also depends on temperature, I added a temperature adjustment.</p><p> Here is the code <a href="http://www.davepatterson.me.uk/public/Mini_Altimeter.ino" rel="nofollow">http://www.davepatterson.me.uk/public/Mini_Altimet...</a></p><p>The accuracy is fine. Sitting in the house the altitude varied by 5m. This is no worse than a 3d gps fix (vertically.)</p><p>The temperature response is slow- hardly surprising as the temperature sensor appears to be inside the MPL3115A2 case. </p><p>Thanks for the inspiration!</p>
<p>After tinkering with the code...I was able to adapt it to my location's elevated altitude of 540 meters by replacing your Float ALTBASIS to 540 and also the line for tweaking base altitude ....if(ALTBASIS &gt;600) ALTBASIS =500 If I would have kept it at -10 you can imagine how long I would have to depress the button to reach my area's base altitude that is in the mid 500 meters. Again thanks for you code and especially to qubist for sharing this great project!</p><p>Is there a location in the code to reflect displaying feet vice meters? </p>
<p>To convert to feet, why not asign a variable to the last line in alt_read:</p><p>float something = ((float)((m_altitude &lt;&lt; 8)|c_altitude) + l_altitude);</p><p>Then multiply by the conversion factor for metres to feet, before returning the value.</p><p>You would have to fiddle with the code for tweaking altbasis to adjust your base height. </p><p>On the down side this limits you to 9999 feet, which is not very high!</p><p>That's why I chose metres, because of the 4 digit limitation.</p>
<p>would it be a viable solution to have the display in feet but the have the altitude divided by 1000 and expressed to 2 decimal places for a total of 4 displayed digits? this would remove the 9999ft altitude ceiling.</p><p>my only experience in this field has been this project but it occurred to me that it could be a viable solution. thoughts would be much appreciated.</p>
<p>for example if we use alt (expressed in metres) represented by x and multiply it by the factor to convert to feet (3.28084 as provided in the alt sensor library), divide the result by 1000 and display to 2dp</p><p>(3.28084(x))/1000</p><p>eg- x=1200 metres</p><p>displayed as 3.94</p><p>or am i following an incorrect line of thinking?</p>
<p>Hi Ricky,</p><p>If you divide ft by 1000, then display to 2 decimal places, the result is to the nearest 10 ft.</p><p>99.99 would be 99990ft.</p>
<p>I made this using headers to prop up the bubble display for enough room to put a battery underneath. I am using a 3.7V 30mAh RC plane battery. I had problems verifying the libraries but after updating Arduino to 1.6.5, it worked. I am having a few issues with accuracy, though. I live at 3600 ft and the altimeter says 3300. Not sure how to correct this. Any help would be appreciated as i am an Arduino newb. Great project! Thanks!</p>
<p>This is an AWESOME project!! It took a little time to get the bubble display but everything is working perfectly. The hard part was getting everything to balance properly on my tiny quadcopter. I had to make a few tweaks to the 3D printed enclosure but for the most part everything went together well. Thank you for your time and efforts.</p>
<p>I can't get the Ultimate Altimeter code to verify. Anyone else have that problem?</p>
<p>Hi, I had a problem with the code, would not verify. </p><p>If it says, MPL3115A2 dose not name a type, And saying it could not find file or directory. Every thing was correct it just would not verify. I updated the Arduino software to the latest version and the code verified OK ?,and loaded OK.</p><p>Just had my first test with it today on a V636 in very high/gusty winds, took it up to 109mtr from the ground.</p><p>I am using David Patterson code as this has temperature sensing, standby, height adjust as well.</p><p><a href="http://www.davepatterson.me.uk/public/Mini_Altimeter.ino" rel="nofollow">http://www.davepatterson.me.uk/public/Mini_Altimet...</a></p>
<p>Made it up at last, Sent for the parts when instructable first got posted, Managed to keep it compact (see pics) but putting all the components on the back of the Arduino. </p><p>Used shrink tube for 18650 lipo as it very thin and light, with battery 110mAh it ways in at 7.3gram. </p><p>Many thanks for the ible,and input from all as i know zip about coding.</p>
<p>After playing around with the sensor, I noticed that it calculates the altitude by observing the air pressure, which makes it not very useful for rc planes as the airflow will disturb the pressure around the sensor. so my question is: how do you get around this?</p>
<p>sorry, I didn't read the last part of the instructions! Thank you!</p>
<p>Kudos on a great design. I want you to know that you've helped a kid out with a science project. The idea was to test the effects of temperature on model rocket altitudes. Since the project isn't due until May that will give him a wide variety of temps to test in.</p><p>Today it was 33&ordm; and we launched on a frozen lake. On the the last flight I heard a &quot;ping&quot; well before the rocket drifted down and my son retrieved it. He immediately started looking around. &quot;Oh no.&quot; I thought in horror.</p><p>&quot;What are looking for?&quot;</p><p>&quot;The nose cone is gone!&quot;</p><p>&quot;And the altitude sensor?&quot;</p><p>&quot;It's gone too.&quot;</p><p>&quot;Crap!&quot; (or something like that)</p><p>After some hunting we were able to find both the nose code and the sensor, - and it was still working! This after a 700 ft drop onto the ice. We never would have found it in grass.</p><p>Thanks again !</p>

About This Instructable

80,900views

392favorites

License:

More by qubist:A compact, Arduino altimeter for RC Planes 
Add instructable to: