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. Sleep mode for bmp280

Sleep mode for bmp280

Scheduled Pinned Locked Moved Hardware
7 Posts 4 Posters 3.3k Views 3 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.
  • fishermansF Offline
    fishermansF Offline
    fishermans
    wrote on last edited by
    #1

    Hello,

    I try to build a battery powered temperature sensor but I only found one sensor who works with low power under 2 volt. This is the bmp280 from bosch. But in i2c mode he need a power from 0,6mA so my battery life are only 2 month. Now the library from adafruit runs the sensor in normal mode and so I insert two new functions in the library:

    void Adafruit_BMP280::sleep() {
    write8(BMP280_REGISTER_CONTROL, 0x3C);
    }

    void Adafruit_BMP280::wakeup() {
    write8(BMP280_REGISTER_CONTROL, 0x3F);
    }

    The first one write 00 to the first bits in the data register - the sleep mode.
    The wakeup function rewrite the first bits with 11 - the normal mode.

    void loop() {
    ...
    ...

    Temp = bmp.readTemperature();
    Press = bmp.readPressure() / 100.0;
    Altit = bmp.readAltitude(1013.25);

    bmp.sleep();

    sleep(30000);

    bmp.wakeup();
    }

    Now the sketch needs only 0,2µA in the sleep mode - it is much more better than 0,6mA.

    Best regards

    Elmar

    1 Reply Last reply
    4
    • gohanG Offline
      gohanG Offline
      gohan
      Mod
      wrote on last edited by
      #2

      If you don't want to deal with low voltages, you could get some LiFePO4 batteries that run at 3.3V

      1 Reply Last reply
      0
      • sundberg84S Offline
        sundberg84S Offline
        sundberg84
        Hardware Contributor
        wrote on last edited by
        #3

        Another hack is to power it from a mcu digital pin and set the pin high/low.

        Controller: Proxmox VM - Home Assistant
        MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
        MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
        RFLink GW - Arduino Mega + RFLink Shield, 433mhz

        gohanG 1 Reply Last reply
        0
        • sundberg84S sundberg84

          Another hack is to power it from a mcu digital pin and set the pin high/low.

          gohanG Offline
          gohanG Offline
          gohan
          Mod
          wrote on last edited by
          #4

          @sundberg84 if it is really 0,2µA it is actually astonishing already

          1 Reply Last reply
          0
          • fishermansF Offline
            fishermansF Offline
            fishermans
            wrote on last edited by
            #5

            Oh no it is 2µA:cold_sweat:

            1 Reply Last reply
            0
            • gohanG Offline
              gohanG Offline
              gohan
              Mod
              wrote on last edited by
              #6

              it is still better then the 5-6 uA I get from mine

              1 Reply Last reply
              0
              • __isded___ Offline
                __isded___ Offline
                __isded__
                wrote on last edited by
                #7

                Just wanted to say thanks for this, it is still relevant and useful six years later !

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


                19

                Online

                11.7k

                Users

                11.2k

                Topics

                113.0k

                Posts


                Copyright 2019 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