MPL3115A2 Warmup Time


I am a bit confused with the data from MPL3115A2 (altitude, pressure, temperature sensor). See attached figure. In this experiment, the sensor is just placed on my desk (no movements), and the altitude (yellow line) is recorded. From the results, it looks like the sensor needs about 10 minutes to stabilize.

Is this correct or am I missing something? I think 10 minutes is a lot.

– Andreas

It doesn't measure the altitude, it calculates the altitude.

What is wrong with the GPS altitude ? At start is a peak of 18 meters too high ? That seems strange. Also for the pressure, there is a big peak at the start of 240kPa. That is enormous.

Perhaps the big peak for the pressure messes up the calculation for the altitude.

So the question is : why are there such big peaks at the start. Do you have a BMP085 or BMP180 to compare the absolute baromic pressure ?

Do you have any way to tell when you have GPS lock ? Is it possible it is still acquiring satelites ?

What is wrong with the GPS altitude ? At start is a peak of 18 meters too high ?

I don’t know what planet you live on, but GPS altitude is always crappy like that.

My monitor does not adequately distinguish the colours in your plot, but it seems stange that there is no consistent relationship between the pressure and the altitude, since your device measures the pressure and then calculates the altitude directly from that, using basically what is a standard exponential formula.

Your plot looks ridiculous actually. According to the scale on the right hand side, your pressure axis varies from 0 to 200 kPa. If this scaling is correct, then even if your pressure reading is "noisy", it should still have a value in the vicinity of 101 kPa, and the pressure reading should be a horizontal line with noise at around that level.

Do you have any way to tell when you have GPS lock ? Is it possible it is still acquiring satelites ?

After 6 minutes, he is up to 9 satellites. I don't think the GPS reading is the problem.

The problem lies with his pressure device. His pressure reading is fluctuating wildly between 0 and 200 kPa. In other words, he is reading complete junk. His I2C connection is not reading anything useful at all.

And then, his alleged barometric altitude is showing no correlation to the alleged pressure readings at all, when in fact there should be a perfect although non-linear correlation, because the altitude is determined directly by the pressure. The OP has not said whether he is using the altitude calculated by the device, or whether he is calculating the altitude from the pressure on the arduino. Either way, it's 100% junk.

The whole question of it taking 10 minutes to "warm up" or "settle down" to a stable reading, is effectively a complete red herring, because all of the supposed readings from the MPL3115A2 are complete junk.

I was using (GitHub - sparkfun/MPL3115A2_Breakout: Example code and board files for MPL3115A2 Breakout board.) to communicate with the sensor. I think there is something wrong when it decodes the pressure data.

I switched to (GitHub - adafruit/Adafruit_MPL3115A2_Library: Arduino library for the MPL3115A2 sensors in the Adafruit shop). Now I get consistent pressure data (~101kPa which is close to the weather forecast data).

Now, the altitude variations are probably within the noice level.

That is a big difference. Thumbs up for Adafruit. Did you close all the doors and windows ? on a day without wind outside ? and the sensor not near a computer ? The altitude varies 0.8 meters, I would be satisfied if it was only 0.4 meters.

I had a look at the two codes and they are very different. I can't see how the sparkfun version would be giving you the first answers that you had, though. I think it is more likely that your i2c just wasn't working for you.

When you were using the sparkfun code, were you reading the pressure and altitude alternately ?

I think part of it was just looking at the API interface and not the code. Sparfun did not switch pressure to altitude which Adafruit library does in each reading. Skipping OneShotMode might also improved accuracy.

Now, the accuracy is ok, but I need to do some more experiments outside to see how it reacts.