Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. m1cr0lab
    • Continue chat with m1cr0lab
    • Start new chat with m1cr0lab
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    Steph

    @m1cr0lab

    2
    Reputation
    10
    Posts
    955
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Website github.com/m1cr0lab Location Reunion Age 52

    m1cr0lab Follow

    Posts made by m1cr0lab

    • RE: Incorrect measurements with ENV III HAT on M5StickC+

      @northwest Ok Lee, thank you very much, that's very kind of you 🙂

      posted in Arduino
      m1cr0lab
    • RE: Incorrect measurements with ENV III HAT on M5StickC+

      Hello @northwest, you're right, I have to check.

      Unfortunately I misplaced the manual, but I did find this summary doc online. It states the following features:

      • Accuracy : -20-100°C +/- 1°C
      • Resolution : 0.1°C

      Nevertheless, I have a couple of DS18B20 sensors, which are known to be pretty accurate, all of which indicate a temperature very close to that measured by my kitchen thermometer.

      An error close to 1°C is acceptable in my use case, but ENV II or ENV III HATs get worse measurements than my DS18B20. I also compared these measurements with other sensors like the Adafruit BME280 (which always gives measurements with a 2°C increase because of the voltage regulator on the sensor board), but which is still accurate when taken into account.

      Thank you,
      Steph

      posted in Arduino
      m1cr0lab
    • RE: Incorrect measurements with ENV III HAT on M5StickC+

      Well... I'm soooooo sorry... I thought I had an ENV III, but it's actually an ENV II... 😬

      ENV II even has two temperature sensors, since instead of the QMP6988, it has a BMP280, which is a pressure and temperature sensor. It is, therefore, possible to perform 2 simultaneous temperature measurements!

      So, this time things work better:

      ENV II with M55StickC+

      We still notice a difference in the temperature measurements. The SHT30 seems to get better results (which is probably why they added it).

      Here, it's still 1°C above the real temperature. In the meantime, I turned on the air-conditioning, so maybe the deviation is reduced because of the ventilation? On the other hand, we can see that the temperature measured by the BMP280 is 1°C higher than the one measured by the SHT30.

      But this time, I get a non-zero pressure measurement. 🙂

      Here is the new version of my code for those who are interested:

      #include <M5Unified.h>
      #include <UNIT_ENV.h>
      #include <Adafruit_BMP280.h>
      
      constexpr uint32_t SLEEP_DURATION_US = 30 * 1000 * 1000; // 30 sec
      
      SHT3X sht30;
      Adafruit_BMP280 bmp;
      // QMP6988 qmp6988; // only for ENV III
      
      void setup() {
      
          M5.begin();
          M5.Display.setRotation(3);
          M5.Display.setFont(&fonts::Font2);
      
          Wire.begin(0, 26);
          bmp.begin(0x76);
          bmp.setSampling(
              Adafruit_BMP280::MODE_NORMAL,
              Adafruit_BMP280::SAMPLING_X16,
              Adafruit_BMP280::SAMPLING_X16,
              Adafruit_BMP280::FILTER_X16,
              Adafruit_BMP280::STANDBY_MS_500
          );
      
          // qmp6988.init(); // only for ENV III
          
      }
      
      void displayMeasurement(
          const uint8_t x1,
          const uint8_t x2,
          const uint8_t x3,
          const uint8_t y,
          const char*   sensor,
          const char*   data,
          const float_t value
      ) {
      
          M5.Display.drawString(sensor,  x1, y);
          M5.Display.drawString(data,    x2, y);
          M5.Display.drawFloat(value, 2, x3, y);
      
      }
      
      void loop() {
      
          static float_t temperature_1, temperature_2, humidity, pressure;
      
          uint8_t fail = sht30.get();
      
          temperature_1 = bmp.readTemperature();
          temperature_2 = fail ? 0 : sht30.cTemp;
          humidity      = fail ? 0 : sht30.humidity;
          pressure      = bmp.readPressure();
          
          // only for ENV III
          // pressure = qmp6988.calcPressure();
          // qmp6988.setpPowermode(QMP6988_SLEEP_MODE);
      
          displayMeasurement(10, 70, 100, 10, "BMP280", "T1", temperature_1);
          displayMeasurement(10, 70, 100, 30, "SHT30",  "T2", temperature_2);
          displayMeasurement(10, 70, 100, 50, "SHT30",  "H",  humidity);
          displayMeasurement(10, 70, 100, 70, "BMP280", "P",  pressure);
      
          delay(2000);
          
          M5.Power.deepSleep(SLEEP_DURATION_US);
      
      }
      

      Sorry for my confusion between ENV II and ENV III. But maybe finally the questions raised here will be useful to some readers...

      posted in Arduino
      m1cr0lab
    • RE: Incorrect measurements with ENV III HAT on M5StickC+

      I apparently get a small improvement in the temperature measurement by shutting down the microcontroller like this:

          // M5.Power.Axp192.setLDO2(0);
          // esp_sleep_enable_timer_wakeup(SLEEP_DURATION_US);
          // esp_deep_sleep_start();
          M5.Power.deepSleep(SLEEP_DURATION_US);
      

      But I still have a 2.5°C difference...

      On the other hand, I don't have a solution for the pressure measurement. 😕

      posted in Arduino
      m1cr0lab
    • Incorrect measurements with ENV III HAT on M5StickC+

      Hello,

      I have the impression that ENV III HAT is not working properly and is providing incorrect measurements:

      M5StickC+ with ENV III HAT

      First, the measured temperature is about 3°C above the actual temperature (which I also checked with a DS18B20 sensor). I understand that the sensor measurement can be disturbed by the heating of the electronic components, but still... 3°C is a huge difference !

      I made sure to put the microcontroller in deep sleep to give it time to cool down (see my code below)!

      Then, the measured pressure is always equal to zero... 🤔

      Here is my code:

      #include <M5Unified.h>
      #include <UNIT_ENV.h>
      
      constexpr uint32_t SLEEP_DURATION_US = 60 * 1000 * 1000; // 1 min
      
      SHT3X   sht30;
      QMP6988 qmp6988;
      
      void setup() {
      
          M5.begin();
          M5.Display.setRotation(3);
          M5.Display.setFont(&fonts::Font2);
      
          Wire.begin(0, 26);
          qmp6988.init();
          
      }
      
      void loop() {
      
          static float_t temperature, humidity, pressure;
      
          uint8_t fail = sht30.get();
      
          temperature = fail ? 0 : sht30.cTemp;
          humidity    = fail ? 0 : sht30.humidity;
          pressure    = qmp6988.calcPressure();
      
          qmp6988.setpPowermode(QMP6988_SLEEP_MODE);
      
          M5.Display.drawString("T:", 10, 10); M5.Display.drawFloat(temperature, 2, 30, 10);
          M5.Display.drawString("H:", 10, 30); M5.Display.drawFloat(humidity,    2, 30, 30);
          M5.Display.drawString("P:", 10, 50); M5.Display.drawFloat(pressure,    2, 30, 50);
      
          delay(2000);
      
          M5.Power.Axp192.setLDO2(0);
          esp_sleep_enable_timer_wakeup(SLEEP_DURATION_US);
          esp_deep_sleep_start();
      
      }
      

      Did I make a mistake somewhere?

      Maybe you have experienced this sensor yourself and have some elements to share with me?

      Thank you very much in advance.
      Steph

      posted in Arduino
      m1cr0lab
    • RE: M5Paper power management

      Hello again @felmue,

      I came across this Adafruit video today, and I thought maybe you'd be interested?

      https://youtu.be/m0XAT8V37-g?t=412

      (The interesting part is between 6'52" and 13'05")

      => Power Profiler Kit II

      Cheers
      Steph

      posted in Units
      m1cr0lab
    • RE: M5Paper power management

      Thank you very much @felmue,

      Then I actually saw that you were using this device on your M5Stack page.

      Thanks again for your advice, which I think is perfect... hopefully we can still find some in stock somewhere.

      Regards,
      Steph

      posted in Units
      m1cr0lab
    • RE: M5Paper power management

      Hi guys,

      Being a beginner in electronics, I am wondering how to make current measurements with such low intensities (µA). Would you be so kind as to explain to me how you do it and with which model of measuring device. Pictures are welcome if it doesn't take too much time.

      Thanking you in advance
      Steph

      posted in Units
      m1cr0lab
    • RE: Using G19, G21, G22, G23, G25 or G33 as I2C pin on Atom Lite

      Hi @Balta,

      If you don't need the I2C bus at all, you can disable it like this:

      Wire.~TwoWire();
      

      Try it to see if it solves your problem.

      posted in Atom
      m1cr0lab
    • RE: Updated: M5StickC + 18650C HAT: Heat & LCD corruption

      @skink

      Are you sure the 18650C hat has its own charging circuit?
      I thought we had to connect the M5StickC for the charge to be managed by its AXP192 controller?
      Also, how do you know when the charge is complete? Is there an indicator LED for this?

      Steph

      posted in General
      m1cr0lab