BMP180 / GY68 Temperature and Pressure sensor (HCMODU0101)

Modules for various types of sensors including accelerometers. gyro's, IR motion, etc
Post Reply
admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

BMP180 / GY68 Temperature and Pressure sensor (HCMODU0101)

Post by admin » Wed May 25, 2016 11:32 am

Image



The BMP180 is the function compatible successor of the BMP085, a new generation of high precision digital pressure sensors for consumer applications. The ultra-low power, low voltage electronics of the BMP180 is optimized for use in mobile phones, PDAs, GPS navigation devices and outdoor equipment. With a low altitude noise of merely 0.25m at fast conversion time, the BMP180 offers superior performance. The I2C interface allows for easy system integration with a microcontroller. The BMP180 is based on piezo-resistive technology for EMC robustness, high accuracy and linearity as well as long term stability.

The module (HCMODU0101) measures a tiny 13mm x 10mm and contains the 3.3V regulator allowing the module to be safely powered from a 5V source. Solder terminal for power and I2C interface are provided with 10K pullups for the I2C data and clock pins.

ImageImageImage


Image

Product code: HCMODU0101
Power supply: 5V
Interface: I2C
Pressure accuracy (hPa): -4.0 to +2.0
Pressure resolution (hPa): 0.01
Temperature resolution (oC): 0.1
Module dimensions: 13mm x 10mm


Image





Raspberry Pi users:

For Raspberry Pi uses we have tested this module with the free Cayenne cloud based IoT software platform. Simply connect the module to your Raspberry Pi as shown below and use the Cayenne software platform to get remote temperature and pressure readings without writing a single line of code.


Image

You can create a free account simply by clicking our referral link below:
                  • Image



Arduino users:

To make using this module with your Arduino as easy as possible we have written an exclusive library (HCBMP180). This library can be downloaded from the software section of our support forum here:

http://forum.hobbycomponents.com/viewto ... =58&t=2019

The library will allow you to obtain calibrated temperature and pressure measurements from the module. Additionally it can also be used to get absolute altitude, relative altitude, and pressure at sea level measurements.


Image


Example sketch using the HCBMP180 library:

Code: Select all

/* FILE:    HCBMP180_Example
   DATE:    24/05/16
   VERSION: 0.1
   AUTHOR:  Andrew Davies

   Created by Hobby Components Ltd (HOBBYCOMPONENTS.COM)
   
24/05/16 version 0.1: Original version

   
This is an example of how to use the HCBMP180 Arduino library to obtain measurement 
readings from a BMP180 sensor or module. The example has been written particularly 
for the BMP180 GY-68 Digital Baromic Pressure Sensor Module (HCMODU0101) available 
from hobbycomponents.com 

The example demonstrates how to get the current calibrated temperature and 
pressure reading from the sensor and also how to use the library to obtain current
Altitude above sea level, differential altitude, and baromic pressure at sea level
(useful for weather forecasting). To use the module connect it to your Arduino as 
follows:


BMP180....Uno/Nano

VIN.......+5V (for HCMODU00101) for other BMP180 modules check for correct supply voltage.
GND.......GND
SCL.......A5
SDA.......A4


You may copy, alter and reuse this code in any way you like, but please leave
reference to HobbyComponents.com in your comments if you redistribute this code.
This software may not be used directly for the purpose of selling products that
directly compete with Hobby Components Ltd's own range of products.

THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
REASON WHATSOEVER.
*/


/* Include the HCBMP180 library */
#include "HCBMP180.h"


/* Current air pressure at sea level in Pascals. Used for calculating the absolute 
 * altitude above sea level. You can obtain an up to date value by visiting an on-line 
 * weather site for your location that also provides current baromic air pressure. 
 * To convert a value from Millibar (mb) to Pascals simply multiply the value by 100 */
#define PRESSURE_AT_SEA_LEVEL 102100


/* Current sensor altitude above sea level in meters. Used for calculating the pressure 
 * at sea level (useful for weather forecasting). You can obtain this value by visiting 
 * an on-line map that provides altitude information for you location. */
#define LOCATION_ALTITUDE 60.29


/* Create an instance of the library */
HCBMP180 HCBMP180(I2CBMP180ADD);

/* Used for the differential altitude example */
double Reference_Altitude;


void setup() 
{
  /* Initialise the HCBMP180 library and the serial interface */
  HCBMP180.Init();
  Serial.begin(9600);

  /* Make an initial altitude measurement which will then be used by the differential 
   * altitude example to calculate any changes in height since the sketch was started */
  Reference_Altitude = HCBMP180.Altitude(HCBMP180.GetPressure(), PRESSURE_AT_SEA_LEVEL);
}



void loop() 
{
  int Temp;
  long Pressure, SeaLevel;
  double Altitude;

  /* Get the current temperature in 0.1oC units */
  Temp = HCBMP180.GetTemp();

  /* Output the temperature to the serial port. Temperature is in 0.1oC units so to 
   * convert to oC simply divide by 10 */
  Serial.print("Temperature (oC): ");
  Serial.println((float)Temp / 10);


  /* Get the current pressure in Pascals */
  Pressure = HCBMP180.GetPressure();

  /* Output the pressure to the serial port in Millibars. To convert from Pascals to
   * Millibars simply divide by 100 */
  Serial.print("Pressure (mb): ");
  Serial.println(Pressure / 100);


  /* Calculate the absolute height above sea level using the current pressure at sea 
   * level */
  Altitude = HCBMP180.Altitude(Pressure, PRESSURE_AT_SEA_LEVEL);

  /* Output the calculated height to the serial port */
  Serial.print("Sensor height above sea level (meters): ");
  Serial.println(Altitude);

  /* Calculate the pressure at sea level in Pascals */
  SeaLevel = HCBMP180.SeaLevelPressure(Pressure, LOCATION_ALTITUDE);

  /* Output the current pressure at sea level to the serial port. Pressure is in Pascals
   * so to convert to Millibar simply divide by 100 */
  Serial.print("Pressure at sea level (mb): ");
  Serial.println(SeaLevel / 100);


  /* Calculate any differences in altitude since the the sketch was started and output it
   * to the serial port */
  Serial.print("Differential altitude (meters): ");
  Serial.println(Altitude - Reference_Altitude);

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


Downloads:

The HCBMP180 Arduino compatible library required for the above sketch can be downloaded from the software section of our support forum here:

http://forum.hobbycomponents.com/viewto ... =58&t=2019

HCMODU0101-BMP180-DS000-09.pdf


Disclaimer: The Cayenne platform is an external free service and is not provided by, or connected to, Hobby Components Ltd. It is therefore not being sold as part of product advertised on this page. As such we do not provide any guarantees or warranties with regards to this service. Issues or questions related to the Cayenne platform should be directed to Cayenne and not Hobby Components Ltd.

Libraries, example code, and diagrams are provided as an additional free courtesy by Hobby Components and are not sold as part of this product. We do no provide any guarantees or warranties as to their accuracy or fitness for purpose.

Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “Sensors”