KS0405 Keyestudio BMP280 Module (Black and Eco-friendly): Difference between revisions
Keyestudio (talk | contribs) No edit summary |
Keyestudio (talk | contribs) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 32: | Line 32: | ||
== Hookup Guide == | == Hookup Guide == | ||
<br> | <br> | ||
'''For I2C communication:'''<br> | <big>'''For I2C communication:'''</big><br> | ||
<br>[[Image:KS0405-I2C.jpg|700px|frameless]]<br> | <br>[[Image:KS0405-I2C.jpg|700px|frameless]]<br> | ||
<br> | <br> | ||
'''For SPI communication:'''<br> | <big>'''For SPI communication:'''</big><br> | ||
<br>[[Image: | <br>[[Image:KS0405-SPI-.jpg|700px|frameless]]<br> | ||
<br> | |||
<br> | <br> | ||
== Test Program == | == Test Program == | ||
<br> | <br> | ||
'''For I2C communication:'''<br> | <big>'''For I2C communication:'''</big><br> | ||
<pre> | <pre> | ||
Line 86: | Line 85: | ||
} | } | ||
</pre> | </pre> | ||
<br> | <br> | ||
'''For SPI communication:'''<br> | <big>'''For SPI communication:'''</big><br> | ||
<pre> | <pre> | ||
#include <Wire.h> | #include <Wire.h> | ||
Line 133: | Line 132: | ||
<br> | <br> | ||
== Upload the program == | == Upload the program == | ||
<br> | <br> | ||
Line 139: | Line 139: | ||
https://www.arduino.cc/en/Main/OldSoftwareReleases#1.5.x <br> | https://www.arduino.cc/en/Main/OldSoftwareReleases#1.5.x <br> | ||
<br> | <br> | ||
Here we use the Arduino 1.6.1 version to test the BMP280 module in the code.<br> | <span style="color: red"> Here we use the '''Arduino 1.6.1 version''' to test the BMP280 module in the code.<br> | ||
It might fail to compile the test program when using other versions of arduino IDE. | It might fail to compile the test program when using other versions of arduino IDE. </span> <br> | ||
<br>[[Image:Ks0405- | <br>[[Image:Ks0405-1.png|700px|frameless]]<br> | ||
<br> | <br> | ||
Downloaded Arduino 1.6.1, unzip the software package to open the arduino application. | Downloaded Arduino 1.6.1, unzip the software package to open the arduino application. | ||
<br>[[Image:Ks0405- | <br>[[Image:Ks0405-2.png|700px|frameless]]<br> | ||
<br> | <br> | ||
Follow the hookup guide to connect well the module, and open the arduino software.<br> | Follow the hookup guide to connect well the module, and open the arduino software.<br> | ||
<br><span style="color: red">'''Note: ''' before open the software, do remember to place the code libraries inside the arduino libraries folder. </span> <br> | <br><span style="color: red">'''Note: ''' before open the software, do remember to place the code libraries inside the arduino libraries folder. </span> <br> | ||
<br>[[Image:Ks0405-3.png|700px|frameless]]<br> | |||
<br>[[Image:Ks0405-4.png|700px|frameless]]<br> | <br>[[Image:Ks0405-4.png|700px|frameless]]<br> | ||
<br> | <br> | ||
Line 175: | Line 176: | ||
== Resources == | == Resources == | ||
https:// | |||
*'''Download PDF,code and libraries :''' <br> | |||
https://fs.keyestudio.com/KS0405 | |||
<br> | |||
== Buy From == | |||
*[https://www.keyestudio.com/keyestudio-bmp280-module-digital-sensor-temperature-humidity-barometric-pressure-sensor-module-p0519.html Official website ] | |||
*[https://www.aliexpress.com/store/product/Keyestudio-BMP280-5V-Digital-Barometric-Pressure-Altitude-Sensor-High-Precision-Atmospheric-Module-For-Arduino/1452162_32984799188.html?spm=2114.12010615.8148356.1.3d1f31519Gr79c Shop on aliexpress ] | |||
[[Category: Module]] | [[Category: Module]] |
Latest revision as of 11:58, 4 March 2021
Overview
The keyestudio BMP280 module mainly uses the BMP280 sensor, a temperature and air pressure sensor, which is an absolute air pressure sensor designed for mobile applications.
The sensor module is available in an extremely compact package with small size and low power consumption. It features proven piezoresistive pressure sensor technology with high accuracy and linearity, as well as long-term stability and high EMC robustness.
The multiple device working options provide the ultimate flexibility; we can optimize the device in terms of power consumption, resolution and filtering performance.
The module has two modes: I2C communication and SPI communication mode. When using the BMP280 module, users can choose the communication method according to their own needs.
Technical Parameters
- Operating voltage: DC 5V
- Air pressure measurement range: 300hPa~1100hPa (elevation +9000~-500m)
- Air pressure measurement error: ±1hPa (±1m)
- Air pressure measurement accuracy: 0.18Pa
- Temperature measurement range: 0℃~ 65℃
- Temperature measurement error: ±0.5℃, maximum ±1℃
- Temperature measurement accuracy: 0.1℃
Application field
- temperature check
- Atmospheric pressure detection
- Altitude detection
- Indoor navigation (floor inspection, elevator inspection)
- Outdoor navigation, leisure and sports apps
- Healthcare applications (i.e. spirometry)
- Vertical speed indication (i.e. ascending/sinking speed)
Hookup Guide
Test Program
For I2C communication:
#include <Wire.h> #include <SPI.h> #include <Adafruit_Sensor.h> #include <Adafruit_BMP280.h> #define BMP_SCK 13 //SCL #define BMP_MISO 12 //SDO #define BMP_MOSI 11 //SDA #define BMP_CS 10 //CSB Adafruit_BMP280 bme; // I2C //Adafruit_BMP280 bme(BMP_CS, BMP_MOSI, BMP_MISO, BMP_SCK); void setup() { Serial.begin(9600); Serial.println(F("BMP280 test")); if (!bme.begin()) { Serial.println("Could not find a valid BMP280 sensor, check wiring!"); while (1); } } void loop() { Serial.print("Temperature = "); Serial.print(bme.readTemperature()); Serial.println(" *C"); Serial.print("Pressure = "); Serial.print(bme.readPressure()); Serial.println(" Pa"); // Serial.print("Approx altitude = "); // Serial.print(bme.readAltitude(1013.25)); // Serial.println(" m"); Serial.println(); delay(2000); }
For SPI communication:
#include <Wire.h> #include <SPI.h> #include <Adafruit_Sensor.h> #include <Adafruit_BMP280.h> #define BMP_SCK 13 //SCL #define BMP_MISO 12 //SDO #define BMP_MOSI 11 //SDA #define BMP_CS 10 //CSB //Adafruit_BMP280 bme; // I2C Adafruit_BMP280 bme(BMP_CS, BMP_MOSI, BMP_MISO, BMP_SCK); void setup() { Serial.begin(9600); Serial.println(F("BMP280 test")); if (!bme.begin()) { Serial.println("Could not find a valid BMP280 sensor, check wiring!"); while (1); } } void loop() { Serial.print("Temperature = "); Serial.print(bme.readTemperature()); Serial.println(" *C"); Serial.print("Pressure = "); Serial.print(bme.readPressure()); Serial.println(" Pa"); // Serial.print("Approx altitude = "); // Serial.print(bme.readAltitude(1013.25)); // Serial.println(" m"); Serial.println(); delay(2000); }
Upload the program
Special note:
You can download different version of Arduino IDE from the link here:
https://www.arduino.cc/en/Main/OldSoftwareReleases#1.5.x
Here we use the Arduino 1.6.1 version to test the BMP280 module in the code.
It might fail to compile the test program when using other versions of arduino IDE.
Downloaded Arduino 1.6.1, unzip the software package to open the arduino application.
Follow the hookup guide to connect well the module, and open the arduino software.
Note: before open the software, do remember to place the code libraries inside the arduino libraries folder.
Open the arduino software, firstly select the proper Board and COM port in “Tools”.
After that, copy and paste the test code to arduino window. Click to compile and upload the code.
Done uploading the test code, click to open the monitor and set the baud rate to 9600.
The monitor will show the current temperature and air pressure.
Schematics Diagram
Extension
Resources
- Download PDF,code and libraries :
https://fs.keyestudio.com/KS0405