0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
BME280 ENVIRONMENTAL SENSOR

BME280 ENVIRONMENTAL SENSOR

  • 厂商:

    WAVESHARE(微雪电子)

  • 封装:

    -

  • 描述:

    BME280 ENVIRONMENTAL SENSOR

  • 数据手册
  • 价格&库存
BME280 ENVIRONMENTAL SENSOR 数据手册
Final data sheet BME280 Combined humidity and pressure sensor Bosch Sensortec BME280: Final data sheet Document revision 1.0 Document release date November 11 , 2014 Document number BST-BME280-DS001-09 Technical reference code(s) 0 273 141 185 Notes th Data in this document are subject to change without notice. Product photos and pictures are for illustration purposes only and may differ from the real product’s appearance. Final Datasheet BME280 Environmental sensor Page 2 BME280 DIGITAL HUMIDITY, PRESSURE AND TEMPERATURE SENSOR Key features  Package  Digital interface  Supply voltage      2.5 mm x 2.5 mm x 0.93 mm metal lid LGA I²C (up to 3.4 MHz) and SPI (3 and 4 wire, up to 10 MHz) VDD main supply voltage range: 1.71 V to 3.6 V VDDIO interface voltage range: 1.2 V to 3.6 V Current consumption 1.8 µA @ 1 Hz humidity and temperature 2.8 µA @ 1 Hz pressure and temperature 3.6 µA @ 1 Hz humidity, pressure and temperature 0.1 µA in sleep mode Operating range -40…+85 °C, 0…100 % rel. humidity, 300…1100 hPa Humidity sensor and pressure sensor can be independently enabled / disabled Register and performance compatible to Bosch Sensortec BMP280 digital pressure sensor RoHS compliant, halogen-free, MSL1 Key parameters for humidity sensor  Response time 1s  Accuracy tolerance ±3 % relative humidity  Hysteresis ±1% relative humidity Key parameters for pressure sensor  RMS Noise 0.2 Pa, equiv. to 1.7 cm  Offset temperature coefficient ±1.5 Pa/K, equiv. to ±12.6 cm at 1 °C temperature change Typical application  Context awareness, e.g. skin detection, room change detection  Health monitoring / well-being  Warning regarding dehydration or heat stroke  Spirometry (measurement of lung volume and air flow)  Home automation control  control heating, venting, air conditioning (HVAC)  Internet of things  GPS enhancement (e.g. time-to-first-fix improvement, dead reckoning, slope detection)  Indoor navigation (change of floor detection, elevator detection)  Outdoor navigation, leisure and sports applications  Weather forecast  Vertical velocity indication (rise/sink speed) Target devices  Handsets such as mobile phones, tablet PCs, GPS devices  Navigation systems and gaming, e.g flying toys  Camera (DSC, video) and portable health care devices  Home weather stations, flying toys and smart watches BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 3 General Description The BME280 is as combined digital humidity, pressure and temperature sensor based on proven sensing principles. The sensor module is housed in an extremely compact metal-lid LGA package with a footprint of only 2.5 × 2.5 mm² with a height of 0.93 mm. Its small dimensions and its low power consumption allow the implementation in battery driven devices such as handsets, GPS modules or watches. The BME280 is register and performance compatible to the Bosch Sensortec BMP280 digital pressure sensor (see chapter 5.2 for details). The BME280 achieves high performance in all applications requiring humidity and pressure measurement. These emerging applications of home automation control, in-door navigation, health care as well as GPS refinement require a high accuracy and a low TCO at the same time. The humidity sensor provides an extremely fast response time for fast context awareness applications and high overall accuracy over a wide temperature range. The pressure sensor is an absolute barometric pressure sensor with extremely high accuracy and resolution and drastically lower noise than the Bosch Sensortec BMP180. The integrated temperature sensor has been optimized for lowest noise and highest resolution. Its output is used for temperature compensation of the pressure and humidity sensors and can also be used for estimation of the ambient temperature. The sensor provides both SPI and I²C interfaces and can be supplied using 1.71 to 3.6 V for the sensor supply VDD and 1.2 to 3.6 V for the interface supply VDDIO. Measurements can be triggered by the host or performed in regular intervals. When the sensor is disabled, current consumption drops to 0.1 µA. BME280 can be operated in three power modes (see chapter 3.3):    sleep mode normal mode forced mode In order to tailor data rate, noise, response time and current consumption to the needs of the user, a variety of oversampling modes, filter modes and data rates can be selected. Please contact your regional Bosch Sensortec partner for more information about software packages. BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 4 Index of Contents 1. SPECIFICATION ........................................................................................................................ 7 1.1 GENERAL ELECTRICAL SPECIFICATION .................................................................................. 7 1.2 HUMIDITY PARAMETER SPECIFICATION ................................................................................. 8 1.3 PRESSURE SENSOR SPECIFICATION ..................................................................................... 9 1.4 TEMPERATURE SENSOR SPECIFICATION ............................................................................. 10 2. ABSOLUTE MAXIMUM RATINGS .......................................................................................... 11 3. FUNCTIONAL DESCRIPTION ................................................................................................. 11 3.1 BLOCK DIAGRAM ............................................................................................................... 11 3.2 POWER MANAGEMENT ....................................................................................................... 12 3.3 SENSOR MODES................................................................................................................ 12 3.3.1 SENSOR MODE TRANSITIONS ......................................................................................................... 12 3.3.2 SLEEP MODE ................................................................................................................................. 13 3.3.3 FORCED MODE .............................................................................................................................. 13 3.3.4 NORMAL MODE.............................................................................................................................. 14 3.4 MEASUREMENT FLOW ....................................................................................................... 14 3.4.1 HUMIDITY MEASUREMENT .............................................................................................................. 15 3.4.2 PRESSURE MEASUREMENT ............................................................................................................ 15 3.4.3 TEMPERATURE MEASUREMENT ...................................................................................................... 15 3.4.4 IIR FILTER..................................................................................................................................... 16 3.5 RECOMMENDED MODES OF OPERATION .............................................................................. 17 3.5.1 WEATHER MONITORING ................................................................................................................. 17 3.5.2 HUMIDITY SENSING ........................................................................................................................ 18 3.5.3 INDOOR NAVIGATION...................................................................................................................... 18 3.5.4 GAMING ........................................................................................................................................ 19 3.6 NOISE .............................................................................................................................. 19 4. DATA READOUT ..................................................................................................................... 21 4.1 DATA REGISTER SHADOWING ............................................................................................. 21 4.2 OUTPUT COMPENSATION ................................................................................................... 21 4.2.1 COMPUTATIONAL REQUIREMENTS .................................................................................................. 22 4.2.2 TRIMMING PARAMETER READOUT ................................................................................................... 22 4.2.3 COMPENSATION FORMULAS ........................................................................................................... 23 5. GLOBAL MEMORY MAP AND REGISTER DESCRIPTION .................................................. 25 5.1 GENERAL REMARKS .......................................................................................................... 25 5.2 REGISTER COMPATIBILITY TO BMP280 .............................................................................. 25 5.3 MEMORY MAP ................................................................................................................... 25 5.4 REGISTER DESCRIPTION .................................................................................................... 26 BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 5 5.4.1 REGISTER 0XD0 “ID” ..................................................................................................................... 26 5.4.2 REGISTER 0XE0 “RESET”............................................................................................................... 26 5.4.3 REGISTER 0XF2 “CTRL_HUM” ........................................................................................................ 26 5.4.4 REGISTER 0XF3 “STATUS” ............................................................................................................. 26 5.4.5 REGISTER 0XF4 “CTRL_MEAS”....................................................................................................... 27 5.4.6 REGISTER 0XF5 “CONFIG” ............................................................................................................. 28 5.4.7 REGISTER 0XF7…0XF9 “PRESS” (_MSB, _LSB, _XLSB) ................................................................... 29 5.4.8 REGISTER 0XFA…0XFC “TEMP” (_MSB, _LSB, _XLSB).................................................................... 29 5.4.9 REGISTER 0XFD…0XFE “HUM” (_MSB, _LSB) ................................................................................ 30 6. DIGITAL INTERFACES ............................................................................................................ 31 6.1 INTERFACE SELECTION ...................................................................................................... 31 6.2 I²C INTERFACE.................................................................................................................. 31 6.2.1 I²C WRITE ..................................................................................................................................... 32 6.2.2 I²C READ ...................................................................................................................................... 33 6.3 SPI INTERFACE ................................................................................................................. 33 6.3.1 SPI WRITE .................................................................................................................................... 34 6.3.2 SPI READ ..................................................................................................................................... 34 6.4 INTERFACE PARAMETER SPECIFICATION ............................................................................. 35 6.4.1 GENERAL INTERFACE PARAMETERS................................................................................................ 35 6.4.2 I²C TIMINGS .................................................................................................................................. 35 6.4.3 SPI TIMINGS ................................................................................................................................. 36 7. PIN-OUT AND CONNECTION DIAGRAM............................................................................... 38 7.1 PIN-OUT ........................................................................................................................... 38 7.2 CONNECTION DIAGRAM I2C ................................................................................................ 39 7.3 CONNECTION DIAGRAM 4-WIRE SPI ................................................................................... 40 7.4 CONNECTION DIAGRAM 3-WIRE SPI ................................................................................... 41 7.5 PACKAGE DIMENSIONS ...................................................................................................... 42 7.6 LANDING PATTERN RECOMMENDATION ............................................................................... 43 7.7 MARKING.......................................................................................................................... 44 7.7.1 MASS PRODUCTION DEVICES ......................................................................................................... 44 7.7.2 ENGINEERING SAMPLES ................................................................................................................. 45 7.8 SOLDERING GUIDELINES AND RECONDITIONING RECOMMENDATIONS .................................... 46 7.9 RECONDITIONING PROCEDURE .......................................................................................... 47 7.10 TAPE AND REEL SPECIFICATION........................................................................................ 47 7.10.1 DIMENSIONS ............................................................................................................................... 47 7.10.2 ORIENTATION WITHIN THE REEL.................................................................................................... 48 7.11 MOUNTING AND ASSEMBLY RECOMMENDATIONS ............................................................... 49 7.12 ENVIRONMENTAL SAFETY ................................................................................................ 49 7.12.1 ROHS ........................................................................................................................................ 49 7.12.2 HALOGEN CONTENT .................................................................................................................... 49 7.12.3 INTERNAL PACKAGE STRUCTURE .................................................................................................. 49 BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 6 8. APPENDIX A: ALTERNATIVE COMPENSATION FORMULAS ............................................ 50 8.1 COMPENSATION FORMULAS IN DOUBLE PRECISION FLOATING POINT ..................................... 50 8.2 PRESSURE COMPENSATION IN 32 BIT FIXED POINT .............................................................. 51 9. APPENDIX B: MEASUREMENT TIME AND CURRENT CALCULATION ............................ 52 9.1 MEASUREMENT TIME ......................................................................................................... 52 9.2 MEASUREMENT RATE IN FORCED MODE .............................................................................. 52 9.3 MEASUREMENT RATE IN NORMAL MODE .............................................................................. 52 9.4 RESPONSE TIME USING IIR FILTER ..................................................................................... 53 9.5 CURRENT CONSUMPTION................................................................................................... 53 10. LEGAL DISCLAIMER............................................................................................................. 54 10.1 ENGINEERING SAMPLES................................................................................................... 54 10.2 PRODUCT USE ................................................................................................................ 54 10.3 APPLICATION EXAMPLES AND HINTS ................................................................................. 54 10.4 HANDLING INSTRUCTIONS................................................................................................ 54 11. DOCUMENT HISTORY AND MODIFICATION ..................................................................... 55 BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 7 1. Specification If not stated otherwise,  All values are valid over the full voltage range  All minimum/maximum values are given for the full accuracy temperature range  Minimum/maximum values of drifts, offsets and temperature coefficients are ±3 values over lifetime  Typical values of currents and state machine timings are determined at 25 °C  Minimum/maximum values of currents are determined using corner lots over complete temperature range  Minimum/maximum values of state machine timings are determined using corner lots over 0…+65 °C temperature range The specification tables are split into humidity, pressure, and temperature part of BME280. 1.1 General electrical specification Table 1: Electrical parameter specification Parameter Symbol Condition Min Typ Max Unit VDD ripple max. 50 mVpp 1.71 1.8 3.6 V 1.2 1.8 3.6 V Supply Voltage Internal Domains Supply Voltage I/O Domain VDDIO Sleep current IDDSL 0.1 0.3 µA Standby current (inactive period of normal mode) IDDSB 0.2 0.5 µA Current during humidity measurement IDDH Max value at 85 °C 340 µA Current during pressure measurement IDDP Max value at -40 °C 714 µA Current during temperature measurement IDDT Max value at 85 °C 350 µA Start-up time tstartup Time to first communication after both VDD > 1.58 V and VDDIO > 0.65 V 2 ms Power supply rejection ratio (DC) PSRR full VDD range ±0.01 ±5 %RH/V Pa/V Standby time accuracy Δtstandby ±25 % BST-BME280-DS001-09 | Revision 1.0 | November 2014 ±5 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 8 1.2 Humidity parameter specification Table 2: Humidity parameter specification Parameter Operating range 3 Supply current Absolute accuracy tolerance 4 Hysteresis Nonlinearity 5 Symbol Condition Min Typ Max Unit For temperatures < 0 °C and > 60 °C see Figure 1 -40 25 85 °C RH 100 %RH IDD,H 1 Hz forced mode, humidity and temperature 1.8 2.8 µA AH 20…80 %RH, 25 °C, including hysteresis ±3 %RH HH 109010 %RH, 25 °C ±1 %RH NLH 1090 %RH, 25 °C 1 %RH 900 or 090 %RH, 25°C 1 s 0.008 %RH Response time to 6 complete 63% of step 0 Resolution RH Noise in humidity (RMS) NH Highest oversampling, see chapter 3.6 0.02 %RH Hstab 10…90 %RH, 25 °C 0.5 %RH/ year Long term stability 3 When exceeding the operating range (e.g. for soldering), humidity sensing performance is temporarily degraded and reconditioning is recommended as described in section 7.8. Operating range only for non-condensing environment. 4 For hysteresis measurement the sequence 103050709070503010 %RH is used. The hysteresis is defined as the difference between measurements of the humidity up / down branch and the averaged curve of both branches 5 Non-linear contributions to the sensor data are corrected during the calculation of the relative humidity by the compensation formulas described in section 4.2.3. 6 The air-flow in direction to the vent-hole of the device has to be dimensioned in a way that a sufficient air exchange inside to outside will be possible. To observe effects on the response time-scale of the device an air-flow velocity of approx. 1 m/s is needed. BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 9 100 Relative humidity [%] 80 60 40 20 0 -40 -20 0 20 40 Temperature [°C] 60 80 Figure 1: humidity sensor operating range 1.3 Pressure sensor specification Table 3: Pressure parameter specification Parameter Symbol Condition Min Typ Max operational -40 25 +85 full accuracy 0 +65 300 1100 hPa 4.2 µA Operating temperature range TA Operating pressure range P full accuracy Supply current IDD,LP 1 Hz forced mode, pressure and temperature, lowest power Temperature coefficient 9 of offset TCOP 25…65 °C, 900 hPa AP,full Arel Absolute accuracy pressure Relative accuracy pressure VDD = 3.3V 2.8 Unit °C ±1.5 Pa/K ±12.6 cm/K 300 . . . 1100 hPa 0 . . . 65 °C ±1.0 hPa 700 … 900hPa 25 . . . 40 °C ±0.12 hPa 9 When changing temperature by e.g. 10 °C at constant pressure / altitude, the measured pressure / altitude will change by (10 × TCOP). BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Resolution of pressure output data RP Highest oversampling 0.18 Pa Full bandwidth, highest oversampling See chapter 3.6 1.3 Pa NP,fullBW 11 cm Reduced bandwidth, highest oversampling See chapter 3.6 0.2 Pa NP,filtered 1.7 cm Noise in pressure Minimum solder height 50µm Solder drift Long term stability 10 Possible sampling rate Page 10 Pstab per year fsample_P Lowest oversampling, see chapter 9.2 -0.5 157 +2.0 hPa ±1.0 hPa 182 Hz 1.4 Temperature sensor specification Table 4: Pressure parameter specification Parameter Operating range Symbol T Condition Min Typ Max Unit Operational -40 25 85 °C Full accuracy 0 65 °C IDD,T 1 Hz forced mode, temperature measurement only 1.0 µA AT,25 25 °C ±0.5 °C AT,full 0…65 °C ±1.0 °C Output resolution RT API output resolution 0.01 °C RMS noise NT Lowest oversampling 0.005 °C Supply current Absolute accuracy 11 temperature 10 Long term stability is specified in the full accuracy operating pressure range 0 … 65 °C Temperature measured by the internal temperature sensor. This temperature value depends on the PCB temperature, sensor element self-heating and ambient temperature and is typically above ambient temperature. 11 BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 11 2. Absolute maximum ratings The absolute maximum ratings are determined over complete temperature range using corner lots. The values are provided in Table 5. Table 5: Absolute maximum ratings Parameter Voltage at any supply pin Condition Min Max Unit VDD and VDDIO pin -0.3 4.25 V -0.3 VDDIO + 0.3 V -45 +85 °C 0 20 000 hPa HBM, at any pin ±2 kV CDM ±500 V Machine model ±200 V Voltage at any interface pin Storage temperature ≤ 65% RH Pressure ESD Condensation No power supplied Allowed 3. Functional description 3.1 Block diagram Figure 2 shows a simplified block diagram of the BME280: VDD Pressure sensing element Pressure front-end Humidity sensing element Humidity front-end Temperature sensing element Temperature front-end Voltage regulator (analog & digital) VDDIO Voltage reference ADC Logic I n t e r f a c e SDI SDO SCK CSB OSC POR NVM GND Figure 2: Block diagram of BME280 BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 12 3.2 Power management The BME280 has two distinct power supply pins  VDD is the main power supply for all internal analog and digital functional blocks  VDDIO is a separate power supply pin used for the supply of the digital interface A power-on reset (POR) generator is built in; it resets the logic part and the register values after both VDD and VDDIO reach their minimum levels. There are no limitations on slope and sequence of raising the VDD and VDDIO levels. After powering up, the sensor settles in sleep mode (described in chapter 3.3.2). It is prohibited to keep any interface pin (SDI, SDO, SCK or CSB) at a logical high level when VDDIO is switched off. Such a configuration can permanently damage the device due an excessive current flow through the ESD protection diodes. If VDDIO is supplied, but VDD is not, the interface pins are kept at a high-Z level. The bus can therefore already be used freely before the BME280 VDD supply is established. Resetting the sensor is possible by cycling VDD level or by writing a soft reset command. Cycling the VDDIO level will not cause a reset. 3.3 Sensor modes The BME280 offers three sensor modes: sleep mode, forced mode and normal mode. These can be selected using the mode[1:0] setting (see chapter 5.4.5). The available modes are:    Sleep mode: no operation, all registers accessible, lowest power, selected after startup Forced mode: perform one measurement, store results and return to sleep mode Normal mode: perpetual cycling of measurements and inactive periods. The modes will be explained in detail in chapters 3.3.2 (sleep mode), 3.3.3 (forced mode) and 0 (normal mode). 3.3.1 Sensor mode transitions The supported mode transitions are shown in Figure 3. If the device is currently performing a measurement, execution of mode switching commands is delayed until the end of the currently running measurement period. Further mode change commands or other write commands to the register ctrl_hum are ignored until the mode change command has been executed. Mode transitions other than the ones shown below are tested for stability but do not represent recommended use of the device. BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 13 Power OFF (VDD or VDDIO = 0) VDD and VDDIO supplied Sleep Normal 00 :0] = 1 [ e d Mo 11 :0] = 1 [ e d Mo Mode[1:0 ] = 01 (cyclic standby and measurement periods) Mode[1:0] = 01 Forced (one measurement period) Figure 3: Sensor mode transition diagram 3.3.2 Sleep mode Sleep mode is entered by default after power on reset. In sleep mode, no measurements are performed and power consumption (IDDSM) is at a minimum. All registers are accessible; Chip-ID and compensation coefficients can be read. There are no special restrictions on interface timings. current 3.3.3 Forced mode In forced mode, a single measurement is performed in accordance to the selected measurement and filter options. When the measurement is finished, the sensor returns to sleep mode and the measurement results can be obtained from the data registers. For a next measurement, forced mode needs to be selected again. This is similar to BMP180 operation. Using forced mode is recommended for applications which require low sampling rate or hostbased synchronization. The timing diagram is shown below. Write POR settings Mode[1:0] = 01 Data readout Mode[1:0] = 01 Measurement H Measurement P Measurement T Measurement H IDDSB IDDSL Measurement T IDDP IDDT IDDH Measurement P cycle time = rate of force mode tmeasure time Figure 4: Forced mode timing diagram BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 14 current 3.3.4 Normal mode Normal mode comprises an automated perpetual cycling between an (active) measurement period and an (inactive) standby period. The measurements are performed in accordance to the selected measurement and filter options. The standby time is determined by the setting t_sb[2:0] and can be set to between 0.5 and 1000 ms according to Table 27. The total cycle time depends on the sum of the active time (see chapter 9) and standby time tstandby. The current in the standby period (IDDSB) is slightly higher than in sleep mode. After setting the measurement and filter options and enabling normal mode, the last measurement results can always be obtained at the data registers without the need of further write accesses. Using normal mode is recommended when using the IIR filter. This is useful for applications in which short-term disturbances (e.g. blowing into the sensor) should be filtered. The timing diagram is shown below: Write POR settings Mode[1:0] = 11 Data readout when needed Measurement H Measurement P Measurement T Measurement H IDDSB IDDSL Measurement T IDDP IDDT IDDH Measurement P cycle time = tmeasure + tstandby tmeasure tstandby time Figure 5: Normal mode timing diagram 3.4 Measurement flow The BME280 measurement period consists of a temperature, pressure and humidity measurement with selectable oversampling. After the measurement period, the pressure and temperature data can be passed through an optional IIR filter, which removes short-term fluctuations in pressure (e.g. caused by slamming a door). For humidity, such a filter is not needed and has not been implemented. The flow is depicted in the diagram below. BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 15 Start measurement cycle Measure temperature (oversampling set by osrs_t; skip if osrs_t = 0) IIR filter enabled? No Yes Measure pressure (oversampling set by osrs_p; skip if osrs_p = 0) IIR filter initialised? No Copy ADC values to filter memory (initalises IIR filter) Yes Measure humidity (oversampling set by osrs_h; skip if osrs_h = 0) Update filter memory using filter memory, ADC value and filter coefficient Copy filter memory to output registers End measurement cycle Figure 6: BME280 measurement cycle The individual blocks of the diagram above will be detailed in the following subchapters. 3.4.1 Humidity measurement The humidity measurement can be enabled or skipped. When enabled, several oversampling options exist. The humidity measurement is controlled by the osrs_h[2:0] setting, which is detailed in chapter 5.4.3. For the humidity measurement, oversampling is possible to reduce the noise. The resolution of the humidity measurement is fixed at 16 bit ADC output. 3.4.2 Pressure measurement Pressure measurement can be enabled or skipped. When enabled, several oversampling options exist. The pressure measurement is controlled by the osrs_p[2:0] setting which is detailed in chapter 5.4.5. For the pressure measurement, oversampling is possible to reduce the noise. The resolution of the pressure data depends on the IIR filter (see chapter 0) and the oversampling setting (see chapter 5.4.5):  When the IIR filter is enabled, the pressure resolution is 20 bit.  When the IIR filter is disabled, the pressure resolution is 16 + (osrs_p – 1) bit, e.g. 18 bit when osrs_p is set to ‘3’. 3.4.3 Temperature measurement Temperature measurement can be enabled or skipped. Skipping the measurement could be useful to measure pressure extremely rapidly. When enabled, several oversampling options exist. The temperature measurement is controlled by the osrs_t[2:0] setting which is detailed in chapter 5.4.5. For the temperature measurement, oversampling is possible to reduce the noise. The resolution of the temperature data depends on the IIR filter (see chapter 0) and the oversampling setting (see chapter 5.4.5):  When the IIR filter is enabled, the temperature resolution is 20 bit.  When the IIR filter is disabled, the temperature resolution is 16 + (osrs_t – 1) bit, e.g. 18 bit when osrs_t is set to ‘3’. BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 16 3.4.4 IIR filter The humidity value inside the sensor does not fluctuate rapidly and does not require low pass filtering. However, the environmental pressure is subject to many short-term changes, caused e.g. by slamming of a door or window, or wind blowing into the sensor. To suppress these disturbances in the output data without causing additional interface traffic and processor work load, the BME280 features an internal IIR filter. It effectively reduces the bandwidth of the temperature and pressure output signals12 and increases the resolution of the pressure and temperature output data to 20 bit. The output of a next measurement step is filtered using the following formula: Data_filtered_old is the data coming from the current filter memory, and data_ADC is the data coming from current ADC acquisition. Data_filtered is the new value of filter memory and the value that will be sent to the output registers. The IIR filter can be configured to different filter coefficients, which slows down the response to the sensor inputs. Note that the response time with enabled IIR filter depends on the number of samples generated, which means that the data output rate must be known to calculate the actual response time. For register configuration, please refer to Table 28. A sample response time calculation is shown in chapter 9.4. Table 6: filter settings Filter coefficient Samples to reach ≥75 % of step response Filter off 1 2 2 4 5 8 11 16 22 In order to find a suitable setting for filter, please consult chapter 3.5. When writing to the register filter, the filter is reset. The next ADC values will the pass through the filter unchanged and become the initial memory values for the filter. If temperature or pressure measurements are skipped, the corresponding filter memory will be kept unchanged even though the output registers are set to 0x80000. When the previously skipped measurement is re-enabled, the output will be filtered using the filter memory from the last time when the measurement was not skipped. If this is not desired, please write to the filter register in order to re-initialize the filter. 12 Since the BME280 does not sample continuously, filtering can suffer from signals with a frequency higher than the sampling rate of the sensor. E.g. environmental fluctuations caused by windows being opened and closed might have a frequency >3) – ((BME280_S32_t)dig_T1 11; var2 = (((((adc_T>>4) – ((BME280_S32_t)dig_T1)) * ((adc_T>>4) – ((BME280_S32_t)dig_T1))) >> 12) * ((BME280_S32_t)dig_T3)) >> 14; t_fine = var1 + var2; T = (t_fine * 5 + 128) >> 8; return T; } // Returns pressure in Pa as unsigned 32 bit integer in Q24.8 format (24 integer bits and 8 fractional bits). // Output value of “24674867” represents 24674867/256 = 96386.2 Pa = 963.862 hPa BME280_U32_t BME280_compensate_P_int64(BME280_S32_t adc_P) { BME280_S64_t var1, var2, p; var1 = ((BME280_S64_t)t_fine) – 128000; var2 = var1 * var1 * (BME280_S64_t)dig_P6; var2 = var2 + ((var1*(BME280_S64_t)dig_P5) 25; var2 = (((BME280_S64_t)dig_P8) * p) >> 19; BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 24 p = ((p + var1 + var2) >> 8) + (((BME280_S64_t)dig_P7) 10) * (((v_x1_u32r * ((BME280_S32_t)dig_H3)) >> 11) + ((BME280_S32_t)32768))) >> 10) + ((BME280_S32_t)2097152)) * ((BME280_S32_t)dig_H2) + 8192) >> 14)); v_x1_u32r = (v_x1_u32r – (((((v_x1_u32r >> 15) * (v_x1_u32r >> 15)) >> 7) * ((BME280_S32_t)dig_H1)) >> 4)); v_x1_u32r = (v_x1_u32r < 0 ? 0 : v_x1_u32r); v_x1_u32r = (v_x1_u32r > 419430400 ? 419430400 : v_x1_u32r); return (BME280_U32_t)(v_x1_u32r>>12); } BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 25 5. Global memory map and register description 5.1 General remarks The entire communication with the device is performed by reading from and writing to registers. Registers have a width of 8 bits. There are several registers which are reserved; they should not be written to and no specific value is guaranteed when they are read. For details on the interface, consult chapter 6. 5.2 Register compatibility to BMP280 The BME280 is downward register compatible to the BMP280, which means that the pressure and temperature control and readout is identical to BMP280. However, the following exceptions have to be considered: Table 17: Register incompatibilities between BMP280 and BME280 Register Bits Content BMP280 BME280 0xD0 “id” 7:0 chip_id 0xF5 “config” 7:5 t_sb 0xF7…0xF9 “press” 19:0 press Resolution (16…20 bit) depends only on osrs_p 0xFA…0xFC “temp” 19:0 temp Resolution (16…20 bit) only depends on osrs_t Read value is 0x56 / 0x57 (samples) 0x58 (mass production) ‘110’: 2000 ms ‘111’: 4000 ms Read value is 0x60 ‘110’: 10 ms ‘111’: 20 ms Without filter, resolution depends on osrs_p; when using filter, resolution is always 20 bit Without filter, resolution depends on osrs_t; when using filter, resolution is always 20 bit 5.3 Memory map The memory map is given in Table 18 below. Reserved registers are not shown. Table 18: Memory map Register Name Address hum_lsb hum_msb temp_xlsb temp_lsb temp_msb press_xlsb press_lsb press_msb config ctrl_meas status ctrl_hum calib26..calib41 reset id calib00..calib25 0xFE 0xFD 0xFC 0xFB 0xFA 0xF9 0xF8 0xF7 0xF5 0xF4 0xF3 0xF2 0xE1…0xF0 0xE0 0xD0 0x88…0xA1 Registers: Type: bit7 bit6 bit5 temp_xlsb press_xlsb t_sb[2:0] osrs_t[2:0] bit4 bit3 hum_lsb hum_msb 0 temp_lsb temp_msb 0 press_lsb press_msb filter[2:0] osrs_p[2:0] measuring[0] bit2 bit1 bit0 0 0 0 0 0 0 spi3w_en[0] mode[1:0] im_update[0] osrs_h[2:0] calibration data reset[7:0] chip_id[7:0] calibration data Reserved registers do not change Calibration data Control registers Data registers Status registers Chip ID Reset read only read / write read only read only read only write only BST-BME280-DS001-09 | Revision 1.0 | November 2014 Reset state 0x00 0x80 0x00 0x00 0x80 0x00 0x00 0x80 0x00 0x00 0x00 0x00 individual 0x00 0x60 individual Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 26 5.4 Register description 5.4.1 Register 0xD0 “id” The “id” register contains the chip identification number chip_id[7:0], which is 0x60. This number can be read as soon as the device finished the power-on-reset. 5.4.2 Register 0xE0 “reset” The “reset” register contains the soft reset word reset[7:0]. If the value 0xB6 is written to the register, the device is reset using the complete power-on-reset procedure. Writing other values than 0xB6 has no effect. The readout value is always 0x00. 5.4.3 Register 0xF2 “ctrl_hum” The “ctrl_hum” register sets the humidity data acquisition options of the device. Changes to this register only become effective after a write operation to “ctrl_meas”. Table 19: Register 0xF2 “ctrl_hum” Register 0xF2 “ctrl_hum” Name Description Bit 2, 1, 0 osrs_h[2:0] Controls oversampling of humidity data. See Table 20 for settings and chapter 3.4.1 for details. Table 20: register settings osrs_h osrs_h[2:0] Humidity oversampling 000 Skipped (output set to 0x8000) 001 oversampling ×1 010 oversampling ×2 011 oversampling ×4 100 oversampling ×8 101, others oversampling ×16 5.4.4 Register 0xF3 “status” The “status” register contains two bits which indicate the status of the device. Table 21: Register 0xF3 “status” Register 0xF3 “status” Name Bit 3 measuring[0] Bit 0 im_update[0] BST-BME280-DS001-09 | Revision 1.0 | November 2014 Description Automatically set to ‘1’ whenever a conversion is running and back to ‘0’ when the results have been transferred to the data registers. Automatically set to ‘1’ when the NVM data are being copied to image registers and back to ‘0’ when the copying is done. The data are copied at power-on-reset and before every conversion. Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 27 5.4.5 Register 0xF4 “ctrl_meas” The “ctrl_meas” register sets the pressure and temperature data acquisition options of the device. The register needs to be written after changing “ctrl_hum” for the changes to become effective. Table 22: Register 0xF4 “ctrl_meas” Register 0xF4 “ctrl_meas” Name Bit 7, 6, 5 osrs_t[2:0] Bit 4, 3, 2 osrs_p[2:0] Bit 1, 0 mode[1:0] Description Controls oversampling of temperature data. See Table 24 for settings and chapter 3.4.3 for details. Controls oversampling of pressure data. See Table 23 for settings and chapter 3.4.2 for details. Controls the sensor mode of the device. See Table 25 for settings and chapter 3.3 for details. Table 23: register settings osrs_p osrs_p[2:0] Pressure oversampling 000 Skipped (output set to 0x80000) 001 oversampling ×1 010 oversampling ×2 011 oversampling ×4 100 oversampling ×8 101, others oversampling ×16 Table 24: register settings osrs_t osrs_t[2:0] Temperature oversampling 000 Skipped (output set to 0x80000) 001 oversampling ×1 010 oversampling ×2 011 oversampling ×4 100 oversampling ×8 101, others oversampling ×16 BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 28 Table 25: register settings mode mode[1:0] Mode 00 Sleep mode 01 and 10 Forced mode 11 Normal mode 5.4.6 Register 0xF5 “config” The “config” register sets the rate, filter and interface options of the device. Writes to the “config” register in normal mode may be ignored. In sleep mode writes are not ignored. Table 26: Register 0xF5 “config” Register 0xF5 “config” Name Bit 7, 6, 5 t_sb[2:0] Bit 4, 3, 2 filter[2:0] Bit 0 spi3w_en[0] Description Controls inactive duration tstandby in normal mode. See Table 27 for settings and chapter 0 for details. Controls the time constant of the IIR filter. See Table 27 for settings and chapter 0 for details. Enables 3-wire SPI interface when set to ‘1’. See chapter 6.3 for details. Table 27: t_sb settings t_sb[2:0] tstandby [ms] 000 0.5 001 62.5 010 125 011 250 100 500 101 1000 110 10 111 20 BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 29 Table 28: filter settings filter[2:0] Filter coefficient 000 Filter off 001 2 010 4 011 8 100, others 16 5.4.7 Register 0xF7…0xF9 “press” (_msb, _lsb, _xlsb) The “press” register contains the raw pressure measurement output data up[19:0]. For details on how to read out the pressure and temperature information from the device, please consult chapter 4. Table 29: Register 0xF7 … 0xF9 “press” Register 0xF7…0xF9 “press” Name 0xF7 press_msb[7:0] 0xF8 press_lsb[7:0] 0xF9 (bit 7, 6, 5, 4) press_xlsb[3:0] Description Contains the MSB part up[19:12] of the raw pressure measurement output data. Contains the LSB part up[11:4] of the raw pressure measurement output data. Contains the XLSB part up[3:0] of the raw pressure measurement output data. Contents depend on temperature resolution. 5.4.8 Register 0xFA…0xFC “temp” (_msb, _lsb, _xlsb) The “temp” register contains the raw temperature measurement output data ut[19:0]. For details on how to read out the pressure and temperature information from the device, please consult chapter 4. Table 30: Register 0xFA … 0xFC “temp” Register 0xFA…0xFC “temp” Name 0xFA temp_msb[7:0] 0xFB temp_lsb[7:0] 0xFC (bit 7, 6, 5, 4) temp_xlsb[3:0] BST-BME280-DS001-09 | Revision 1.0 | November 2014 Description Contains the MSB part ut[19:12] of the raw temperature measurement output data. Contains the LSB part ut[11:4] of the raw temperature measurement output data. Contains the XLSB part ut[3:0] of the raw temperature measurement output data. Contents depend on pressure resolution. Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 30 5.4.9 Register 0xFD…0xFE “hum” (_msb, _lsb) The “temp” register contains the raw temperature measurement output data ut[19:0]. For details on how to read out the pressure and temperature information from the device, please consult chapter 4. Table 31: Register 0xFD … 0xFE “hum” Register 0xFD…0xFE “hum” Name 0xFD hum_msb[7:0] 0xFE temp_lsb[7:0] BST-BME280-DS001-09 | Revision 1.0 | November 2014 Description Contains the MSB part uh[15:8] of the raw humidity measurement output data. Contains the LSB part uh[7:0] of the raw humidity measurement output data. Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 31 6. Digital interfaces The BME280 supports the I²C and SPI digital interfaces; it acts as a slave for both protocols. The I²C interface supports the Standard, Fast and High Speed modes. The SPI interface supports both SPI mode ‘00’ (CPOL = CPHA = ‘0’) and mode ‘11’ (CPOL = CPHA = ‘1’) in 4wire and 3-wire configuration. The following transactions are supported:  Single byte write  multiple byte write (using pairs of register addresses and register data)  single byte read  multiple byte read (using a single register address which is auto-incremented) 6.1 Interface selection Interface selection is done automatically based on CSB (chip select) status. If CSB is connected to VDDIO, the I²C interface is active. If CSB is pulled down, the SPI interface is activated. After CSB has been pulled down once (regardless of whether any clock cycle occurred), the I²C interface is disabled until the next power-on-reset. This is done in order to avoid inadvertently decoding SPI traffic to another slave as I²C data. Since the device startup is deferred until both VDD and VDDIO are established, there is no risk of incorrect protocol detection because of the power-up sequence used. However, if I²C is to be used and CSB is not directly connected to VDDIO but is instead connected to a programmable pin, it must be ensured that this pin already outputs the VDDIO level during power-on-reset of the device. If this is not the case, the device will be locked in SPI mode and not respond to I²C commands. 6.2 I²C Interface The I²C slave interface is compatible with Philips I²C Specification version 2.1. For detailed timings, please review Table 33. All modes (standard, fast, high speed) are supported. SDA and SCL are not pure open-drain. Both pads contain ESD protection diodes to VDDIO and GND. As the devices does not perform clock stretching, the SCL structure is a high-Z input without drain capability. Figure 8: SDI/SCK ESD drawing BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 32 The 7-bit device address is 111011x. The 6 MSB bits are fixed. The last bit is changeable by SDO value and can be changed during operation. Connecting SDO to GND results in slave address 1110110 (0x76); connection it to VDDIO results in slave address 1110111 (0x77), which is the same as BMP280’s I²C address. The SDO pin cannot be left floating; if left floating, the I²C address will be undefined. The I²C interface uses the following pins:  SCK: serial clock (SCL)  SDI: data (SDA)  SDO: Slave address LSB (GND = ‘0’, VDDIO = ‘1’) CSB must be connected to VDDIO to select I²C interface. SDI is bi-directional with open drain to GND: it must be externally connected to VDDIO via a pull up resistor. Refer to chapter 7 for connection instructions. The following abbreviations will be used in the I²C protocol figures:  S Start  P Stop  ACKS Acknowledge by slave  ACKM Acknowledge by master  NACKM Not acknowledge by master 6.2.1 I²C write Writing is done by sending the slave address in write mode (RW = ‘0’), resulting in slave address 111011X0 (‘X’ is determined by state of SDO pin. Then the master sends pairs of register addresses and register data. The transaction is ended by a stop condition. This is depicted in Figure 9. Control byte Slave Address Start S 1 1 1 0 1 Register address (A0h) RW ACKS 1 X 0 Data byte 1 0 1 0 0 0 0 Register data - address A0h ACKS 0 bit7 bit6 bit5 Control byte 1 0 1 0 0 bit3 bit2 bit1 bit0 … Data byte Register address (A1h) … bit4 ACKS 0 0 Register data - address A1h ACKS 1 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 ACKS Stop P Figure 9: I²C multiple byte write (not auto-incremented) BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 33 6.2.2 I²C read To be able to read registers, first the register address must be sent in write mode (slave address 111011X0). Then either a stop or a repeated start condition must be generated. After this the slave is addressed in read mode (RW = ‘1’) at address 111011X1, after which the slave sends out data from auto-incremented register addresses until a NOACKM and stop condition occurs. This is depicted in Figure 10, where register 0xF6 and 0xF7 are read. Control byte Slave Address Start S 1 1 1 0 1 Register address (F6h) RW ACKS 1 X 0 1 1 1 1 0 1 ACKS 1 0 Data byte Slave Address Start S 1 1 1 0 1 Register data - address F6h RW ACKS 1 X 1 Data byte bit7 bit6 bit5 bit4 bit3 bit2 Register data - address F7h ACKM bit1 bit0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 NOACKM Stop P Figure 10: I²C multiple byte read 6.3 SPI interface The SPI interface is compatible with SPI mode ‘00’ (CPOL = CPHA = ‘0’) and mode ‘11’ (CPOL = CPHA = ‘1’). The automatic selection between mode ‘00’ and ‘11’ is determined by the value of SCK after the CSB falling edge. The SPI interface has two modes: 4-wire and 3-wire. The protocol is the same for both. The 3wire mode is selected by setting ‘1’ to the register spi3w_en. The pad SDI is used as a data pad in 3-wire mode. The SPI interface uses the following pins:  CSB: chip select, active low  SCK: serial clock  SDI: serial data input; data input/output in 3-wire mode  SDO: serial data output; hi-Z in 3-wire mode Refer to chapter 7 for connection instructions. CSB is active low and has an integrated pull-up resistor. Data on SDI is latched by the device at SCK rising edge and SDO is changed at SCK falling edge. Communication starts when CSB goes to low and stops when CSB goes to high; during these transitions on CSB, SCK must be stable. The SPI protocol is shown in Figure 11. For timing details, please review Table 34. BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 34 CSB SCK SDI RW AD6 AD5 AD4 AD3 AD2 AD1 AD0 DI7 DI6 DI5 DO7 DO6 DO5 DI4 DI3 DI2 DI1 DO4 DO3 DO2 DO1 DI0 SDO DO0 tri-state Figure 11: SPI protocol (shown for mode ‘11’ in 4-wire configuration) In SPI mode, only 7 bits of the register addresses are used; the MSB of register address is not used and replaced by a read/write bit (RW = ‘0’ for write and RW = ‘1’ for read). Example: address 0xF7 is accessed by using SPI register address 0x77. For write access, the byte 0x77 is transferred, for read access, the byte 0xF7 is transferred. 6.3.1 SPI write Writing is done by lowering CSB and sending pairs control bytes and register data. The control bytes consist of the SPI register address (= full register address without bit 7) and the write command (bit7 = RW = ‘0’). Several pairs can be written without raising CSB. The transaction is ended by a raising CSB. The SPI write protocol is depicted in Figure 12. Control byte Start RW CSB = 0 0 Data byte Register address (F4h) 1 1 1 0 1 Control byte Data register - address F4h 0 0 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 0 Data byte Register address (F5h) RW 1 1 1 0 1 0 Data register - adress F5h 1 bit7 bit6 bit5 bit4 bit3 bit2 Stop bit1 bit0 CSB = 1 Figure 12: SPI multiple byte write (not auto-incremented) 6.3.2 SPI read Reading is done by lowering CSB and first sending one control byte. The control bytes consist of the SPI register address (= full register address without bit 7) and the read command (bit 7 = RW = ‘1’). After writing the control byte, data is sent out of the SDO pin (SDI in 3-wire mode); the register address is automatically incremented. The SPI read protocol is depicted in Figure 13. Control byte Register address (F6h) Start RW CSB = 0 1 1 1 1 0 1 1 0 Data byte Data byte Data register - address F6h Data register - address F7h bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 bit7 bit6 bit5 bit4 bit3 bit2 Stop bit1 bit0 CSB = 1 Figure 13: SPI multiple byte read BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 35 6.4 Interface parameter specification 6.4.1 General interface parameters The general interface parameters are given in Table 32 below. Table 32: interface parameters Parameter Input low level Input high level 2 Output low level I C 2 Output low level I C Output low level SPI Output low level SPI Symbol Condition Vil_si Vih_si Vol_SDI Vol_SDI_1.2 Vol_SDO Vol_SDO_1.2 VDDIO=1.2 V to 3. 6V VDDIO=1.2 V to 3.6 V VDDIO=1.62 V, Iol=3 mA VDDIO=1.20 V, Iol=3 mA VDDIO=1.62 V, Iol=1 mA VDDIO=1.20 V, Iol=1 mA VDDIO=1.62 V, Ioh=1 mA (SDO, SDI) VDDIO=1.20 V, Ioh=1 mA (SDO, SDI) Internal CSB pull-up resistance to VDDIO Output high level Voh Output high level Voh_1.2 Pull-up resistor Rpull 2 I C bus load capacitor Cb Min Typ Max Unit 20 %VDDIO %VDDIO %VDDIO %VDDIO %VDDIO %VDDIO 80 20 23 20 23 80 %VDDIO 60 %VDDIO 70 120 On SDI and SCK 190 kΩ 400 pF 6.4.2 I²C timings For I²C timings, the following abbreviations are used:  “S&F mode” = standard and fast mode  “HS mode” = high speed mode  Cb = bus capacitance on SDA line All other naming refers to I²C specification 2.1 (January 2000). The I²C timing diagram is in Figure 14. The corresponding values are given in Table 33. SDI tBUF tf tLOW SCK tHIGH tHDSTA tr tHDDAT tSUDAT SDI tSUSTA tSUSTO Figure 14: I²C timing diagram BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 36 Table 33: I²C timings Parameter Symbol SDI setup time tSU;DAT SDI hold time tHD;DAT SCK low pulse tLOW SCK low pulse tLOW Condition Min S&F Mode HS mode S&F Mode, Cb≤100 pF S&F Mode, Cb≤400 pF HS mode, Cb≤100 pF HS mode, Cb≤400 pF HS mode, Cb≤100 pF VDDIO = 1.62 V HS mode, Cb≤100 pF VDDIO = 1.2 V 160 30 80 90 18 24 Typ Max Unit 115 150 ns ns ns ns ns ns 160 ns 210 ns The above-mentioned I2C specific timings correspond to the following internal added delays:  Input delay between SDI and SCK inputs: SDI is more delayed than SCK by typically 100 ns in Standard and Fast Modes and by typically 20 ns in High Speed Mode.  Output delay from SCK falling edge to SDI output propagation is typically 140 ns in Standard and Fast Modes and typically 70 ns in High Speed Mode. 6.4.3 SPI timings The SPI timing diagram is in Figure 15, while the corresponding values are given in Table 34. All timings apply both to 4- and 3-wire SPI. T_hold_csb T_setup_csb CSB T_low_sck T_high_sck SCK SDI T_setup_sdi T_hold_sdi SDO T_delay_sdo Figure 15: SPI timing diagram BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 37 Table 34: SPI timings Parameter SPI clock input frequency SCK low pulse SCK high pulse SDI setup time SDI hold time SDO output delay SDO output delay CSB setup time CSB hold time Symbol F_spi T_low_sck T_high_sck T_setup_sdi T_hold_sdi T_delay_sdo T_delay_sdo T_setup_csb T_hold_csb BST-BME280-DS001-09 | Revision 1.0 | November 2014 Condition Min 0 20 20 20 20 25 pF load, VDDIO=1.6 V min 25 pF load, VDDIO=1.2 V min Typ Max Unit 10 MHz ns ns ns ns ns ns ns ns 30 40 20 20 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 38 7. Pin-out and connection diagram 7.1 Pin-out 8 VDD 1 GND 1 GND 8 VDD Pin 1 marker 7 GND 2 CSB 2 CSB 7 GND TOP VIEW (pads not visible) 6 VDDIO BOTTOM VIEW (pads visible) 3 SDI 3 SDI 6 VDDIO 4 SCK 4 SCK 5 SDO Vent hole 5 SDO Figure 16: Pin-out top and bottom view Note: The pin numbering of BME280 is performed in the untypical clockwise direction when seen in top view and counter-clockwise when seen in bottom view. Table 35: Pin description SPI 4W Connect to SPI 3W GND I²C Chip select CSB CSB VDDIO In/Out Serial data input SDI SDI/SDO SDA SCK In Serial clock input SCK SCK SCL 5 SDO In/Out Serial data output SDO DNC GND for default address 6 VDDIO Supply 7 GND Supply Digital / Interface supply Ground 8 VDD Supply Analog supply Pin Name I/O Type Description 1 GND Supply Ground 2 CSB In 3 SDI 4 BST-BME280-DS001-09 | Revision 1.0 | November 2014 VDDIO GND VDD Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 39 7.2 Connection diagram I2C VDD VDDIO 8 VDD 1 GND 7 GND 2 CSB TOP VIEW (pads not visible) 6 VDDIO R1 R2 3 SDI SDA 4 SCK SCL Vent hole 5 SDO I2C address bit 0 GND: '0'; VDDIO: '1' C1 C2 Figure 17: I²C connection diagram Notes:  The recommended value for C1, C2 is 100 nF  The value for the pull-up resistors R1, R2 should be based on the interface timing and the bus load; a normal value is 4.7 kΩ  A direct connection between CSB and VDDIO is required BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 40 7.3 Connection diagram 4-wire SPI VDD VDDIO 8 VDD 1 GND 7 GND 2 CSB CSB 3 SDI SDI 4 SCK SCK TOP VIEW (pads not visible) 6 VDDIO Vent hole 5 SDO SDO C1 C2 Figure 18: 4-wire SPI connection diagram Note: The recommended value for C1, C2 is 100 nF BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 41 7.4 Connection diagram 3-wire SPI VDD VDDIO 8 VDD 1 GND 7 GND 2 CSB CSB 3 SDI SDI/SDO 4 SCK SCK TOP VIEW (pads not visible) 6 VDDIO Vent hole 5 SDO C1 C2 Figure 19: 3-wire SPI connection diagram Note: The recommended value for C1, C2 is 100 nF BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 42 7.5 Package dimensions Figure 20: Package dimensions for top, bottom and side view BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 43 7.6 Landing pattern recommendation For the design of the landing pattern, the following dimensioning is recommended: Figure 21: Recommended landing pattern (top view) Note: red areas demark exposed PCB metal pads.  In case of a solder mask defined (SMD) PCB process, the land dimensions should be defined by solder mask openings. The underlying metal pads are larger than these openings.  In case of a non solder mask defined (NSMD) PCB process, the land dimensions should be defined in the metal layer. The mask openings are larger than these metal pads. BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 44 7.7 Marking 7.7.1 Mass production devices Table 36: Marking of mass production parts Marking 5 6 7 Description CCC Lot counter: 3 alphanumeric digits, variable to generate mass production trace-code T Product number: 1 alphanumeric digit, fixed to identify product type, T = “U” “U” is associated with the product BME280 (part number 0 273 141 185) L Sub-contractor ID: 1 alphanumeric digit, variable to identify sub-contractor (L = “P”) 8 CCC TL Vent hole Symbol Pin 1 marker 4 3 2 1 BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 45 7.7.2 Engineering samples Table 37: Marking of engineering samples Marking Symbol XX 5 6 7 Sample ID: 2 alphanumeric digits, variable to generate trace-code 8 XXN CC Vent hole Description N Eng. Sample ID: 1 alphanumeric digit, fixed to identify engineering sample, N = “ * ” or “e” or “E” Pin 1 marker 4 3 2 1 CC BST-BME280-DS001-09 | Revision 1.0 | November 2014 Counter ID: 2 alphanumeric digits, variable to generate trace-code Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 46 7.8 Soldering guidelines and reconditioning recommendations The moisture sensitivity level of the BME280 sensors corresponds to JEDEC Level 1, see also:  IPC/JEDEC J-STD-020C “Joint Industry Standard: Moisture/Reflow Sensitivity Classification for non-hermetic Solid State Surface Mount Devices”  IPC/JEDEC J-STD-033A “Joint Industry Standard: Handling, Packing, Shipping and Use of Moisture/Reflow Sensitive Surface Mount Devices”. The sensor fulfils the lead-free soldering requirements of the above-mentioned IPC/JEDEC standard, i.e. reflow soldering with a peak temperature up to 260°C. The minimum height of the solder after reflow shall be at least 50µm. This is required for good mechanical decoupling between the sensor device and the printed circuit board (PCB). Figure 22: Soldering profile BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 47 7.9 Reconditioning Procedure After exposing the device to operating conditions, which exceed the limits specified in section 1.2, e.g. after reflow, the humidity sensor may possess an additional offset. Therefore the following reconditioning procedure is mandatory to restore the calibration state: 1. Dry-Baking: 2. Re-Hydration: 120 °C at 5d 7.10 Tape and reel specification 7.10.1 Dimensions Figure 23: Tape and Reel dimensions Quantity per reel: 10 kpcs. BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 48 7.10.2 Orientation within the reel Figure 24: Orientation within tape BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 49 7.11 Mounting and assembly recommendations In order to achieve the specified performance for you design, the following recommendations and the “Handling, soldering & mounting instructions BME280” should be taken into consideration when mounting a pressure sensor on a printed-circuit board (PCB):  The clearance above the metal lid shall be 0.1mm at minimum.  For the device housing appropriate venting needs to be provided in case the ambient pressure shall be measured.  Liquids shall not come into direct contact with the device.  During operation the sensor chip is sensitive to light, which can influence the accuracy of the measurement (photo-current of silicon). The position of the vent hole minimizes the light exposure of the sensor chip. Nevertheless, Bosch Sensortec recommends avoiding the exposure of BME280 to strong light sources.  Soldering may not be done using vapor phase processes since the sensor will be damaged by the liquids used in these processes. 7.12 Environmental safety 7.12.1 RoHS The BME280 sensor meets the requirements of the EC restriction of hazardous substances (RoHS) directive, see also: Directive 2002/95/EC of the European Parliament and of the Council of 8 September 2011 on the restriction of the use of certain hazardous substances in electrical and electronic equipment. 7.12.2 Halogen content The BME280 is halogen-free. For more details on the analysis results please contact your Bosch Sensortec representative. 7.12.3 Internal package structure Within the scope of Bosch Sensortec’s ambition to improve its products and secure the mass product supply, Bosch Sensortec qualifies additional sources (e.g. 2nd source) for the package of the BME280. While Bosch Sensortec took care that all of the technical packages parameters are described above are 100% identical for all sources, there can be differences in the chemical content and the internal structural between the different package sources. However, as secured by the extensive product qualification process of Bosch Sensortec, this has no impact to the usage or to the quality of the BME280 product. BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 50 8. Appendix A: Alternative compensation formulas 8.1 Compensation formulas in double precision floating point Please note that it is strongly advised to use the API available from Bosch Sensortec to perform readout and compensation. If this is not wanted, the code below can be applied at the user’s risk. Both pressure and temperature values are expected to be received in 20 bit format, positive, stored in a 32 bit signed integer. Humidity is expected to be received in 16 bit format, positive, stored in a 32 bit signed integer. The variable t_fine (signed 32 bit) carries a fine resolution temperature value over to the pressure compensation formula and could be implemented as a global variable. The data type “BME280_S32_t” should define a 32 bit signed integer variable type and could usually be defined as “long signed int”. The revision of the code is rev. 1.1 (pressure and temperature) and rev. 1.0 (humidity). Compensating the measurement value with double precision gives the best possible accuracy but is only recommended for PC applications. // Returns temperature in DegC, double precision. Output value of “51.23” equals 51.23 DegC. // t_fine carries fine temperature as global value BME280_S32_t t_fine; double BME280_compensate_T_double(BME280_S32_t adc_T) { double var1, var2, T; var1 = (((double)adc_T)/16384.0 – ((double)dig_T1)/1024.0) * ((double)dig_T2); var2 = ((((double)adc_T)/131072.0 – ((double)dig_T1)/8192.0) * (((double)adc_T)/131072.0 – ((double) dig_T1)/8192.0)) * ((double)dig_T3); t_fine = (BME280_S32_t)(var1 + var2); T = (var1 + var2) / 5120.0; return T; } // Returns pressure in Pa as double. Output value of “96386.2” equals 96386.2 Pa = 963.862 hPa double BME280_compensate_P_double(BME280_S32_t adc_P) { double var1, var2, p; var1 = ((double)t_fine/2.0) – 64000.0; var2 = var1 * var1 * ((double)dig_P6) / 32768.0; var2 = var2 + var1 * ((double)dig_P5) * 2.0; var2 = (var2/4.0)+(((double)dig_P4) * 65536.0); var1 = (((double)dig_P3) * var1 * var1 / 524288.0 + ((double)dig_P2) * var1) / 524288.0; var1 = (1.0 + var1 / 32768.0)*((double)dig_P1); if (var1 == 0.0) { return 0; // avoid exception caused by division by zero } p = 1048576.0 – (double)adc_P; p = (p – (var2 / 4096.0)) * 6250.0 / var1; var1 = ((double)dig_P9) * p * p / 2147483648.0; var2 = p * ((double)dig_P8) / 32768.0; p = p + (var1 + var2 + ((double)dig_P7)) / 16.0; return p; } // Returns humidity in %rH as as double. Output value of “46.332” represents 46.332 %rH double bme280_compensate_H_double(BME280_S32_t adc_H); { double var_H; var_H = (((double)t_fine) – 76800.0); var_H = (adc_H – (((double)dig_H4) * 64.0 + ((double)dig_H5) / 16384.0 * var_H)) * (((double)dig_H2) / 65536.0 * (1.0 + ((double)dig_H6) / 67108864.0 * var_H * (1.0 + ((double)dig_H3) / 67108864.0 * var_H))); var_H = var_H * (1.0 – ((double)dig_H1) * var_H / 524288.0); if (var_H > 100.0) var_H = 100.0; else if (var_H < 0.0) var_H = 0.0; return var_H; } BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 51 8.2 Pressure compensation in 32 bit fixed point Please note that it is strongly advised to use the API available from Bosch Sensortec to perform readout and compensation. If this is not wanted, the code below can be applied at the user’s risk. Both pressure and temperature values are expected to be received in 20 bit format, positive, stored in a 32 bit signed integer. The variable t_fine (signed 32 bit) carries a fine resolution temperature value over to the pressure compensation formula and could be implemented as a global variable. The data type “BME280_S32_t” should define a 32 bit signed integer variable type and can usually be defined as “long signed int”. The data type “BME280_U32_t” should define a 32 bit unsigned integer variable type and can usually be defined as “long unsigned int”. Compensating the pressure value with 32 bit integer has an accuracy of typically 1 Pa (1sigma). At high filter levels this adds a significant amount of noise to the output values and reduces their resolution. // Returns temperature in DegC, resolution is 0.01 DegC. Output value of “5123” equals 51.23 DegC. // t_fine carries fine temperature as global value BME280_S32_t t_fine; BME280_S32_t BME280_compensate_T_int32(BME280_S32_t adc_T) { BME280_S32_t var1, var2, T; var1 = ((((adc_T>>3) – ((BME280_S32_t)dig_T1 11; var2 = (((((adc_T>>4) – ((BME280_S32_t)dig_T1)) * ((adc_T>>4) – ((BME280_S32_t)dig_T1))) >> 12) * ((BME280_S32_t)dig_T3)) >> 14; t_fine = var1 + var2; T = (t_fine * 5 + 128) >> 8; return T; } // Returns pressure in Pa as unsigned 32 bit integer. Output value of “96386” equals 96386 Pa = 963.86 hPa BME280_U32_t BME280_compensate_P_int32(BME280_S32_t adc_P) { BME280_S32_t var1, var2; BME280_U32_t p; var1 = (((BME280_S32_t)t_fine)>>1) – (BME280_S32_t)64000; var2 = (((var1>>2) * (var1>>2)) >> 11 ) * ((BME280_S32_t)dig_P6); var2 = var2 + ((var1*((BME280_S32_t)dig_P5))2)+(((BME280_S32_t)dig_P4)2) * (var1>>2)) >> 13 )) >> 3) + ((((BME280_S32_t)dig_P2) * var1)>>1))>>18; var1 =((((32768+var1))*((BME280_S32_t)dig_P1))>>15); if (var1 == 0) { return 0; // avoid exception caused by division by zero } p = (((BME280_U32_t)(((BME280_S32_t)1048576)-adc_P)-(var2>>12)))*3125; if (p < 0x80000000) { p = (p >3) * (p>>3))>>13)))>>12; var2 = (((BME280_S32_t)(p>>2)) * ((BME280_S32_t)dig_P8))>>13; p = (BME280_U32_t)((BME280_S32_t)p + ((var1 + var2 + dig_P7) >> 4)); return p; } BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 52 9. Appendix B: Measurement time and current calculation In this chapter, formulas are given to calculate measurement rate, filter bandwidth and current consumption in different settings. 9.1 Measurement time The active measurement time depends on the selected values for humidity, temperature and pressure oversampling and can be calculated in milliseconds using the formulas below. For example, using temperature oversampling ×1, pressure oversampling ×4 and no humidity measurement, the measurement time is: 9.2 Measurement rate in forced mode In forced mode, the measurement rate depends on the rate at which it is forced by the master. The highest possible frequency in Hz can be calculated as: If measurements are forced faster than they can be executed, the data rate saturates at the attainable data rate. For the example above with 11.5 ms measurement time, the typically achievable output data rate would be: 9.3 Measurement rate in normal mode The measurement rate in normal mode depends on the measurement time and the standby time and can be calculated in Hz using the following formula: The accuracy of tstandby is described in the specification parameter Δtstandby. For the example above with 11.5 ms measurement time, setting normal mode with a standby time of 62.5 ms would result in a data rate of: BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 53 9.4 Response time using IIR filter When using the IIR filter, the response time of the sensor depends on the selected filter coefficient and the data rate used. It can be calculated using the following formula: For the example above with a data rate of 13.51 Hz, the user could select a filter coefficient of 8. According to Table 6, the number of samples needed to reach 75% of a step response using this filter setting is 11. The response time with filter is therefore: 9.5 Current consumption The current consumption depends on the selected oversampling settings, the measurement rate and the sensor mode, but not on the IIR filter setting. It can be calculated as: Note that the only difference between forced and normal mode current consumption is that the current for the inactive time is either IDDSL or IDDSB. For the example above, the current would be BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 54 10. Legal disclaimer 10.1 Engineering samples Engineering Samples are marked with an asterisk (*) or (e) or (E). Samples may vary from the valid technical specifications of the product series contained in this data sheet. They are therefore not intended or fit for resale to third parties or for use in end products. Their sole purpose is internal client testing. The testing of an engineering sample may in no way replace the testing of a product series. Bosch Sensortec assumes no liability for the use of engineering samples. The Purchaser shall indemnify Bosch Sensortec from all claims arising from the use of engineering samples. 10.2 Product use Bosch Sensortec products are developed for the consumer goods industry. They may only be used within the parameters of this product data sheet. They are not fit for use in life-sustaining or security sensitive systems. Security sensitive systems are those for which a malfunction is expected to lead to bodily harm or significant property damage. In addition, they are not fit for use in products which interact with motor vehicle systems. The resale and/or use of products are at the purchaser’s own risk and his own responsibility. The examination of fitness for the intended use is the sole responsibility of the purchaser. The purchaser shall indemnify Bosch Sensortec from all third party claims arising from any product use not covered by the parameters of this product data sheet or not approved by Bosch Sensortec and reimburse Bosch Sensortec for all costs in connection with such claims. The purchaser must monitor the market for the purchased products, particularly with regard to product safety, and inform Bosch Sensortec without delay of all security relevant incidents. 10.3 Application examples and hints With respect to any examples or hints given herein, any typical values stated herein and/or any information regarding the application of the device, Bosch Sensortec hereby disclaims any and all warranties and liabilities of any kind, including without limitation warranties of noninfringement of intellectual property rights or copyrights of any third party. The information given in this document shall in no event be regarded as a guarantee of conditions or characteristics. They are provided for illustrative purposes only and no evaluation regarding infringement of intellectual property rights or copyrights or regarding functionality, performance or error has been made. 10.4 Handling Instructions Detailed handling instructions are described in the document “handling, soldering & mounting instructions (HSMI)”. Important to highlight is the directive to avoid during manufacturing, transport and usage of the sensor in devices the contact of high concentration of chemical solvents and long exposure times. Chemical interactions of chemical compounds with the sensor shall be prevented. These are especially outgassing of corrugated plastic, organic glues, sticky tape made with adhesives, labels, marker or outgassing package materials such as bubble wrap, foams and others shall be avoided. It is recommended to ventilate the production and manufacturing area. BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice. Final Datasheet BME280 Environmental sensor Page 55 11. Document history and modification Rev. No 0.1 1.0 Chapter Description of modification/changes Document creation Date 2012-11-06 Final datasheet 2014-11-12 Bosch Sensortec GmbH Gerhard-Kindler-Strasse 8 72770 Reutlingen / Germany contact@bosch-sensortec.com www.bosch-sensortec.com Modifications reserved Specifications subject to change without notice Document number: BST-BME280-DS001-09 Revision_1.0_November 2014 BST-BME280-DS001-09 | Revision 1.0 | November 2014 Bosch Sensortec © Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are subject to change without notice.
BME280 ENVIRONMENTAL SENSOR 价格&库存

很抱歉,暂时无法提供与“BME280 ENVIRONMENTAL SENSOR”相匹配的价格&库存,您可以联系我们找货

免费人工找货