PHYSICISTS LIKE TO share the legend of a professor who asked students how they might determine the height of a building using a barometer.

The story goes on to list some of the ways you might do that. You could drop the barometer from the roof and record the time it takes to hit the ground. Or you could offer the barometer as a bribe to the building manager and ask him the height.

Of course, this isn’t really a story about finding the height of a building, but rather a lesson on finding inventive solutions—the point being that teachers should not discourage students from thinking of new ways to solve a problem. (Even if that does make grading tests trickier.)

But still, the question remains: How *would* you measure the height of a building using a barometer?

### What Is a Barometer?

In short, a barometer measures atmospheric pressure. This pressure changes as weather systems move through an area—storms result in lower barometric pressure. The simplest barometers use mercury and looks something like this:

The tube on the right has a higher mercury level, with a sealed top and a vacuum above the mercury column. The column on the left is open to the atmosphere. Notice the dotted line. In order for the mercury below this line remain in equilibrium, the air pressure pushing down on the left must be equal to the pressure of the mercury pushing down on the right. By measuring the height of the column, you can calculate the atmospheric pressure. In general the pressure in a fluid (like mercury or air) increases with depth and can be calculated as:

In this expression, *h* is of course the depth of the mercury and *g* is the gravitational field (with a value of 9.8 N/kg). The ρ represents the density of the fluid. But what if the atmospheric pressure changes? With an increase in pressure, the atmosphere will push down on the open tube and cause the mercury to rise until the two sides of the tube achieve equilibrium.

You usually find mercury in barometers because it has a density of 13,560 kg/m^{3} which is significantly higher than the density of, say, water (1000 kg/m^{3}). Since normal atmospheric pressure is about 10^{5} N/m^{2} (or 10^{5} Pascals), you would need a mercury column of 0.76 meters (or 760 mm—a common unit for pressure). Using water would require a column 10 meters tall. That’s just too tall to be practical.

### Using a Barometer to Measure Altitude

Now for the fun part. Suppose I use a barometer to measure the atmospheric pressure on the ground floor of a building. As ride the elevator up, the atmospheric pressure decreases. Why? For the same reason the pressure changes with different heights of mercury. Assuming the density of air remains constant (a reasonable assumption, given the small change in altitude), the change in pressure from the ground floor to the roof would correlate to the height of the building. This equation is just like the one to calculate the pressure from the mercury except that it uses the density of air (1.2 kg/m^{3)}. Ascending a 30-meter building would see the pressure decrease by 353 N/m^{2.} That represents a tiny fraction of the atmospheric pressure, which explains why you need a highly sensitive barometer. Fortunately, my iPhone has one.

Yes, the iPhone features a built-in barometer. It doesn’t use mercury, though. It uses an electric sensor. I can even record pressure readings. Several iOS apps do this, but I like SensorLog. It seems to work reasonably well.

I recently attended a conference in a building with an elevator. Of course I used my iPhone to calculate the height of the elevator as a function of time using the pressure data:

In order to prevent negative height values, I set the lowest value to zero meters. Also, notice that although the app records data at 100 Hz it doesn’t seem like the pressure values change as fast. This is what produces those steps in the above graph. Unfortunately, this means that it would be difficult to find the acceleration of the elevator. I guess it’s a good thing the iPhone also has an accelerometer in it, right? Perhaps the next step is to use the accelerometer to measure the height. I will save that for a future post.