Home | Product Categories | Weather | SEN-09694

Barometric Pressure Sensor - BMP085 Breakout

sku: SEN-09694 RoHS Compliant In Fritzing Library In Eagle Library

Description: This is a simple breakout board for the BMP085 high-precision, low-power barometric pressure sensor. The BMP085 offers a measuring range of 300 to 1100 hPa with an absolute accuracy of down to 0.03 hPa. It's based on piezo-resistive technology for EMC robustness, high accuracy and linearity as well as long term stability. This sensor supports a voltage supply between 1.8 and 3.6VDC. It is designed to be connected directly to a micro-controller via the I²C bus

This breadboard-friendly board breaks out all pins of the BMP085 to a 6-pin 0.1" pitch header. The analog and digital supplies (VDDD and VDDA) of the BMP085 are tied together and broken out to a single pin. We've also put two 4.7k pull-up resistors on the I2C lines.

Features:

  • Digital two wire (I2C) interface
  • Wide barometric pressure range
  • Flexible supply voltage range
  • Ultra-low power consumption
  • Low noise measurement
  • Fully calibrated
  • Temperature measurement included
  • Ultra-flat, small footprint

Dimensions:

  • 0.65 x 0.65" (16.5 x 16.5 mm)

Documents:

Pricing

In stock

19.95
17.96
15.96

73 in stock

price
10-99
100+



Add to Wish List


Comments 68 comments

  • Got this working on Arduino Pro Mini, here’s the full code:
    http://mitat.tuu.fi/?p=78

    • I believe that there is a calculation error in this code which gets worse as sensor oversampling increases.
      It occurs in the lines where it is setting b3:

      if (oversampling_setting == 3) b3 = ((int32_t) ac1 * 4 + x3 + 2) >> 1;  
      if (oversampling_setting == 2) b3 = ((int32_t) ac1 * 4 + x3 + 2);  
      if (oversampling_setting == 1) b3 = ((int32_t) ac1 * 4 + x3 + 2) >> 1;  
      if (oversampling_setting == 0) b3 = ((int32_t) ac1 * 4 + x3 + 2) >> 2;  
      

      These lines should be replaced by the datasheet and API formula:

      b3 = ((((int32_t)ac1 * 4 + x3) ## oversampling_setting) + 2) >> 2;  
      

      where ## is meant to be the shift-left operator (sparkfun strips ‘less-than’ characters out of posts)
      With a raw temperature reading of 31908 and a raw pressure reading of 320701 at ultra high resolution, the first code snippet gives me a true pressure of 118662. However, when using the second code snippet (which I believe to be correct) I get 100296 – which is within 1hPa of my local weather station.

  • I hope you don’t start at trend putting pull-up resistors on I2C control lines. And if you do please pick the highest resistance (i.e. 10 kohm) as the vast majority of folks would be using a 100 kHz SCL clock rate.

    • I second the motion. I don’t have any preference between having 10K pull-ups or none but I would really prefer not having some smaller value like 4.7K.
      On a separate topic, in case anyone is wondering these sensors can measure an altitude from about -1,000 feet to about 30,000. I might be wrong but I hope I’m right:) I found this site to be helpful. http://www.omega.com/techref/techdata.html#altitude

      • May I add; make all the I2C parts have a similar pinout (at least the I2C lines) so that they can be stacked.

    • I Third this- Too bad they did not use the oval with a space in the middle switch. —( )— Then if you need the pull-ups you just drop some solder in the midle to connect the resistors.

    • I know the post is very old, but on page 15 of the Bosch data sheet, they recommend putting 4.7kOhm resistors to Vddd on both SCL and SDA. Looks like they were just following the datasheets recommendations.

  • I did a test of this sensor relative to GPS altitude on a drive down highway 38 from Sugarloaf CA (near Big Bear) to Mentone, CA.. The results, as well as the Arduino code needed to reproduce my experiment is here:
    http://sites.google.com/site/wayneholder/gps-vs-barometric-altitude
    Wayne

  • All i can say is finally! I’ve been waiting for this for months ever since I suggested it back in January. Can’t wait till you have it back in stock.

  • I desoldered the sensor from this board and found that pin 4 (Vddd) is not connected. The schematic indicates that it should be routed to Vcc. The board still works reasonably well so presumably the digital part of the chip is deriving power through some unintentional path such as the analog supply or the i2c pins.

  • No Joy. I noticed that the digital power pin isn’t connected and if I put a CRO on it I notice that the voltage on the digital power pin is decaying to zero volts when I attempt to communicate to it.
    The XCLR pin which is internally connected to the digital power pin is following the same pattern.
    The sparkfun wiring example indicates that the device should be powered by 5volts. This is in excess of the absolte max in the Bosch data sheet (4.25V).
    What has everyone else been using to power this device?
    Are there any breakout boards available with pin 4 (digital power pin) connected?

    • The Quickstart guide says… “Pay special attention to how you power the BMP085. Its maximum supply voltage is 3.6V. So don’t go feeding it 5V!”

  • I’ve followed the spec sheet powering it at 3.3V and haven’t had a problem, it’s worked perfect and readings are comparable if not the same as the local weather.

  • Does anyone have Arduino code for this that works? I’ve tried several versions from different spots on the Internet and always get unusable results. As far as I can tell, the problem is that the Arduino doesn’t have a “short” variable type (-127 to 127), which is required for reading the registers. I may be wrong, but I’m definitely spinning my wheels. Thanks!

  • @ scoopjones, use this example code, http://mitat.tuu.fi/?p=78, from Finnishguy. It works perfect, I’ve been meaning to turn it into a library just haven’t gotten around to it yet, I’ll post something when I do, hope it helps

  • I tried the suggested code and the change in line 58 to “long ut= bmp085_read_ut();”, but results are still strange. I got 272 for the temperature, and 99615
    for pressure (that could be true, but I’m not sure). Can anyone with working code post a link. Would be much appreciated. Thanks!

  • I’ve just got this to work with the Bus Pirate. Great sensor. One note though about the product description… The absolute accuracy is +/– 1 hPa, not 0.03 hPa. Resolution is down to 0.03 hPa.
    Converting the coefficients was the hardest job since the datasheet nor the application note give the conversion formula. It’s only in C-code. And since I’m not that good at C it took a little time to understand how some of the coeffs are negative.
    If you are deciding between this and MPL115A2I2C take this. I have both and MPL115A’s coeffs are way harder to convert (fixed point numbers).

  • I am using the BMP085 with the new Arduino Uno and a Logic Level Converter (http://www.sparkfun.com/commerce/product_info.php?products_id=8745). Whenever I call Wire.endTransmission() I get error code 2 (received NACK on transmit of address). All the boards are un-modified and I have to following connections:
    A – Arduino
    L – Logic Level Converter
    B – BMP085

    Power

    A,3.3V L,LV
    A,3.3V B,VCC
    A,5V L,HV
    A,GND L,GND
    A,GND L,GND
    A,GND B,GND

    Data

    A,Digital4 L,Ch1,TXO
    A,Digital5 L,Ch2,TXO
    B,SDA L,Ch1,TXI
    B,SCL L,Ch2,TXI
    Voltages seemed fine (3.28V on 3.3V rails). Any thoughts? Could I have burned it out when I soldered on the headers (It was hot to the touch after 5-10 seconds)? And lastly, how would I test the chip with only an Arduino and multimeter? I am new to the electronics part of this.

    • SOLVED
      I was connecting SDA and SCL to digital pins 4 and 5 on my Arduino. They should be connected to ANALOG pins 4 and 5. Well that was a waste of a day.

  • Fabulous sensor — just got it working on my bench after not playing with it for months.
    A lot more computationally intensive than http://www.sparkfun.com/commerce/product_info.php?products_id=8161

  • this is very accurate as the value keeps the same with the local weather station nearby!

    • I’m not getting the pressure accuracy … local weather stations report 30.16 inHg (1013.25 millibar) but the sensor is reporting 99500 (995.00 millibars).


      Temperature 22.5 C looks right.


      For the altitude calculation below, I need to subtract about 650 from the pressure reading, making it 99500-650=98850, in order to come out at the correct local altitude.



      altitude = 44330 * (1.0 – pow((float)pressure/101325.0,(1/5.255)));

      • I don’t know if this is related, but I found this post http://www.picbasic.co.uk/forum/showthread.php?t=13081 that mentions the sensors are affected by light.


        Indeed, I shone a flashlight onto the sensor and the readings went from 99826 to 99710, which affected my altitude calculation – it went from 208m to 227m.


        Perhaps some of the other comments on the post are relevant also (stressing of the substrate)?

  • sunrise@sunsys.net: I’m not getting the pressure accuracy … local weather stations report 30.16 inHg (1013.25 millibar) but the sensor is reporting 99500 (995.00 millibars).


    Okay, weather reports provide pressure corrected to sea level so that comparisons between stations can be made. The sensor reports current pressure only.


    Altitude relative to sea level can be calculated using the sensor’s pressure value like this:


    altimeter_setting = (float)101325pow(((288-0.0065known_altitude)/288),5.256);


    altitude_meters = 44330 * (1.0 – pow((float)pressure/((101325+pressure)-altimeter_setting),(1/5.255)));



    But that’s not the whole story, I think my sensor is still providing an odd value. Using actual data from the sensor (my altitude is 206 metres ASL):

    Pressure from sensor(Pa): 97880

    altimeter_setting calculated: 98873

    altitude_meters: 208


    Weather Underground reports 100500 Pa at my location.



    Thank you to http://www.experts123.com/q/is-the-reported-barometric-pressure-adjusted-to-sea-level.html. I looked at lots of other sources but this had the best explanation, and a formula for sea level correction that seems to work!




    • Today I obtained values from an aircraft altimeter … set to 0 feet it reads 29.34 (993.566 hPa); set to 700 feet it reads 30.05 (1017.61 hPa). The latter agrees with Weather Underground (1017 hPa and rising).


      The BMP-085 sensor output (after the equations in the datasheet) is 988.10, and corrected to sea level 1012.75. So it seems like the sensor output is 5.466 hPa too low, and as a result the sea level correction is 4.86 too low also.


      Re-checking my program, I manually substitute the pressure reading from the 0 feet altimeter 993.56 and the sea level corrected output is 1018.08 – which is much closer to the 700 feet altimeter reading, the error is only 0.45 hPa.


      Re-checking the program calculations from the datasheet, using the datasheet calibration values and input pressure, the output pressure is the same as given in the datasheet example.


      So my conclusion is the sensor is reading too low -about 5.4 hPa.

      • I have received information from a Bosch engineer, who points out that:
        – a pressure vessel would be needed to determine the accuracy of the sensor … local weather stations may be too far away, or their reports to old, to use as a reference
        – the calibration of the altimeter I was using is unknown
        – the sensor is very accurate but not an “ideal” sensor
        – the specification document mentions a possible offset (“up to 1 hPa”) as a result of soldering techniques, which would not be included in the on-chip calibration data stored in EEPROM

        • With the aircraft altimeter if calibrated if you set it the the field elevation then the pressure should be the current pressure. Alternatively if you get the pressure at the airport and set it in the altimeter than it should read the field elevation, if this is true its accurate to a few feet.
          Most airports update the pressure every hour, ask the FBO what the pressure is or if you have a radio the airport will have a frequency with an automated notice including the pressure.

  • This works, but not with my 28j60 ethernet shield, which uses SPI as well. I see someone connected theirs to analog 4 and 5, not like the example showing SDA and SCL to digital 0 and 1?
    Firing this up locks up the etnernet shield.

  • I agonized over designing a product around this chip or the much more expensive SCP1000. The SCP1000 claims to be accurate to within a 9cm column of air (raise/lower it 9cm for a different altitude reading). I had to do the math on the BMP085 because all they give is an accuracy of 0.03 hPa, that works out to 9.75 inches or 25 cm at sea level, about three times that of the SCP1000 but still fantastically accurate for an altitude based product. If you want to see the math 0.03hPa = 3Pa, and at sea level a foot change equals 3.7Pa

    • Don’t agonize it appears that the scp1000 is obsolete. If you plan to design a product you probably want parts that are going to be around for a while.
      http://www.vti.fi/en/support/obsolete_products/pressure_sensors/

  • Are you sure this part is in the Eagle library? I think the latest (at time of writing, the April 13th 2010 version) has the sensor itself, but not the breakout board.
    Anyways not too hard to make yourself, but yeah, not in the library (yet)

  • [delete this comment]

  • does anyone knows if the temperature measurement works with negative values ? lets say down to -20degC ?

  • Can this be used with Adafruit’s data logging shield, which also uses i2c on analog pins 4 and 5? The pins are open and solderable.

    • I’m trying to do just that and am having problems. If I comment out my pressure sensor code, the real-time clock works fine. If I comment out my real-time clock code, the pressure sensor works fine. However, having both sets of code enabled causes my Arduino to seize up.

      • Sorry, strike that. It helps if you don’t mix up the SDA and SCL connections. Now that I have fixed that, I am able to poll both the real-time clock on the Adafruit data-logger shield and the BMP085 pressure sensor using the same Wire library. At the same time, I am also able to write files to the SD card on the data-logger shield as well, but that’s via SPI, so no surprise there.

  • Hopefully somebody knows the answer to the following mystery or could give me some hints to solve it: I’m using two barometer sensors: the BMP085 (I2C) and the SCP1000 (SPI). Somehow the values of both sensor are way off.
    First the temperature:
    The SCP1000 tells me it’s 25.15C while the BMP085 thinks it is 28.1C while in fact it is much cooler around 21C.
    Then the pressure:
    SCP1000: 101767Pa
    BMP085: 103962Pa
    The SCP1000 seems to be closest to the actual value. Both sensor are located on the same board.
    Suggestions are welcome!

  • (1) Has anyone got code to read the BMP085 with a Basic Stamp
    or PICaxe ?
    (2) I’m interested only in pressure variations, not absolute
    value. I wonder if I can omit some of the calibration steps ?

  • We bought BMP085 from Sparkfun and used C8051F340 to communicate with it via I2C.
    Temperature measured 23.1 degC.
    The pressure measured was 99568 Pa. The local weather station had 29.47 in = 99 785 Pa
    These are the dig. signals over the i2c bus.
    AC[12345] = {10377, -1393, -14300, 35532, 24474, 20309}
    B[12] = {5498, 78}
    M[BCD] = {-32768, -11075, 2432}
    UP = 368764, UT = 28522.
    I would say the complexity level of this device is more than I expected.
    Overall this device is working great.

    • Can you tell me what conversion you are using for the 16-bit registers to convert them to a decimal number?
      I am using a non-arduino microcontroller and I am having difficulty getting the calculated temperature and pressure match (even closely) to room temperature and pressure readings. So I suspect I am using the incorrect calibration constants…
      HELP!

      • The datasheet has a pretty complete example on the integer math involved (pay attention to the variable sizes and whether they’re signed or unsigned). But there’s also a paper here on doing all the calculations as floating point, which may be easier to follow.

        • Thanks Mike.
          After trying to get this to work I took a nap and I did a search for “calibrating the BMP085” and I came across that paper.
          In there it explicitly says that the 16-bit signed numbers are using two’s complement. I suspected that that was used but I was still getting some weird values.
          I will give it a thorough read and tackle it again tomorrow.
          Question?
          Is it possible to write to these calibration constant registers?

          • A nap is almost always a good idea in these situations. ;) And I don’t believe you can overwrite the calibration registers, though I may be wrong about that.
            One thing that helped me was to run the example values in both the datasheet and floating-point paper through my code to see if I came up with the same intermediate and final results as in those papers. This can help narrow down the source of the problem. Good luck!

            • That is exactly what I did Mike.
              I used their values in my microcontroller, (has a math object) and also in a python script (just to be sure). I have the results printing to screen at the exact points in the code and I am getting the same values as them.
              There must be something I am missing.
              I will look back at the calibration constants again and make sure I am reading and converting them correctly. Also if I am reading UT and UP correctly.
              Its a shame about the calibration constants. In my line of work, if I intend to deploy these I will have to be able to do my own calibrations and adjustments, which would need me to write to those calibration constants. ( that is if I understand the complex process).
              If all else fails I will just have to order an arduino and bite the bullet.

  • I just purchased this sensor from a local shop. It works. Though I spent a good amount of time looking at the issue of having a 3.3 v device on a 5 v I2C bus before I connected this little sensor to my Arduino Uno. I was prepared to construct a level shifter, until it occurred to me that it might be possible to disable the internal Atmel 328 pull up resistors for the I2C bus.
    It is possible to do this by changing the wire library. Here’s the link: http://www.varesano.net/blog/fabio/how-disable-internal-arduino-atmega-pullups-sda-and-scl-i2c-bus Now all I do is pull the SDA and SCL lines to 3.3 v, which this sensor does. And my other 5V device (DS1307) is perfectly happy with the 3.3v bus voltage. Thanks to Sparkfun for this product!

    • First off good job going the extra mile to do this the right way! There’s a fair amount of controversy over the weak-pull-up resistors being enabled by default in the Wire library (especially since they’re too weak to be good I2C pullup resistors anyway). But we generally use the unmodified library with no problems, by always making sure there is another set of 4.7K pullup resistors to 3.3V somewhere on the bus. The 4.7K resistors overpower the 20K WPU resistors in the Arduino, ensuring that the I2C bus never sees 5V (it’s more like 3.6V, still high but not as bad). Hope this helps.

  • Can I use it as an altimeter? I need to open a parachute before my package crashes into the ground (need to interface it to an Arduino board)

  • This may be obvious to some but the instructions just blindly say use pins A4 and A5 but on the Ardunio mega 2560 you have to use pins 20 (SDA) and 21 (SCL).

  • These sensors are pretty good… up to around 37km altitude.
    Then they start reporting some weird data :–)
    We took one up to 40.575km on our Horus 15.5 high altitude balloon flight, it reported pressure down to 2hPa before outputting gibberish data. It recovered again on the way back down.
    Still, pretty damn good for a sensor only rated down to 300hPa :–)

  • I had my sensor running fine logging to pachube with the ethernet shield then it started logging 0 for both pressure and temperature, I have tried connecting xclr to GND to attempt a reset but no change. Is my sensor broken??

  • Hi, would it be possible to make this sensor a wireless device? Does anyone know a good resource to show me how that would be accomplished? Thanks, Tom

    • It’s possible, but not trivial. You’d likely need a microcontroller of some sort (like the Arduino Pro Mini) to access the sensor, format the data, and send it to a radio (like an XBee). We have a book called Building Wireless Sensor Networks which is a good resource, but there’s also plenty of information on the web as well.
      If you’d rather not have to build something, we do have the full-up Weather Board which includes this sensor (and others) and is designed to easily be made wireless. But it may be overkill for your needs.

      • Thanks Mike! I would like to build something, just to find out for myself how it all works. I will check out that Arduino Pro Mini and I recently purchased the Sensor Networks book.
        Tom

  • FYI: I put together cpp library, please see: http://code.google.com/p/bmp085

    #include "bmp085.h"
    
    bmp085 BMP085;
    
    void setup()
    {
      Serial.begin(9600);
      BMP085.Calibrate(); 
    }
    
    void loop()
    {
        BMP085.refresh();
        Serial.print(BMP085.pressure);
        Serial.print(", ");
        Serial.println(BMP085.temperature);
    
        delay(5000);
    }
    
  • I’ve been running my BMP085 off the +5 volt rail inadvertently for over a month. I’m not proud of the fact that I can’t read a data sheet. But, I will say that it has been working. I did have a strange anomaly come up last night on my weather station, where the BMP085 lives. When the pressure was rising and the temperature was falling, all of a sudden the pressure jumped about 350 Pa and then as the temperature came back up and the pressure fell, the jump reversed itself. Odd. I’m going to implement Member #236519’s suggestion. Go see KWIAPPLE11 on Weather Underground. That’s me.

  • I’m running into some issues with my code and I hope someone could help. If I hard code the readings and calibration data that is shown on P.13 of the datasheet, I get the results shown in the datasheet, however, when I pull the real data and the real calibration off of the device, the pressure is way low (about 3.55psi, 24,500 Pa). The temperature readings are accurate, and when I change the oversampling, the results I get for pressure are consistent (about the same + expected noise) for oversampling of 0, 1, 2 and 3. I did have to play around with typecasting a bit to get things to match up with the reference code. I’d like to experiment with some other calibration data and readings to validate my calculations- at the moment, I have:

    AC1=8515
    AC2=-1156
    AC3=-14476
    AC4=34169
    AC6=24839
    B1=5498
    B2=61
    MB=-32768
    MC=-11075
    MD=2432
    

    Oversampling (for this example) is 2

    UT reads as 35405, which calculates to 21.5C

    UP reads as 171740 (after the shift for oversampling), which results in a pressure of 24957, or 3.619psi. (way too low for my altitude, about 800ft ASL)

    I’d appreciate if someone could either run my calibration an readings into their code and see if they get the same, or send me your calibration and readings I could run through my code.

    FYI: this is being done in C on a PIC32 on a Digilent Uno32. I do plan to share the code once it works. I’ve got a bunch of things running on the same I2C bus under a scheduler I wrote- each sensor can have a different interval and it can do other operations on a different device while the I2C while the pressure sensor is waiting the requisite time.

  • FYI, I was just playing around with the Android SensorManager on my Motorola Xoom tablet and found out that it has the BMP085 on board.

  • Be a bit patient, new to some of the technologies here.

    How do I address a second BMP085 sensor ?

    I’m deploying a sparkfun weather station as part of a water quality initiative. I’ve modified the code to work for what we need, but I need to add two more sensors to the package. The one that is causing me the most concern is water depth. The tide drives change in the water level.

    I’m planning on using a BMP085 inside a collapsible bladder at the bottom of the lagoon, and then measuring the pressure inside the bag as the water level moves up and down. Depth varies from 1 ft to 4 ft.

    The board has one BMP085 on it already for the air pressure. So I am adding a second. I can’t quite figure out how to address the second sensor !

    Any suggestions welcome. Not my most experienced area.

    • Some I2C devices allow you to modify the addresses of individual parts, but unfortunately the BMP085 isn’t one of them. But if you look at the BMP085 datasheet, section 4.2, it mentions that you can connect two devices to the same bus if you also use the XCLR input to keep one BMP085 silent while you’re communicating with the other one.

      The USB Weather Board does run an I/O pin to XCLR on the onboard BMP085, so you can turn it on and off with that pin. For the remote BMP085 you’ll need to get an extra I/O line down there to connect to XCLR (you might steal one of the otherwise unused lines on the programming header).

      Note that you can run into problems driving long wires (more than a few meters) with digital signals including I2C. There are ways around this though, such as reducing the I2C clock speed, and/or using special driver chips to boost the signal. Google and check the datasheets for info. Good luck on your project!

      • Thank you. That is perfect. I saw that code in there, but didn’t quite get it. That makes it clear. I only have about 6 ft between the board and the bottom so I’ll adjust accordingly. Thanks for the tips.

        Again, thank you for the suggestions.

  • trying to get sensor to work for me – I’ve tried a number of the code bases posted here for the arduino and with all of them get stuck during the calibration step. specifically around this call (from Sparkfun’s code):

    ac1 = bmp085ReadInt(0xAA);

    as I debug this method it seems to hang in the function bmp085ReadInt() method:

    Serial.println(“bmp085ReadInt – 1”); Wire.beginTransmission(BMP085_ADDRESS); Serial.println(“bmp085ReadInt – 2”); Wire.send(address); Serial.println(“bmp085ReadInt – 3”);

    “bmp085ReadInt – 3” never shows up in the serial output window.

    any suggestions? i ordered a couple of more just in case I have a bad one here