Skip to content
  • Blog
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
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

Community Forum

  1. Home
  2. Categories
  3. TH02
  4. Smart Humidity and Temperature sensor TH02 Library

Smart Humidity and Temperature sensor TH02 Library

Scheduled Pinned Locked Moved TH02
sensortemperaturelibraryarduinohumidity
8 Posts 3 Posters 4.9k Views 3 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.
  • CharlesC Offline
    CharlesC Offline
    Charles
    wrote on last edited by Charles
    #1

    Playing around with Hoperf RFM12B and RFM69 for my wireless sensors, I discovered they also have one interesting sensor for temperature and humidity called TH02. Just look the picture below, this sensor is so small Of course I already looked and… Continue Reading

    Click here to see the full blog post

    1 Reply Last reply
    • C Offline
      C Offline
      chrisb
      wrote on last edited by
      #2

      Hello Charles,
      First I'd like to say a big thank you for creating this library, it's been a big help for a capstone project I'm on for my bachelors degree. I've ran into a bit of an issue though and I think I know the cause, but I'm a bit stuck and was hoping you may be able to confirm my suspicion. I'm using this with an Anarduino to pull temps using a hopefm RFM69 chip at 915 mhz. I set the chip up inside and it seems to be measuring ~70F like it's suposed to, then when I move the sensor outside (where it's currently 13F) I watch the temp drop down to 32F, and then it climbs up to 55F I believe that the heater in the Humidity portion is turning on but in my code I'm only starting TempConv and I after looking into the library files I did update that to attempt to keep the heater off by using, "th02.startTempConv(true, false);"

      Can you tell me if I may be missing something, or if there is something else I should be looking into? when I bring it back in, the temps are within range again, so I'm fairly certain that it's not a wiring issue.
      Thanks,
      Chris

      1 Reply Last reply
      • C Offline
        C Offline
        chrisb
        wrote on last edited by
        #3

        Also I would like to say I'm very green to this, so please do not rule out the obvious .
        Thank you,
        Chris

        1 Reply Last reply
        • CharlesC Offline
          CharlesC Offline
          Charles
          wrote on last edited by
          #4

          @chrisb
          thanks for the comment.

          To be honest, I never tested the heater so I could be not "bug free"

          Could you try this and post serial result ?

          uint8_t cfg;
          th02.startTempConv(true, false);
          if (th02.getConfig(&cfg)==0) {
            serial.print("Config=");
            serial.println(cfg,HEX);
          } else {
            serial.println("Read error");
          }
          
          C 1 Reply Last reply
          • CharlesC Charles

            @chrisb
            thanks for the comment.

            To be honest, I never tested the heater so I could be not "bug free"

            Could you try this and post serial result ?

            uint8_t cfg;
            th02.startTempConv(true, false);
            if (th02.getConfig(&cfg)==0) {
              serial.print("Config=");
              serial.println(cfg,HEX);
            } else {
              serial.println("Read error");
            }
            
            C Offline
            C Offline
            chrisb
            wrote on last edited by chrisb
            #5

            @Charles
            Here's the output from that bit of code where it drops down to the lowest value and starts to rise back up. Another strange thing I noticed was when I pulled it out of the freezer the temp dropped again like it started reading the temp of the somewhat frozen board again and you could see it warm back up to room temp.

            TH02 Demo
            Scanning I2C bus ...
            I2C device found at address 0x40-> TH02 !
            I2C device found at address 0x6F-> Unknown device !
            Scan done
            TH02 device ID = 0x50
            TH02 device ID match !
            TH02 Status = 0x00
            TH02 Config = 0x30
            //**edited for brevity**
            Start: Config=31: Temp 0.18 C => 0.10 C
            Start: Config=31: Temp 0.06 C => 0.20 C
            Start: Config=31: Temp 0.19 C => 0.30 C
            Start: Config=31: Temp 0.29 C => 0.40 C
            Start: Config=31: Temp 0.41 C => 0.60 C
            Start: Config=31: Temp 0.57 C => 0.70 C
            Start: Config=31: Temp 0.66 C => 0.80 C
            
            1 Reply Last reply
            • L Offline
              L Offline
              Lensdigital
              wrote on last edited by Lensdigital
              #6

              I'm also seeing issue with sensor not working with temperatures below 0C 😞
              I don't think it's heating of the sensor. I think you are loosing negative sign somewhere. Mine shows 6C when it's -6C for example...
              Wrong type of variables somewhere in the library?

              C 1 Reply Last reply
              • L Lensdigital

                I'm also seeing issue with sensor not working with temperatures below 0C 😞
                I don't think it's heating of the sensor. I think you are loosing negative sign somewhere. Mine shows 6C when it's -6C for example...
                Wrong type of variables somewhere in the library?

                C Offline
                C Offline
                chrisb
                wrote on last edited by
                #7

                @Lensdigital
                That would make a lot more sense than what I was thinking with the humidity sensor heater, especially with the way it "drops" when I pull it out of the freezer. -10 C also matches the outdoor temp when I was trying it outside.
                I'm glad you caught this!
                Chris

                1 Reply Last reply
                • CharlesC Offline
                  CharlesC Offline
                  Charles
                  wrote on last edited by
                  #8

                  Guys,

                  Humm, that's interesting, I already fixed a problem with negative values in library (see ). As far As I remember this fixed the problem (but may be it's another issue now)
                  Are you using the latest version ?

                  1 Reply Last reply

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  2

                  Online

                  5.8k

                  Users

                  565

                  Topics

                  5.3k

                  Posts

                  Top Topics

                  Popular Tags

                  teleinfo
                  25 topics
                  arduino
                  19 topics
                  remora
                  16 topics
                  esp8266
                  10 topics
                  arduipi
                  10 topics
                  raspberry
                  8 topics
                  wifinfo
                  7 topics
                  broadcast
                  7 topics
                  Copyright © 2022 Charles-Henri Hallard | Return to blog page | Powered by NodeBB
                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Blog
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups