enjoyneering / BMP180

This is an Arduino library for the Bosch BMP085 & BMP180 barometric pressure & tempemperature sensor
11 stars 8 forks source link

What about the temperature - 260 ℃ #2

Open brightproject opened 1 year ago

brightproject commented 1 year ago

Hello @enjoyneering Use BMP180 breadboard GY-68 I2C adress 0x77 Датчик давления и температуры BMP180 Is the sensor faulty or is the library configured incorrectly? Скриншот 12-07-2023 20 45 57 I use example. Just changed terrain height from 115 to 150. I tried to add an include to the sketch, but nothing changes.

#include <BMP180.h>

But then I saw that the main header file was already added to #include <BMP180advanced.h> maybe some coefficients need to be adjusted, or is the sensor defective / fake? Does this sensor have a built-in temperature sensor? I used to think that it was not inside, but I saw the meaning and was surprised. Added information When I used another library temperature is corrected Скриншот 12-07-2023 21 43 00 compensation calculation B5 function in this library is

int32_t BMP180::computeB5(int32_t UT)
{
  int32_t X1 = ((UT - (int32_t)_calCoeff.bmpAC6) * (int32_t)_calCoeff.bmpAC5) >> 15;
  int32_t X2 = ((int32_t)_calCoeff.bmpMC << 11) / (X1 + (int32_t)_calCoeff.bmpMD);

  return X1 + X2;
}

compensation calculation B5 function in this library is

long BMP180::calculateB5(long UT) {
    long X1 = (UT - (long)_AC6) * (long)_AC5 >> 15;
    long X2 = ((long)_MC << 11) / (X1 + (long)_MD);
    return X1 + X2;
}
achilles0XFF commented 7 months ago

hey @enjoyneering and @brightproject , i was testing the sensor, i used this library before and it worked correctly, but when i use it now i run into the same problem as you did, the temperature being -260 therefore the pressure reading is also incorrect, i read your comment and saw the solution that you provided but when i use the other library that you provided, i run into the same problem again, temperature is again -260, i'm pretty sure that my sensor is ok. do you know how to solve this?