8 Replies Latest reply on Jan 6, 2021 1:44 PM by ilvyanyatka

    Is Enviro HAT working for you reliably?

    ilvyanyatka

      Hello,

      I am having issues with Enviro HAT humidity and temperature sensors. I wonder if mine is defected or if I am missing something on how to use it. It is not snapped on Raspberry PI but connected by jumper wires.

      1) The first humidity reading is often (not always) more than 90, the second and so on drops down to 30-40

      2) In the same room 2 minutes apart humidity value can change up to 15 points. For example, first reading - 42, second - 27

      3) Temperature value drops much below real value if humidity grows. For example, in the same room with 22C/40% humidity, if humidifier is running, next reading it 10 minutes will show 16C/55% humidity

       

      Do you have any idea why?

      TIA

        • Re: Is Enviro HAT working for you reliably?
          feiticeir0

          Hi Victoria.

           

          I'm going to guess that the problem may be the connections - maybe the jumper wires are not well connected to the PINs or some may be faulty ? I had problems before with loose jumper wires.

           

          Can you test it by snap the two together ?

           

          Mine is working fine without those reading swings.

           

          Try and test both snapped to see.

          4 of 4 people found this helpful
            • Re: Is Enviro HAT working for you reliably?
              ilvyanyatka

              Thank you Bruno.

               

              When I initially tested it while it was snapped on the PI - the first issue definitely was happening. The one with 90% of humidity readings.

              It will be hard to snap it on now to test the other 2 issues because I use a lot of other GPIO pins that Enviro HAT will cover if I snap it on the PI. I will really need to disassemble the whole setup.

            • Re: Is Enviro HAT working for you reliably?
              skruglewicz

              Hi ilvyanyatka

               

              I have the enviro hat connected with jumper wires and the sensor is behaving reasonable well

              in My blog# 10 at this location    I describe my script to check the Humidity in the growing house.

               

              lI recall the test retuning different readings for Humidity, but the screenshots only display 88%?

              I display the Humidity over time in my chart HERE

               

              I'm away from my project this week but I'll see if I'm getting the same values as you describe.

              when I get a chance.

              Regards

              Steve

              2 of 2 people found this helpful
                • Re: Is Enviro HAT working for you reliably?
                  ilvyanyatka

                  Thank you Steve!

                   

                  What exactly is in your code for

                  value = RoomHumidity.getValue()

                   

                  Do you use bme280 object to access Enviro sensor?  Something like

                      bus = SMBus(1) 

                     bme280 = BME280(i2c_dev=bus)

                      AirHumidity = bme280.get_humidity()

                     

                  Or do you use some other library/object?

                   

                  Victoria

                  2 of 2 people found this helpful
                    • Re: Is Enviro HAT working for you reliably?
                      feiticeir0

                      This may seem a dumb question, but have you tried with the Pimoroni's examples ?

                       

                      Because - in their examples - the sensor sits on top of the Raspberry PI, they perform some calculations to remove the average cpu temperature to give a sort of accurate reading of the ambient temperature. and you don't have it that way.

                       

                      Here's my code, a simple one to read the temperature/humidity (without giving in to cpu temperature):

                      import time
                      import sys
                      
                      from bme280 import BME280
                      
                      
                      bme280 = BME280()
                      
                      
                      try:
                      
                          while True:
                              # get data
                              print ("Temp: {}".format(bme280.get_temperature()))
                              print ("Hum: {}".format(bme280.get_humidity()))
                      
                              time.sleep(5)
                      except KeyboardInterrupt:
                          sys.exit(0)
                      

                       

                      And a run of it for 60 seconds:

                       

                      Temp: 22.631540955626406
                      Hum: 78.25451136740215
                      Temp: 31.840742193745086
                      Hum: 26.63692386637497
                      Temp: 31.831073930848675
                      Hum: 26.830281509600262
                      Temp: 31.831718481676603
                      Hum: 26.85365856716121
                      Temp: 31.834618960458556
                      Hum: 26.818467172909095
                      Temp: 31.838486265644406
                      Hum: 26.75399488327368
                      Temp: 31.834618960458556
                      Hum: 26.91790856236235
                      Temp: 31.83913081652463
                      Hum: 26.683776162340155
                      Temp: 31.834618960458556
                      Hum: 26.818467172909095
                      Temp: 31.825595248994887
                      Hum: 26.871405382322422
                      Temp: 31.832040757092273
                      Hum: 26.567011411920134
                      Temp: 31.829140278392174
                      Hum: 26.812795837825956
                      
                      

                       

                      I have it on top of the RPI, so, the values are acceptable.

                      I really don't have the swings of values you describe.

                       

                      Just try the code and see.

                      1 of 1 people found this helpful
                      • Re: Is Enviro HAT working for you reliably?
                        skruglewicz

                        Hi ilvyanyatka

                        Thanks so much for checking out my blog.

                        To answer your question, the code in the script is using a Python Classes from sensors.py.

                        The code for this class can be viewed in my blog testing my classes at  Blog# 8.1 (Part 1 of 2) EAS - System Build

                        specifically at this location RoomHumidity class in the blog

                         

                        I will eventually post my entire source code up to a Git Repository, soon.

                        I recall during testing, the script that checks the humidity, rose as the water in the glass container was running.

                         

                        Hope this answers your initial question

                         

                        Steve K

                        2 of 2 people found this helpful