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
  1. Home
  2. Announcements
  3. 💬 Air Humidity Sensor - Si7021

💬 Air Humidity Sensor - Si7021

Scheduled Pinned Locked Moved Announcements
temperaturehumiditysi7021
28 Posts 13 Posters 1.8k Views 12 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by hek
    #1

    This thread contains comments for the article "Air Humidity Sensor - Si7021" posted on MySensors.org.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      texnic
      wrote on last edited by
      #2

      The link to the 3.3 V module on AliExpress actually leads to the 5 V module.

      YveauxY 1 Reply Last reply
      1
      • T texnic

        The link to the 3.3 V module on AliExpress actually leads to the 5 V module.

        YveauxY Offline
        YveauxY Offline
        Yveaux
        Mod
        wrote on last edited by
        #3

        @texnic the seller must have changed the items. I will look into it. Thanks for the hint!

        http://yveaux.blogspot.nl

        1 Reply Last reply
        1
        • M Offline
          M Offline
          Mark Hansen
          wrote on last edited by
          #4

          Vice-versa, the link to the 5V module leads to a 3V (well, 1.9V to 3.6V) sensor unit

          YveauxY 1 Reply Last reply
          0
          • L Offline
            L Offline
            Latest Mailing List
            Banned
            wrote on last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0
            • M Mark Hansen

              Vice-versa, the link to the 5V module leads to a 3V (well, 1.9V to 3.6V) sensor unit

              YveauxY Offline
              YveauxY Offline
              Yveaux
              Mod
              wrote on last edited by
              #6

              @mark-hansen I checked all links (Ebay & Ali) and they all link to the correct modules.

              The sensor might support 1.9-3.6V, but the modules are for 3.3 and 5.0V IO levels respectively. The blue modules have a component marked 662K at the bottom, which is a XC6206P332MR voltage regulator. The 6-pin component next to it is a level shifter so the module operates at 5V levels on the outside, and 3.3V to the SI7021.

              So please, explain why you think the links are wrong.

              http://yveaux.blogspot.nl

              1 Reply Last reply
              1
              • K Offline
                K Offline
                kiesel
                wrote on last edited by
                #7

                I had the problem that the code wouldn't return when calling sensor.getCelsiusHundredths() while using the linked library. It works with this library:

                https://github.com/LowPowerLab/SI7021

                1 Reply Last reply
                0
                • SebexS Offline
                  SebexS Offline
                  Sebex
                  wrote on last edited by
                  #8

                  Hi, when making this sensor battery powered (and thus enabling "#define REPORT_BATTERY_LEVEL"), I get the verification error of "Vcc.h: No such file or directory". How can I solve this?

                  BearWithBeardB 1 Reply Last reply
                  0
                  • SebexS Sebex

                    Hi, when making this sensor battery powered (and thus enabling "#define REPORT_BATTERY_LEVEL"), I get the verification error of "Vcc.h: No such file or directory". How can I solve this?

                    BearWithBeardB Offline
                    BearWithBeardB Offline
                    BearWithBeard
                    wrote on last edited by BearWithBeard
                    #9

                    @Sebex The Si7021 guide mentions that you have to install the Arduino VCC library (link to GitHub) if you want to use this feature:

                    Example

                    This example uses the Si7021 library, which is included in the MySensors external examples. If you choose to report battery level to the gateway (by defining REPORT_BATTERY_LEVEL at the top of the sketch) the Vcc library is also required. Please install the librarie(s) and restart the Arduino IDE before trying to compile.

                    It might be a good idea to add a link to the library in the article itself, since it doesn't make clear which library is required for this.

                    mfalkviddM 1 Reply Last reply
                    1
                    • BearWithBeardB BearWithBeard

                      @Sebex The Si7021 guide mentions that you have to install the Arduino VCC library (link to GitHub) if you want to use this feature:

                      Example

                      This example uses the Si7021 library, which is included in the MySensors external examples. If you choose to report battery level to the gateway (by defining REPORT_BATTERY_LEVEL at the top of the sketch) the Vcc library is also required. Please install the librarie(s) and restart the Arduino IDE before trying to compile.

                      It might be a good idea to add a link to the library in the article itself, since it doesn't make clear which library is required for this.

                      mfalkviddM Offline
                      mfalkviddM Offline
                      mfalkvidd
                      Mod
                      wrote on last edited by
                      #10

                      @BearWithBeard the Vcc library is present in MySensorsArduinoExamples, so if MySensorsArduinoExamples is installed, Vcc will be available.

                      Dependencies is a mess, which is why MySensorsArduinoExamples is in a separate repo. We (the community) has not yet found a good way to handle dependencies.

                      1 Reply Last reply
                      1
                      • SebexS Offline
                        SebexS Offline
                        Sebex
                        wrote on last edited by
                        #11

                        Yea that solved it, I copied the file in the library. Thanks!

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          bebr
                          wrote on last edited by
                          #12

                          Hi there,

                          I've a pro mini 3.3V with a si7021 and a Li-ion 3.7V battery.
                          I'm using the VCC library, but the reported values are weird: the remaining battery value drops a lot, and if I reset the board, it jumps back to a more normal value.

                          The battery is connected to the VCC pin on the arduino.
                          A regulator (LM2936) powers the si7021 and the nrf24.

                          Here is a graph of the battery level. Pikes appear when I reset the arduino.

                          f66813cf-f528-406d-9171-a645dc4f931b-image.png

                          Isn't the 2 resistors method more accurate?

                          Thanks!

                          YveauxY 1 Reply Last reply
                          0
                          • B bebr

                            Hi there,

                            I've a pro mini 3.3V with a si7021 and a Li-ion 3.7V battery.
                            I'm using the VCC library, but the reported values are weird: the remaining battery value drops a lot, and if I reset the board, it jumps back to a more normal value.

                            The battery is connected to the VCC pin on the arduino.
                            A regulator (LM2936) powers the si7021 and the nrf24.

                            Here is a graph of the battery level. Pikes appear when I reset the arduino.

                            f66813cf-f528-406d-9171-a645dc4f931b-image.png

                            Isn't the 2 resistors method more accurate?

                            Thanks!

                            YveauxY Offline
                            YveauxY Offline
                            Yveaux
                            Mod
                            wrote on last edited by
                            #13

                            @bebr well, it can depend on a number of things: where in the sketch do you read the vcc level (eg before or after sending), what voltage levels did you configure in your sketch, did you remove the voltage regulator from the pro mini?

                            http://yveaux.blogspot.nl

                            1 Reply Last reply
                            0
                            • B Offline
                              B Offline
                              bebr
                              wrote on last edited by
                              #14

                              @Yveaux thanks for your answer.

                              I used the sketch on the Mysensors'si7021 page, so the vcc level is read at the end of the loop, before going to sleep and after sending the temp/hum values.
                              The only modification I made are setting up the voltage values.
                              As my 3.7V Li-Ion battery is at 4.2V when fully charged and at 3V when almost completed discharged, this how I configured it in the sketch:

                              #ifdef REPORT_BATTERY_LEVEL
                              #include <Vcc.h>
                              static uint8_t oldBatteryPcnt = 200;  // Initialize to 200 to assure first time value will be sent.
                              const float VccMin        = 3.0;      // Minimum expected Vcc level, in Volts: Brownout at 1.8V    -> 0%
                              const float VccMax        = 4.2;  // Maximum expected Vcc level, in Volts: 2xAA fresh Alkaline -> 100%
                              const float VccCorrection = 1.0;      // Measured Vcc by multimeter divided by reported Vcc
                              static Vcc vcc(VccCorrection); 
                              #endif
                              

                              I didn't apply any correction because read and reported VCC was very close, and I'm just testing this for now.

                              I didn't removed the onboard regulator nor the power led for now. Isn't the regulator only used when applying voltage to the RAW pin?

                              YveauxY 1 Reply Last reply
                              1
                              • B bebr

                                @Yveaux thanks for your answer.

                                I used the sketch on the Mysensors'si7021 page, so the vcc level is read at the end of the loop, before going to sleep and after sending the temp/hum values.
                                The only modification I made are setting up the voltage values.
                                As my 3.7V Li-Ion battery is at 4.2V when fully charged and at 3V when almost completed discharged, this how I configured it in the sketch:

                                #ifdef REPORT_BATTERY_LEVEL
                                #include <Vcc.h>
                                static uint8_t oldBatteryPcnt = 200;  // Initialize to 200 to assure first time value will be sent.
                                const float VccMin        = 3.0;      // Minimum expected Vcc level, in Volts: Brownout at 1.8V    -> 0%
                                const float VccMax        = 4.2;  // Maximum expected Vcc level, in Volts: 2xAA fresh Alkaline -> 100%
                                const float VccCorrection = 1.0;      // Measured Vcc by multimeter divided by reported Vcc
                                static Vcc vcc(VccCorrection); 
                                #endif
                                

                                I didn't apply any correction because read and reported VCC was very close, and I'm just testing this for now.

                                I didn't removed the onboard regulator nor the power led for now. Isn't the regulator only used when applying voltage to the RAW pin?

                                YveauxY Offline
                                YveauxY Offline
                                Yveaux
                                Mod
                                wrote on last edited by Yveaux
                                #15

                                @bebr said in 💬 Air Humidity Sensor - Si7021:
                                Your setup looks allright.

                                Isn't the regulator only used when applying voltage to the RAW pin?

                                Yes it is, but I'm not sure what will happen if you source 3v3 via its output pin.
                                Anyway, I doubt if this could cause the effect you're seeing.

                                http://yveaux.blogspot.nl

                                1 Reply Last reply
                                0
                                • B Offline
                                  B Offline
                                  bebr
                                  wrote on last edited by
                                  #16

                                  Ok, do you need my schematic, to make it clearer?

                                  I've planned to removed the onboard regulator (and power led) on my production board. But this one is for testing so I leave it untouched.

                                  So currently the regulator, is obiously external.

                                  Thanks again, any help appreciated, otherwise I'll use the 2 resistors method.

                                  1 Reply Last reply
                                  0
                                  • B Offline
                                    B Offline
                                    bebr
                                    wrote on last edited by
                                    #17

                                    And now, without resetting, the battery level has jumped from 23% to 47%. This last seems to be correct according to the measure of 3.673V, directly taken on the battery.

                                    mfalkviddM 1 Reply Last reply
                                    0
                                    • B bebr

                                      And now, without resetting, the battery level has jumped from 23% to 47%. This last seems to be correct according to the measure of 3.673V, directly taken on the battery.

                                      mfalkviddM Offline
                                      mfalkviddM Offline
                                      mfalkvidd
                                      Mod
                                      wrote on last edited by
                                      #18

                                      @bebr could it be temperature related? I have noticed that the voltage in my nodes increase when the sun is shining on them.

                                      B 1 Reply Last reply
                                      0
                                      • mfalkviddM mfalkvidd

                                        @bebr could it be temperature related? I have noticed that the voltage in my nodes increase when the sun is shining on them.

                                        B Offline
                                        B Offline
                                        bebr
                                        wrote on last edited by bebr
                                        #19

                                        @mfalkvidd I thought of this too, but I opened the windows this morning, 11°C here this morning, and the battery level stayed around 50%.

                                        Here are some graphs showing it's not temperature related:
                                        Screenshot_2020-03-30 MySensors testing - Grafana.png

                                        1 Reply Last reply
                                        1
                                        • B Offline
                                          B Offline
                                          bebr
                                          wrote on last edited by bebr
                                          #20

                                          I noticed I used a 10uF/50V capacitor instead of a 0.1uF/5V for LM2936 regulator.
                                          Could it be the source of my problem?
                                          I change it last evening, and now the reported battery level seems ok.
                                          Sorry, I'm noob in electronics :)

                                          skywatchS 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          14

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

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