Measuring Height with Atmospheric Pressure
Introduction
It can be easy to forget that we are constantly under pressure (although Freddie and Bowie tried to tell us) from the atmosphere around us. Not only that, it’s a bit counterintuitive: the higher up you go, the less pressure there is, and vice versa. There are a few ways we encounter this in our day to day, like maintaining cabin pressure on a plane at 30,000 feet or water boiling just a little bit faster out here in the Rockies! With this project, we’re going to play around with the atmosphere around us, and do a little bit of math, to create a pressure sensor-based height measuring tool!
The powerhouse of this project is the Qwiic MicroPressure Sensor. This sensor has an onboard Honeywell 25psi piezoresistive silicon pressure sensor which gives the ability to measure very minute differences in absolute pressure. We'll take those pressure measurements, apply some math inside the code and translate the change in pressure from a bottom and top reading into a height measurement.