A really good talk along the lines of what I researched for photon to co2 consumption rates. Check it out:
What I learned (so you won’t have to)
My goal for this project is to grow tomatoes (and possibly other warm-weather crops) all year round in my greenhouse. I learned several things from my winter experience this year. I thought I’d record them here to benefit anyone else out there trying to grow tomatoes year-round in uncooperative environments.
For the record. I “shut-down” the greenhouse in mid-December. This year (La Nina year), was below average cold for my area. There just wasn’t enough produce to justify the propane heating cost which was turning out to be double what I expected (9 kg of fuel per month). Further, there was no future produce either as flowers were not setting fruit. Reasons listed below.
Light is essential
No duh, right? This winter, I did not have supplemental lighting. As a result, growth was slow, the plans were weak, and fruit didn’t set. A lot of this has to do with improper temperatures, but I believe light was a major factor this year.
Geothermal is unhelpful for winter tomatoes
The concept behind geothermal in the winter is that you can store energy during the day, and recover it at night. In addition, since the geothermal “battery” recharges from the surrounding soil, there’s a temperature floor which helps keep air temperatures at night above freezing.
The problem with the theory is when there is little to no energy input geothermal temperatures are too low for tomatoes. Without the sun, which is typical for winters in my area, there’s no “free energy” to store during the day. To supplement the lack of solar energy, I have a propane water heater as a backup heating source. This energy isn’t “free” light sunlight and I don’t need to store it in the ground. In fact, it’s inefficient to store it in the ground during the day because just like the geothermal battery “recharges” from the surrounding soil, the surrounding soil also “recharges” from the geothermal battery when the battery has a higher temperature. The energy losses to the surrounding soil resulted in lower than acceptable air and soil bed temperatures and wasted propane. The lower temperatures with the light problems led to slow growth and a lack of fruit production.
When I turned the greenhouse back on, I added a bypass manifold that separated the geothermal from the bed and aisle lines. Now I can provide radiant heating directly from the propane water heater without any losses to the earth.
The result was very positive. The water reservoir heated up enough that it was warm to the touch. Soil temperatures went from just 11C to above 16C (March 6th).
Don’t shut down your greenhouse
When I shut down, temperatures were allowed to drop extremely low. It was cold enough to crack some PVC pipes, and burst copper tubes in every single heat exchanger in the greenhouse including the propane water heater. The damage was close to $500… (all in the name of saving $20 worth of propane). Instead of shutting down, I should have just lowered the set-point to around 3C.
Genetics is everything
A number of my tomato plants had poor yields, even in the summer time. Among the poor producers was the San Marzano that I got from The Home Depot. This was especially disappointing as even my grafted San Marzano produced almost nothing. I’m not sure why the San Marzanos didn’t produce well in my greenhouse, but this year I’m trying a greenhouse-specific hybrid: The Pozzano. This is supposed to be the same style as the San Marzano (paste/plum tomato), but really excels in the greenhouse. We’ll see. So far the plants I have look promising.
A new start
It took a while to repair and get things running again. Sometime learning is expensive and I sure learned a lot this year. Early February, I was able to transplant some new Pozzano plants into the greenhouse. I have 7 new plants and 5 of the 7 have flowers. This is going to be year 3 and I’m hoping this will be the year it “just works”. Summer is coming and I have big plans, but I’ll save that for the next post.
Plants use carbon dioxide and water to make sugar. They use light energy to power this operation. I wanted to see if I could estimate light energy requirements by the rate at which my plants are consuming CO2. With that information, maybe I can vary my LED light intensity to match those requirements.
NOTE: I’m already varying my LED intensity based on how much sunlight I’m getting. You can see that blog here.
Energy required per gram of CO2
1g of hydrogen = 5.02e22 elements.
CO2 weighs as much as 44 hydrogen elements.
1g CO2 = 5.02e22 / 44 = 1.1e21
It takes about 60 photons of light to break down 1 molecule of CO2 and sugarize it. The average energy of a 550nm photon is 3.63e-19 Joules.
Energy per molecule of CO2 = 60 x 3.62e-19 = 2.17e-17
Energy per gram of CO2 = 2.17e-17 x 1.1e21 = 24741 Joules or 24kJ.
The ratio of grams CO2 to plant sugar (6CH12O6) is 1.4:1. So for every 1g CO2 consumed, your plant increases in mass 0.6g. So 1g of growth requires about 40kJ of energy.
According to this website, plants consume about 2.40g/h/m2 of CO2. That’s about 57.6kJ of energy over the span of 1 hour or about 16W per square meter ( 57600/3600). It’s not clear on the website, but I believe that’s using the CO2 concentration of 1300ppm. Consumption will also vary by plant, temperature, water, nutrients and other conditions. If you happen to find plant specific CO2 consumption rates, or consumption rates per concentration CO2, please comment below with the source.
Plants only use 16W per square meter
Full sunlight at the earths surface is about 1000W/m^2. Is it possible that plants only use 1.6% of the sunlight that hits them?
Light technology efficiency
LEDs are about 40% efficient (theoretical maximum efficiency). That means a 100W LED will produce about 40W of light energy. We need to assume that a certain percentage of the light isn’t going to hit the plant. This is difficult to measure, so let’s just assume only 10% of the light actually hits the plant. So a 100W LED would have about 4W actually hit the plant. That would mean we need about 400W of LEDs per meter to reach our 16W of required light energy. We can play around with that “plant penetration” percentage too. At 50% penetration, we only need 100W/m^2. I’ve prepared a calculator spreadsheet that uses the knowledge we developed here to calculate light power requirements.
Calculating Greenhouse CO2 infiltration/leakage
At the moment, my greenhouse is somewhat empty. I can write a simple python script that will bring the CO2 reading up to 1000ppm, and then measure how long it takes for the CO2 reading to reach ambient levels (for my sensor, that’s about 460ppm).
I’ll take the reading in a different blog, but we can do the math here.
Actual CO2 consumption = (CO2 Reading 1 – CO2 Reading 2) – Leakage Rate
Light Power Required = (Actual CO2 Consumption x 24000) / 3600
Now that we have the light required, we can plug the data into our calculator and see what our light level should be. My light intensity is controlled by PWM rate programatically so we can plug these calculations into the automation algorithm.
PID my lights
Now that we have a light rate, we can actually use a PID controller to check our light vs CO2 consumption rate. The setpoint should be set to the maximum CO2 consumption rate we can achieve. We can try to use the number we got above (2.4g/h/m2) or we can observe our greenhouse full of plants over time and get a maximum rate. We can also start low and adjust over time. The minumum rate is 1.2g/h/m2. For this example, I’ll use the python pid module but you can adapt it to whichever PID library you use. Most of this is just psuedo code, so keep that in mind.
pid = PID()
while CO2_generator.co2_level < 1300:
sleep(30) #sleep for 30 seconds and check to see if we are at the right level
CO2_generator.on(False) #turn off co2 genration
co2_reading_1 = CO2_generator.co2_level
co2_reading_2 = CO2_generator.co2_level
greenhouse_area = 24.5 #cubic meters
air_weight = greenhouse_area * 1.66 #kg
co2_rate = air_weight * ((co2_reading_1 - co2_reading_2) * 0.000001) * 1000
co2_rate = co2_rate / 60 * 3600 # get our rate in seconds, then convert to hours
light_rate = pid.update(co2_rate)
if light_rate > 100:
light_rate = 100
if light_rate < 0:
light_rate = 0
#rinse and repeat
Our set point can actually change over time based upon the actual plant size and health. We should implement some machine-learning and change the set_point accordingly. For example, if we are never reaching our setpoint and the lights are always on, we should accept the current co2_rate as the new setpoint. Also, any time our co2_rate is higher than our setpoint, the co2_rate should become the new setpoint. After all, we are trying to maximize CO2 consumption.
Also, since temperature is also a significant component in co2 usage and photosythesis, we can create a second PID controller that controlls temperature and tries to find the temperature that will give us the maximum co2 consumption rate.
My previous method of light control was based upon light level readings and assumed plant requirements (ie 8hrs of “full sun” per day). I think this method is much more accurate because CO2 consumption by the plant and photosynthesis are very strongly correlated. It is still probably important not to give your plants more light in terms of total on time than is necessary. The rule of thumb is up to 16 hours depending on the plant and stage of growth… however, if CO2 consumption goes on and on past 16 hours, maybe we should call into question the 16 hour rule.
I’m going to be implementing this new method of light control and I’ll post back on my results. As I said, right now my greenhouse is mostly empty, so I imagine that the results will be several months away. Remind me if I forget to blog about what I observed from this method.
Math is hard… especially in complex systems. Therefore what I’m about to do may have errors. There may be holes in my understanding. Hopefully, if you see an error or hole, you’ll let me know. Here goes…
Air holds less energy than water. About 4 times less. That means that you can sink lots of energy into water without raising its temperature much. Water can also transfer energy (thermal conductivity) better than air. These attributes should make water superior to air at heating or cooling, right? Well, as I have learned, maybe not.
Air contains water. Up to 2% of air is water vapor. How many grams of water per cubic meter of air depends on the air’s temperature. The warmer the air is, the more water it can hold. For example, one cubic meter of air (1.2kg) at 30C can contain 30g of water at 100% saturation or 100% humidity. At 15C, air only can hold 12g of water (again at 100% humidity). I’ll be using those temperatures later in my examples, so take note.
When water changes from a liquid state, to a gas state (and vice-versa), it takes a certain amount of energy. It takes 2257 joules per gram of liquid water to change it from a liquid to gas. In my understanding, the energy to phase change the water will come from the warmest available source. In a geothermal cooling situation, the energy is going to come from the air because it’s warmer. We can calculate, then, how much energy will be taken out of the air as it goes from one temperature to another. We can estimate a best-case energy transfer air to a 15C geothermal thermal mass. I compiled the following chart showing the best-case performance of geothermal air per humidity level:
From the chart, we can see that it’s possible to condense 100% of the available air above 50% humidity. We also see that we move about 18,000 joules of energy from the air during this transfer. By contrast, taking the same mass of water (1.2kg) from 30C to 15C without any phase changes transfers 75,312 joules. Even with the latent bonus, more energy is being transferred with water.
The devil is in the details. How quickly can you transfer that amount of energy using the various mediums and what is the cost are really the questions. How likely is it that you will be able to achieve a water temperature shift from 30C to 15C? I guess it depends on the amount of tubing in the ground. Likewise, we are making assumptions about the air system -that all available water has been condensed and the humidity of the air coming out is almost 100%.
Update (2016/10/24): I originally claimed the air coming out would be 0%. That is incorrect since not all the water vapor will be condensed.
Too make the muddy water less clear, a geothermal water system isn’t exactly 100% sensible (no phase changes). For example, I see water condensing around my heat exchanger. Water can also condense around the reservoir surface area but I have not noticed it (nor have I looked for it). This condensing effect might be just as good as a geothermal air system, but I don’t have the proper tools to test it and my temperatures are probably not warm enough to do the testing until next year anyway. So we’ll have to leave that as an open question: does the latent effects of a water system with heat exchanger equal that of a geothermal air system?
Air is probably better at cooling than it will be at heating. The main reason is that the amount of moisture that the air can hold at cool temperatures is low. If you live in an area like mine where the cool months still have high humidity, this effect is reduced even more because there just won’t be the excess capacity in the air to hold any water vapor. Without water vaporizing or condensing, there will be no latent heating bonus.
I put together a similar chart showing, again, best-case results where the air picks up as much moisture from the soil as possible (achieving 100% humidity every pass). I’m assuming that air that wicks up moisture gains the energy from the phase change of liquid from the soil to gas. I started with an air temperature of 0C and a geothermal mass of 10C.
Both tables are available here: https://docs.google.com/spreadsheets/d/17UPHaWa3gyW5nGFhePqA4NapztrVFfzKLJVkps7rV2w/edit?usp=sharing
How does that compare to water? Well, to take 1.2kg of 0C water to 10C takes 51000 joules of energy (ignoring phase change). That’s enough to warm the air to “7.2C” over 50 times. At one complete exchange of the loop per minute, it will take about 22 hours for the water to achieve that temperature.
The up front costs of geothermal air are higher than geothermal water. For 200 meters of corrugated 6 inch tubing, the cost is around $500 dollars. For the same length of 1/2″ PEX tubing, it will cost less than $200 dollars. The blower is also more expensive than the pump. Below I’ve listed prices I found for both systems:
What about runtime costs? The pump consumes around 70W. This dayton blower consumes above 200W at full speed. The fan on the heat exchanger runs at about 90W. So even though the water system has more components, the total sum of components uses less power than the air system.
Utility is how useful a thing is. If it has more than one uses, the better. Are there multiple uses for the air we can take advantage of? Yes. We can use the cool air from the geothermal system to cool lighting such as LEDs but we need extra fans. Ambient air cooling will probably not be adequate. Channeling the air might also be difficult.
Water will have much more utility. Water is going to be better for spot cooling things and for moving energy around. The tubing is much smaller and cheaper and pumps are less expensive. You can use the same pump for the entire system where with air, multiple fans are requires for spot applications. The costs add up. We can easily use a water system to spot cool CO2 generators, lights, and virtually anything else we need to without any additional moving parts or electrical components (generally just tubes and adapters).
Geothermal with air as a medium might be better than water at cooling if water has no latent effects. If water does have latent effects and if latent effects are equal, water is probably better due to it’s capacity to store energy.
The latent effects of air for cooling are diminished in dry environments when air is below 50% humidity. Humidity in high desert states like Utah may not get over 30% during summer days.
For heating, the endothermic bonus for air is not great and since it cannot be used as thermal mass, water could be better.
Temperature stability is going to be better with water because the required amount of energy to change the water’s temperature is greater.
Utility is also better for water because it can be used to spot cool virtually anything without adding additional costs relative to trying to spot cool with air.
My current cooling solution is composed of the following:
- 15″ x 12″ intake water-cooled heat exchanger
- 12″ exhaust fan
- 8″ water-cooled heat exchanger with 240mm fan x2
- Geothermal loop 5-6′ deep
- Soil bed and aisle loop 3-4″ deep
Since the beginning of spring, I’ve been optimizing the cooling system. Now that it’s summer, I can test it’s capabilities. Here are some of the principles I’m trying out.
In my area day/night temperatures can swing violently. 7C at night, and 31C during the day isn’t uncommon. It will become more consistent as summer progresses, but for now, I want a system that will change the setpoint based on the fact that nights are colder. I want the system to store more heat during the day so it can keep things warmer at night. So I have a bit of machine learning built into the system that takes into consideration the night time temperature and allows for a higher setpoint during the day to store more heat. I have to keep the setpoint within livable conditions for my plants. Right now, I’ve got 9C as my lowest setpoint, and 34C as my highest and the “ideal” setpoint at 24C. For every night the temperature drops below 9C, I raise the running setpoint by one degree. In the winter, that will probably mean that the temperature could reach 34C and maintain there for a while. In the summer, if the nights are warm, the setpoint will decrease as long as it’s above the 24C.
With this type of “learning”, I shouldn’t have to ever manually set my setpoint.
Oh, and one more thing. If the setpoint is kinda high -too high for humans to comfortably work in the greenhouse, I have a rule where if the human lights (a white LED strip) are on, change the setpoint to something that a human can tolerate. For me, that’s 23C.
The rule for this is simple. If the temperature is below the variable setpoint and it’s daytime, burn some hydrocarbons and make some CO2. If it’s night, only turn on if the temperature drops below the minimum threshold (9C). Plants only need CO2 when there’s light, so trying to maintain a certain CO2 level at night will become expensive.
Exhaust only when needed
I have my exhaust set to turn on when the temperature exceeds the maximum threshold of 34C. Why? Well, if there’s a certain CO2 level, and it’s 25C (vs the 24C setpoint) we don’t want to exhaust the CO2. That’d be a waste!
We will, however, exhaust the CO2 if we get a gas alarm from the harmful gas sensor.
Variable speed intake
My intake has 6 200CFM 120mm fans controlled by a photon which can PWM a MOSFET to control how much voltage the fans get. Using a PID algorithm and the variable setpoint, On the photon, I get 8bits of control resolution (256 steps) so I’m able to suck in just the amount of air needed to cool. Almost all of the cooling work is being done by this and the other heat exchanger.
Below you can see how well the intake system tracks the temperature (right graph) and also see when the exhaust fan kicks on (left graph).
Heat exchanger for geothermal
I redesigned my geothermal system a bit. Instead of using the same reservoir as the irrigation, it now exclusively uses a 50 gallon drum and a small 5w continuous pump. This pump pumps water through the geothermal system and back 24hrs a day every day. In addition, I moved the water cooling pump (the pump that pumps through the intake, LEDs, CO2 generator, etc) to use this dedicated drum as well.
This change allows me to add a bit of chlorine to the water to keep algae from clogging my tubes. It also frees up my irrigation reservoir for liquid-based feeding (more on that in a future post?).
To compare, here are the designs for both the old system and the new system.
Attached to the geothermal line is my little 8″ x 8″ heat exchanger with 240mm fan. The fans don’t push a lot, but it’s the quality that counts. The air coming from there is cooled from water deep within the earth.
I don’t open my door
With this setup, I have never had the need to open my door so far. This hopefully keeps pests out and with them, disease.
Over the next several weeks, I’ll be trying to test the potential of this system. Today’s high was 27C. My high temperature in the greenhouse was 36C right around the time I increased the aggressiveness of the intake PID algorithm and reset the system (see the missing data on the graph above) . With that aggressive setting, the intake still only hit 210 pulses out of a possible 255. My next goal is to optimize the PID settings and tune it better. This will further give me an idea of the systems capabilities.
But the greenhouse is outside, right? It already has the sun, right? Yes and yes. However, exposing plants to a higher concentration of blue light before sunrise, can begin the process of the plant opening its stomata (pours the plant uses to “breath” out water and breath in CO2) to make it more ready for photosynthesis and ultimately carbon fixing and growth.
Far red light benefits at the end of the day are already covered in a different blog. The higher concentrations should help -especially because trees and other objects shade the setting sun from my plants.
I’m trying to put growth and fruit production into overdrive. My max expected yield should be somewhere around 1-2lbs of tomatoes per day. I’m getting close to 1lb every 2-3 days. The blue light along with CO2 boosting in the morning should help with growth and production. I expect to see less suckers on my tomatoes and more growth with the far red light as well.
My red and blue lights are enclosed in flood light housings. It was pretty easy to set them up this way. I used a carabiner to hang them from the wire over my second bed. I then pointed the lights at my tomatoes and ran the power cord to the ubiquity mfi mpower strip that I recently installed. The cool thing about the mpower strip is that you can control it over wifi -so I can tie it into my automation system, but it also supports simple schedules including location-based sunrise/sunset. I created a schedule that starts the blue light 1hr before sunrise and turns it off 1hr after sunrise.
The blue light looks really cool at night. This is what a 50 watt LED can do.
The schedule I set up for the far red LED was 30 mins before sunset, and turn back of 1 hr after sunset. It isn’t visibly as bright as the blue, but my infrared camera sees the difference.
I’ll try to remember to follow up if I notice a difference. If I forget, comment below and I’ll either respond with my findings or make a new “results” post.
ssh home “cat ~/Projects/ostro-os/build-opencv/tmp-glibc/deploy/images/intel-corei7-64/ostro-image-noswupd-intel-corei7-64.dsk.xz” | pv | xzcat | sudo dd of=/dev/sdc
…where /dev/sdc is the drive you want to flash to.
As I mentioned in a video a bit back I wanted to add more water to the geothermal water system. This will improve the systems ability to absorb and store more energy. This should improve cooling in the summer and heating in the winter. I decided to place a 55 gallon drum to the rear of the greenhouse. Additionally, to maximize the system performance, I wanted to add radiant heating/cooling pipes in the aisle between the beds. This will increase the surface area greatly.
It took several weeks to get all the parts and plan the attack. But once the parts and plans were in place, it only took a couple hours to retrofit the greenhouse with the upgrade. Here’s step-by-step what I did with images.
Here’s an image from about a week earlier showing what we are working with. The bed on the left is regulated with the geothermal water system. It has PEX tubing running through the bottom of the bed. We are going to attach to that tubing and run 4 more lengths up and down the center aisle between the two beds. At the end of the aisle we will put the 55gal drum.
Step 1 – remove tiles and dig trenches
This was pretty straight forward. I made the trenches about 2-3″ deep. The first trench and last trench hugged the edge of the bed. In the middle, I made the trench deep and wide enough for two passes. The reason for this is I needed exactly 4 passes but the aisle just wasn’t quite wide enough for that with 9 inch spacing between the passes. The aisle is just under 3 feet. If it was exactly 3 feet, it would have been perfectly spaced.
Step 2 – Lay out PEX
PEX really doesn’t want to be straight. Putting some dirt over the ends helped me hold it down enough to get it in the trenches.
Step 3 – Cover PEX
While digging the trenches, I move the dirt to a wheelbarrow. I moved it back after laying out the PEX. I also added a layer of sand to help level the aisle. I used 4 50lb bags of sand from Home Depot.
Step 4 – Clean tiles
The tiles got kinda dirty over the last 9 months. This is a good opportunity to clean them off. These tiles are made from recycled rubber tires. The cleaned easily with a hose.
Step 5 – Weed cover and replace tiles
I put down two layers of weed cover. Mostly because it was already rolled as two layers and the length was perfect for the aisle. Rather than unfolding the layers, I just laid it out as it was rolled.
Step 6 – Connect barrel to system
The PEX is 1/2 inch. I bought some braided PVC tubing of the same inner-diameter to match. I connected them together with several barb couplers. For the barrel, I drilled holes in the bung-cap and put some 1/2 inch NPT threaded bulkheads. The bungs for this barrel are not the same as I’m used to. These drums are of Japanese origin and it took some extra planning to make adapters for them.
To get the pex to fit on the plastic barbs, I had to heat it up to soften it. The fit still wasn’t great. Brass barbs fit better.
Step 7 – Fill the barrel
This was slightly tricky. My reservoir is 20 gallons. It fills from 1/4 inch tubing from my rain water barrels via a float valve. The geothermal water system is all 1/2 inch. Output is greater than input. So to fill the 55 gallon barrel, I needed to add more water as needed to the reservoir. I used my garden hose to add water when needed. I had to fill it a couple times after it got low.
Note: this may look not level… and it is, but not as much as you might think. First, the left post of the greenhouse settled about 6 inches. Second, the barrel is under pressure and is bulging a bit making it lean more to the right. The bulging is concerning. I fix might include a reducer before the inlet.
After filling it with water and tightening up a few hose clamps, it was finished. Let’s enjoy some fresh garden strawberries and celebrate the new 20 megawatts I’ve just added to the system. This brings my total up to 27mW (20 gallon tank is 7mW at 23C).
I needed a few more lights for my second greenhouse bed. I had the bright idea to use water cooling because, well, I already have a water system, why not direct the heat from the LEDs somewhere useful, like the soil bed?
You can take a look at my previous blogs on how I made the LED strips. This time, instead of using heat sinks, I used water blocks, which were about the same price.
After a long break from lights, I finally got a system put in to water cool several components at the same time from the same pump. Check it the video explaining that here:
I’ve got everything I want just about hooked up to the water system including a water cooled air intake system and the solar and CO2 generator. Only thing left is maybe another heat exchanger and maybe another strip of lights.
Initial testing is promising. After several minutes (long enough for part of the aluminum back to get very hot to the touch), the water blocks and surrounding area remained very cool.
What about cost? Well, this actually ended up being cheaper than the previous system. The water blocks where the same cost, but the savings came in the power supply. I have been using one power supply per 6 LEDs (180W per 6). Instead of a 350W power supply (that can’t really do two at full power, I’m using a 400W 24V power supply to power 12 LEDs instead of just 6. This saves me about $50 per 12 LEDs.
Stay tuned, I have something awesome in the works related to LED grow lights. I think it will take these lights to the next level.
If you are following my youtube channel, you’ve probably already seen this. If not, here it is again. This is an introduction to grow lights where I cover what are the important aspects of light relevant to plants and compare a couple different types of grow lights (T5 vs LED).
To sum things up, T5’s are cheaper out of the gate. But LEDs are more bang for the buck in the long run.