BME280/BMP280 high consumption when sleeping
-
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.
-
@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
-
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?"
-
@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.
-
@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:
Please don't mind the bad quality pictures.
-
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.
-
@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?
Is there any way to modify the 5v version to works with 3.3v?
-
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.
-
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"); }
-
@bbastos said in BME280/BMP280 high comsumption when sleeping:
7uA during sleep
Sounds pretty good to me!
You calling it done then?
-
@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 I'll open an issue on nodemanager's github.
Thank you so much for the help!