본문 바로가기
Arduino Sensors/Chapter 5 Atmospheric environmental sens

BME280 Atmospheric pressure Sensor [Arduino Sensors for Everyone]

by 로니킴 2021. 6. 20.


This chapter explains how to use the BME280 sensor. You will learn its features, operating principles, specifications, connection pin arrangement, output values, and connect Arduino and the sensor together to measure the air around you easily using the library.

 

Contents

     


    BME280 Atmospheric pressure Sensor

     

     

    Atmosphere refers to the entire weather present on Earth. The weather is a physical phenomenon that occurs in the atmosphere. Air pollution refers to pollution of ambient air, and it is a phenomenon in which pollutants such as dust and harmful gases in the atmosphere exist in a large amount in a specific area ao it adversely affect people, property, animals and plants. 
     
    In addition to the physical properties of pollutants, air pollution is closely related to pressure, temperature, humidity, and wind (wind direction and wind speed).

     

     

    The air in the space we live in feels like it has no weight, but in reality, air has weight, and there is a force exerted on the ground in which we live. This is called atmospheric pressure. 
       
      
    WINDY.COM atmospheric pressure 

     

    1 Atmospheric pressure is based on the weight of air applied to the surface of the water, and this weight varies slightly depending on the location on Earth or weather conditions, so the standard atmospheric pressure is the average of values measured for one year in a region of 40 degrees latitude.  
      
    Meteorology refers to physical natural phenomena occurring in the atmosphere, and climate interprets the meaning by linking atmospheric phenomena to its effects on humans. The four factors of meteorological phenomena are heat (air temperature), pressure (atmospheric pressure), wind (wind direction and wind speed), and moisture (humidity). 


     

    Effects on the human body

    High pressure causes stagnation of pollutants (fine dust, sulfur dioxide, nitrogen dioxide, ozone, etc.) in the atmosphere, and low pressure creates clean air by dispersing air pollutants but can cause meteorological diseases.

     
    High pressure: When high pressure occurs, atmospheric congestion occurs in which the fine dust in the upper layer stays on the surface where people live due to the downward air current. When the atmosphere is stagnant, air pollutants (fine dust, sulfur dioxide, nitrogen dioxide, ozone, etc.) discharged from various sources of air pollutants such as power plants, vehicles, and factories stay longer in the atmosphere.

     

    Eventually, the concentration of pollutants increases, which adversely affects the human body through breathing, skin contact, etc. The high concentration of fine dust that has hit the Korean peninsula is caused by air stagnation as domestic air pollutants accumulate in the air. The reason the atmosphere is stagnant is due to the high pressure passing through the Korean Peninsula in spring and autumn. High pressure is usually occurs in spring and autumn, but part of the continental high pressure falls off and passes through the Korean peninsula. High pressure fronts create sunny and hot weather, and if such weather continues, fine dust can be bad due to atmospheric congestion. Therefore, when the weather becomes warmer, the fine dust concentration can rise even more.

     
    When high pressure passes, even if the sky is clear, there is an air stagnates, and the fine dust in the upper layer comes down to the surface where we live due downdrafts. When the atmosphere is stagnant, even if the amount of air pollutants such as fine dust is emitted from various sources of air pollutants such as power plants, vehicles, and factories stays constant, the time that the pollutants stay in the atmosphere increases. Eventually, due to atmospheric congestion, the concentration of air pollutants such as fine dust increases, and it adversely affects the human body through respiration and skin contact.
     
     
    Low pressure: The reason why the body and mind hurt when it rains is because of a meteorological disease. On rainy days, there are many people who say, "My knees are sore." These pains are not due to mood swings, but to weather conditions. Low pressure causes cloudy weather. In addition, low pressure is formed even on days when typhoons pass. 
       
    It creates fresh air by dispersing air pollutants, but it causes meteorological diseases. Meteorological disease refers to changes in temperature, humidity, and air pressure that cause or worsen diseases that you normally suffer from. The greater the temperature and humidity change, the worse it becomes. It causes symptoms such as arthritis, depression, headache, toothache, and hives. When it rains, both the body and the heart hurt because of the meteorological disease. On rainy days, there are many people who say, "My knees are sore." These pains are not due to mood, but due to weather conditions. Low pressure causes cloudy weather. In addition, low pressure is formed even on days when typhoons pass.
     
    Meteorological disease refers to changes in temperature, humidity, and air pressure that cause or worsen diseases that you normally suffer from. The greater the temperature and humidity change, the worse it becomes. Headache are also one of the symptoms of meteorological conditions caused by changes in the weather. When the air pressure fluctuates, positive ions become more abundant than negative ions in the atmosphere, and positive ions reduce serotonin secretion in the body, causing headaches. 

    Also, low pressure makes a people anxious and, in severe cases, causes depression. When atmospheric pressure decreases, the inner ear in the human ear (which acts as an atmospheric pressure sensor) detects the atmospheric pressure and affects the autonomic nerves. It causes drowsiness, moodiness, increased heart rate, constriction of blood vessels, and worsening of chronic Girositis.

    Neurotransmitters such as serotonin and melatonin, which regulate our mood, sleep, and behavior, are secreted according to the amount of sunlight.When the amount of sunlight decreases due to cloudy days, serotonin, called the happiness hormone, decreases, and melatonin, which induces sleep, increases. These changes in neurotransmitters make people more anxious, angrier, slower, and can increase the likelihood of a car accident while driving.
     

    However, low atmospheric pressure is unstable and is often accompanied by rain and wind, so air pollutants are well dispersed. Low pressure is commonly associated with cloudy skies, strong winds, atmospheric instability, and the formation of wind fronts. Low pressure disperses air pollutants such as fine dust but causes meteorological diseases.

     

     

     



    [Atmospheric pressure and temperature]

    Atmosphere refers to the air on Earth that exists above the surface. The atmosphere consists of the troposphere, stratosphere, mesosphere, and thermosphere. The troposphere occupies 70-80% of the total atmosphere in a 10km section from the surface of the earth. The higher it goes up, the lower the temperature and convection occurs.
     
    Air pollution refers to pollution of ambient air, which is distinct from indoor pollution. It is a phenomenon in which pollutants such as dust, harmful gas, and odor in the atmosphere exist in a large amount in a specific area so as to have a harmful effect on people, animals and plants, and property. 

    A specific area can be in terms of a height of the factory chimney, the kilometer of a city, the area is the troposphere, the continent is the stratosphere, and the Earth is the atmosphere. Gas-phase pollutants are gases that exist in the standard state (25 degrees, 1 atm), and include sulfur oxides, oxygen oxides, hydrocarbons, and volatile organic compounds. Particulate pollutants include dust, smoke, droplets, fly ash, and smoke. Etc. 

     



    [Atmospheric pressure and temperature]
    As you go up into the atmosphere, the air pressure decreases and eventually becomes zero. Wind is caused by the atmospheric pressure difference and blows from the high-pressure side to the low-pressure side. These winds affect the decomposition of air pollutants.

    Atmospheric pressure is halved for every 5.5 km above the surface. 0km 1014 hPa, 5km 540.5ha, 10km 265 hPa, and so on.

     

     

     


    BME280 Sensor?

    Bosch's BME280 sensor can measure atmospheric pressure, temperature, and humidity. It is suitable for all kinds of weather/environment detection. The GY-BME280 sensor module provides the I2C interface. Sensor modules are also provided by Grivaity, SparkFun, waveshare, and adafruit, and the performances are the same.
     

     

     

    bst-bme280-ds002.pdf
    2.65MB

     

     

     


     

    [BOSCH]
    The following is the website of the BME280 sensor manufacturer Bosch.

     

     

     


    [BME280 sensor specifications ]

    The specifications of the BME280 sensor are as follows. The operating ranges of the BME280 sensor are temperature, -40 ~ +85 C, humidity, 0 ~ 100% rel, air pressure, 300 ~ 1100 hPa. The humidity sensor and pressure sensor can be activated/deactivated independently.

     

     

     

     

    Comparison between AM2302, SHT71, HTU21 D, SI7021 and BME280 is as follows.

     

     

     


    BME280 sensor configuration
     
    The BME280 sensor combines individual high-linearity and high-precision sensors for pressure, humidity and temperature in an 8-pin metal sheath 2.5 x 2.5 x 0.93 mm3 LGA package.   

    The BME280 is designed for low current consumption (3.6μA @ 1Hz), long-term stability and high EMC robustness. 

     


    BME280 sensor patent and internal microscope scanning diagram (right)
      
    At the heart of the module is a digital temperature, humidity and pressure sensor manufactured by Bosch-BME280. In addition, the BME280 sensor is the successor to sensors such as the BMP180, BMP085 or BMP183.
     

     

     


    BME280 sensor operating principles

     The BME280 is an integrated environmental sensor specifically developed for mobile applications where size and low power consumption are major design constraints.

     

    • Humidity sensor offers extremely fast response times to support the performance requirements of new applications such as situational awareness and high accuracy over a wide temperature range.
    • Pressure sensor is an absolute atmospheric pressure sensor featuring very high accuracy and resolution with very low noise.
    • The integrated temperature sensor is optimized for very low noise and high-resolution measurements. It is mainly used for temperature calibration of pressure and humidity sensors and can also be used to estimate the ambient temperature.

     

     

     


    [BME280 sensor output value ]

    According to the data sheet of the BME280 sensor, it can output temperature, humidity and air pressure.

     

     

     


    According to the BME280 data sheet, the sensor can be configured as many times as possible with various oversampling options, filter settings and sensor modes. For example, it is possible to change the sensor settings according to the situation such as weather monitoring, humidity sensing, and indoor air quality monitoring. 

     

      Weather monitoring Gaming Indoor monitoring
    Sensor mode Force mode
    1 sample/minue
    Normal Mode
    Tstandby = 0.5ms
    Normal Mode
    Tstandby = 0.5ms
    Oversampling settings Pressure x 1
    Temperature x 1
    Humidity x 1
    Pressure x 4
    Temperature x 1
    Humidity x 0
    Pressure x 16
    Temperature x 2
    Humidity x 1
    IIR filter settings Filter off Filter coefficient 16 Filter coefficient 16
    Current consumption 0.16μA 581 μA 633 μA
    RMS noise 3.3 Pa/30cm, 0.07% RH 0.3Pa/2.5cm 0.2Pa/1.7cm
    Data output 1/60 Hz 83Hz 25Hz
    Filter bandwidth - 1.75Hz 0.53Hz
    Response time (75%) - 0.3s 0.9s
    Characteristic -Very low data rates
    -Minimal power consumption
    -The noise of the pressure value is not important
    -Humidity, pressure and temperature monitored
    -Requires low altitude noise
    -The bandwidth required to respond quickly to altitude changes is ~2Hz
    -Increased power consumption
    -Humidity sensor is disabled
    -Requires the lowest possible altitude noise.
    -Very low bandwidth is preferred
    -Increased power consumption
    -Measure humidity to help detect changes in the room

     

     

    [Pressure output]

     
    Pressure measurement can be activated or skipped. When enabled, there are several oversampling options. Pressure measurement is controlled by setting osrs_p [2: 0]. For pressure measurements, oversampling is possible to reduce noise; the resolution of the pressure data depends on the IIR filter and oversampling settings.

    -When the IIR filter is activated, the pressure resolution is 20 bits
    -When the IIR filter is deactivated, the pressure resolution is 16 + (osrs_p-1) bits (e.g. 18 bits when osrs_p is set to '3')
     


    [Temperature measurement]

    Temperature measurement can be activated or skipped. Omitting the measurement can be useful for measuring pressure very quickly. When enabled, there are several oversampling options.

     

    Temperature measurement is controlled by setting osrs_t [2: 0]. For temperature measurements, oversampling is possible to reduce noise; the resolution of the temperature data depends on the IIR filter and oversampling settings.

    -When the IIR filter is activated, the temperature resolution is 20 bits.
    -When the IIR filter is deactivated, the temperature resolution is 16 + (osrs_t – 1) bits. (e.g. 18 bits if osrs_t is set to '3'

    The IIR filter does not change the humidity value inside the sensor quickly and does not require low-pass filtering. However, other pressures, such as collision with a door or window or wind on the sensor, can affect the measured values. Therefore, to suppress these disturbances in the output data without incurring additional interface traffic and processor workload, the BME280 has an internal IIR filter, effectively reducing the bandwidth of the temperature and pressure output signals and increasing the resolution of pressure and temperature output data to 10 to 20 bits.  
     

     


    [Humidity measurement]

    Humidity measurement can be activated or skipped. When enabled, there are several oversampling options. Humidity measurement is controlled by setting osrs_h [2: 0]. In the case of humidity measurement, oversampling is possible to reduce noise. The humidity measurement resolution is fixed with a 16-bit ADC output. 
     
     
     


     
    BME280 sensor operation

    The BME280 supports I2C and SPI (3-wire / 4-wire) digital serial interfaces. The sensor can operate in three power modes: sleep mode, normal mode and forced mode.

     



     
    • Sleep Mode: Power saving mode is by default after power-on reset. No measurements are taken in sleep mode and power consumption (IDDSM) is minimal. All registers are accessible. Chip-ID and compensation coefficient can be read. There are no special restrictions on the interface timing.

    • Normal mode: The sensor automatically cycles between the measurement and the waiting period. This mode is recommended when using the BME280 built-in IIR filter if short-term disturbances (e.g. entering the sensor) need to be filtered out.

    Forced Mode: The sensor performs a single measurement upon request and then returns to sleep mode. In forced mode, a single measurement is performed depending on the measurement and filter options selected. When the measurement is complete, the sensor returns to sleep mode, and the measurement result can be obtained from the data register. This mode is recommended for applications requiring low sample rates or host-based synchronization.
     
    Various oversampling modes, filter modes and data rates can be selected to match the data rate, noise, response time and current consumption needs of your project. Along with several short-term disturbance filtering settings, the sensor can be programmed in a very flexible manner to suit the application and power management requirements. 

    To simplify the design phase, default settings are provided that are optimized for several use cases, such as weather monitoring, elevator/stair case detection, drop detection, or indoor navigation.
     
     

     

     


    Purchasing the BME280 sensor

    As follows, the [BME280] sensor used in the book [Arduino Sensors for Everyone] can be purchased at Ali Express, Amazon.  

     

     

     

     


    Software Coding

    Run the example file in Steamedu123_Sensor-master > examples.

    /*
       @501 BME280 Atmospheric pressure (Barometric) sensor
    */
    
    #include <C501_Steam_Air_BME280_hPa.h>   // Internal library header file
    
    SteamBME280 bme280;     // Instance, pin number
    
    void setup() {
      Serial.begin(9600);   // Start serial communication at a speed of 9600bps.
      bme280.begin();       // (1) Initialize the sensor.
    }
    
    void loop() {
      bme280.read();        // (2) Measure the value of the sensor.
      bme280.display();     // (3) Output the sensor value.
      delay(1000);          // Wait for 1 second.
    }

     

     

     

     

     


     

    BME280 Arduino sensor operation check

    When the hardware connection and software coding are completed, you can check the operation screen as follows.

     

    ------------------------------------------------------ 
    Development environment: WINDOWS 10
    Arduino IDE: 1.8.13
    ------------------------------------------------------ 

     

    01 library copy

    You can easily check the operation by using the  library.  
    The libraries \Steamedu123_Sensor-master folder is copied to the folder below.
    * This folder is created automatically after installing Arduino C:\Users\s\Documents\Arduino\libraries


    02 *. ino file execution
    -Connect Arduino and PC
    -Run Arduino IDE
    -Menu → Tools → Board: Check Arduino UNO
    -Menu → Sketch → Check/Compile

    03 Check compilation

    Select Sketch>OK/Compile (CTRL+R) to compile.


    04 Arduino Uno upload

    When the compilation is completed without any problems, select Sketch>Upload (CTRL+U) to upload the compiled file.


    05 Operation check

    You can check the operation as follows.
     

     


     

    Wrap-up

    You can connect Arduino and [BME280] sensor and practice the sensor easily with simple coding.

     

    In this section, we investigated the effects of atmospheric pressure on the human body, the reference concentration, the measurement range of simple measuring instruments, and the sensors used in measuring instruments. We learned how to control the BME280 sensor, and with Arduino, we measured atmospheric pressure.

    At high pressure, even if the weather is clear, you should check the concentration of fine dust before going out. The pain in the arthritis area, which appears on cloudy days, becomes more severe when exposed to cold wind. To prevent this, wear long clothes or blankets to cover your arms and legs.

     

     

     

     


     

    References

    References for [BME280 atmospheric pressure Arduino sensor] used in the book [Arduino Sensors for Everyone] are as follows.

     

    [1] Lee Hyun-joo, Jung Yeo-min, Kim Sun-tae, Lee Woo-seop, Atmospheric patterns related to fine dust generation on the Korean Peninsula and future prospects, Korea Climate Chemical Journal, 2018
    [2] Reversal trajectory and atmospheric pressure analysis in case of high concentration fine dust in Busan, Kim Min-kyung, Jung Woo-sik, Lee Hwa-woon, Dowgon, Yoo Eun-chul, Journal of the Korea Air Quality Association, 2014
    [3] Behavior of volatile pollutants from soil to atmosphere due to changes in atmospheric pressure, Hwang Kyung-yeop, and Ji-won Choi, 2005
    [4] Yoo Seung-hee, Kim Hyun-chul, Kim Byung-wook, Kim Soon-tae, October 2015 High-Concentration Fine Dust Case Study: Barometric Pressure Patterns and Foreign Contributions, Journal of the Korea Air Quality Association, 2018
    [5] Gabriel Yurko, Real-Time Sensor Response Characteristics of 3 Commercial Metal Oxide Sensors for Detection of BTEX and Chlorinated Aliphatic Hydrocarbon Organic Vapors, 2019 (https:// bit.ly/39FHFCn)
    [6] BME280 datasheet, https://bit.ly/3oSPo6s
    [7] MPL115A1 datasheet, https://bit.ly/3oUt5gC
    [8] AliExpress BME280, https://aliexpi.com/iawT
    [9] AliExpress MS5540, https://aliexpi.com/vbdu
    [10] AliExpress MPL115A1, https://bit.ly/3oTOBCb
    [11] Small and precise: barometric pressure sensors, https://bit.ly/2M0rcAw
    [12] BME280 Combined humidity and pressure sensor datasheet," Key features", p1
    [13] BME280 Circuit, https://aliexpi.com/lzxd

     

     

     

     


    Purchasing a book

    [Arduino Sensors for Everyone] The book is available for purchase on Google Book and Apple Books.

    In this book, you will learn how to use the PMS7003, GP2Y1010AU0F, PPD42NS, SDS011 Fine Dust Sensor, DHT22 temperature/humidity sensor, MH-Z19B carbon dioxide sensor, ZE08-CH2O formaldehyde sensor, CCS811 total volatile organic compound (TVOC) sensor , GDK101 radiation (gamma ray) sensor, MQ-131 ozone (O3) sensor, MQ-7 carbon monoxide sensor, MICS-4514 nitrogen dioxide sensor, MICS-6814 ammonia sensor, DGS-SO2 sulfur dioxide (SO2) sensor, BME280 atmospheric pressure sensor, GUVA-S12SD ultraviolet (UV) sensor, MD0550 airflow sensor, and QS-FS01 wind speed sensor.

     

    [Google play book]

     

    Arduino Sensors for Everyone, 저자: Ronnie Kim - Google Play 도서

    Arduino Sensors for Everyone - 저자가 Ronnie Kim인 eBook입니다. PC, Android, iOS 기기에서 Google Play 북 앱을 사용해 이 책을 읽어 보세요. 책을 다운로드하여 오프라인으로 읽거나 Arduino Sensors for Everyone을(를)

    play.google.com

     



    댓글