Tweaked settings heater algorithm

master
marcel 4 months ago
parent e99422412e
commit 4d9767edda
  1. BIN
      build-doc/images/smart_heater.odg
  2. 395
      build-doc/images/smart_heater.svg
  3. 45
      build-doc/weather_station.html
  4. 20
      build-doc/weather_station.md
  5. BIN
      build-doc/weather_station.pdf
  6. BIN
      test_software/__pycache__/epever_control.cpython-36.pyc
  7. 8
      test_software/epever_control.py

Binary file not shown.

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 47 KiB

@ -552,22 +552,23 @@ sensor can become saturated with moisture it can get stuck at 100%. This
happens in particular with fog or other high humidity and condensing
weather types. The sensor has a build in heater to drive of moisture and
thus preventing this problem. Because the temperature of the sensor
rises when the heater is turned on, accurate ambient temperature
readings are no longer possible. But with a smart algorithm it is
possible to get the benefits of the build in heater while still being
rises when the heater is turned on, accurate ambient temperature and
humidity readings are no longer possible. But with a smart algorithm it
is possible to get the benefits of the build in heater while still being
able to use the sensor as an ambient thermometer.</p>
<p>When the humidity rises above 95% for more than an hour the current
temperature is stored and the heater is switched on for 10 minutes. Than
the heater is switched off again. If after 10 minutes the humidity is
still above 95% the heater is turned on again for another 10 minutes.
But not before the temperature is measured and stored, as the sensor is
now cooled off to ambient temperature. If the humidity is below 95% the
sensor is free from moisture and the process is not repeated for another
hour.</p>
<p>When the heater algorithm is active, the temperature is updated every
20 minutes instead of every 2 seconds. Statis bit 0 (ModBus register
30014) indicated if the heater is on or off and status bit 1 gives the
update rate of the main temperature sensor.</p>
temperature and humidity are stored and the heater is switched on for 5
minutes. Than the heater is switched off again. If after 15 minutes the
humidity is still above 95% the heater is turned on again for another 5
minutes. But not before the temperature and humidity are measured and
stored, as the sensor is now cooled off to ambient temperature. If the
humidity is below 95% the sensor is free from moisture and the process
is not repeated for another hour.</p>
<p>When the heater algorithm is active, the temperature and humidity
values are updated every 20 minutes instead of every 2 seconds. Statis
bit 0 (ModBus register 30014) indicated if the heater is on or off and
status bit 1 gives the update rate of the temperature and humidity
values.</p>
<p>This algorithm can be enabled by setting the HeaterCoil (see ModBus
secion).</p>
<figure>
@ -701,9 +702,15 @@ same as for APRS weather reports. But of course we use SI units.</p>
</tr>
</tbody>
</table>
<p><sup>NOTE</sup> Register 30013 holds the backup temperature reading
from the pressure sensor.</p>
<p><sup>NOTE</sup> Register 13 holds the backup temperature reading from
the pressure sensor.</p>
<table>
<colgroup>
<col style="width: 18%" />
<col style="width: 31%" />
<col style="width: 25%" />
<col style="width: 24%" />
</colgroup>
<thead>
<tr class="header">
<th>Status bits</th>
@ -721,9 +728,9 @@ from the pressure sensor.</p>
</tr>
<tr class="even">
<td>1</td>
<td>Temp update</td>
<td>every 2 sec</td>
<td>Temp/humidity update</td>
<td>every 20 minutes</td>
<td>every 2 seconds</td>
</tr>
<tr class="odd">
<td>2</td>
@ -739,7 +746,7 @@ two decimal points can be stored as 16 bit integer values. Just divide
by 10 or 100 to get the floating point values.</p>
<h3 id="output-coils-write-only">Output coils (write only)</h3>
<p>Input registers are numbered 1 to 9999 but have data addresses 0x000
to 0x270E. The default value is of a register is 0.</p>
to 0x270E. The default value of a register is 0.</p>
<table>
<thead>
<tr class="header">

@ -236,11 +236,11 @@ The pulse from the rain meter is connected to an interrupt input of the micro-co
## Humidity
Via the I²C bus, the humidity value of the sensor is read. As the sensor can become saturated with moisture it can get stuck at 100%. This happens in particular with fog or other high humidity and condensing weather types. The sensor has a build in heater to drive of moisture and thus preventing this problem. Because the temperature of the sensor rises when the heater is turned on, accurate ambient temperature readings are no longer possible. But with a smart algorithm it is possible to get the benefits of the build in heater while still being able to use the sensor as an ambient thermometer.
Via the I²C bus, the humidity value of the sensor is read. As the sensor can become saturated with moisture it can get stuck at 100%. This happens in particular with fog or other high humidity and condensing weather types. The sensor has a build in heater to drive of moisture and thus preventing this problem. Because the temperature of the sensor rises when the heater is turned on, accurate ambient temperature and humidity readings are no longer possible. But with a smart algorithm it is possible to get the benefits of the build in heater while still being able to use the sensor as an ambient thermometer.
When the humidity rises above 95% for more than an hour the current temperature is stored and the heater is switched on for 10 minutes. Than the heater is switched off again. If after 10 minutes the humidity is still above 95% the heater is turned on again for another 10 minutes. But not before the temperature is measured and stored, as the sensor is now cooled off to ambient temperature. If the humidity is below 95% the sensor is free from moisture and the process is not repeated for another hour.
When the humidity rises above 95% for more than an hour the current temperature and humidity are stored and the heater is switched on for 5 minutes. Than the heater is switched off again. If after 15 minutes the humidity is still above 95% the heater is turned on again for another 5 minutes. But not before the temperature and humidity are measured and stored, as the sensor is now cooled off to ambient temperature. If the humidity is below 95% the sensor is free from moisture and the process is not repeated for another hour.
When the heater algorithm is active, the temperature is updated every 20 minutes instead of every 2 seconds. Statis bit 0 (ModBus register 30014) indicated if the heater is on or off and status bit 1 gives the update rate of the main temperature sensor.
When the heater algorithm is active, the temperature and humidity values are updated every 20 minutes instead of every 2 seconds. Statis bit 0 (ModBus register 30014) indicated if the heater is on or off and status bit 1 gives the update rate of the temperature and humidity values.
This algorithm can be enabled by setting the HeaterCoil (see ModBus secion).
@ -299,19 +299,19 @@ Input registers are numbered 30001 to 39999 but have data addresses 0x000 to 0x2
| 13 | Temperature (two's complement) | degrees Celcius * 100 |
| 14 | Status bits | see table below |
^NOTE^ Register 30013 holds the backup temperature reading from the pressure sensor.
^NOTE^ Register 13 holds the backup temperature reading from the pressure sensor.
| Status bits | Description | logic 0 | logic 1 |
|-------------|------------------|-------------|------------------|
| 0 | Heater status | heater off | heater on |
| 1 | Temp update | every 2 sec | every 20 minutes |
| 2 | Heater algorithm | disabled | enabled |
| Status bits | Description | logic 0 | logic 1 |
|-------------|----------------------|------------------|-----------------|
| 0 | Heater status | heater off | heater on |
| 1 | Temp/humidity update | every 20 minutes | every 2 seconds |
| 2 | Heater algorithm | disabled | enabled |
The ModBus registers are 16 bit wide. For better precision, some units are scaled by a factor of 10 or 100. This way, values with up to two decimal points can be stored as 16 bit integer values. Just divide by 10 or 100 to get the floating point values.
### Output coils (write only)
Input registers are numbered 1 to 9999 but have data addresses 0x000 to 0x270E. The default value is of a register is 0.
Input registers are numbered 1 to 9999 but have data addresses 0x000 to 0x270E. The default value of a register is 0.
| Address | Description | logic 0 | logic 1 |
|---------|------------------|----------|---------|

Binary file not shown.

@ -43,10 +43,10 @@ class EpeverChargeController(minimalmodbus.Instrument):
@retry(wait_fixed=200, stop_max_attempt_number=5)
def retriable_read_register(
self, registeraddress, number_of_decimals, functioncode
self, registeraddress, number_of_decimals, functioncode, signed=False
):
return self.read_register(
registeraddress, number_of_decimals, functioncode, False
registeraddress, number_of_decimals, functioncode, signed
)
@retry(wait_fixed=200, stop_max_attempt_number=5)
@ -76,7 +76,7 @@ class EpeverChargeController(minimalmodbus.Instrument):
def get_temperature(self):
"""Rated Battery's voltage"""
return self.retriable_read_register(4, 2, 4)
return self.retriable_read_register(4, 2, 4, True)
def get_rain(self):
"""Rated charging current to battery"""
@ -100,7 +100,7 @@ class EpeverChargeController(minimalmodbus.Instrument):
def get_temperature_backup(self):
"""Charging mode: 0x0001 = PWM"""
return self.retriable_read_register(13, 2, 4)
return self.retriable_read_register(13, 2, 4,True)
def get_status_bits(self):
"""Charging mode: 0x0001 = PWM"""

Loading…
Cancel
Save