Instructables

A compact, Arduino altimeter for RC Planes

FeaturedContest Winner
Picture of A compact, Arduino altimeter for RC Planes
P1010191.JPG

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!

 
Remove these adsRemove these ads by Signing Up

Step 1: Materials List

Picture of 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

1-40 of 52Next »

I placed my Spark fun order. I added a DeadOn RTC https://www.sparkfun.com/products/10160 and an OpenLog https://www.sparkfun.com/products/9530

I'm making a HUD altimeter for skydiving. I'll post back as I make progress.

qubist (author)  RichardBronosky25 days ago

Dude! 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!

I would love to get rid of the switch and make the button act as press and hold a few seconds to turn on and agin to turn off. Any idea how to accomplish this?

So, this is the plan...

I'm going to add a diode and a p-channel mosfet to the project. I'm going to connect the button to the battery + rather than GND. I'll make the button supply power to the Arduino as well as be sensed by pin 3. The setup routine will activate the mosfet which will hold the power supply on. I'll watch for a long button press and that will cut the signal to the mosfet and cause the power to cut off when the button is released.

I'll post more details when I get it built.

DARKHOURS1 month ago

Great Project Just what i have just been looking for. been on ebay and a ready made unit are expensive I fly Large Quads all the time and allways getting people asking how high is that. this is the ticket . and have all parts allready from other Arduino projects.. but the display do you think you could use a larger 7 segment display as im not worried about weight.. do you have a schematic/drawing or pin layout of this project that you could send me Thanks

qubist (author)  DARKHOURS1 month ago

Using a different display seems do-able, but it might be a bit tricky since the pins won't be as nicely lined up as they are on the Bubble Display. I don't have a pin layout diagram for the entire project, but there is a table in the Arduino sketch that defines all the pins for the display. Using that, my instructions, and Sparkfun's hookup guide for the Bubble Display, I'm sure you can find what you need.

Good luck!

splodgie1 month ago

Hi, HELP, My Arduino Pro mini turned up of eBay, it's 3.3v/5.0v selectable version ,

BUT it runs at 16mHz only, will it still work with your using your code (8mHz).

qubist (author)  splodgie1 month ago

It should run fine. Just make sure to have the Arduino on3.3v or else you will burn everthing out. If it doesn't work, let me know and I will help you out! Good luck!

Eradicatore1 month ago

Thanks so much for sharing! Found this post on G+ (the youtube video that is) and love the displays! I used it as a way to learn 123d.circuits.io. I made a quick little mini pro "shield" with this display, and a ds18s20. I also left the i2c holes open for adding any i2c sensor later. Thanks for the idea!!!

qubist (author)  Eradicatore1 month ago

Sounds awesome! You are welcome!

florinc1 month ago

Nice. Good idea. You cut some corners though. The theory says that current limiting resistors should be for those LED. Also, from practical standpoint, there should be a LiPo charger on board. The JST connectors you used for battery won't last too many plugging-ins and outs.

qubist (author)  florinc1 month ago

Thanks for the feedback! Resistors are necessary for the display if you are using 5v which we are not. For 3.3v, resistors are just if you want to be super safe. I wanted to make it as compact as possible, so I left out an on-board charger. The white plastic JST connector itself should last for as long as any other connector in my understanding, but the way I stripped and soldered the battery's wires was not great. I really should have used heat shrink tubing or something.

For a 3v3 supply with 2v drop across the LED, you would need a 68 ohm resistor to get 20 mW. With no resistor, not only are you probably overdriving the LED, but you may also be over-driving the digital pins, which are only rated to source 40 mA each. However, there may be another source of resistance in your circuit, because 1.3v across an LED with no resistor should pull 1.3 amps, which would immediately blow the LED and maybe the digital pin or the voltage regulator.

Vf LED 2.0v (Max)

Vcc 3.3v

If LED 5ma

R=260 ohm

Or @ Vf LED 1.6v (Min) = 340 ohm

This would be right if the LEDs would be powered continuously. SevSeg library takes care of multiplexing, turning on and off the LEDs. That's why they don't blow out right away. But relying on software to take care of the current limitation is not considered a good design (think what happens if, for some reason, the multiplexing is stopped).

florinc qubist1 month ago

Forward voltage on a red LED is max 2V, according to the datasheet. Even if they work now, they won't work much longer, since you stress them.

I understand that space was an issue, but for your next project check Sparkfun's display hookup: https://learn.sparkfun.com/tutorials/bubble-displa...

Those particular JST connectors are used for semi-permanent connections. They are physically hard to unplug because of the retention mechanism.

(Please don't take this as criticism, but as a lesson for your future projects.)

qubist (author)  florinc1 month ago

OK I will take this into account next time. If I build another Altimeter I will update the Instructable.

I am OK with the JST connectors being used more than they "should" be. The people over at Adafruit use them all the time for wearables and never mention problems, so I am going to not worry too much about that.

Thank you so much for the feedback. I try not to take it as criticism but if I do it is my fault :P

zogmeister1 month ago

Hi there

Great instructable.... how do you charge the battery?

qubist (author)  zogmeister1 month ago

Hi. Good question. You can use a Mini-USB to JST charger available from Sparkfun.com or Adafruit.com among other places. I've also added a User's Manual to the last step so you can look at that for other information.

Sowee1 month ago

Do you know how heavy this thing is?

qubist (author)  Sowee1 month ago

Around 8 grams (0.3 ounces).

sscauso1 month ago

This is translated by google, I hope you understand.

Long time I'm looking for a device to forward me from my plane R / C variations in altitude (Vario) ago.

Ideally, the receiver translated the information variable frequency sounds, as do altimeters aboard the real gliders.

You know if this device exists?

You know where I can get?

Thank you very much!

sscauso sscauso1 month ago

Thanks for your reply

qubist (author)  sscauso1 month ago

I think what you're trying to say is you want a device that can show you the altitude of your plane in real-time.

This device won't do that, but it will show you your highest and lowest altitudes after the plane lands.

I don't know much about R/C, So I don't think I can help you find what you're looking for, but I would suggest trying to find a community of people who know more.

Good luck!

marhar1 month ago

Nicely done! I appreciate the care to make it super-light, so that it can easily fit into small aircraft. And I learned a lot about the bubble display... I'll be using these on a lot of small projects in the future. I've got the parts on order right now.

qubist (author)  marhar1 month ago

Awesome! Glad to hear it. I'd love it if you could share them once you are done (you can use the "I Made One" feature of Instructables).

Poppy Ann1 month ago

you did the best thing by missing off the extra resistors and saved a little weight any saving is good when playing with a quad.

qubist (author)  Poppy Ann1 month ago

Well I guess we'll see how long it lasts :) Thanks!

splodgie1 month ago

Hi, What is the total power used when turned on and working, ie: Max mAH draw,

if you could please.

qubist (author)  splodgie1 month ago

The device draws around 40mA while the display is on, though this fluctuates depending on what it is displaying. While in standby mode (display is off but it is still recording altitudes), the device draws 5.5mA.

splodgie qubist1 month ago

Hi, Thanks for your reply, Just the info I needed.

Dave

Alderin1 month ago

Cool little gadget! I might put one in my car for when/if I can ever get one of my other larger projects built. :-)

Though if you replace the Arduino Pro Mini with a Moteino from LowPowerLab.com, and you can have it send the data wirelessly in near-real-time. Almost no other changes to make, and nearly the same size/weight. The Moteino has an RF module to communicate in the 900mhz range (other ranges available), and is as easy to set up as any Arduino.

florinc Alderin1 month ago

Adding the wireless module would also require the use of a bigger LiPo battery. The current 40mAh would probably last less than half an hour of continuous use.

qubist (author)  florinc1 month ago

I guess there is room for a bit bigger of a battery... And you could have the Moteino go to sleep all the time, so it was only on for a couple of milliseconds every 10 seconds or so. I'd say not a bad idea, but a major mod nonetheless... Great idea!

kjlpdx1 month ago

I adjust my altimeter every time I fly my plane based on current air pressure. does your design allow this, or perhaps a zeroing ability so it can display AGL?

qubist (author)  kjlpdx1 month ago

The sensor doesn't allow for this to my knowledge, so the absolute height settings can be a bit off (but not that much, never over ~10 feet). There is a "diff" setting that displays the difference between the lowest and highest recorded altitudes. This setting should always be accurate.

kjlpdx qubist1 month ago
air pressure typically ranges from 28" to 32" of mercury, with 29.92 considered average. this chart shows alitiude variations, far more than 10'. http://www.engineeringtoolbox.com/air-altitude-pressure-d_462.html
which is why I set my altimeter before every flight as well as during cross country flights based on local air pressure. not that this really matters for your application, just want you to know what is true. kevin N3773 RV-6A
qubist (author)  kjlpdx1 month ago

OK I don't really know that much about this and you seem to. Here is a conversation on the Sparkfun page of the sensor. The user named a1ronzo is an official Sparkfun person, hence the logo next to his username. (I was wrong. 10m not 10 feet :P) Here is the rest of that page too.

It looks like there is a calibration sketch. I don't know how it works, but feel free to check it out here.

In any case, the main thing that I was trying to measure with the Altimeter was the difference in heights, and that should stay pretty much the same no matter the slight inaccuracies in the absolute altitude measurements. (right?)

Thanks for the feedback and information!

Ralphxyz1 month ago

I just have never understood using GitHub. I can see your .cpp files and .h files so I can copy paste but I have never been able to download a .zip file it always takes me to making a repository.

What is the imaging software used to run your 3D printed case image? Thad 3D viewer is great.

qubist (author)  Ralphxyz1 month ago

Github has a button in the bottom right corner (see step 7, Red circle) that allows you to download the file a a .zip file. It should let anybody -- even unregistered users -- download the entire repository as a file. Make sure you are "Downloading ZIP" not "Forking." Once you have the file, there should be a folder inside called "Ultimate_Altimeter" and in that, an Arduino sketch file.

The 3D rendering of the STL file is built into instructables.com. Pretty sweet yeah?

1-40 of 52Next »