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
fishermansF

fishermans

@fishermans
About
Posts
12
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Sleep mode for bmp280
    fishermansF fishermans

    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

    Hardware
  • Login

  • Don't have an account? Register

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