Skip to content

ahmetonat/Aviation-Altimeter

Repository files navigation

Aviation-Altimeter

Barometric altimeter with MEMS pressure sensor, ARM processor and OLED display

Aviation use altimeters are extremely sensitive mechanical devices which use a bellows to convert pressure to displacement, and then use a clockwork mechanism to convert the displacement to dial position on the display. Since the overall displacement is quite small (a few millimeters for the ~20,000 ft altitude range of the device, the mechanism must be fairly complex, precise and maintained periodically. Accurate and sensitive MEMS sensors have been available since around 2005, which are a perfect replacement for the mechanical altimeters. However the early versions were analog (simple Wheatstone bridges) which meant that they were susceptible to drifts, required temperature compensation and fairly complex electronics to read the output voltage with sufficient precision to allow use as an aviation altimeter.

Technology to the rescue, recently these problems were solved with tiny pressure sensors which include temperature compensation, low drift, and high precision analog digital converters on-board. Simple communication protocol is sufficient to interface with them, and it is only a matter of following the datasheet to implement up to 24 bit pressure and temperature readout. Quite incredible, where the tecnology has come!

One such notable pressure sensor is Measurement Specialities MS5611 series. They have 24 bit precision and high accuracy, with factory calibrated coefficients permanently stored on-chip, which are used to convert raw measurement values to pressure reading. It is a dream come true; such a precision and accuracy is difficult to come by at such low prices, of about $8~10. Better, they come installed in many drone flight controllers. This is great because for about $25, you get a STM32F103 microcontroller with many other sensors, clock, regulator, all broken out to .1" pin headers. A great platform to experiment and develop with (see my blog on this: http://aviatorahmet.blogspot.com/2016/05/naze32-custom-code-binking-lights-with.html).

In this project, a full function barometric altimeter for aviation use was implemented using a Flip32 (Naze32 clone) flight controller board with installed MS5611 pressure sensor, an SSD1306 graphic OLED screen on I2C, and a rotary volume encoder. A single LiPo cell powers the system, with about 40mA current draw.

QNH adjustment is implemented. You can learn the local QNH value of a nearby airport, dial it into the device, and obtain the MSL altitude in feet. In exactly the same way as a conventional altimeter is used.

Operation: At power up, an information screen is briefly displayed. Then it returns to normal operation where altitude in ft. is displayed in the center of the screen, measured local pressure in hPa and temperature in Deg. C. at the top, and set QNH at the bottom. To adjust QNH, press and turn the dial. The QNH set screen appears. At the center QNH value is displayed and at the top are the MSL altitude in feet and meters. If you know QNH, you can dial it while keeping the dial pressed in, or if you know the MSL altitude, you can dial that, just as in conventional altimeters. Upon releasing the dial, the device returns to the altitude display screen. Double click takes you into the information screen and back out of it.

The project requires u8glib ARM port, and was compiled with GCC ARM Embedded toolchain, easily downloadable from Launchpad. A binary is provided for direct burning into a Naze32, Flip 32 or similar. Elctrical connections are very simple: OLED display connects to the provided I2C terminals, encoder to GPIOA, A signal:PA1, B signal:PA3, click signal:PA0. Internal pull ups of STM32 are used for simplicity, and no smoothing capacitors are needed.

See the full write-up, complete with photos and video of operation in my blog: http://aviatorahmet.blogspot.com/2016/05/altimeter-with-qnh-setting-diy.html

About

Barometric altimeter with MEMS pressure sensor, ARM processor and OLED display

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published