Home Intel Galileo A BMP180 sensor and Intel Galileo example

A BMP180 sensor and Intel Galileo example

by shedboy71

The BMP180 is a digital barometric pressure sensor from Bosch Sensortec, with a very high performance, which enables applications in advanced mobile devices, such as smartphones, tablet PCs and sports devices. It follows the BMP085 and brings many improvements, like the smaller size and the expansion of digital interfaces.

The ultra-low power consumption down to 3 μA makes the BMP180 the leader in power saving for your mobile devices. BMP180 is also distinguished by its very stable behavior (performance) with regard to the independency of the supply voltage.

Applications

– Indoor navigation
– GPS-enhancement for dead-reckoning, slope detection, etc.
– Sport devices, e.g. altitude profile
– Weather forecast
– Vertical velocity indication (rise/sink speed)

Parameter Technical data
Pressure range 300 … 1100 hPa
RMS noise expressed in pressure 0.06 hPa, typ. (ultra low power mode)
0.02 hPa, typ. (ultra high resolution mode)
RMS noise expressed in altitude 0.5 m, typ. (ultra low power mode)
0.17 m, typ. (ultra high resolution mode)
Relative accuracy pressure
VDD = 3.3 V
950 … 1050 hPa/ ±0.12 hPa
@ 25 °C/ ±1.0 m
700 … 900 hPa/ ±0.12 hPa
25 … 40 °C/ ±1.0 m
Absolute accuracy
p = 300…1100hPa
(Temperature = 0…+65°C, VDD = 3.3. V)
Pressure: -4.0 … +2.0 hPa
Temperature: ±1 °C, typ.
Average current consumption (1 Hz data refresh rate)

Peak current

3 μA, typical (ultra-low power mode)
32 μA, typical (advanced mode)650 μA, typical
Stand-by current 1.62 … 3.6 V
Supply voltage VDDIO 1.62 … 3.6 V
Supply voltage VDD 1.8 … 3.6 V
Operation temp.
Range full accuracy”
-40 … +85 °C
0 … +65 °C

 

Parts

Label Part Type
Part1 Intel Galileo Gen2
Part2 Adafruit BMP180 – you can use other
Dupont cables – male to female

 

Layout

 

Code

You will need to add the Adafruit BMP library – https://github.com/adafruit/Adafruit-BMP085-Library

This is the default example

[codesyntax lang=”cpp”]

#include <Wire.h>
#include <Adafruit_BMP085.h>


// Connect VCC of the BMP180 sensor to 3.3V (NOT 5.0V!)
// Connect GND to Ground
// Connect SCL to i2c clock - Analog 5
// Connect SDA to i2c data - Analog 4


Adafruit_BMP085 bmp;
  
void setup() 
{
  Serial.begin(9600);
  if (!bmp.begin()) 
  {
	Serial.println("Could not find a valid BMP085 sensor, check wiring!");
	while (1) {}
  }
}
  
void loop() 
{
    Serial.print("Temperature = ");
    Serial.print(bmp.readTemperature());
    Serial.println(" *C");
    
    Serial.print("Pressure = ");
    Serial.print(bmp.readPressure());
    Serial.println(" Pa");
    
    // Calculate altitude assuming 'standard' barometric
    // pressure of 1013.25 millibar = 101325 Pascal
    Serial.print("Altitude = ");
    Serial.print(bmp.readAltitude());
    Serial.println(" meters");

    Serial.print("Pressure at sealevel (calculated) = ");
    Serial.print(bmp.readSealevelPressure());
    Serial.println(" Pa");

  // you can get a more precise measurement of altitude
  // if you know the current sea level pressure which will
  // vary with weather and such. If it is 1015 millibars
  // that is equal to 101500 Pascals.
    Serial.print("Real altitude = ");
    Serial.print(bmp.readAltitude(101500));
    Serial.println(" meters");
    
    Serial.println();
    delay(1000);
}

[/codesyntax]

 

Testing

Open the serial monitor and you should see something like this

Temperature = 24.20 *C
Pressure = 100388 Pa
Altitude = 78.64 meters
Pressure at sealevel (calculated) = 100386 Pa
Real altitude = 92.92 meters

Temperature = 26.50 *C
Pressure = 100392 Pa
Altitude = 78.14 meters
Pressure at sealevel (calculated) = 100394 Pa
Real altitude = 92.58 meters

Temperature = 28.00 *C
Pressure = 100397 Pa
Altitude = 77.63 meters
Pressure at sealevel (calculated) = 100393 Pa
Real altitude = 90.74 meters

 

Links

1PCS GY-68 BMP180 Replace BMP085 Digital Barometric Pressure Sensor Module For Arduino

You may also like