This sensor based on BMP 280 digital pressure sensor made by Bosch. You can find the complete datasheet here. This small sensor is quite impressive with it's accuracy. It claimed to be ±1 hPa in measuring barometric pressure, ±1.0°C in temperature measurement and ±1 meter in altitude accuracy. Pretty impressive right ?
This sensor support both I2C or SPI interface. The wiring for this sensor is simple. Note that this sensor require 3.3v, so if you use Arduino Uno, use the 3.3v pin.
Wiring sensor and Arduino:
- VCC <----> 3.3v---->
- GND <----> GND---->
- SCL/SCK <----> A5(Analog pin 5)---->
- SDA/SDI <----> A4(Analog pin 4)---->
Install following library from Arduino IDE.
Adafruit Unified Sensors (https://github.com/adafruit/Adafruit_Sensor)
For this sensor you need to change I2C address on to 0x76. Locate file Adafruit_BMP280.h and change the I2C the address.
Download sketch and upload to Arduino from my github : https://github.com/satujamsaja/Arduino/tree/master/bmp280
Here is the result.
While pressure result pretty accurate, altitude is miss about 18m. Calculated from google map, my location altitude is 7m above sea level. Well we wouldn't get accurate altitude without accurate sea level pressure on that point. This sea level pressure would change depend on weather or even temperature. But for this calculation we use 1 atm which is equal to 1013.25 millibar.
Good luck.
Comments