"God carved learn programming" DIY Arduino (27) - BMP280 barometric pressure sensor

Paragraph 37 and reference sensor module, widely circulated on the Internet, in fact, compatible with Arduino sensor module must be more than 37 species. Since I am on hand accumulated a number of sensors and modules, in accordance with the practice makes perfect (be sure to DIY) concept, learning and communication for the purpose of preparing here one by one to try to do hands-on experiments, whether successful or not, will be recorded --- little progress or can not handle the problem, hoping to initiate. 

 

[] Arduino series of experiments, the sensor module 108 kinds (information + + graphics + Simulation Code)

Experiment twenty-seven: GY-BMP280-3.3 precision atmospheric pressure sensor module

 

BMP280

Bosch Sensortec - BMP280 absolute pressure sensor which is designed specifically for mobile applications. The sensor module is extremely compact package. Thanks to the small size and low power consumption, may be used in such devices such as mobile phones, GPS module or a battery-powered type wristwatch device. The same as with the previous generation products, BMP180, BMP280 Bosch is also based on the mature technology piezoresistive pressure sensor having high linearity and Accuracy, long-term stability and robustness and high EMC. Diverse devices selected to bring the highest flexibility, the device can be optimized for power consumption, resolution and filtering performance.

 

Bosch BMP280 latest digital pressure sensor having superior performance and low price, a relative accuracy of ± 0.12 hPa (corresponding to ± 1 meter), the sensor power only 2.7μA. BMP280 having a minimum packaging industry, use of extremely compact metal cover 8 pin LGA package, a footprint of only 2.0 × 2.5mm2, package height of 0.95 mm. Including pressure and temperature measurement. The pressure sensor communication interface supports SPI and IIC, compared to the previous generation BMP180, accuracy has been considerable improvement, is ideal for the low-cost multi-rotor aircraft used in flight controls, only the price of the popular MS5611 quarter one. The sensor module of its small size and low power consumption 2.74μA @ 1Hz allows the battery-powered equipment. Door navigation, GPS improved health care and emerging applications require a relatively high accuracy and low TCO.

BMP280 chip architecture of FIG.

BMP280 is ideal for applications such as floor level detection because the sensor with ± 0.12 hPa excellent relative accuracy, the height difference corresponding to ± 1m, temperature coefficient of offset (TCO) of only 1.5 Pa / K (corresponding to 12.6 cm / K). As the successor BMP180 widely implemented, BMP280 first started using a lot of pressure measuring phone in 2011, BMP280 allows high performance at all need accurate pressure measurement applications. Meanwhile, BMP280 higher application flexibility, a new filter mode and SPI interface, and with respect to BMP180, 63% reduced footprint.

 

Applications
1, GPS navigation enhancements (such as improving the initial positioning time, dead reckoning, slope detection)
2, indoor navigation (indoor testing, lift detection)
3, outdoor navigation, leisure and sports applications
4, weather
5, health care applications (e.g. spirometry)
6, a vertical speed indicator (e.g., rising / sinking speed)

 

GY-BMP280-3.3 precision atmospheric pressure sensor module
is a low-power digital multifunction sensor, which can measure the ambient temperature and atmospheric pressure. Pressure sensitive element is a low-noise high-resolution high-precision absolute atmospheric pressure piezoelectric sensing element; temperature sensing element having a low noise and high resolution, the temperature values may be temperature compensated pressure self-calibration. The sampling rate by configuring the register, the sampling rate may be provided sensing element. Very limited space for mobile devices, such as smart phone, a tablet computer, smart watch and wearable devices, weather forecast, indicating a vertical speed, flight control equipment, indoor and outdoor navigation, intelligent home device.

 

Module electrical schematics

Adafruit_BMP280_Library, Arduino library for BMP280 sensor Download https://github.com/adafruit/Adafruit_BME280_Library https://github.com/mahfuz195/BMP280-Arduino-Library https://github.com/adafruit/Adafruit_BMP280_Library/releases (version 1.0.3)





 

The library also download --Adafruit_Sensor

https://github.com/adafruit/Adafruit_Sensor

 

Materials and hardware connections required

Note that this board is the rated voltage of 3.3v, and simultaneously supports two connections: I²C and SPI, following the SPI connection procedures and connections.

The six left BMP280 interface right is Arduino interfaces 6, both connected to a Dupont line. Connect the USB cable to the computer, choosing the right development board and port, upload and open the serial port monitor, see the value change. BMP 280 the Arduino the UNO-GY the VCC 3.3V the GND GND the SCL 13 is the SDA. 11 CSB 10 the SDO 12 is NOTE: Do not use 5V, the sensor may be damaged BMP280











 

 

/*

【Arduino】108种传感器模块系列实验(资料+代码+图形+仿真)

实验二十七:GY-BMP280-3.3 高精度大气压强传感器模块(高度与温度计)

*/

 

#include <Wire.h>

#include <SPI.h>

#include <Adafruit_Sensor.h>  

#include <Adafruit_BMP280.h>

 

#define BMP_SCK 13  

#define BMP_MISO 12

#define BMP_MOSI 11 

#define BMP_CS 10

 

Adafruit_BMP280 bmp(BMP_CS, BMP_MOSI, BMP_MISO,  BMP_SCK);  

 

void setup() {

  Serial.begin(9600);

  Serial.println(F("BMP280 测试"));

  

  if (!bmp.begin()) {  

    Serial.println(F("找不到对应的传感器"));

    while (1);

  }

}

 

void loop() {

    Serial.print(F("温度 = "));

    Serial.print(bmp.readTemperature());

    Serial.println(" *C");

    

    Serial.print(F("气压 = "));

    Serial.print(bmp.readPressure());

    Serial.println(" Pa");

 

    Serial.print(F("海拔 = "));

    Serial.print(bmp.readAltitude(1013.25));

    Serial.println(" m");

    

    Serial.println();

    delay(2000);

}

  

 

I²C 的连接方式和程序

 

Guess you like

Origin www.cnblogs.com/eagler8/p/11489571.html