pysense: lots of invalid temp/hum values
-
Hi,
I am running the following code on a pysense board (with a LoPy):
from pysense import Pysense
from SI7006A20 import SI7006A20
import time
import pycompycom.heartbeat(False)
py = Pysense()
tempHum = SI7006A20(py)for i in range(1, 100):
print("{}/{}".format(tempHum.temp(), tempHum.humidity()))
time.sleep(60)Below is the output. It seems that most of the values are invalid. Is there any issue with my code or any known issue with the board ?
35.33643/48.2554
35.30425/174.0031
5181.098/2693.725
35.34715/16.50949
5181.088/48.24777
35.2828/2756.156
5181.077/48.27829
35.27207/47.85104
35.27207/2662.483
1260.164/174.0183
5181.152/2662.49
5181.152/2662.49
5181.077/670.1731
1260.186/47.98837
1260.164/47.76712
5181.035/2662.445Thanks !
-
@catalin Thank you for the response. Can you please provide the link to the forum thread debating this?
-
hi @GrtVHecke, there are other forum threads debating this problem.
It can be quickly mitigated by compensating yourself, it's a linear simple compensation(
t_ambient = a * t_pysense + b
), so you need to measure temperature in 2 cases (desk/office and outside/fridge) to finda
andb
.These measurements should be made in the normal conditions (battery, sleep regime, active radio connections).
-
@martinnn So what you are basically saying is that the pysense board can not be used for temperature monitoring. Which is a shame since I thought this was the purpose of the board. I saw other messages mentioning pycom would integrate offsets depending on the processor temperature to compensate this (or I misunderstood). That is what I was asking for.
-
@grtvhecke
Which offset are you referring to? I currently get 29 °C out ot the SI7006A20 at room temperature.
Obviously the WiPy gets quite warm and heats up the whole assembly, SI7006A20 measures the PCB temperature (which is probably correct, I did not verify this). So it is pretty much useless for measuring ambient air temperature.
The only way to fix this (as I see it) would be a remote (thermally isolated) temperature sensor - or running the WiPy (or whatever board you are using) in a low power mode generating a negligable amount of heat.
-
@albert_c, @bucknall in pysense: lots of invalid temp/hum values:
Is there a library now available that gets the correct temperature of the pysense board (taking into account the offset)? This question since the topic seems to have died without any answer and it is important for me to know. So I know I can purchase the pysense or not.
-
Testing pysense with LoPy 1.7.9.b3 and pysense 1.1.0. No invalid values, the only issue found temperature returned by SI7006A20 and MPL3005A2 has 1.1 Celsius difference. Do not know which one is correct, need a measurement with another sensor.
-
@bucknall Thank you !!! Just let me know when is ready ...i'm pretty sure a lot of people will apreciate mbus library :)
-
@syncope Unfortunately not yet, we're still to implement the internal temperature sensor from Espressif so are waiting to implement that code before releasing a library for the offset!
Thanks for your patience,
Alex
-
@chumelnicu This is on the roadmap but unfortunately I can't give you an estimate of when it will arrive as we have a number of important firmware features/changes that are taking priority.
Thanks for your patience!
-
@bucknall said in pysense: lots of invalid temp/hum values:
This is expected as the temp sensor on the pysense is picking up the temperature of lopy as well. We're working on using the LoPy's internal temp sensor to use as an offset for pysense to give you the real world external temperature (One of the issues with having such a small PCB + package!).
do you have any news about the offset?
-
@bucknall Hi . Any news about micropthyton mbus lib?
Thank you!
-
Hi @mbriarg,
What are you referring to? Are you asking about the internal temperature sensor and offset that I mentioned below?
-
@bucknall Hi Alex.Do you have any librery scheduled?
Just to know if it's matter of weeks or months.
-
@thomas, @bucknall
Thanks Thomas for checking thoroughly, thanks Bucknall for explaining the cause.I managed reduce the offset to < 1 °C by just putting my WiPy on Break-away headers like this one.
The distance is makes clearly a difference. I did the test outdoor, without housing or enclosure, and compared to my simple outdoor thermometer. If you need exact values you certainly should elaborate more, but for my simple need +- 1° is good enough.
-
@livius
Thank you for the hint.
In fact we work with pymodbus, or I should say we use it. I'm not very deep in Modbus and new to Micropython, this is why I currently do not want to go into it deeper. But there are quite a few devices that talk modbus.
-
Ok, thanks @bucknall for the feedback.
-
Hi @thomas,
This is expected as the temp sensor on the pysense is picking up the temperature of lopy as well. We're working on using the LoPy's internal temp sensor to use as an offset for pysense to give you the real world external temperature (One of the issues with having such a small PCB + package!).
This is in the works and should be arriving soon!
-
Hi @bucknall,
I've just tested and it's also much better: no more errors so far. Only thing is a ~7° offset with the actual temperature. Any idea ?
Thanks anyway for the quick changes, great products, great team !
Thomas
-
@albert_c
As start point - here is modbus python(not micro python) lib
https://github.com/riptideio/pymodbus/tree/master/pymodbusMaybe this can help somehow