MPL3115a2 readings are not accurate

cancel
Showing results for 
Search instead for 
Did you mean: 

MPL3115a2 readings are not accurate

Jump to solution
641 Views
Contributor V

Hi,

        I am working on a project where I have to sense the pressure readings on various floors of a building. The hardware I am using is Rapid IoT with MPL3115a2. I am reading the value for every second. But my values are not accurate when I compare it with other barometers. I have tested it multiple times but the values are very random. 

Why is it so? I also checked the product datasheet and NXP websites. It was mentioned, the accuracy is good. But there are a lot of fluctuations in the pressure readings(it feels like a random number readings).

Can you anyone tell me whether rapid iot which has an embedded MPL3115a2 is the right fit?

if not please suggest some other barometric sensors to work with.

Thanks and Regards

Niranjan

0 Kudos
1 Solution
318 Views
NXP TechSupport
NXP TechSupport

Hi Niranjan,

Apologies for that, please find my example project attached below.

Unfortunately I am not familiar with the code you attached, it seems to be complex and a bit hard to review/reproduce. If I find some spare time, I will look into it. 

Best regards,

Tomas

View solution in original post

0 Kudos
4 Replies
318 Views
NXP TechSupport
NXP TechSupport

Hi Niranjan,

Issues with accuracy or drifting measurements that do not correlate with the weather or ambient pressure changes are usually related to a little-known fact about light sensitivity. The sensor die is light sensitive and direct light exposure through the port hole can lead to varied accuracy of pressure measurement. My recommendation is to avoid such exposure to the port during normal operation. For instance you can put a small piece of foam over the port to block out light, but still allow the air to reach the sensor. Using this and maximum oversampling (128x), you should be able to achieve the accuracy specified in the datasheet. If not, please post here your source code so that I can review it. You can find my example project here.

Best regards,

Tomas

0 Kudos
318 Views
Contributor V

Hi,

    Thank you for your response. 

1. I am not able to download the demo project(the link you have provided). The attachment has been removed from the NXP community!!

2. Meanwhile, I tested a demo code using mpl3115a2 libraries in mbed platform. I have attached the file over here. The changes in altimeter values are marginal

Can you look into the source code and help me to improve accuracy. (function used: in code: print_AltimiterValue )

It would be really helpful if you can point me in the right direction. Once successful, I would be placing an order for more than 100 of these for my project work. 

EDIT:: Attached Updated Project Code

Regards

Niranjan

0 Kudos
319 Views
NXP TechSupport
NXP TechSupport

Hi Niranjan,

Apologies for that, please find my example project attached below.

Unfortunately I am not familiar with the code you attached, it seems to be complex and a bit hard to review/reproduce. If I find some spare time, I will look into it. 

Best regards,

Tomas

View solution in original post

0 Kudos
318 Views
Contributor V

Hi,

     I am able to observe altimeter values now. When I move from one floor to another floor, the marginal difference is very small.

For example.

floor 1 - values range from 160 to 164

floor 2 - values range from 164.5 to 168 and so on.

Is there any way to improve it or increase the difference? My aim to achieve a prediction of the floor based on these sensor readings.

Currently, the oversample rate is 128x. 

(I also have an additional mpl3115a2 sensor with me. Any sorta taking average of sensor values or any other mathematical approach)

Best Regards

Niranjan

0 Kudos