Electronic – How to compensate for weather changes in barometric pressure sensor (BMP180)


I am using BMP180 barometric pressure sensor on an elevator for extended periods (months together), below is the guidance from Sparkfun.

Sparkfun guidance: “You should also remember that pressure changes due to weather will affect your altitude readings. The best accuracy will be obtained if you take a “fresh” p0 (baseline/reference pressure) when you need it and don’t rely on it to be accurate for extended periods due to changes in the weather”

How can I obtain a fresh p0 (baseline/reference pressure) when the elevator is continuously moving ?

Best Answer

Two options:

  1. Detect ground-floor and perform a reset on each arrival.

  2. Install a second unit on a specific floor and update the reference pressure in the elevator micro - perhaps by wireless connection.

And ...

  1. Try to compensate in software. If you can detect the difference between the rapid changes of pressure due to elevator motion and those due to atmospheric variation, you could adjust accordingly when the elevator stops (but see caution notes).

  2. If there is reasonably frequent travel to upper and lower limits, you could recalibrate then. i.e.,

if (p > pmax) { // p is pressure reading. pmax = p; // Must be at top floor. pmin = p - bottom_to_top; // bottom_to_top is the pressure span } if (p < pmin) { pmin = p; // Must be at bottom floor. pmax = p + bottom_to_top; } You would have to manage power-up if the micro doesn't have non-volatile memory.


If this is an office building with air conditioning, you may have trouble with varying pressures on different floors. This may be high enough to 'swamp' the readings between floors. One way of avoiding this may be to read only when the elevator doors are closed and monitor lift-shaft pressure but this may vary also due to compression of the air during descent and vice versa.

Related Topic