jirkavavrik / iot-weather-station

DIY weather station using Arduino & Node-RED & Blynk
0 stars 0 forks source link

After a while, arduino only receives NaN from SHT30 #4

Closed jirkavavrik closed 1 year ago

jirkavavrik commented 1 year ago

After a while (tens of minutes, maybe hours) the lines h = sht30.readHumidity(); t = sht30.readTemperature(); begin to return just NaN. Restarting the board fixes this for another few tens of minutes to few hours.

jirkavavrik commented 1 year ago

During this period the pressure from BMP180 is also received incorrectly (1689 or 3103 hPa), likely I2C issue?

jirkavavrik commented 1 year ago

Screenshot 2023-07-07 at 10-11-48 Node-RED Dashboard SHT30 sends NaN, BMP180 sends strange value. Soft resetting SHT30 only delays the time for this to occur. https://github.com/jirkavavrik/iot-weather-station/commit/8cd5676d8d263be702669f701562c5e1034c81cf

jirkavavrik commented 1 year ago

It seems that this is a hardware issue - using too long cable for I2C communication. When using a shorter cable, the problem seems to be no longer present.

jirkavavrik commented 1 year ago

After switching to shorter cable, there hasn't been any problem for several days of nonstop runtime. Closing this issue.