Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

BMP085 Incorrect Readings #35

@StaticDet5

Description

@StaticDet5

I have very little experience with programming like this. I'm really learning from folks who are brave enough to put their code up to be shared, so thank you.

I had the Adafruit I2C library working, and I've been using the BMP085 sensors to monitor temperature and pressure. I recently updated to the newest version and my BMP085 temp sensors seem to be broken (I have a TMP102 sensor running on the same bus and it is reporting normally). I've swapped out BMP085 sensors and I'm getting consistent readings across the sensors.

(Byte Order not being reversed before returning Raw Temp)

According to the data sheet, the uncompensated temperature value needs to be byte reversed before being returned out of the function. Attempting to run the code for the BMP085 without doing this gives me obviously wrong, unstable values.

Adding
raw = self.i2c.reverseByteOrder(raw)
before the if(self.debug) statement gives a stable, but obviously wrong value.

(Parentheses placed incorrectly)
in the function
def readTemperature(self)
the
X1 = ((UT - self._cal_AC6) * self._cal_AC5) >> 15
seems incorrect. I think it should read
X1 = (UT - self._cal_AC6) * (self._cal_AC5 >> 15)

This gets me results that are closer to real, but still incorrect.

(Deviation from the datasheet)
This calculation is different from the datasheet:
temp = ((B5 + 8) >> 4) / 10.0
Where did the "/10" come from? With this, the values are wildly inaccurate, but I don't understand why it is needed.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions