Arduino Uno Tutorial with BMP180 BMP085 and LCD

Arduino Tutorial Interface Temperature Pressure Altitude Sensor BMP180 BMP085 with LCD

Arduino Tutorial Interface Temperature Pressure Altitude Sensor BMP180 BMP085 with LCD

Step for this project namely as Arduino Uno Tutorial with BMP180 BMP085 and LCD. To learn more about basic Arduino Uno, please find out our list of project HERE. Adafruit provide very comprehensive details about the BMP085. This precision sensor from Bosch is the best low-cost sensing solution for measuring barometric pressure and temperature. Because pressure changes with altitude you can also use it as an altimeter! The sensor is soldered onto a PCB with a 3.3V regulator, I2C level shifter and pull-up resistors on the I2C pins.

The BMP180 is the next-generation of sensors from Bosch, and replaces the BMP085. The good news is that it is completely identical to the BMP085 in terms of firmware/software – you can use our BMP085 tutorial and any example code/libraries as a drop-in replacement. The XCLR pin is not physically present on the BMP180 so if you need to know that data is ready you will need to query the I2C bus.

This board is 5V compliant – a 3.3V regulator and a i2c level shifter circuit is included so you can use this sensor safely with 5V logic and power.

Check out the links above for our tutorials and wiring diagrams

  1. Install the Library (Click Here)
  2. Install Hardware as shown in the picture below
  3. Copy and paste the Code as shown in the Coding Section (Download Github Document)
  4. Watch the video for more details and their appropriate trick and technique
Arduino Uno Tutorial with BMP180 BMP085 and LCD

Diagram for this project

 

//Diagram and source code: https://drive.google.com/drive/folders/1kUBgtWRL4FcZ2qgNtLdpHVs6cRJ-oleh?usp=sharing

#include <Adafruit_BMP085.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
Adafruit_BMP085 bmp;
  
void setup() {
  Wire.begin();
  lcd.init();
  lcd.backlight();
  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");
    lcd.setCursor(1 - 1, 1 - 1); //set coursor Column (1-16) and row (1-2)
    lcd.print("Temp(*C):");
    lcd.setCursor(10 - 1, 1 - 1);
    lcd.print(bmp.readTemperature());
    
    Serial.print("Pressure = ");
    Serial.print(bmp.readPressure());
    Serial.println(" Pa");
    lcd.setCursor(1 - 1, 2 - 1);
    lcd.print("P:");
    lcd.setCursor(3 - 1, 2 - 1);
    lcd.print(bmp.readPressure());
    
    // 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");
    lcd.setCursor(10 - 1, 2 - 1);
    lcd.print("A:");
    lcd.setCursor(12 - 1, 2 - 1);
    lcd.print(bmp.readAltitude());   

    Serial.println();
    delay(500);
}

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *