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.