Humidty

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
kniazio
Normal user
Posts: 71
Joined: 12 Jun 2016, 11:12

Humidty

#1 Post by kniazio » 05 Feb 2024, 14:56

I have two DS18B20 thermometers, wet and dry. How to calculate humidity using these two thermometers?

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Humidty

#2 Post by TD-er » 05 Feb 2024, 15:22

Not sure if I understand your question.
The "wet bulb temperature" isn't a temperature, but it is the temperature at which you will start to have 100% relative humidity.
It is similar to the "dew point temperature".

As far as I know you can't simply dip a thermometer in water and use it to compute the dew point temperature or humidity.
What you're measuring with a wet thermometer is the water temperature.

Unless you let the water evaporate so the temperature will drop and keep looking at the lowest recorded temperature during evaporation of water.
This evaporation should be rather quick too and I think the water should be at room temperature before starting to evaporate.
Not 100% sure if this will be the same temperature as the dew point temperature though as there are quite a few unknowns here.

kniazio
Normal user
Posts: 71
Joined: 12 Jun 2016, 11:12

Re: Humidty

#3 Post by kniazio » 05 Feb 2024, 16:34

The thermometer will not be immersed in water. It will be in contact with the wick immersed in water. This is how they measure humidity in tobacco dryers. I want to know how to calculate humidity using dry and wet bulb readings.

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Humidty

#4 Post by chromo23 » 05 Feb 2024, 16:45

kniazio wrote: 05 Feb 2024, 16:34 I want to know how to calculate humidity using dry and wet bulb readings.
Here you can find an explanation along with a formula:
https://www.youtube.com/watch?v=dnv_CML ... calTechArt

Happy tinkering :)

kniazio
Normal user
Posts: 71
Joined: 12 Jun 2016, 11:12

Re: Humidty

#5 Post by kniazio » 05 Feb 2024, 17:07

Code: Select all

on System#Boot do  
timerSet,1,1  
endon  
 
On Rules#Timer=1 do  
7dt,[Suchy#Temperature]  
timerSet,2,3  
endon
 
On Rules#Timer=2 do  
7dt,[Mokry#Temperature]
timerSet,3,3
endon

On Rules#Timer=3 do
TaskValueSet,Wilgotnosc,1,100*(exp((17.625*[Mokry#Temperature])/(243.04+[Mokry#Temperature]))/exp((17.625*[Suchy#Temperature])/(243.04+[Suchy#Temperature])))
7dt,[Wilgotnosc#Humidity]
timerSet,1,3
endon
I didn't ask for a link to a device, but for help in creating rules.
My rules show 134%. What could be wrong?

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Humidty

#6 Post by chromo23 » 05 Feb 2024, 17:16

kniazio wrote: 05 Feb 2024, 17:07 I didn't ask for a link to a device, but for help in creating rules.
I am so sorry Sir,

since i fell on my head my mind reading capability's are not as good as they where before.
But since you are asking so nicely i will immediately send a special team of engineers to help you with your problem (free of charge of course).
Could you provide me with you home address please...

kniazio
Normal user
Posts: 71
Joined: 12 Jun 2016, 11:12

Re: Humidty

#7 Post by kniazio » 05 Feb 2024, 17:23

OK sir. Never mind. Regards.

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Humidty

#8 Post by TD-er » 05 Feb 2024, 18:42

I think you should split this into several lines using the let command to assign intermediate values to a variable

Code: Select all

TaskValueSet,Wilgotnosc,1,100*(exp((17.625*[Mokry#Temperature])/(243.04+[Mokry#Temperature]))/exp((17.625*[Suchy#Temperature])/(243.04+[Suchy#Temperature])))

Code: Select all

// Wet
let,2,(17.625*[Mokry#Temperature])/(243.04+[Mokry#Temperature])
let,2,exp([var#2])

// Dry
let,3,(17.625*[Suchy#Temperature])/(243.04+[Suchy#Temperature])
let,3,exp([var#3])

let,1,100*([var#2]/[var#3])
TaskValueSet,Wilgotnosc,1,[var#1]
This also allows to add some logs so you could debug what might be wrong.
Also I am not sure this will work as you need to make sure the "wet" sensor and the dry sensor both show the same value when being exposed to the same temperature.
Especially with "Chinese" DS18b20 sensors there can be some difference.

kniazio
Normal user
Posts: 71
Joined: 12 Jun 2016, 11:12

Re: Humidty

#9 Post by kniazio » 05 Feb 2024, 21:51

I did it this way:

Code: Select all

let,1,(exp((17.502*[Suchy#Temperature])/(240.97+[Suchy#Temperature])))*6.112 //Ed
let,2,(exp((17.502*[Mokry#Temperature])/(240.97+[Mokry#Temperature])))*6.112 //Ew
let,3,(1+(0.00115*[Mokry#Temperature]))*([Suchy#Temperature]-[Mokry#Temperature])*0.66875
let,4,((%v2%-%v3%)/%v1%)*100
TaskValueSet,3,1,%v4%
It works too.
Thank you very much for your interest and help.

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Humidty

#10 Post by TD-er » 05 Feb 2024, 22:29

You're welcome.
Just curious, where did you come up with the formula?
And how do you keep the "wet" sensor wet?

kniazio
Normal user
Posts: 71
Joined: 12 Jun 2016, 11:12

Re: Humidty

#11 Post by kniazio » 05 Feb 2024, 23:54

The formula was written by a friend of mine. To keep the sensor wet, place it on a string immersed in a container of water. This design has been used in tobacco drying kilns for years

adampr1
Normal user
Posts: 17
Joined: 27 Jun 2016, 13:34
Location: Germany

Re: Humidty

#12 Post by adampr1 » 06 Feb 2024, 10:03

As friend of Kniazio , like to add link to source of calculation formula: https://www.1728.org/relhum.htm.
As form me is not clear that is difference of a constants used by that calculation and yours (and other from internet):
17.502 vs 17.625 and default Klevin Temp 240.97 vs 243.04 ?
Maybe is for default air pressure calculated for standard (but different places) or average for compensate non-linear function
of vaporisation by different "dry temperatures".
best regards
Adam

PS. Pleas add direct HomeAssistant support (like Tasmota or Esphome) to EspEasy.
;)
Domoticz Beta release on OrangePI PC and BananaPI,
2x RFLink (last version),
ESPEasy, ESPEasy32 (different configurations),
MySensors (different configurations),
2x MiLight RGBW (over RFLink)
and others things :D

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Humidty

#13 Post by TD-er » 06 Feb 2024, 10:39

adampr1 wrote: 06 Feb 2024, 10:03 [...]
PS. Pleas add direct HomeAssistant support (like Tasmota or Esphome) to EspEasy.
;)
You mean the discovery via MQTT?
That's in the pipeline. (no ETA yet)

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests