The Raspberry Pi Creation You'll Want To Bring On A Hike
The Raspberry Pi Pico is a cheap, compact, microcontroller that packs a lot of punch. Like the full-sized Raspberry Pi, the smaller board can serve as the centerpiece of a host of creative projects. While designing something like an altimeter may seem daunting at first, it's actually pretty straightforward with a Pico and the right components.
You can use a Pi Pico, a BME280 sensor, and an algorithm to create a functional altimeter. The process is demonstrated in the video below, and on Hackster.io. This device can come in pretty handy while hiking for a number of reasons. If you're going up a mountain, you can subtract your current altitude from the height of the summit to work out roughly how far you have to climb. If you're using a topographical map, altitude is another piece of information you can use to determine your exact location.
In extreme circumstances, an altimeter could help keep you safe. Once you climb above 26,000 feet, the atmosphere no longer contains enough oxygen to sustain life. When you enter the "death zone," you can either use supplemental oxygen or you'll have around 16 to 20 hours to perform whatever task you were doing. An altimeter can help you pinpoint when you enter the zone, so you can start counting down the time you have left or make the most of your oxygen tanks. With that being said, if you're climbing one of the few mountains that goes into the death zone, you should probably pay for a piece of professional kit instead of relying on a homemade device.
How the Pico Altimeter works
You can use readings from your environment to calculate your height above sea level with a good degree of accuracy. The BME280 sensor can measure things like air pressure, humidity, and temperature and then relay that information to the Raspberry Pi Pico. From there, the code you have installed can take the air pressure reading, and use it to figure out your altitude.
The reason this works partially comes down to gravity. It affects everything with mass to some degree, and pulls most of earth's gas as close to the surface as possible. This results in the air being dense at sea level, with the density decreasing the further up you go. The denser the air is, the more pressure it can exert, so the lower densities at higher up will result in less pressure exerted on the sensor.
Air pressure is around 14.7 PSI at sea level, and only about 4.84 PSI at the summit of Mount Everest. If you're hiking, you're on land and the pressure you're experiencing will be somewhere in between. As a rule of thumb, pressure will drop by around 0.5 PSI for every 1000 feet you go above sea level, though this rate drops off the higher you go. With the correct algorithm, it's easy to translate a pressure reading into an altitude estimate. If you want to try this yourself, the Pi Pico is one of the few Raspberry Pi products that is readily available and reasonably cheap. You can pick up a two-pack of the microcontrollers on Amazon for just over $12.