https://wiki.elecrow.com/index.php?title=Crowtail-_BMP180_Barometer&feed=atom&action=historyCrowtail- BMP180 Barometer - Revision history2024-03-28T23:56:02ZRevision history for this page on the wikiMediaWiki 1.33.0https://wiki.elecrow.com/index.php?title=Crowtail-_BMP180_Barometer&diff=151&oldid=prevAdmin: Created page with "== Description == The BMP180 offers a pressure measuring range of 300 to 1100 hPa with an accuracy down to 0.02 hPa in advanced resolution mode. It’s based on piezo-resisti..."2019-08-22T05:19:34Z<p>Created page with "== Description == The BMP180 offers a pressure measuring range of 300 to 1100 hPa with an accuracy down to 0.02 hPa in advanced resolution mode. It’s based on piezo-resisti..."</p>
<p><b>New page</b></p><div>== Description ==<br />
<br />
The BMP180 offers a pressure measuring range of 300 to 1100 hPa with an accuracy down to 0.02 hPa in advanced resolution mode. It’s based on piezo-resistive technology for high accuracy, ruggedness and long term stability. These come factory-calibrated, with the calibration coefficients already stored in ROM. What makes this sensor great is that it is nearly identical to its former rev, the BMP085!<br />
<br />
'''Model: [http://www.elecrow.com/crowtail-bmp180-barometer-p-1249.html CT0017BMP]'''<br><br />
<br />
[[File:Crowtail-BMP180 Barometer.JPG |400px]]<br />
<br />
== Features ==<br />
*Digital two wire (I2C) interface<br />
*Wide barometric pressure range<br />
*Flexible supply voltage range<br />
*Ultra-low power consumption<br />
*Low noise measurement<br />
*Factory-calibrated<br />
*-40 to +85°C operational range, ±2°C temperature accuracy<br />
*I2C address: 0x77<br />
<br />
== Specifications ==<br />
Dimensions(mm):40.0(L)x20.0(W)x6.8(H)<br />
<br />
<table border="1" cellspacing="0" width="80%"><br />
<tr><br />
<th scope="col" style="width: 40%" align="center"> Item<br />
</th><th scope="col" align="center"> Min<br />
</th><th scope="col" align="center"> Typical<br />
</th><th scope="col" align="center"> Max<br />
</th><th scope="col" align="center"> Unit<br />
</th></tr><br />
<tr><br />
<th scope="row">Voltage<br />
</th><td align="center">3<br />
</td><td align="center">5.0<br />
</td><td align="center">5.5<br />
</td><td align="center">VDC<br />
</td></tr><br />
<tr><br />
<th scope="row">Current<br />
</th><td align="center">1.1<br />
</td><td align="center">/<br />
</td><td align="center">20<br />
</td><td align="center">uA<br />
</td></tr><br />
<tr><br />
<th scope="row">Pressure Range<br />
</th><td align="center">300<br />
</td><td align="center">/<br />
</td><td align="center">1100<br />
</td><td align="center">hPa<br />
</td></tr><br />
<tr><br />
<th scope="row">Faster I2C data transfer<br />
</th><td align="center">/<br />
</td><td align="center">/<br />
</td><td align="center">3.4<br />
</td><td align="center">MHZ<br />
</td></tr></table><br />
<br />
== Usage ==<br />
Barometric condition is one of the criteria used to predict coming change in weather and deduce altitude above sea level. Here is a demo to show you how to read the barometric data from this Crowtail - Barometer Sensor (BMP180).<br />
<br />
1.Hardware connection<br />
<br />
Connect it to IIC port of Crowduino.<br />
<br />
[[File:BMP180hardware1.jpg |600px]]<br />
<br />
2.Download [http://www.elecrow.com/wiki/index.php?title=File:SFE_BMP180.zip the library];Unzip it into the libraries file of Arduino IDE by the path: ..\arduino-1.0.1\libraries.<br />
// Your sketch must #include this library, and the Wire library.<br />
// (Wire is a standard library included with Arduino.): <br />
#include <SFE_BMP180.h><br />
#include <Wire.h> <br />
// You will need to create an SFE_BMP180 object, here called "pressure": <br />
SFE_BMP180 pressure;<br />
#define ALTITUDE 1655.0 <br />
void setup()<br />
{<br />
Serial.begin(9600);<br />
Serial.println("REBOOT"); <br />
// Initialize the sensor (it is important to get calibration values stored on the device).<br />
if (pressure.begin())<br />
Serial.println("BMP180 init success");<br />
else<br />
{<br />
// Oops, something went wrong, this is usually a connection problem,<br />
// see the comments at the top of this sketch for the proper connections.<br />
Serial.println("BMP180 init fail\n\n");<br />
while(1); // Pause forever.<br />
}<br />
} <br />
void loop()<br />
{ <br />
char status;<br />
double T,P,p0,a; <br />
// Loop here getting pressure readings every 10 seconds. <br />
// If you want sea-level-compensated pressure, as used in weather reports,<br />
// you will need to know the altitude at which your measurements are taken.<br />
// We're using a constant called ALTITUDE in this sketch: <br />
Serial.println();<br />
Serial.print("provided altitude: ");<br />
Serial.print(ALTITUDE,0);<br />
Serial.print(" meters, ");<br />
Serial.print(ALTITUDE*3.28084,0);<br />
Serial.println(" feet"); <br />
// If you want to measure altitude, and not pressure, you will instead need<br />
// to provide a known baseline pressure. This is shown at the end of the sketch. <br />
// You must first get a temperature measurement to perform a pressure reading. <br />
// Start a temperature measurement:<br />
// If request is successful, the number of ms to wait is returned.<br />
// If request is unsuccessful, 0 is returned.<br />
status = pressure.startTemperature();<br />
if (status != 0)<br />
{<br />
// Wait for the measurement to complete:<br />
delay(status);<br />
// Retrieve the completed temperature measurement:<br />
// Note that the measurement is stored in the variable T.<br />
// Function returns 1 if successful, 0 if failure.<br />
status = pressure.getTemperature(T);<br />
if (status != 0)<br />
{<br />
// Print out the measurement:<br />
Serial.print("temperature: ");<br />
Serial.print(T,2);<br />
Serial.print(" deg C, ");<br />
Serial.print((9.0/5.0)*T+32.0,2);<br />
Serial.println(" deg F");<br />
<br />
// Start a pressure measurement:<br />
// The parameter is the oversampling setting, from 0 to 3 (highest res, longest wait).<br />
// If request is successful, the number of ms to wait is returned.<br />
// If request is unsuccessful, 0 is returned.<br />
status = pressure.startPressure(3);<br />
if (status != 0)<br />
{<br />
// Wait for the measurement to complete:<br />
delay(status);<br />
// Retrieve the completed pressure measurement:<br />
// Note that the measurement is stored in the variable P.<br />
// Note also that the function requires the previous temperature measurement (T).<br />
// (If temperature is stable, you can do one temperature measurement for a number of pressure measurements.)<br />
// Function returns 1 if successful, 0 if failure.<br />
status = pressure.getPressure(P,T);<br />
if (status != 0)<br />
{<br />
// Print out the measurement:<br />
Serial.print("absolute pressure: ");<br />
Serial.print(P,2);<br />
Serial.print(" mb, ");<br />
Serial.print(P*0.0295333727,2);<br />
Serial.println(" inHg");<br />
// The pressure sensor returns abolute pressure, which varies with altitude.<br />
// To remove the effects of altitude, use the sealevel function and your current altitude.<br />
// This number is commonly used in weather reports.<br />
// Parameters: P = absolute pressure in mb, ALTITUDE = current altitude in m.<br />
// Result: p0 = sea-level compensated pressure in mb <br />
p0 = pressure.sealevel(P,ALTITUDE); // we're at 1655 meters (Boulder, CO)<br />
Serial.print("relative (sea-level) pressure: ");<br />
Serial.print(p0,2);<br />
Serial.print(" mb, ");<br />
Serial.print(p0*0.0295333727,2);<br />
Serial.println(" inHg"); <br />
// On the other hand, if you want to determine your altitude from the pressure reading,<br />
// use the altitude function along with a baseline pressure (sea-level or other).<br />
// Parameters: P = absolute pressure in mb, p0 = baseline pressure in mb.<br />
// Result: a = altitude in m.<br />
<br />
a = pressure.altitude(P,p0);<br />
Serial.print("computed altitude: ");<br />
Serial.print(a,0);<br />
Serial.print(" meters, ");<br />
Serial.print(a*3.28084,0);<br />
Serial.println(" feet");<br />
}<br />
else Serial.println("error retrieving pressure measurement\n");<br />
}<br />
else Serial.println("error starting pressure measurement\n");<br />
}<br />
else Serial.println("error retrieving temperature measurement\n");<br />
}<br />
else Serial.println("error starting temperature measurement\n"); <br />
delay(5000); // Pause for 5 seconds.<br />
}<br />
<br />
3.Create a new Arduino sketch and paste the codes below to it or open the code directly by the path:File -> Example ->SFE_BMP180_example->SFE_BMP180_example.<br />
<br />
4.Open the serial monitor.You should see the data from BMP0180.<br />
<br />
[[File:bmp180result.jpg |400px]]<br />
<br />
== Resource ==<br />
<br />
*[http://www.elecrow.com/wiki/index.php?title=File:SFE_BMP180.zip BMP180 Barometer Program]<br />
*[http://www.elecrow.com/wiki/index.php?title=File:Crowtail-BMP180_Barometer_eagle_files.zip Crowtail- BMP180 Barometer eagle files]</div>Admin