electronut Programming & Embedded Systems - by Mahesh Venkitachalam

Temperature/Altitude/Pressure Display using BMP180

BMP180 Display

I was in Bhutan last December, and as we travelled to different locations, I kept wondering what the temperature and altitude was, and wished I had some gizmo that would show me these values. Back home, I did a bit of research on altitude sensors, and one that came up was the cheap BMP180 sensor. It measures temperature and pressure, and the latter can be used to calculate the altitude. It’s been lying around with me the past few months, and now I’ve finally gotten around to building a display around it.

This project uses an Arduino Pro Mini 3.3 V clone, a BMP180 sensor and a Nokia 5110 LCD module to display the current temperature, altitude and pressure. Here is the schematic for the project:

BMP180 Schematic

The circuit uses a push button so that the circuit and display is on only as long as you keep it pressed, conserving the battery. To interface the Arduino with the BMP180, I used Sparkfun’s library. For the Nokia 5110 LCD, I used the Adafruit Nokia 5110 library. The code alternates between drawing a silly “mountain/location” animation and reporting the sensor values. I also built a laser cut enclosure for the project, using using the Inkscape T-Slot Boxmaker plugin.

BMP180 Enclosure

Here is a photo of the project assembly:

BMP180 Assembly

You can find all files realted to this project including code, schematic and enclosure design at my github link here.

The end product turned out to be a bit bulkier than I wanted. With a custom PCB and a LiPo battery, I could have made something much smaller. I also want to find a better alternative to the laser-cut T-slot method - maybe combine laser cutting with 3D printing. Oh well, next time.

If you liked this article, please consider supporting my efforts by purchasing my book.

Python Playground, published by No Starch Press, USA, is a collection of imaginative programming projects that will inspire you to use Python to make art and music, build simulations of real-world phenomena, and interact with hardware like the Arduino and Raspberry Pi. Do check it out!