Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. BME280 Temp Sensor Problem - Min Power Up Time? Min Time To Get First Reading?

BME280 Temp Sensor Problem - Min Power Up Time? Min Time To Get First Reading?

Scheduled Pinned Locked Moved Hardware
9 Posts 4 Posters 1.4k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mahonroy
    wrote on last edited by
    #1

    Hey guys, I created a battery powered circuit that powers up, takes a temperature/humidity/pressure reading from the BME280, then powers down completely. I am having troubles getting good readings with certain delays.

    I am trying to make this process as quickly as possible to conserve battery power.

    Currently I have a 2 millisecond delay at startup to give the BME280 time to power up. Is this necessary? I can't find any info on what is an appropriate delay for this.

    I then initialize the BME280 using these settings:

    • tStandby = 0.5ms
    • filter = off
    • humidity oversampling = *1
    • temperature oversampling = *1
    • pressure oversampling = *1
    • run mode = normal

    If I immediately then take temp/humidity/pressure readings I always get good humidity values, and bad temperature and pressure readings (No matter what I get about 72 degrees and 14,000 feet elevation... no matter if I move the sensor to cold, warm, etc. And its always the exact same value, it never changes). I am at 5280 feet by the way.

    If I add 10ms delay after initializing, then take readings, I still have the same problem.

    If I change it to a 20ms delay, then take readings, I now sometimes get accurate readings for temp/humidity/pressure.

    If I do the 20ms delay, take readings, then wait another 20ms delay, then take readings again I always get accurate readings.

    I did the calculation in the datasheet for "Typical Measurement Time" and "Maximum Measurement Time" and I get 8ms typical, and 9.3ms max. So I would think the original 10ms delay should be good, but it doesn't seem to be working right?

    Is there something I am missing? Any help or advice would be greatly appreciated, thanks!

    mfalkviddM G 2 Replies Last reply
    0
    • M Mahonroy

      Hey guys, I created a battery powered circuit that powers up, takes a temperature/humidity/pressure reading from the BME280, then powers down completely. I am having troubles getting good readings with certain delays.

      I am trying to make this process as quickly as possible to conserve battery power.

      Currently I have a 2 millisecond delay at startup to give the BME280 time to power up. Is this necessary? I can't find any info on what is an appropriate delay for this.

      I then initialize the BME280 using these settings:

      • tStandby = 0.5ms
      • filter = off
      • humidity oversampling = *1
      • temperature oversampling = *1
      • pressure oversampling = *1
      • run mode = normal

      If I immediately then take temp/humidity/pressure readings I always get good humidity values, and bad temperature and pressure readings (No matter what I get about 72 degrees and 14,000 feet elevation... no matter if I move the sensor to cold, warm, etc. And its always the exact same value, it never changes). I am at 5280 feet by the way.

      If I add 10ms delay after initializing, then take readings, I still have the same problem.

      If I change it to a 20ms delay, then take readings, I now sometimes get accurate readings for temp/humidity/pressure.

      If I do the 20ms delay, take readings, then wait another 20ms delay, then take readings again I always get accurate readings.

      I did the calculation in the datasheet for "Typical Measurement Time" and "Maximum Measurement Time" and I get 8ms typical, and 9.3ms max. So I would think the original 10ms delay should be good, but it doesn't seem to be working right?

      Is there something I am missing? Any help or advice would be greatly appreciated, thanks!

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @mahonroy is there a reason the sensor is powered off? According to the datasheet, the sensor consumes 0.1 μA in sleep mode, so the time spent initializing the sensor will likely use more power than keeping it in sleep mode.

      Similar discussions:
      https://forum.mysensors.org/topic/7046/solved-bme280-power-consumtion/4
      https://forum.mysensors.org/topic/9641/bme280-battery-powered-sensors

      Which library are you using to communicate with the bme280? (My guess is https://github.com/embeddedadventures/BME280 but lets make sure we're looking at the same library.)

      M 1 Reply Last reply
      1
      • M Mahonroy

        Hey guys, I created a battery powered circuit that powers up, takes a temperature/humidity/pressure reading from the BME280, then powers down completely. I am having troubles getting good readings with certain delays.

        I am trying to make this process as quickly as possible to conserve battery power.

        Currently I have a 2 millisecond delay at startup to give the BME280 time to power up. Is this necessary? I can't find any info on what is an appropriate delay for this.

        I then initialize the BME280 using these settings:

        • tStandby = 0.5ms
        • filter = off
        • humidity oversampling = *1
        • temperature oversampling = *1
        • pressure oversampling = *1
        • run mode = normal

        If I immediately then take temp/humidity/pressure readings I always get good humidity values, and bad temperature and pressure readings (No matter what I get about 72 degrees and 14,000 feet elevation... no matter if I move the sensor to cold, warm, etc. And its always the exact same value, it never changes). I am at 5280 feet by the way.

        If I add 10ms delay after initializing, then take readings, I still have the same problem.

        If I change it to a 20ms delay, then take readings, I now sometimes get accurate readings for temp/humidity/pressure.

        If I do the 20ms delay, take readings, then wait another 20ms delay, then take readings again I always get accurate readings.

        I did the calculation in the datasheet for "Typical Measurement Time" and "Maximum Measurement Time" and I get 8ms typical, and 9.3ms max. So I would think the original 10ms delay should be good, but it doesn't seem to be working right?

        Is there something I am missing? Any help or advice would be greatly appreciated, thanks!

        G Offline
        G Offline
        Guillermo Schimmel
        wrote on last edited by
        #3

        @mahonroy Why so extreme? What is your power budget? I'm using a standard sketch for the same sensor and the power consumption is negligible.

        I even added a 2 second (2000ms) powered on delay in order to mycontroller.org to detect the parent EUI.

        1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          @mahonroy is there a reason the sensor is powered off? According to the datasheet, the sensor consumes 0.1 μA in sleep mode, so the time spent initializing the sensor will likely use more power than keeping it in sleep mode.

          Similar discussions:
          https://forum.mysensors.org/topic/7046/solved-bme280-power-consumtion/4
          https://forum.mysensors.org/topic/9641/bme280-battery-powered-sensors

          Which library are you using to communicate with the bme280? (My guess is https://github.com/embeddedadventures/BME280 but lets make sure we're looking at the same library.)

          M Offline
          M Offline
          Mahonroy
          wrote on last edited by
          #4

          @mfalkvidd said in BME280 Temp Sensor Problem - Min Power Up Time? Min Time To Get First Reading?:

          @mahonroy is there a reason the sensor is powered off? According to the datasheet, the sensor consumes 0.1 μA in sleep mode, so the time spent initializing the sensor will likely use more power than keeping it in sleep mode.

          Similar discussions:
          https://forum.mysensors.org/topic/7046/solved-bme280-power-consumtion/4
          https://forum.mysensors.org/topic/9641/bme280-battery-powered-sensors

          Which library are you using to communicate with the bme280? (My guess is https://github.com/embeddedadventures/BME280 but lets make sure we're looking at the same library.)

          @guillermo-schimmel said in BME280 Temp Sensor Problem - Min Power Up Time? Min Time To Get First Reading?:

          @mahonroy Why so extreme? What is your power budget? I'm using a standard sketch for the same sensor and the power consumption is negligible.

          I even added a 2 second (2000ms) powered on delay in order to mycontroller.org to detect the parent EUI.

          Thanks for the responses! The way my circuit works is I have a small coin cell battery and an external timer TPL5111 that powers up the circuit on a configurable timer. The microcontroller does its work, then signals back to the TPL5111 that the work is done, and the timer will cut power to the circuit until the timer has elapsed again. There are other things that are happening as well such as transmitting data via RF.
          This way I don't have to worry about quiescent current draw from the battery boosting circuit, I don't have to mess with putting stuff to sleep, shutting down and re-enabling peripherals, etc. And the current draw for the entire circuit is only 35nA when asleep.

          And this is the library I am using:
          https://github.com/e-radionicacom/BME280-Arduino-Library/blob/master/BME280.cpp

          G 1 Reply Last reply
          0
          • M Mahonroy

            @mfalkvidd said in BME280 Temp Sensor Problem - Min Power Up Time? Min Time To Get First Reading?:

            @mahonroy is there a reason the sensor is powered off? According to the datasheet, the sensor consumes 0.1 μA in sleep mode, so the time spent initializing the sensor will likely use more power than keeping it in sleep mode.

            Similar discussions:
            https://forum.mysensors.org/topic/7046/solved-bme280-power-consumtion/4
            https://forum.mysensors.org/topic/9641/bme280-battery-powered-sensors

            Which library are you using to communicate with the bme280? (My guess is https://github.com/embeddedadventures/BME280 but lets make sure we're looking at the same library.)

            @guillermo-schimmel said in BME280 Temp Sensor Problem - Min Power Up Time? Min Time To Get First Reading?:

            @mahonroy Why so extreme? What is your power budget? I'm using a standard sketch for the same sensor and the power consumption is negligible.

            I even added a 2 second (2000ms) powered on delay in order to mycontroller.org to detect the parent EUI.

            Thanks for the responses! The way my circuit works is I have a small coin cell battery and an external timer TPL5111 that powers up the circuit on a configurable timer. The microcontroller does its work, then signals back to the TPL5111 that the work is done, and the timer will cut power to the circuit until the timer has elapsed again. There are other things that are happening as well such as transmitting data via RF.
            This way I don't have to worry about quiescent current draw from the battery boosting circuit, I don't have to mess with putting stuff to sleep, shutting down and re-enabling peripherals, etc. And the current draw for the entire circuit is only 35nA when asleep.

            And this is the library I am using:
            https://github.com/e-radionicacom/BME280-Arduino-Library/blob/master/BME280.cpp

            G Offline
            G Offline
            Guillermo Schimmel
            wrote on last edited by
            #5

            @mahonroy It is a very interesting experiment indeed.

            I just connected the batteries to the arduino, no boosting. But I have space for 2 AAs. With coin things surely are harder.

            I can't help you now but will keep watching your results. Good luck!

            1 Reply Last reply
            1
            • M Offline
              M Offline
              Mahonroy
              wrote on last edited by
              #6

              Something I tried which seems to be working for several hours so far:
              Waiting 3ms, initialize BME280, then immediately read temp/humidity/pressure.... then wait 10ms, then take another reading. If I do this I seem to get good values 100% of the time. Seems odd, and seems kind of a hack, but it appears to be working like this.

              mfalkviddM 1 Reply Last reply
              0
              • M Mahonroy

                Something I tried which seems to be working for several hours so far:
                Waiting 3ms, initialize BME280, then immediately read temp/humidity/pressure.... then wait 10ms, then take another reading. If I do this I seem to get good values 100% of the time. Seems odd, and seems kind of a hack, but it appears to be working like this.

                mfalkviddM Offline
                mfalkviddM Offline
                mfalkvidd
                Mod
                wrote on last edited by mfalkvidd
                #7

                @mahonroy waiting 3ms can probably be lowered a little bit, but is in the right range to handle the bme280 startup time.
                0_1548486195207_BB2ECB7A-C054-4D39-8E5A-367D34C4461E.jpeg

                Bosch recommends using forced mode:

                Using forced mode is recommended for applications which require low sampling rate

                mfalkviddM 1 Reply Last reply
                0
                • mfalkviddM mfalkvidd

                  @mahonroy waiting 3ms can probably be lowered a little bit, but is in the right range to handle the bme280 startup time.
                  0_1548486195207_BB2ECB7A-C054-4D39-8E5A-367D34C4461E.jpeg

                  Bosch recommends using forced mode:

                  Using forced mode is recommended for applications which require low sampling rate

                  mfalkviddM Offline
                  mfalkviddM Offline
                  mfalkvidd
                  Mod
                  wrote on last edited by mfalkvidd
                  #8

                  0_1548486992726_0995040E-C1AD-4156-9274-F6E6A06B5F47.jpeg

                  This part of the datasheet indicates that the time required to complete a measurement is 1.25 + 2.3 + 2.875 + 2.875 = 9.7ms, which is close to the wait time you have found. I would have thought that the library handled the wait time though, but I have not studied the library you are using.

                  EDIT: the library you are using already has a 10ms delay in begin() (after setting the mode which starts the measurement process) so you should not need to wait an additional 10ms. The comment in the library source code is confusing though; it refers to start up time, but the start up time needs to pass before sending any commands.

                  1 Reply Last reply
                  0
                  • Nico 0N Offline
                    Nico 0N Offline
                    Nico 0
                    wrote on last edited by
                    #9

                    hi, i'm making something similar to yours, i know a lot of time has elapsed, but i'll input my knowledge. For your problem it has to do with how the data you are collecting is saved and the configuration for taking measurements you are using.
                    You probably are using a pull measurement, instead of constant measurement. So the device will give you the data saved in register, before taking a new measurement. For example if you take a measure every 1hour, without turning off, it will give you the measurement of the preview hour each time you request for data. This is common in a lot of systems with registers.
                    So your problem may be that when you turn on the device, there is garbage on the register. Thats why you have to do 2 measurements to get the actual value.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    12

                    Online

                    11.7k

                    Users

                    11.2k

                    Topics

                    113.1k

                    Posts


                    Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • MySensors
                    • OpenHardware.io
                    • Categories
                    • Recent
                    • Tags
                    • Popular