support for si7012 i2c temp/hum sensor

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
kroonen
Normal user
Posts: 26
Joined: 05 Oct 2015, 22:00

support for si7012 i2c temp/hum sensor

#1 Post by kroonen » 05 Oct 2015, 22:09

Hi,

I noticed that this project looks very good. I'm using nog some temp/humidity sensor with esp and lua with fhem software.

It should be bette to have it run with arduino , so this project looks very good.

Is there a way to get hardware support for the si7012.

lua examples : https://github.com/nodemcu/nodemcu-firm ... les/si7021

arduino library: https://forum.pjrc.com/threads/29237-Si ... or-Library

regards Richard

Martinus

Re: support for si7012 i2c temp/hum sensor

#2 Post by Martinus » 07 Oct 2015, 13:43

kroonen wrote:Is there a way to get hardware support for the si7012.
regards Richard
I think this is possible, but I don't have one to test. I will order a few on eBay so we can have a look at this.

Charly86
New user
Posts: 9
Joined: 11 Oct 2015, 22:28

Re: support for si7012 i2c temp/hum sensor

#3 Post by Charly86 » 12 Oct 2015, 04:26


Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: support for si7012 i2c temp/hum sensor

#4 Post by Ger » 05 Nov 2015, 21:39

I just received two chinese si7021 modules, with both modules I get a checksum error.
Are both modules corrupt or can it be an other problem?

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: support for si7012 i2c temp/hum sensor

#5 Post by Ger » 06 Nov 2015, 22:06

I have tested the modules on an arduino mega 2560 with the following library https://forum.pjrc.com/attachment.php?s ... 1437698680
The example in this library is working correct

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: support for si7012 i2c temp/hum sensor

#6 Post by Ger » 06 Nov 2015, 22:06

I have tested the modules on an arduino mega 2560 with the following library https://forum.pjrc.com/attachment.php?s ... 1437698680
The example in this library is working correct

kroonen
Normal user
Posts: 26
Joined: 05 Oct 2015, 22:00

Re: support for si7012 i2c temp/hum sensor

#7 Post by kroonen » 06 Nov 2015, 22:43

Hi,

I aslo tested with an si7021, that works ok with an esp8266 with lua. I also get these errors


Log

6939298 : HTTP : connection failed
6940323 : SI7021 : checksum error!
6940336 : SI7021 : Read Error!


regards richard

Martinus

Re: support for si7012 i2c temp/hum sensor

#8 Post by Martinus » 07 Nov 2015, 16:38

I did not build this plugin, but I do have one of those devices. Didn't test it before, since I've guested that the plugin would just work.
I figured out that in my testlab, it also gets a read error with the default settings.
But if I change the resolution to 12 bit, it does work fine!

It works with 13 and 12 bits. It does NOT work with 14 and 11 bits. Strange.
Could you guys verify if your situations are similar to mine?

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: support for si7012 i2c temp/hum sensor

#9 Post by Ger » 07 Nov 2015, 17:46

My results are the same as yours.

kroonen
Normal user
Posts: 26
Joined: 05 Oct 2015, 22:00

Re: support for si7012 i2c temp/hum sensor

#10 Post by kroonen » 08 Nov 2015, 09:49

Same results here.

Martinus

Re: support for si7012 i2c temp/hum sensor

#11 Post by Martinus » 08 Nov 2015, 13:18

So the good news: There are at least two settings that can be used.
And the error seems consistent, so probably easier to reproduce and fix.
Maybe "Charly86" (the plugin developer) can have a look at the code?

fluppie
Normal user
Posts: 89
Joined: 09 Oct 2015, 13:23

Re: support for si7012 i2c temp/hum sensor

#12 Post by fluppie » 09 Nov 2015, 09:33

I have 2 HTU21D (should be software compatible) boards and they also don't work. Will try with the 13/12 bit setting.

fluppie
Normal user
Posts: 89
Joined: 09 Oct 2015, 13:23

Re: support for si7012 i2c temp/hum sensor

#13 Post by fluppie » 16 Nov 2015, 00:52

fluppie wrote:I have 2 HTU21D (should be software compatible) boards and they also don't work. Will try with the 13/12 bit setting.
DHT : Temperature: 23.90
DHT : Humidity: 52.50
SI7021 : Res=0x1 => Error 0x1
SI7021 : Read Error!
WD : Uptime 16 ConnectFailures 0 FreeMem 29296

DHT : Temperature: 23.70
DHT : Humidity: 52.50
SI7021 : checksum error!
SI7021 : Read Error!
WD : Uptime 1 ConnectFailures 0 FreeMem 27040

Still not working on 13/10 bits or 12/8 bits

rmtucker
Normal user
Posts: 57
Joined: 04 Oct 2015, 17:14

Re: support for si7012 i2c temp/hum sensor

#14 Post by rmtucker » 22 Dec 2015, 23:47

Just thought i would mention here that i made some code changes to the si7021 code because it did not work on the htu21d module either.

Changed this:-

if (resolution == SI7021_RESOLUTION_11T_11RH)
delay(4);
else if (resolution == SI7021_RESOLUTION_12T_08RH)
delay(5);
else if (resolution == SI7021_RESOLUTION_13T_10RH)
delay(8);
else
delay(12);

Too
delay(55)

And it works faultlessly so i can assume it will work on the si7021 as well.

dynode
New user
Posts: 4
Joined: 11 Feb 2016, 01:56

Re: support for si7012 i2c temp/hum sensor

#15 Post by dynode » 11 Feb 2016, 01:59

Came here from google, confirming this works for SI7021 :)

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: support for si7012 i2c temp/hum sensor

#16 Post by tozett » 11 Feb 2016, 14:35

may this thread now should be marked as SOLVED?

User avatar
pmayer
Normal user
Posts: 26
Joined: 12 Jun 2016, 20:04
Location: Germany
Contact:

Re: support for si7012 i2c temp/hum sensor

#17 Post by pmayer » 12 Jun 2016, 20:08

Hi,

I can confirm that the SI7021 still won't work with R108 out of the box. Had to change the delay to 55 as mentioned.

Any chance this will get into the release?

cheers,
patrik

User avatar
Redfeather
New user
Posts: 6
Joined: 22 May 2016, 20:43
Location: Netherlands

Re: support for si7012 i2c temp/hum sensor

#18 Post by Redfeather » 02 Jul 2016, 15:52

pmayer wrote:Hi,

I can confirm that the SI7021 still won't work with R108 out of the box. Had to change the delay to 55 as mentioned.

Any chance this will get into the release?

cheers,
patrik
For me the same, i have created a pull request for this issue https://github.com/ESP8266nu/ESPEasy/pull/44

User avatar
pmayer
Normal user
Posts: 26
Joined: 12 Jun 2016, 20:04
Location: Germany
Contact:

Re: support for si7012 i2c temp/hum sensor

#19 Post by pmayer » 04 Jul 2016, 22:39

Great work!

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 14 guests