ikalogic

Open full view…

Protocol : I2C Temperature and humidity sensors

Christian Hortolland
Tue, 20 Mar 2018 12:49:27 GMT

Hello, I would like to use the I2C temperature and humidity protocol for a SHT20 sensor driven by a Raspberry Pi. I have done several tests, see the attached image below. The control frames seem well decoded, but not the data frames. The transmission rate is not 100KHz or 400KHz, but rather 62.5KHz, but I do not think the problem comes from there. when I use the basic I2C protocol the data is correctly decoded. Do you have an idea ? Thank you in advance. Christian [I2C_SHT20_Protocole](//muut.com/u/ikalogic/s3/:ikalogic:ZwIO:i2c_sht20_protocole.jpg.jpg)

Ibrahim KAMAL
Tue, 20 Mar 2018 14:12:19 GMT

Hello Christian! Thank you for your feedback. Indeed, something is wrong, could you please send me your workspace file? To make it simpler you just need to go in the settings menu and hit "Send report to ikalogic". In this way, we'll have everything we need to solve the problem.

Christian Hortolland
Tue, 20 Mar 2018 14:24:55 GMT

Hello ikamal, It's done. Thanks ! Christian

Christian Hortolland
Tue, 03 Apr 2018 07:12:29 GMT

Hello Ikamal, Do you have news about the I2C T & H protocol? Thank you. Christian

Ibrahim KAMAL
Wed, 04 Apr 2018 07:59:21 GMT

Hello Christian, It's still in the pipe. I'll get back to you as soon as it's done.

Christian Hortolland
Wed, 22 Aug 2018 12:12:16 GMT

Hello ikamal, I just installed version 3.0.17 and the problem still seems to be there. Have you any news ? Thanks you in advance. Christian

Ibrahim KAMAL
Wed, 22 Aug 2018 20:34:50 GMT

Hi Christian, I've assigned Vlad (from our team) to this issue, he's on it and will get back to you ASAP. Thanks for your understanding.

Christian Hortolland
Wed, 22 Aug 2018 21:18:05 GMT

Thanks you in advance to both of you!

Vladislav Kosinov
Fri, 24 Aug 2018 16:42:22 GMT

Hello Christian, I've just updated this decoder to the version 1.36. It should working now. If you have already an old workspace with previous versions of this decoder, you'll need to remove the old version first, otherwise you'll get "missing parameter" errors.

Christian Hortolland
Sat, 25 Aug 2018 12:21:47 GMT

hello Vadislav, Thank you for your help ! But the new version of the protocol does not work either for me (while the basic I2C protocol works well), see screenshot attached. Maybe it's because the SHT20 does not work at a standard speed? (62.5KHz instead of 100K or 400K). Christian [I2C_SHT20_2018_08_25_](//muut.com/u/ikalogic/s3/:ikalogic:qvBT:i2c_sht20_2018_08_25_.jpg.jpg)

Nicolas BASTIT
Mon, 03 Sep 2018 12:56:11 GMT

Hi Christian, I would like to know if your problem is solved by the modifications from Vlad. Please could you remind here if it works ? Thanks !

Christian Hortolland
Tue, 04 Sep 2018 07:01:19 GMT

Hello Nicolas, no it doesn't works. Christian

Nicolas BASTIT
Tue, 04 Sep 2018 07:30:54 GMT

Hi Christian, I don't understand what is wrong with your previous screen shoot. According to the SHT20 datasheet, 0xF3 is the command that read the temperature with no hold, isn't it ?

Christian Hortolland
Tue, 04 Sep 2018 11:54:48 GMT

Hello, Indeed, you're right, it works !! (I was not looking at the right place in the frame). Thank you very much ! Just a quick note, when the humidity measurement is done on 12 bits, I think that on the 2 bytes of the measure the last quartet must be reset to 0 before doing the calculation. This is what I understand from reading chapters 5.4 and 6 of the datasheet. So in the attached capture maybe it would be 37.60% rather than 37.62%. But this is a detail, it is not significant on the final value (your opinion interests me anyway). Thanks again to the team for your help ! Christian [Protocol_I2C_T&H_37-62pc](//muut.com/u/ikalogic/s3/:ikalogic:9Tso:protocol_i2c_th_3762pc.jpg.jpg)

Nicolas BASTIT
Tue, 04 Sep 2018 13:23:27 GMT

That reset isn't shown on the signal but the calculus is made the right way during the decoding. Even if it would have been forgotten, the value of the error due to this 2 bits, in the worst case, is 125* 0b11 / 65536 = 0.00572 (unity is %) that is not significant with our data display. Moreover, the sensor accuracy is about +/-3%. So I don't think it's significant at all :) I hope I had helped you !