From 33a5bbbc24002723c531089188cac416313975a2 Mon Sep 17 00:00:00 2001 From: marcel Date: Wed, 13 Mar 2024 11:35:45 +0100 Subject: [PATCH] Si7021 wrap around bug now has a partial workaround --- CHANGELOG.md | 8 ++++++++ README.md | 6 ++++++ firmware/weather_station.ino | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad4a37b..ceb581b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,3 +77,11 @@ All notable changes to this project will be documented in this file. ### Changed - Humidity threshold heater is now a define instead of hard coded numbers in the source. + +## [0.2.5] - 2024-03-13 + +### Fixed + +There is a bug in the Si7021 chip: when the sensor is exposed to extreme environmental conditions for a longer period (very high or very low humidity), the humidity register will wrap around and give wrong values. (https://community.silabs.com/s/question/0D51M00007xeOo9SAE/si7021-relative-humidity-reading-underflowing-?language=en_US). +Workaround: let's assume the humidity will never go below 15%. In the Netherlands a humidity below 20% is rare, but can occur and the minimum value ever measured in De Bilt was 6% (on 1 april 1965). At several other sites in the Netherlands the humidity went as low as 10%. But as this was a one time event and the measurements are doubtful, this event was not registered in the original database. (https://nl.wikipedia.org/wiki/Relatieve_luchtvochtigheid) +In rare cases, the humidity value could creep up above 15% (when the actual humidity is 100%) and still give wrong values. diff --git a/README.md b/README.md index cdd53a1..ad08be6 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,12 @@ An apprehensive description of the project can be found here: [https://meezenest Libraries are included with the source code of this project +## Known bugs + +There is a bug in the Si7021 chip: when the sensor is exposed to extreme environmental conditions for a longer period (very high or very low humidity), the humidity register will wrap around and give wrong values. (https://community.silabs.com/s/question/0D51M00007xeOo9SAE/si7021-relative-humidity-reading-underflowing-?language=en_US). +Workaround: let's assume the humidity will never go below 15%. In the Netherlands a humidity below 20% is rare, but can occur and the minimum value ever measured in De Bilt was 6% (on 1 april 1965). At several other sites in the Netherlands the humidity went as low as 10%. But as this was a one time event and the measurements are doubtful, this event was not registered in the original database. (https://nl.wikipedia.org/wiki/Relatieve_luchtvochtigheid) +In rare cases, the humidity value could creep up above 15% (when the actual humidity is 100%) and still give wrong values. + ## License Copyright (C) 2023, 2024 M.T. Konstapel diff --git a/firmware/weather_station.ino b/firmware/weather_station.ino index 011ff6a..0a65e16 100644 --- a/firmware/weather_station.ino +++ b/firmware/weather_station.ino @@ -105,7 +105,7 @@ const int SensorStatusBitsIreg = 14; * 0 = Heater algorithm (0 = disable, 1 = enable) */ const int HeaterCoil = 0; -#define HUMIDITY_THRESHOLD 92 +float HUMIDITY_THRESHOLD = 92.0; // RS-485 serial port #define MySerial Serial // define serial port used, Serial most of the time, or Serial1, Serial2 ... if available