Dew Point PID Controller?

Hi, I tried to find here something. But had no luck at all.
I have no experience with Mycodo and programming and am trying to get it all working. That’s why I base my settings on the forum and the documentation on Github.

At the moment a few parameters are important to me. These are humidity, air temperature, vapor pressure deficit and dew point.

I set up a PID controller for the first 3 and everything worked well until the ambient temperatures changed when it got colder in Germany and I had problems with dew. Then I took a closer look at a few tables and found the appropriate values ​​for myself.

22°C = 790 Pa VPD = 70% rH
23°C = 840 Pa VPD = 70% rH
24°C = 890 Pa VPD = 70% rH
25°C = 1110 Pa VPD = 65% rH
26°C = 1260 Pa VPD = 62,5% rH

The thing is that I use a deep water system and cool the water down. The water temperatures then range between 19-20°C. That’s why I thought it would be better to set up a PID for the dew point and set it to 18.5°C. Then I won’t have any condensed water in the tent and the vapor pressure deficit should be within the right range. But I can’t set it properly. I have default settings, but the fan has not been used to lower the dew point. Rather, I can watch it continue to rise until the set point+band of air temperature and humidity is reached. I don’t know what I’m doing wrong or if it’s even working the way I want it to.

What is the best way to set it? If the air temperature is between 22 and 26°C, the ventilation doesn’t need to be used for cooling. I just want air to be exchanged regularly and the values ​​to be within the range as above, with a dew point ideally set at 18.5°C.

Dew point isn’t usually something you setup a controller for. Dew point is always below the air temp, so you really don’t need to worry about it as long as you keep the air temp pretty consistent. If you are running a humidifier in your system to control VPD, turn off your VPD controller at night to prevent the humidifier from running and increasing the humidity (and the dew point)… plants don’t really need VPD control at night because they respirate differently when they are not photosynthesizing. Also make sure you have good air circulation inside the grow space and a good air exchange rate to prevent humidity from building up to the point where you get leaf condensation.
Also, the PID controller isn’t the best choice for controlling temperature or humidity in a hydroponics or mushroom grow room… the bang-bang works better, is much easier to setup and calibrate, and can better handle quickly changing dynamic conditions like the transition from day to night.

1 Like

Thank you for the feedback. I kind of thought something like that. A day ago I set up again the PID controllers for temperature, humidity and VPD for the current daytime temperature and as soon as the lights go out I adjust the values ​​for the night using a time-controlled method. At the moment everything is running as planned.

How can I use the Bang Bang Hysteretic to set other values ​​for the night? I think that was the reason why I didn’t use it. There was no way to select a method or I overlooked it.
And do I have to keep adjusting my values ​​when the ambient temperature changes or can I automate this somehow? When it gets warmer again, I have a temperature difference of 3°C in the room. Then I have to work with completely different values ​​because the ventilation cannot compensate for this and the humidification has to work much harder. It should always be at a level where the plants are doing well and the ventilation and humidification should run at a minimum level.

First, please read the following how-to on setting up the Bang-Bang Function to control VPD…

I really recommend using the Bang-Bang functions over the PID for controlling temps and humidity… it’s much less complicated than trying to constantly tune your PIDs. And once you have the Bang-Bang working, it’s much simpler to change your target set-point than trying to re-tune a PID to a new set-point. And the Bang-Bang will react faster to changes than a PID can, keeping your target set-points more constant. Your house thermostat is a Bang-Bang controller, it’s easy to set a new temp on your thermostat, right? It’s the same thing in Mycodo using the Bang-Bang Function.

Once you’ve read the how-to and have all that working, you can use another Function to activate and deactivate the VPD function for day and night.
To do this I prefer to use the Trigger: Daily Time Span Function. The Time Span Function ensures that your settings stay turned on all through the time span you set, even if the system goes through an unplanned reboot like from a power outage… when the system comes back up the span function makes sure your settings are still active.
Here is an example of how my day-night VPD functions are setup…
I have several Functions that activate and deactivate each other depending on what settings I want for day and night.

Night Fans Function:
This Trigger: Daily Time Span Function reduces night time humidity in the grow space by setting my fresh air intake fans to 60% speed from 11pm to 5am, and it checks that state every 300 seconds (5 min.) to make sure the settings stay the same. for instance, if I manually set the fan speed to 100% while this Function is active, it will reset the fan speed back to 60% after each 300 second check Period occurs.

VPD Day Humidistat (from the how-to link):
This Bang-Bang Hysteretic (On/Off - Raise/Lower) Function is what checks the VPD level and turns the humidifier on or off according to the set-point you have chosen.

Humidifier On - Fans High or Low (from the how-to link):
These 2 Trigger Output (On-Off) functions work together with the humidifier to help mix the humidifier mist more efficiently and quickly raise humidity while the humidifier is running, and then lowers the fan speed when the humidifier is off to prevent the humidity levels from falling too fast and causing the humidifier to run excessively.


VPD Day - On:
This Trigger Daily Time Span Function is what turns on and off all the other Functions that you want for day conditions. In my case, during the time span of 5am to 11pm, I have the VPD Humidistat Function and the fan speed control Functions being activated, and the Night fans Function being deactivated.

VPD Night - Off:
This Trigger Daily Time Spam Function is what turns on or off all of the Functions you want for your night settings. In my case this is basically the reverse of the VPD Day -On Function… from 11pm to 5am I have the VPD Humidistat function and the fan speed Functions being deactivated, and the Night Fans Function being activated.

All of this may seem like it’s over-complicated, but Mycodo is designed with this kind of “granular modularity” for a good reason… it allows for the grouping of multiple Functions to create complex automation sequences that can be performed without any user intervention required.

1 Like

I’ll take a look at it tomorrow. Thank you very much for your detailed answer. I think I’ll be able to set everything up the way I want it in the next few days. If I have any further questions, I’ll get back to you here

1 Like

It may seem like a lot of reading and setup, but once you have it all configured you’ll have a better understanding of how Mycodo works, and you’ll have a system that requires less time and attention from you.
I’ve had my system setup like this for the past several years and it just works.
Notice the blue and green horizontal lines in my Dashboard graph… blue for VPD and green for humidity.
The VPD is right on target during the day, and then at night the VPD controller turns off and allows the humidity to fall to prevent leaf condensation. During the day, a VPD of 0.8 kPh is maintained regardless of temperature fluctuations (within the set temperature parameters). My humidifier is actually only cycling about 60 seconds on and 120 seconds off. That one spike on the right side of the graph was where I had the door open to the tent and was refilling the humidifier and checking my pH. But notice how quickly the conditions returned to my set-points after the tent was closed up again.

Hello Lucid,

It took me a few more days to take the time to make the settings… But I’ve just read through everything you recommended and thought about it a bit. In principle, you’re not doing anything differently than I did before. But a few questions have come up.

How do you control the temperature? The bang-bang control only controls the humidity to get to the corresponding VPD. Then you have the triggers for the humidifier on and off. Does that mean that your fan always runs at 20% power during the day, at 65% power during the day while the humidifier is running and at 60% power during the night? And you just maintain the VPD regardless of the temperature without making any adjustments? Then the VPD varies again due to varying temperatures, or you assume that the temperatures are always around 69°F at night and 77°F during the day. Perhaps the temperature control can also be neglected as long as the set VPD is correct, which is a combination of air temperature and humidity.

I haven’t spent enough time on air exchange. I think that’s more important to me than controlling the air temperature. I checked again and it is recommended to exchange all the air in the tent at least every 3 minutes. My tent has 6.34m³ and my fan can manage up to 350m³/h on the first stage. This means that for sufficient air exchange I would have to let the fan extract 126.8m³ of air or, after deducting a 10% tolerance through an carbon filter, let it run continuously for around 40% of the time. I think I’ll do that with a duration trigger. If I set it like this for the whole day, the air quality should be guaranteed and I would only have to react to changing temperatures and readjust the VPD? I currently usually have 21.5°C at night and 25°C during the day. These are roughly the same values ​​as you have. But that changes slightly because my house is hardly insulated and the room temperatures fluctuate greatly in cold or hot weather.

Otherwise, the only thing I noticed was the VPD of the leaf temperature. I don’t know if that’s how it’s done. Can’t I just subtract the average temperature difference and calculate with a VPD based on the leaf temperature? That means that the VPD of the air will always be higher than what you set. So if I set 950 Pa at 22°C leaf temperature, I have an effective VPD of around 1130 Pa at 25°C air temperature. For me, it’s easier to calculate with one of the values ​​instead of getting confused with two different values. Then I can just calculate with 1130 Pa at 25°C.

As I mentioned in the how-to, air temp is very important.
If you can’t control your air temps, nothing else you do will matter.
You can maintain VPD with fluctuating temps, but your humidity will rise significantly if the temps rise, and you don’t want to go over 70% humidity or over 80F for extended periods due to possible mold growth!
I am using an air conditioner to cool the room where my “tent” is.
I keep it at a pretty constant 77F.

This is also what maintains the temps in the grow space as well, and why I have constant air exchange running in the tent to keep bringing in fresh cool air from the room.
At night with the lights off the air temp in the tent is the same as in the room, about 77F.
During the day when the lights are on, the heat from the lights will raise the temps in the tent to 80+… however, with the humidifier running, the evaporating mist will lower the temps inside the tent to about 77F or less. Like I said, it’s a tricky balance… but once you have it dialed in it should just work as long as you maintain constant temps in the room. If you can’t maintain constant temps, nothing else will work right. Everything depends on keeping the temps constant, that is much more important than air exchange.

To calculate correct VPD you really should use the leaf temp… but since running a leaf temp sensor is impractical (because you have to readjust the sensor every day as the plants grow and move) it is simpler to just subtract an average of 5-6 F from the air temp and use that adjusted temp as the basis for your VPD calculations… I explained this in the how-to.

1 Like

OK, I’ve now set everything up again and am looking to see if it works better this way. I’m curious to see when the values ​​settle down

1 Like

Summer is back in Germany. Since I switched everything to Bang-Bang Hysteretic, it has worked quite well. More or less like before with the PID controllers.
The goal was actually to only use the tent from autumn to spring, as I have constant temperatures then. Since I really wanted to try out my system, I now have to deal with the summer temperatures.

2 days ago I still had 22°C in the room. Today it was already 25°C in the morning and during the day the temperatures in the room are guaranteed to rise to 28-29°C. I have to think about how I can control the system better. It will be cooler again at the end of the week. But the tent will continue to be in use for the next 10 weeks and I have to think about how I deal with such temperature peaks.

As you have already explained, a different humidity must be used for each temperature in order to achieve the correct vapor pressure deficit. Do you know if there is a built-in function in Mycodo with which I can make temperature-related settings that change depending on the temperature? Something like If formulas in Excel? Air conditioning is not an option for me. Electricity in Germany is very expensive and the entire system is designed to consume less than 1.4kW at full load. Higher consumption would not be economical.

As an example: I mentioned various settings:
24°C/70%rH
25°C/72%rH
26°C/73%rH
27°C/75%rH
28°C/76%rH
29°C/77.5%rH

Using a temperature sensor in the room, I want to run a different program depending on the current room temperature. Something like the “Trigger: Daily Time Span” but for the temperature. I have already created the corresponding functions manually. But I also have to change them manually. However, I would like to automate it if possible. Based on the room temperatures that I have observed over the last 4 weeks, I can already estimate quite well how much the fan can cool the tent down. But that is at most around 2-3°C below room temperature.

Now I would like a function that can do the following: Selection of the input (temperature sensor), Hysteresis (at what point the next program is activated. 25.5°C program with 0.5 hysteresis = activation of the function in the range of 25.0°C-30.0°C) and then the creation of the individual temperatures with the storage of the functions for activating and deactivating the temperature and humidity control. Of course, this can also work in other ways. These are just my ideas of how it could work.

I know that the humidity is not optimal. But the plants can cope with it. Even if it causes stress and they grow more slowly. I have also grown some at over 30°C and corresponding humidity without them suffering too much.

Maybe you or KyleGabriel know if this is possible. Thanks in advance.

Buy an air conditioner for that room. That is your ONLY option to “control the system better”. NOTHING ELSE YOU DO WILL MATTER IF YOU DON’T HAVE CONTROL OF THE TEMPERATURES IN THAT ROOM OR YOUR TENT!

The how-to I posted explains in detail how to control VPD using a bang-bang. Please re-read it, because it seems you haven’t understood it completely. There should be no need to manually change any of the settings once you have it setup and running, assuming that you are able to control the temperatures in the room.

The only way you are going to be able to control the VPD is by keeping the temperatures in the room at a constant 22-25C. 22-25C is considered the ideal temperature range for most plants. If you can’t control the temps, you will not be able to accurately control the humidity or the VPD. The only way you are going to control the temps is to have the correct sized output cooling that room (air conditioner or evaporative cooler using a thermostat). Figure out the cubic feet of that room, and buy an appropriate sized air conditioner that can handle that volume. New, modern air conditioners are more energy efficient than models from even 10 years ago. If you are only cooling one small room, it isn’t going to cost you that much in electricity, especially if you buy the correctly sized air conditioner that is rated for that size room.

If the temperatures in the room go over 26C, then the humidity must also rise to keep the VPD low, this means you will end up with average humidity levels above 70%. Your plants may be able to handle the higher temps and humidity, but anything over 26C and 70% humidity is bad because it can promote mold growth if they stay above 26C and 70% for too long (a week or more).

Buy an air conditioner, that will solve all your problems.

1 Like

Thank you very much for your help. I have read and understood the instructions in detail. I will then continue to change the values ​​manually and in future concentrate on only using the tent from autumn to spring when the temperatures in my apartment and especially the grow room can be kept constant.

I am aware of the mold issue. I have installed a few fans in the tent so that the mold does not have it so easy. I can also lower the humidity at the weekend when I send the plants into flowering phase. And as for the weather, as I said, there are usually only peaks here. It has been warmer since Tuesday and it will be cooler again at the weekend.

As I said, air conditioning is not an option. In one month my tent with everything I need for it has already consumed over 540 kW/h. With my electricity contract, which is still quite cheap in Germany, that is around €150 just for electricity of the tent. And from the start I made sure to buy the most efficient devices possible. The summer temperatures are of course also contributing to the fact that I am currently using a little more electricity.

No, you clearly haven’t. If you had read and understood the Mycodo documentation and the VPD how-to you wouldn’t be manually changing between several different Functions that set different set-points for different temps in the room. All you need is ONE set-point and ONE Function to keep the VPD in the target range, regardless of what the temperature is. This is the whole point of AUTOMATING it. If you are manually changing between different functions or set-points, you clearly don’t understand how the software is supposed to work, this is also made clear by the fact that you were originally trying to setup PIDs for temp and humidity and to “control dew point”. No one tries to control dew point, because you really can’t control it, and there is absolutely no need to do so. The simple fact that you are trying to grow in a room where you don’t even have any control over the temperatures is also a big red flag that you don’t know what you are doing.

Are you growing in a tent, or the entire room? What could you possibly be doing that “consumes over 540 kWh in one month”? Are you running HPS or halogen lights? If you really want to use less power, you should be using blue/purple LED lights, not “full spectrum” lights. Blurple LED lights use less than half the electricity compared to full spectrum lights, because they only emit the specific wavelength that the plants actually use for photosynthesis and don’t waste energy on other wavelengths. Blurple lights also generate much less heat, which means you don’t need as many fans running and there won’t be as much heat buildup in the tent or the room over time. The blurple lights are also meant to be placed much closer to your plants since they run much cooler than other lights, the lower temperatures will mean you can have lower relative humidity and thus more control over VPD.

I designed my system to use the least amount of electricity as possible while still being able to grow the maximum yields the plants are capable of. In the past month my entire system has used only 100 kWh. Granted my system is only about 1m x 1m with 4 LED panels, but even if I tripled the grow space and the number of lighting panels I still wouldn’t be anywhere near 540 kWh per month.

I think you need to do some more reading and research because you clearly still don’t have a firm understanding of what you are doing.

Your tutorial only works if the temperature in the room is constant. If I follow your instructions when the lights are on and the ambient temperature is rising, the tent continues to heat up. You yourself wrote that the constant temperature is the most important thing. It is indeed if your instructions are to work. The control only does what it was set up to do. If it gets warmer, it simply increase the humidity and the vapor pressure deficit will be correct again. That’s right. The only difference is that the temperature and humidity will continue to rise while the vapor pressure deficit remains the same. Your instructions simply don’t work for me because I can’t achieve consistently low temperatures. I also have to keep an eye on the dew point. That’s why I can’t simply adjust the vapor pressure deficit as you described. The Bang-Bang Hysteric just use the Exhaust FAN when the humitidy is to high. Otherwise it shuts it down. But i need the exhaust fan to cool the tent to the coolest possible temperature. It is only 2-3°C. But I need exactly these 2-3 °C to cool the air and maintain a fairly constant air temperature. Otherwise the tent will get warmer, and so will the room, and this will continue like a spiral. Do you understand? I have to work with a temperature and humidity control, which by the way gets me to the same goal. I haven’t found another option yet and you couldn’t tell me one. But at least everything works as it should.

My biggest consumers are the LED lamps (Cree COBs), LED strips and a water cooler. When they run at 100% power, they use almost 1000W. The rest is just peanuts. For everything like humidifier, exhaust fan, fans in the tent, water pumps, air pump… just under 300W. My tent is 1.5 x 2.5 m.
Does the 100kwh include your air conditioner?

Yes, I explained that in the beginning of the tutorial. If you are running an ENVIRONMENTAL AUTOMATION SYSTEM, then it would be expected that you are actually CONTROLLING ALL OF THE ENVIRONMENTAL FACTORS that you need to grow plants BEGINNING WITH THE TEMPERATURE!!!
If you have no control over the temperature, then you have no control over ANYTHING that is related to the temperature. That means you have no control over relative humidity (that is humidity levels RELATIVE to the temperature). If you can’t control RELATIVE HUMIDITY, then you can’t control VPD! How many times do I have to repeat this basic concept?!?!?

OMG… you’re running a water chiller instead of an air conditioner??? There’s your biggest money waster right there! Do you realize that if you were running an air conditioner and cooling the WHOLE ROOM that everything in that room including your reservoir is going to stay at relatively the same temp as the air???
You claim to have designed your system to use the least amount of energy… but you’re running 1000W of LED lights??? First of all using wattage to determine the µmol output of your LED lights is the wrong way to measure that… you need to use a PAR meter (or a PPFD meter app on a smart phone) to figure out the ACTUAL µmol levels that the lights are producing!!! Anything over 800 µmol is only wasting electricity, creating excess waste heat, and will stress your plants!!! What is the footprint of your grow space??? How many plants are you trying to grow? I believe that the legal limit for cannabis in most of the world where it’s legal to grow isn’t more than 12 plants max. YOU ONLY NEED 40-50 WATTS OF LEDs PER PLANT OR PER SQFT OF GROW SPACE TO REACH OPTIMAL YIELDS! So even if you were growing 12 plants you have WAY too much light… about double the wattage you actually need (and quadruple the waste heat)! And Cree COBs??? Talk about massive waste heat… there’s your entire problem! Your lights are emitting more heat than usable light!!! Like I said you clearly don’t have a basic grasp of what you are doing. With all that excess heat and too much light your plants are going to be constantly stressed and your yields will suffer (if they even survive at all). You are just wasting all your electricity creating excess waste heat, waste heat that you have to use even more electricity to remove from the grow space. Do YOU understand??? It doesn’t seem so.

I agree with you in many cases. I don’t know the most about botany. Everything I know about it I’ve taught myself over the years and from the internet. And when I read more of your stuff here, I may not have thought through some things completely when planning it. For me, it’s a proof of concept system whose dimensions I had nothing to do with before. Before, I had a small 80x80 tent in the basement in which I grew with soil and with which I actually hardly used any electricity. For me, this was an upscale attempt and that doesn’t mean that I can’t change anything about the system. I’m glad to have come across someone here who seems to know so much about it. I had no idea about hydro systems before and just started building because I couldn’t find much useful information about them. Maybe I should have read a book about it.

Yes, it’s cannabis and there are actually only 6 plants. There are basically 7 large buckets in the tent. All connected to each other via pipes with a circulation pump. 6 buckets for plants and one that is my control unit and through which I regulate the EC value, PH value and fertilization with peristaltic pumps as well as carry out the PH, EC and temperature measurements. The water cooling is also connected to this, for which I needed another water pump. I wanted to keep the water at around 20°C so that the roots absorb the nutrients better and algae do not form so quickly. I had read several times that many people do it this way. Of course it will not be necessary. The cooling is outside the tent because it generates heat, which I had not previously taken into account. In the tent there is also an air pump that is connected to all buckets via hoses and enriches the water with oxygen via bubble stones. Outside the tent there is also a 100L water tank that keeps the system at the right water level and fills it up by gravity, as well as a small control cabinet through which I connected all inputs, outputs…

I may have exaggerated a bit with the lighting. I have always worked well and happily with the Cree COBs in the past. At the beginning I used 50W LED drivers and then I tried 80W drivers with much better results. But only centrally, where the plants were best lit. Each plant has one above it. And I wanted to use a few strips to better illuminate the outer edges, as the Crees have weaknesses there. I probably exaggerated too much. But the plants love it. They grow faster than ever before. Probably depends on the hydro system. I’m not an expert :joy:
The values ​​for the Crees are pretty much the same as in the screenshot here. The only difference is that I only run each one at 80 watts and get the same result.

Which lamps would you recommend? I would be very grateful for better suggestions if I can achieve the same result and save a lot of energy at the same time. But I’m still not sure about the air conditioning. Let me explain why.

When it’s not summer, I can regulate the temperature in the room very well using the outside temperature and the radiators. The outside temperature is then so low that it would never reach a critical level without the radiator. That’s what the system was designed for. I only want to run it 1-2 times a year at most (4-8 months). That’s why I shouldn’t have any problems in normal operation like now with an outside temperature of 30°C. The cooler was only intended as a topping to get even better results and less manual intervention. If I look at the air conditioning systems available here in Germany, I’ll probably end up with one with 1kW. I know that it doesn’t always run continuously. But I’m wondering if I need it if I can keep the room temperature at a certain level anyway.
The water cooler uses around 200 watts when it’s running with the water pump. It may be unnecessary. But it doesn’t run continuously either. Currently, because of the high temperatures, it uses around 50% of the time (so at most 2.4 kWh a day). But if the system is running in the temperature range for which I had intended it, maybe a quarter of the time at most 1.2 kWh a day.

Do you really think it makes sense for me to invest in an air conditioning system? I’m currently in the test run and it was VERY STUPID FROM ME to start in mid-May. I hadn’t thought about that before. But I’m not the type of person who gives up so easily. That’s why I was looking for a way to find a short-term solution to my unusual problems. Even if it’s only needed for the next 10 weeks.

I think we’ve misunderstood each other quite a bit here.

From what I have read, the legal limit in Germany for the personal cultivation of cannabis is only 3 plants per household.
You have told me you are growing 6 plants.
So by giving you any information to assist you in growing more than the legal limit, I would technically be aiding and abetting you in committing a crime.
I believe in obeying the law, especially when it comes to things like growing cannabis… because if we abuse the privilege that the cannabis laws give us, then we can very easily lose those privileges by having those laws repealed… not to mention ending up in prison or even having our homes and property seized.
Therefore you are on your own from now on.
If you are looking for help in committing a crime, I suggest you look elsewhere since that is not the purpose of this forum.
What I should do is track down your IP address and inform the local authorities there about your criminal activities.

Your information is wrong. 3 plants per adult person are allowed in the household. Since I live with my wife, we are also allowed to grow 6 plants. I follow the law very closely.

And it seems you know as little about German law as you do about the Internet. In Germany, it is forbidden to save IP addresses. At most, they are kept for 30 days for billing purposes and then deleted. The local authorities cannot do anything with the IP address. Especially since up to 20 households use the same IP address.

So be it. You’re a strange bird anyway. If your comments didn’t give such a didactic impression, you would definitely have more success here in the forum. Have a nice life.