Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. fishermans
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by fishermans

    • 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

      posted in Hardware
      fishermans
      fishermans