Sleep mode for bmp280
-
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
-
Another hack is to power it from a mcu digital pin and set the pin high/low.
-
Another hack is to power it from a mcu digital pin and set the pin high/low.
-
Oh no it is 2µA:cold_sweat:
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login