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. Development
  3. NodeManager
  4. BME280/BMP280 high consumption when sleeping

BME280/BMP280 high consumption when sleeping

Scheduled Pinned Locked Moved NodeManager
11 Posts 4 Posters 138 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.
  • B bbastos

    Hello,

    First, I'd like to thank you all for the hard working building mysensors and nodemanager. This's an incredible and motivanting way of learn and build DIY iot devices even by beginners like me. So my big thank you!

    About my problem, I'm getting 0.50mA when sleeping using BME280/BMP280, just arduino(pro mini) and radio gives me 5uA. I've tried to power the sensor from digital pins using PowerManager power(5,6), but i'm still getting 0.50mA when sleeping.

    It seems like the i2c bus is not being disabled when enter on sleep mode.

    Any help would be appreciated.

    rvendrameR Offline
    rvendrameR Offline
    rvendrame
    Hero Member
    wrote on last edited by
    #2

    @bbastos , welcome to mySensors. Try to add these lines before the sleep():

    digitalWrite( A4 , LOW ); 
    digitalWrite( A5 , LOW ); 
    

    Stills unclear why, but it worked for me at least.

    Reference: https://forum.mysensors.org/post/99876

    Home Assistant / Vera Plus UI7
    ESP8266 GW + mySensors 2.3.2
    Alexa / Google Home

    B 1 Reply Last reply
    0
    • TRS-80T Offline
      TRS-80T Offline
      TRS-80
      wrote on last edited by
      #3

      I am still one of the newer people around here, so I could be off base, but my first thought was "how are you measuring that?"

      B 1 Reply Last reply
      0
      • rvendrameR rvendrame

        @bbastos , welcome to mySensors. Try to add these lines before the sleep():

        digitalWrite( A4 , LOW ); 
        digitalWrite( A5 , LOW ); 
        

        Stills unclear why, but it worked for me at least.

        Reference: https://forum.mysensors.org/post/99876

        B Offline
        B Offline
        bbastos
        wrote on last edited by
        #4

        @rvendrame said in BME280/BMP280 high comsumption when sleeping:

        @bbastos , welcome to mySensors. Try to add these lines before the sleep():

        digitalWrite( A4 , LOW ); 
        digitalWrite( A5 , LOW ); 
        

        Stills unclear why, but it worked for me at least.

        Reference: https://forum.mysensors.org/post/99876

        Thank you @rvendrame! I'll surely try, the only problem is that I don't have control over sleep function, it's encapsulated in nodemager. I'll try to find the best place to put the code you've sugested.

        1 Reply Last reply
        0
        • TRS-80T TRS-80

          I am still one of the newer people around here, so I could be off base, but my first thought was "how are you measuring that?"

          B Offline
          B Offline
          bbastos
          wrote on last edited by
          #5

          @TRS-80 said in BME280/BMP280 high comsumption when sleeping:

          I am still one of the newer people around here, so I could be off base, but my first thought was "how are you measuring that?"

          You need to put the digital multimeter in series with your circuit +- like this:

          WhatsApp Image 2020-06-19 at 16.11.36.jpeg

          WhatsApp Image 2020-06-19 at 16.11.30.jpeg

          Please don't mind the bad quality pictures.

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

            Hi,
            Looks like you're using the 5v version of the bme280, there's an extra 3.3v regulator on this board, this could be the culprit.

            B 1 Reply Last reply
            0
            • M Memphis007

              Hi,
              Looks like you're using the 5v version of the bme280, there's an extra 3.3v regulator on this board, this could be the culprit.

              B Offline
              B Offline
              bbastos
              wrote on last edited by bbastos
              #7

              @Memphis007 said in BME280/BMP280 high comsumption when sleeping:

              Hi,
              Looks like you're using the 5v version of the bme280, there's an extra 3.3v regulator on this board, this could be the culprit.

              I really didn't paid too much attention when buying. I've taken better pictures of bme280 and bmp280, would you mind help me identifying?

              WhatsApp Image 2020-06-21 at 19.54.07.jpeg

              WhatsApp Image 2020-06-21 at 19.53.43.jpeg

              Is there any way to modify the 5v version to works with 3.3v?

              1 Reply Last reply
              0
              • TRS-80T Offline
                TRS-80T Offline
                TRS-80
                wrote on last edited by TRS-80
                #8

                Second picture, left one, middle left of board, large component with 3 leads looks like a regulator to me.

                If you bought on Ali, you should have detailed purchase records, take a close look at them it should state 5v or 3.3v pretty clearly.

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  bbastos
                  wrote on last edited by
                  #9

                  Thanks!

                  Either way, using mysensors library directly with @rvendrame tips I was able to get 7uA during sleep.

                  // Enable debug prints to serial monitor
                  #define MY_DEBUG
                  //#define MY_REPEATER_FEATURE
                  
                  // Enable and select radio type attached
                  #define MY_RADIO_NRF24
                  
                  #define MY_NODE_ID 100
                  
                  //#define MY_PARENT_NODE_ID
                  
                  #include <SPI.h>
                  #include <MySensors.h>
                  #include <Adafruit_Sensor.h>
                  #include <Adafruit_BME280.h> // I had to change I2C address in library for 0x76 (line 32)
                  #include <Wire.h>
                  
                  Adafruit_BME280 bme; // I2C
                  
                  #define CHILD_ID_HUM 0
                  #define CHILD_ID_TEMP 1
                  #define CHILD_ID_PRESS 2
                  
                  // MyMessage to controler
                  MyMessage msgT1(CHILD_ID_TEMP, V_TEMP);
                  MyMessage msgP1(CHILD_ID_PRESS, V_PRESSURE);
                  MyMessage msgF1(CHILD_ID_PRESS, V_FORECAST);
                  MyMessage msgH1(CHILD_ID_HUM, V_HUM);
                  
                  void presentation() {
                    // Send the sketch version information to the gateway and Controller
                    sendSketchInfo("BME280 Test", "1.0");
                    present(CHILD_ID_TEMP, S_TEMP);
                    present(CHILD_ID_PRESS, S_BARO);
                    present(CHILD_ID_HUM, S_HUM);  
                  }
                  
                  void setup() {
                    //GND
                    pinMode(5,OUTPUT);
                    digitalWrite(5, LOW);
                    //VCC
                    pinMode(6,OUTPUT);
                    digitalWrite(6, HIGH);
                    //Baudrate
                    Serial.begin(9600);
                    //BME280 init  
                    initBme280();
                    //Initial reading
                    serverUpdate(); 
                  }
                  
                  
                  void loop() { 
                    digitalWrite(6, HIGH);
                    initBme280();
                    serverUpdate();
                    //delay(200);
                    digitalWrite(6, LOW);
                    digitalWrite(SDA, LOW); // disable internal pullup
                    digitalWrite(SCL, LOW);  // disable internal pullup  
                    sleep(60000); //sleep 1 minute
                  }
                  
                  
                  void initBme280() {
                    if (!bme.begin(0x76)) {
                      Serial.println("Could not find a valid BME280 sensor, check wiring!");
                      while (1);
                    }
                  }
                  
                  // used to read sensor data and send it to controller
                  void serverUpdate() {
                    double T, P, H;
                    T=bme.readTemperature();
                    P=bme.readPressure()/100.0;
                    H=bme.readHumidity();
                    delay(10);
                    send(msgT1.set(T, 1));
                    send(msgP1.set(P, 1));
                    send(msgH1.set(H,1));
                        
                     // unmark for debuging
                    Serial.print("T = \t"); Serial.print(T, 1); Serial.print(" C\t");
                    Serial.print("P = \t"); Serial.print(P, 1); Serial.print(" mBar\t");
                    Serial.print("H = \t"); Serial.print(H, 1); Serial.print(" %\t");
                  }
                  
                  1 Reply Last reply
                  0
                  • TRS-80T Offline
                    TRS-80T Offline
                    TRS-80
                    wrote on last edited by
                    #10

                    @bbastos said in BME280/BMP280 high comsumption when sleeping:

                    7uA during sleep

                    Sounds pretty good to me!

                    You calling it done then? :)

                    B 1 Reply Last reply
                    0
                    • TRS-80T TRS-80

                      @bbastos said in BME280/BMP280 high comsumption when sleeping:

                      7uA during sleep

                      Sounds pretty good to me!

                      You calling it done then? :)

                      B Offline
                      B Offline
                      bbastos
                      wrote on last edited by
                      #11

                      @TRS-80 said in BME280/BMP280 high comsumption when sleeping:

                      @bbastos said in BME280/BMP280 high comsumption when sleeping:

                      7uA during sleep

                      Sounds pretty good to me!

                      You calling it done then? :)

                      Yes, it`s pretty good! But I'd like to use nodemanager on my nodes, it's so much easier :grin: I'll open an issue on nodemanager's github.

                      Thank you so much for the help!

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


                      18

                      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