[SOLVED] Problems with an SI7021 temp/humidity sensor
-
So I have been struggling with a temp and humidity sensor that I built using an SI7021 sensor. The problem is that it continuously reads 18.88 C or 66 F with 118% humidity. Since this is an I2C sensor, I ran an I2C scanner sketch and it said that it found a device at 0x40, which is what this should be at, so it is seeing the device. I have checked and re-checked the wiring and for shorts/opens, but found nothing wrong.
Has anyone heard of this before?
-
@dbemowsk What hardware setup?
Did you install pullup resistors on the I2C lines (possibly on the breakout board) ?
Did you check with another sensor?
What Si7021 library do you use?
-
@Yveaux I have this installed on an easy newbie board. The pull ups are already on the breakout board. They can be seen in this pic as the 2 - 103 (10K) resistors.
I have one more sensor, but I didn't unsolder this one to try that one. I knew I should have put a socket on for that (Hind sight is always 20 20). As for the libraries, I tried a couple different ones with the same results. There is one that is apparently included with MySensors which I tried, and I also tried the one from Adafruit.
-
@dbemowsk this is not an si7021 sensor. The ic looks different: https://www.google.nl/imgres?imgurl=http%3A%2F%2Fuk.farnell.com%2Fproductimages%2Fstandard%2Fen_GB%2F2422570-40.jpg&imgrefurl=http%3A%2F%2Fuk.farnell.com%2Fsilicon-labs%2Fsi7021-a20-gm%2Ftemp-humidity-sensor--0-4deg-c%2Fdp%2F2473670&docid=ePsMcVMs1jbwkM&tbnid=Lj5GeDfYKpx0AM%3A&vet=1&w=234&h=200&client=ms-android-samsung&bih=560&biw=360&q=si7021&ved=0ahUKEwiUi97FudHSAhWDDRoKHUrFB8wQMwglKAowCg&iact=mrc&uact=8
Might be compatible, but it could be the cause of your issues.
-
@Yveaux SOrry, had to look back at the ebay purchase.
It was sold as an HDC1080. When I posted, I looked at the back and it said SI7021. As I remember, it did say this was compatible to the SI7021.
-
Looks like a HDC1080 - EDIT: you were faster
-
@Yveaux I have to agree. The SI7021 is an I2C sensor an the one you're using in the pic does not seem to be I2C. Also some of the I2C sensors come with the pull-up resistors already on the board (check the data sheet for your sensor).
-
@dpcr look at the pic in my second post. The pull ups are there. Also, read the original post where I stated that I ran an I2C scanner and it said that it found a device at 0x40. This is most definitely an I2C sensor.
-
@tekka so is there a different library for the HDC1080? Worth the list of sensor numbers on the back I figured that meant that those were compatible sensors.
-
@dbemowsk this post states the HDC1080 is only pin compatible to the Si7021, not software compatible.
Could you try with a HDC1080 library, e.g. this one ?
-
@Yveaux I will try that, thanks
-
@Yveaux So I tried that library and it worked. Thanks for the help. Now I just need to print an enclosure for the thing.
-
@dbemowsk said in Problems with an SI7021 temp/humidity sensor:
@Yveaux So I tried that library and it worked. Thanks for the help. Now I just need to print an enclosure for the thing.
Great!