VPD for humidity control

Home Assistant automation projects, questions, etc. go here.
Post Reply
liquidpower
LED-Curious
LED-Curious
Reactions:
Posts: 2
Joined: Fri Jun 05, 2020 10:38 pm

Iv been working on this for a few days got it running just wanted to share
flow takes temp and h of grow tent joins them together as an array and sends to the function
Image

Code: Select all

var h = msg.payload[0];
var t = msg.payload[1];

var T = (t- 32) * 5/9 ;
var SVP = (Math.pow(2.71828,(T / (T +238.3) * 17.2694))* 610.78);
//SVP = SVP * 610.78;
var VPD = (((100-h) / 100) * SVP)*10;

VPD = VPD *.001;
msg.topic="vpd"
msg.payload=VPD
return msg;
then i put a switch on the end if its higher then the vpd i want turn humidifier on off once its lower then the number i want.
User avatar
LEDG
Site Admin
Reactions:
Posts: 1599
Joined: Sun Jun 04, 2017 8:15 pm

Nice! Thanks for sharing! Will definitely give this a try.

Is the first broken image supposed to be the flow?
Want to Support the Site?

Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
Capt. Saicin
LED Enthusiast
LED Enthusiast
Reactions:
Posts: 83
Joined: Mon Jul 30, 2018 7:20 pm

If anyone's interested, this is the code i'm using on arduino. Sourced it from around the web.

Code: Select all

...
VPCanSat = 610.78 * pow (M_E, ((tempCanopy-1.5)/((tempCanopy-1.5)+238.3)*17.2694));
//M_E = euler number
VPAir = VPCanSat * (humAir/100);
VPD = VPCanSat - VPAir;
  ...
TempCanopy is measured in a sensorbox in the canopy. I'm subtracting 1.5°C from that measure to approximate the temperature near the leaf due to cooling while transpiring. HumAir is another sensor in the upper third of the room. I'm not exactly sure if that's wise. I'm a bit unsure whether the VapourPressure in the canopy or upper half is the relevant one here. On the one hand the VP near the canopy is probably relevant for the direct transpirational rate. But the VP in the upper third could act as a "reservoir" to take up moisture...unsure.
What's your take on this?

Happy to be corrected :D
ATPinMotion
LED Lover
LED Lover
Reactions:
Posts: 241
Joined: Tue Dec 18, 2018 7:50 pm

Nice work, and good question.

Airspeed should be considered as well. Fans above canopy and/or below?

What is your air exchange rate?

Is supply air coming in low and the exhaust exiting high?
Run 'em soft
liquidpower
LED-Curious
LED-Curious
Reactions:
Posts: 2
Joined: Fri Jun 05, 2020 10:38 pm

first img was a the flow
i'm not looking at air speed or any thing just checking if the temp and humidity put out the ideal VPD goal if humidity is to low per set vpd turn on humidifier.
User avatar
LEDG
Site Admin
Reactions:
Posts: 1599
Joined: Sun Jun 04, 2017 8:15 pm

Nice thank you
Want to Support the Site?

Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
jaysal
LED Enthusiast
LED Enthusiast
Reactions:
Posts: 75
Joined: Sat May 30, 2020 7:49 am

liquidpower wrote:
Thu Jun 11, 2020 3:59 pm
first img was a the flow
i'm not looking at air speed or any thing just checking if the temp and humidity put out the ideal VPD goal if humidity is to low per set vpd turn on humidifier.
Looks great! Do you mind sharing the Node-RED export for this sequence?
btbr
LED-Curious
LED-Curious
Reactions:
Posts: 1
Joined: Wed May 25, 2022 12:35 am

Love a share too if you are able. Little bit stuck trying to get it to work.
Samsung123
LED-Curious
LED-Curious
Reactions:
Posts: 4
Joined: Sat Nov 13, 2021 8:11 am

This is what I'm using in node red to spit out an ideal RH. From there I'm planning to make the ideal humidity into some triggers. Right now I'm just using helpers and adjusting the target manually based of my target VPD.

Code: Select all

function calcRh(targetVpd, tempC) {
    const tempF = tempC * 9/5 + 32
    const rh = 100 * (1 - targetVpd / (3.386 * Math.exp(17.863 - 9621 / (tempF + 460))));
    return rh.toFixed(2);
}

const targetVpd = msg.payload["input_number.target_vpd"]
const tempC = msg.payload["sensor.a_temperature"]

msg.payload = calcRh(targetVpd, tempC)

return msg;
Image
Post Reply