sparkfun / Weather_Shield

Barometric pressure, temperature, humidity and light sensing weather shield for Arduino.
https://www.sparkfun.com/
Other
67 stars 67 forks source link

Getting wrong data? #19

Closed zeyaddeeb closed 8 years ago

zeyaddeeb commented 9 years ago

$,winddir=-1,windspeedmph=nan,windgustmph=0.0,windgustdir=0,windspdmph_avg2m=5.7,winddir_avg2m=-1,windgustmph_10m=6.2,windgustdir_10m=-1,humidity=998.0,tempf=-1766.2,rainin=7.78,dailyrainin=7.79,pressure=-999.00,batt_lvl=inf,light_lvl=nan,#

rjp663 commented 8 years ago

I'm seeing the same temperature error (tempf=-1766.2). The error seems to occur after about 24hours of run time. Did you ever find the root cause for this issue?

Thanks, Rick

ClintonKeith commented 8 years ago

I'm seeing the temperature sensor defaulting to this temperature as well. Sometimes it happens within an hour of reset, sometimes days later.

amitpatel144 commented 8 years ago

I face this troubling issue too. Is your problem solved or not ? Wait for your reply Mr. thelostscientist.

ClintonKeith commented 8 years ago

No response here. So I installed a DHT22 and get the temp/humidity from that now.

amitpatel144 commented 8 years ago

And Sir what about pressure Sensor MPL3115A2? Is it working properly?

ClintonKeith commented 8 years ago

It’s working. It doesn’t seem too accurate, but that’s the nature of most inexpensive pressure sensors.

On Mar 5, 2016, at 8:03 PM, Amit patel notifications@github.com wrote:

And Sir what about pressure Sensor MPL3115A2? Is it working properly?

— Reply to this email directly or view it on GitHub https://github.com/sparkfun/Weather_Shield/issues/19#issuecomment-192800801.

amitpatel144 commented 8 years ago

Thanks Clinton Keith Sir, for important suggestion. As per as datasheet MPL3115A2 is high accurate pressure sensor, but I doesn't believed it. I used it but I am not satisfied from it. Many times it’s given -999hPa, wrong data and temperature too. One of my friend suggest again about this sensor. I was in dilemma that may be my sensor is not working properly .But actually it is the base problem of this sensor. Nor you and I but also many people faced this problem .The sensor manufacturer said that it’s your connection problem or I2C problem. Same as happen in temperature and humidity sensor HTU21D.

Thanks for suggestion. Now I moved to Bosch Sensortec sensor BME280.

ClintonKeith commented 8 years ago

Thanks Amit,

Please let us know how the BME280 works out. I may have to follow your lead.

The data I get from the MPL (plot below), shows noise within the accuracy range from the datasheet, but the overall average disagrees with other sensors in the area. I might try to install another sensor nearby to compare.

Clint

On Mar 7, 2016, at 12:40 AM, Amit patel notifications@github.com wrote:

Thanks Clinton Keith Sir, for important suggestion. As per as datasheet MPL3115A2 is high accurate pressure sensor, but I doesn't believed it. I used it but I am not satisfied from it. Many times it’s given -999hPa, wrong data and temperature too. One of my friend suggest again about this sensor. I was in dilemma that may be my sensor is not working properly .But actually it is the base problem of this sensor. Nor you and I but also many people faced this problem .The sensor manufacturer said that it’s your connection problem or I2C problem. Same as happen in temperature and humidity sensor HTU21D.

Thanks for suggestion. Now I moved to Bosch Sensortec sensor BME280.

— Reply to this email directly or view it on GitHub https://github.com/sparkfun/Weather_Shield/issues/19#issuecomment-193158716.

amitpatel144 commented 8 years ago

Thanks for your best wishes. I'll try on BME280 as soon as possible.

ClintonKeith commented 8 years ago

Just a follow-up on the built in sensor. It’s worse than I thought. The three plots show three local weather station barometric sensors. The bottom one is the mine (the built-in weather shield). The pressure response is the opposite of the others! I noticed this as a storm just moved through. I expected pressure to be dropping.

I’ll bet there is a bug with the example code.

On Mar 8, 2016, at 3:11 AM, Amit patel notifications@github.com wrote:

Thanks for your best wishes. I'll try on BME280 as soon as possible.

— Reply to this email directly or view it on GitHub https://github.com/sparkfun/Weather_Shield/issues/19#issuecomment-193731758.

amitpatel144 commented 8 years ago

yes ; I agree with you . I think i should need run both sensor at a time. Then I can distinguish better results . Sir, I think you already watched the comparison result. If not then please watch it. link: http://wiki.paparazziuav.org/wiki/Baro_comparsion

amitpatel144 commented 8 years ago

Hello Sir, I purchase a new sensor named BME280. Its precision is 1 meter .I got better result then any other pressure sensor. I got a huge difference between reading of MPL3115A2 and BME280. The noise level is low than MPL3115A2. I got many better feedback on BME280. This support I2C and SPI. I'll attach output soon. Thanks for your best wishes.

amitpatel144 commented 8 years ago

ss

nseidle commented 8 years ago

To address the original problem: a humidity of 998 means the humidity sensor failed to respond over I2C in a timely fashion (ie, not at all). Similary, -999 from the pressure sensor means it failed as well. There is most likely a problem with your I2C bus. If you're using the shield check the solder connection. If you're using a combination of breakout boards double check that the bus has 4.7k pull-up resistors on the SDA/SCL lines. Most of our breakout boards have these pull-ups installed but not all companies include them.

I've touched up the hook-up tutorial to include a new basic sketch. Please give this a try as it will specifically call out an error if I2C communication fails.

@rjp663 I have seen the tempf go negative when I pulled the shield from the board while it was powered up and running, and then re-inserted the shield after a few seconds. I attribute this failure mode to the pressure sensor not getting re-initialized correctly.

I've had a handful of these shields in the field for months at a time without sensors needing to be reset or power cycled. I will run a few-day test over the weekend and re-open the issue.

rjp663 commented 8 years ago

Nathen,

Thanks for your detailed analysis. Due to the unreliability of the shield I've move my temp and pressure sensors off board utilizing a BME280. The weather shield at this point only provides pull-up resistors for the rain, wind speed and wind direction connections. I've also rewritten much of the code.

I've spent my free time for this last year playing around with this weather station. Sooner or later I've got to stop tweaking on it and move on to another project.

Rick

Sent from my iPad

On Jun 10, 2016, at 3:45 PM, Nathan Seidle notifications@github.com wrote:

To address the original problem: a humidity of 998 means the humidity sensor failed to respond over I2C in a timely fashion (ie, not at all). Similary, -999 from the pressure sensor means it failed as well. There is most likely a problem with your I2C bus. If you're using the shield check the solder connection. If you're using a combination of breakout boards double check that the bus has 4.7k pull-up resistors on the SDA/SCL lines. Most of our breakout boards have these pull-ups installed but not all companies include them.

I've touched up the hook-up tutorial to include a new basic sketch. Please give this a try as it will specifically call out an error if I2C communication fails.

@rjp663 I have seen the tempf go negative when I pulled the shield from the board while it was powered up and running, and then re-inserted the shield after a few seconds. I attribute this failure mode to the pressure sensor not getting re-initialized correctly.

I've had a handful of these shields in the field for months at a time without sensors needing to be reset or power cycled. I will run a few-day test over the weekend and re-open the issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

amitpatel144 commented 8 years ago

Is anyone got solution of MPL3115A2 sensor on Adruino due board?

aleixq commented 6 years ago

Sorry to make it alive again but I get correct results using https://github.com/mariocannistra/MPL3115A2 . Running the calibration previously to get the value gives correct results. Run barometer_calibration example to test it (if running this example a lot of time it ends giving -999, let it rest for a while after)

Here I paste snippets of the code that I run giving good values:

float barominMb = 0.0;
float city_meters_above_sea = 280.0; // HARDCODED ALTITUDE
void setup(void){
//Configure the pressure sensor
myPressure.setModeStandby();    // <-- this one starts a config sequence
myPressure.setModeBarometer();
myPressure.setOversampleRate(7);
myPressure.enableEventFlags();
myPressure.setModeActive();
myPressure.runCalibration(city_meters_above_sea);
}
...
void loop(){
pressure = myPressure.readPressure();
barominMb = getPressuremb(pressure, city_meters_above_sea);
}
...
float getPressuremb(float pressure, float currentElevation)
{
  float pressure_offset = pressure + myPressure.elevation_offset;

  // output is in Pa
  // 1 kPa = 10 hPa = 1000 Pa
  // 1 hPa = 100 Pascals = 1 mb
  pressure_offset = (pressure_offset / 100) ;   //  ... / 1000 * 10 ;
  return pressure_offset;  
}
nseidle commented 6 years ago

Please start a new issue with as much of a description of your issue as possible.