Home LCD Projects BMP180 readings on an LCD Arduino project

BMP180 readings on an LCD Arduino project

by shedboy71

In this example we will create a temperature and altitude meter using a bm180 sensor and display the readings on an LCD shield

Lets look at the BMP180 first

The BMP180 is the new digital barometric pressure sensor of 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
Pressure conv. Time 5 msec, typical (standard mode)

 

If you’re using an Arduino simply connect the VIN pin to the 5V or 3.3v voltage pin, GND to ground, SCL to I2C Clock (Analog 5) and SDA to I2C Data (Analog 4).

Parts List

Description Link
Arduino Uno 1pcs UNO R3 CH340G+MEGA328P for Arduino UNO R3 (NO USB CABLE)
LCD Keypad shield 1PCS LCD Keypad Shield LCD 1602 Module Display For Arduino
bmp180 1PCS GY-68 BMP180 Replace BMP085 Digital Barometric Pressure Sensor Module For Arduino
connecting wire 40pcs Dupont jumper wire cable 30cm male to male,female to female,male to female Dupont jump wire line 2.54mm breadboard cable

 

Connection

In this example we show the connections to a typical LCD shield

lcd shield and bmp180

lcd shield and bmp180

 

Code

You need to add the adafruit bmp085 library, this is available in the library manager or from https://github.com/adafruit/Adafruit-BMP085-Library

 

 

[codesyntax lang=”cpp”]

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

//setup for the LCD keypad shield
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
Adafruit_BMP085 bmp;

void setup() 
{
  //init serial for some debug
  Serial.begin(9600);
  Serial.println("BMP180 Sensor Test"); 
  //init bmp180
  if (!bmp.begin()) 
  {
    Serial.println("BMP180 sensor not found");
    while (1) {}
  }
  //init LCD
  lcd.begin(16,2);
  //line 1 - temperature
  lcd.setCursor(0,0);
  lcd.print("Temp = ");
  //line 2 - humidity
  lcd.setCursor(0,1);
  lcd.print("Alt = ");
}

void loop() 
{
  // put your main code here, to run repeatedly:
  
  //display temperature and altitude on lcd
  lcd.setCursor(0,0);
  lcd.print("Temp = "); 
  lcd.print(bmp.readTemperature());
  lcd.setCursor(0,1);
  lcd.print("Alt = ");
   // 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.
  lcd.print(bmp.readAltitude(101500));
  delay(1000);
}

[/codesyntax]

 

 

 

Link

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More