This project aims at building an automated plant growth chamber to grow and monitor Arabidopsis thaliana seedlings for plant research. The chamber will be equipped with following the features:
- Provide a humidity, light and temperature-controlled environment which reaches to research level - meaning that we aim at implementing it in real plant research and experiments conducted in given growth conditions are reproducible.
- Real-time monitoring of plant growth (camera + humidity, light and temperature data) through Arduino WiFi module or Raspberry Pi.
- Pumps for auto-irrigation.
- A robotic arm that can be used to perform some manual control remotely.
- Expandable to larger scales and allow customizable purposes.
Healthy plants grown in a favorable and controlled environment are at the centre of all plant science research. No reliable conclusion could be drawn if the plants used in the experiments are suffering from inadvertent stress or if plants to be compared grow in slightly different conditions. On the other hand, however, monitoring the growth of plants for each experiment is demanding and sometimes impractical. Hereby, we aim to build an automated plant growth chamber that is featured with real-time remote monitoring of plant conditions through web servers, expandability to larger scales and compatibility to customizable purposes. Our vision is that the chamber will provide a controlled environment for plant growth under a variety of conditions, automate regular workflows such as irrigation and imaging, and produce growth condition data for better understanding the metadata of each experiment and sharing reproducible protocols.
Biological systemsWe aim to apply our growth chamber to growing plant seedlings on multi-well plates under acontrolled environment for high-throughput chlorophyll fluorescence imaging assays.
Chlorophyll fluorescence imaging (CF imaging) measures the fluorescence of chlorophyll within a leaf upon incident light, which is emitted in a process in competition with the photochemical reactions of photosystem II (PSII) and therefore served as an estimate of PSII activity. CF imaging assays are widely used in plant physiology research as they provide an accurate and non-invasive method to evaluate photosynthetic activity and responses to biotic and abiotic changes of plants.
CF imaging is also featured with the potential to screen a large number of samples simultaneously and brings up lots of opportunities to perform high-throughput screening for a variety of purposes. High-throughput CF screening can be achieved by growing plants on multi-well plates for a number of days so that all plants can be imaged simultaneously. However, small plant seedlings such as these could easily suffer from subtle differences in the growth conditions, and in real experiments the soil in multi-well plates could easily dry out if not watered promptly. Real-time monitoring could not only save time but also help to grow healthier plants.
Herein we propose that by integrating the automated plant growth chamber with CF screening, we could assess photosynthesis activities of a range of plant species in a fast and automated manner. Especially we aim at assessing photosynthesis activities of various Arabidopsis thaliana transgenic lines that and across several C3 and C4 species.
Sensors and camera assemblySeveral sensors are used to monitor environmental conditions in the chamber. To begin with, we used a BME680-Temperature-Humidity-Pressure sensor to measure temperature, humidity and pressure, and an NTC temperature sensor and the LM75 temperature sensor on the Rich Uno board to record temperature at different locations. A Raspberry Pi Camera Module v2, connected to a Raspberry Pi 4B+, is used to take images at defined intervals. The data will be logged and used as decision variables for condition control.
The NTC temperature sensor is an analog sensor (thermistor), which measures temperature through resistance. The resistance-temperature relationship for this type of sensor follows the Steinhart-Hart equation (click the link to see the tutorial).
The BME680 sensor is an I2C device that returns temperature, humidity and pressure data. The device manufacturer Seeed provides an Arduino library to access data from the sensor on Github.
The LM75 sensor is also an I2C device built on the Arduino Rich UNO board. This sensor is used to measure the Arduino board temperature to make sure it is not overloaded. Again there is an Arduino library to interact with the sensor provided on Google Drive. A complete snapshot of sensors and camera is shown above.
Data logging and visualisationSensor data are received on Arduino board and then sent to Raspberry Pi for further processing. Instructions about how to build Arduino-Raspberry Pi communication can be found in this article. In short, you can send data from Arduino board by simply using the common println
function, and on Raspberry Pi you can set up serial communication by the serial
package. Remember to change the device address ('/dev/ttyACM0' on my Rpi) and baud rate below accordingly.
import serial
ser = serial.Serial('/dev/ttyACM0', 9600, timeout=1) # Remember to set the correct device address and baud rate
ser.flush() # flush any input and output buffer
while True:
if ser.in_waiting > 0:
line = ser.readline().decode('utf-8').rstrip()
print(line)
Real-time monitoring on Adafruit-IOWe use Adafruit-IO to visualise real-time environmental data and images online.
Most information about setting up your own Adafruit-IO dashboard can be found in this article or on their official website here, but some details are out of date and some changes were made accordingly. Below is an instruction about how to set up a camera feed for the Adafruit-IO dashboard (On Adafruit, individual data from each sensor is saved to separate 'feeds', and several feeds for a single project can be incorporated into a 'dashboard'). Feeds for other sensors can be set in the same manner.
Adafruit IO setup
1. Sign up an account on Adafruit.io.
2. You might have been redirected to accounts.adafruit.com, now go back to io.adafruit.com/ and log in.
3. Go to 'Dashboard' > 'view all'.
Then click '+New Dashboard', enter a name and click on it.
4. Click the gear button and select 'create new block'.
We need the image block for video steaming.
5. Enter a name for the feed. Select it and go to 'Next step'. On the next page you could put some more details to describe this block. When finished, click 'Create block'.
>Feed is where data from each sensor is stored, in our case this is where the video from Raspberry Pi camera will be pushed to.
6. Now you can go to 'Feeds' to see the feed you just created. This is where you can view your data and change settings.
7. In order to setup software on Raspberry Pi in the next section, go to 'My Key' and you could find the 'Username' and 'Active Key' that you will need later (you shouldn't share this with anyone and don't push any documents including this information to a public repo on Github).
Raspberry Pi Setup
(Follow this section if you only want to try live-streaming with your Rpi camera on Adafruit. We will use a python script to push images and sensor data together instead.)
1. Install Node.js on Raspberry Pi.
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash
sudo apt install nodejs
2. Check if Node.js is installed successfully by checking their versions:
node –v
npm –v
On my computer they were:
v10.24.0
6.14.11
3. Install ‘adafruit-io-camera’ on Raspberry Pi to monitor Pi camera and send pictures to an Adafruit IO feed. This may take some time.
sudo apt-get update
sudo apt-get install -y imagemagick
sudo npm install --global --no-optional forever forever-service adafruit-io-camera
4 After adafruit-io-camera is installed, use your ‘Username’ and ‘AIO Key’ to configure your Adafruit IO account on Raspberry Pi. Replace your username and AIO key on the place of ‘YOUR-USERNAME’ and ‘AIO-KEY’ respectively, which can be found under 'My Key' on io.adafruit.
adafruit-io camera config --username YOUR-USERNAME --key AIO-KEY
5. Now start your camera using the following command, replace ‘pi-camera’ with the name of feed that you just created.
adafruit-io camera start -f pi-camera -r 2
The '-r' flag specifies timelapse capture rates in seconds, i.e. it is writing a new image to the feed every 2 seconds here. This is limited by the 30 data points per minute provided by the free IO account. If you upgrade your IO account then it will be able to accept 60 data points per minute, therefore you would be able to change -r to 1.
When not in use you can stop pushing video to Adafruit IO by:
adafruit-io camera stop
Next time when you want to start camera again, simply do
adafruit-io camera start
Upload sensor data and images to Adafruit from Rpi
We use the Adafruit_IO python package to upload sensor data and images from Raspberry Pi to our Adafruit dashboard (actually feeds are the direct places that you actually push data to). Install Adafruit_IO
(and fswebcam
that we will later use to take images) by
pip3 install Adafruit_IO
sudo apt install fswebcam
An example of pushing a sensor data to Adafruit_IO is given below
from Adafruit_IO import Client
aio = Client(username = 'YOUR USERNAME',key = 'YOUR KEY') # refer to 'Adafruit IO setup' step 7
feed = aio.feeds('YOUR FEED NAME') # this is the feeds that you will upload data to.
aio.send_data(feed.key, YOUR DATA) # send data to adafruit-io. Remember that the second argument only accepts string
If you want to upload an image, you will need to first convert it to a string so that Adafruit could receive and then interpret it.
import base64
camera_feed = aio.feeds('YOUR FEED NAME')
with open(image, "rb") as imageFile:
base_str = base64.b64encode(imageFile.read())
base_str = base_str.decode('utf-8')
aio.send_data(camera_feed.key, base_str)
Full codes are included in the attached RaspberryPi-Control.py file.
Save data to Google driveSensor data and high-resolution images are saved on Google drive for long-term storage.
We use the PyDrive
package to upload figures and sensor data to Google drive. Official documentation can be found here.
Install PyDrive by
pip3 install PyDrive
PyDrive configuration:
Official document is here, but it didn't work for me and I did some minor modifications as below
1. Go to APIs Console and make your own project.
2. Search for ‘Google Drive API’, select the entry, and click ‘Enable’.
3. Select ‘Credentials’ from the left menu, click ‘Create Credentials’, select ‘OAuth client ID’.
4. Now, the product name and consent screen need to be set -> click ‘Configure consent screen’ and follow the instructions. Once finished: Select ‘Application type’ to be Desktop application.
5. Enter an appropriate name.
6. Click ‘Create’.
7. Click ‘Download JSON’ on the right side of Client ID to download client_secret_<really long ID>.json.
8. The downloaded file has all authentication information of your application. Rename the file to “client_secrets.json” and place it in your working directory.
9. Create a quickstart.py file and copy and paste the following code.
from pydrive.auth import GoogleAuth
gauth = GoogleAuth()
gauth.CommandLineAuth()
Run quickstart.py and follow the authorizations from command lines as a quick test that the connection is working.
The common workflows to upload .csv files (sensor data) and images are as followings
from pydrive.drive import GoogleDrive
from pydrive.auth import GoogleAuth
gauth = GoogleAuth()
gauth.CommandLineAuth()
drive = GoogleDrive(gauth)
csv_file = drive.CreateFile({'title' : 'YOUR CSV FILE TITLE'})
csv_file.SetContentFile('PATH TO YOUR LOCAL CSV FILE')
csv_file.Upload()
img_file = drive.CreateFile({'title' : 'YOUR IMAGE FILE TITLE', 'mimeType':'image/jpeg'})
img_file.SetContentFile('PATH TO YOUR LOCAL IMAGE FILE')
img_file.Upload()
Examples
Auto-irrigation
To water plants at certain intervals, we use a small water pump that we bought before, cut the end of the wire, and connect it to a jumper wire to be able to connect it to a relay. The working voltage of this pump is 5v, so we used a 5v pin from Arduino board as a power supplier by connecting it to the leftmost channel of a Grove - 4-Channel SPDT Relay (image below).
At the moment we aim to water every 48 hours and each time turn on the pump for 30 seconds. We achieved this by checking the time difference between last watering time (logged to a 'WaterLog' file) and thecurrent time on Rpi. We are still in the process of calibrating the amount of water for each irrigation event.
def irrigation(water_interval = 48):
now = datetime.now()
last_water = datetime.strptime(open('WaterLog','r').read(), '%M.%H.%d.%m.%y') # read the time of last watering event from WaterLog file. Time is stored in this file as a string in the format 'minute.hour.day.month.year'
delta = now - last_water
if (delta.days*24 + delta.seconds/3600) > water_interval:
ser.write(b'water\n') # send a 'water' signal to Arduino board
os.system('echo ' + now.strftime('%M.%H.%d.%m.%y') + ' > WaterLog')
Temperature and humidity controls (Not included at this stage)
To introduce some heating and cooling and humidifier modules to control the temperature and humidity in our chamber.
Chamber assemblyWe used a polystyrene box to set up our first prototype. A 24-well plate was printed to grow small Arabidopsis seedlings. Arduino board, Raspberry pi and relay are placed outside of the box, pump and sensors are placed inside of the box, and a fan will be mounted to the side for air circulation and coolling.
Summary
This is our first trial aiming to test some basic features before moving forward, starting from 11am 27.4.21 and lasted for 14 days. This was the first version of our box and 24-well plate, with no environment controls and low brightness light. 1 Pai choi seed was sown per well for this demonstration.
Features
- Temperature, humidity, pressure data were pushed to Adafruit-IO every 30s for real-time monitoring and saved to Google drive for long-term storage.
- Low-resolution images were taken every 30s and pushed to Adafruit for real-time monitoring. High-resolution images were taken every 30min and saved to Google drive for long-term storage and data analysis.
- Auto-irrigation every 48 h (Changed to 60 h later).
Problems
- Program was interrupted many times because of Internet connection failure. -> Separate local data logging and data upload into two parallel program will solve this.
- Temperature in the chamber is high when light is on (Compare NTC values and LM75 values). -> Temperature control features will take care of this.
- Humidity in the chamber is low when light is on. -> Humidity control features will take care of this.
- Too much water during auto-irrigation, and water cannot drain away. Changed irrigation intervals to 60h. Need to reduce watering time from 30s to 15s (or 10s) next time. -> Irrigation calibration will take care of this.
Improvement and upcoming features
- Separate local data logging process and data upload process into two parallel program will be able to disentangle local data logging from any Internet connection problems, ensuring that data is not lost when Internet is down.
- Temperature and humidity control features will be implemented in the next version.
- Calibrate irrigation intervals, duration and make a hole at the bottom of the container to drain redundant water.
- Use a brighter light source.
Results
Environmental data during the 14-day trial is shown below. The environment will be more controlled in our next version (fingers crossed).
A time-lapse video (below) was made from high-resolution images taken by Raspberry Pi.
Version 2.0In our next version, we aim to tidy up the wires and pack everything into a box.
1. Light source
We wanted to use a bright, reliable and adjustable light source for our growth chamber and finally decided to use this ILK-PETUNIA-01 LED Light Kit from Intelligent LED Solutions (ILS). It consists of twelve LEDs with a narrow beam angle (6 warm white LEDs, 5 red LEDs and 1 blue LED). The most interesting advantage of this kit is that the three channels of LEDs (white, red and blue) are configured in parallel, so by adjusting the wiring strategies you can have obtain different colors of light from this. What is more exciting is that when combining with a Light Controller you could even adjust the current going into each channel and thus have a fine control over light intensities and color spectrum (although we would later show that the controller wasn't always very easy to use...). We tested a series combinations of current in each channel and measured the light intensity with a professional light meter. Please see the last image of this section below for reference. One thing to notice is that the controller is not good at handling small current changes within 5-10 mA, and in reality if you do something like 48 mA you would normally get a similar light output as 45mA. So you may not always get the exact PPFD you need. This light and controller combination is not cheap (cost us £476.87!), but there are also more basic growing light kits from ILS so feel free to check their website if you are interested!
We mounted the light on the top of the box and installed a small fan beside it to help with heat dissipation (the light could get really hot when all LEDs are turned on!). The fan was programmed to turn on every other minute when all LEDs were turned on and every half an hour for one minute when normal growing light intensity was used later in Version 3.0.
Unfortunately the light occupied where the camera was so the camera was moved to the side. But it was still able to capture most of the plate (although from a weird angel...).
2. Air circulation
A 24V dc 80mm*80mm fan was installed on one side of the box and a filter with the size installed on the other side. This fan was also installed to cool down the temperature in the box to some extent so was programmed to turn on when temperature in the chamber is above 23oC (in order to maintain a temperature of around 22oC in the box).
3. Wiring
The relay, Arduino board and Raspberry Pi were mounted on the back of the chamber. The camera, sensors and water pipe were inserted into the box through some holes.
4. Plate
We have also rebuilt our 24-well plates to make more space for germinating and growing seedlings. The size of this plate is just slightly larger than a normal 96-well plate and matches the largest calibrated imaging area of Technologica chlorophyll fluorescence imager (CF Imager) which is used to estimate photosynthesis activities.
5. Overview
An overview of this version of the box is shown in the video below:
Version 3.0 and the final demonstrationIn this final version of our project, we are putting together all the features from previous prototypes, making some adjustment and introducing better irrigation, light and temperature controls.
A list of the features include:
1.☑️ Environmental data logging: Real-time monitoring of images, temperature, humidity and air pressure on Adafruit website and long-term storage on Google Drive.
2.☑️ Remote real time visulisation from a second RaspberryPi or any other devices.
3.☑️ Auto-irrigation and easy drain.
4.☑️ Adjustable light source and programmable switch (Set to around 230 PPFD intensity and 16/8 hours light/dark in this demo)
5.☑️ Temperature controls (Set to 22±1oC in this demo).
Setup for each feature
Some of these might have already been mentioned in previous sections, but here is a more complete summary of everything in this final prototype.
1. Real-time monitoring and data logging
Temperature, humidity and air pressure data from sensors were collected via Arduino board to Raspberry pi every 30 sec. Low-resolution images were taken every 30 sec and high-resolution images every 30 min by raspberry pi camera. Environment data and low-resolution images were sent to Adafruit-IO every 30 sec for real-time monitoring, and environment data and high-resolution images uploaded to Google Drive every 30 min for long-term storage.
2. Light
For light source, we are using the ILK-PETUNIA-01 LED Light Kit from Intelligent LED Solutions (ILS) controlled by a 12-channel Light Controller. The light intensity was adjusted to around 230 PPFD and the light itself was programmed to be turned on 16 hours per day. Please refer to' Version 2.0/1. Light source' section for more details.
3. Irrigation
A simple irrigation system is set up by using two lunch boxes- one box filled with water at the bottom as a water tank (the first image below) and another box on the top as a tray for 24-well plates. We placed a small water pump in the bottom box and drilled two holes for wire and water pipe. For the top box, a hole was drilled directly above where the pipe came out from the bottom box so that water can be pumped into the top box and drain back to the bottom box through a very short piece of pipe.
Every 60 hours, a 'water' command is sent from Raspberry pi to Arduino board, which then turns the water pump on for 30 sec. During the 30 sec irrigation time, water is pumped from the bottom box to the top, allowing soil in the 24-well plate to absorb enough water. After the irrigation time, water drains back to the bottom box so that plants won't get overwatered. When 'water' command is sent, the time when the irrigation event happened is also logged to a local file, which is used to calculate the next irrigation time.
4. Heating and cooling:
As part of the temperature control, a heater mat was stuck inside the box for heating and the fan on the side was used for cooling (though very limiting). A 1 oC variation was allowed around the set temperature, T. When chamber temperature is lower than (T-1)oC, the heater mat is turned on until temperature reaches T; when chamber temperature is higher than (T+1)oC, the fan is turned on until temperature goes back to T.
4. Overview
An overview of the box is shown in the video below:
Demonstration
As a quick demonstration of the prototype, we sowed some stratified Arabidopsis thaliana seeds on the printed 24-well plate and placed them in the growth area in the chamber. The light was set to 230 PPFD with a cycle of 16/8h light/dark, and the temperature was set to 22±1oC.
To record and monitor growth conditions, Local-3.0.py and Upload-3.0.py were run from Raspberry Pi to communicate with Arduino board and upload data to the cloud respectively. The Local-3.0.py collects environment data from sensors, takes images and checks whether it is time for irrigation. The Upload-3.0.py uploads the above data to Adafruit and Google Drive. The benefit of separating local and uploading processes is that when Internet is broken Rpi can still collect data from Arduino board and save them in local folders, which can be then uploaded to cloud until Internet connection is back.
A time-lapse video was made from high-resolution images collected from Raspberry pi in a period of 9 days:
And the environment data for this trial is plotted below:
A.The temperature sensor (LM75) on Arduino Rich UNO R3 outside the box recorded room temperature.
B.Two temperature sensors (BME680 and NTC) were placed inside the box to record inner temperature, which was then used to control the ON/OFF of heater and fan for temperature controls. In this demonstration the chamber was programmed to maintain a temperature between 21-23oC (As indicated by the gray box).
C.Air pressure inside the chamber (by BME680).
D.Humidity inside the chamber (by BME680).
1. What we have done:
We have made a small portable automated plant growth chamber from a polystyrene box, 2 lunch boxes and some common devices (Arduino board, Rpi, basic sensors, water pump and camera). The chamber is featured with real-time monitoring and long-term storage of plant images and environment data, auto-irrigation and easy drain, programmable light source and some temperature controls.
2. Quick take-home messages:
- Real-time monitoring on Adafruit website through Adafruit_IO_Python.
- Data storage in Google Drive through PyDrive.
- ILK-PETUNIA-01 made by Intelligent LED Solutions (ILS) is a good light that is small in size, provides adjustable light intensity and different light spectrum (when used with a light controller) within a good range. But the controller does not respond to subtle current changes and the built-in timer is not precise.
3. Problems:
- Unfortunately we could not get a proper humidifier to work in our setup.
- A proper cooling device is needed to get better a temperature control.
Given the prevalence of existing growth chambers in plant research labs, we think it could be useful to take some parts of the prototype we have shown here into a portable monitoring kit, consisting of Raspberry Pi, BME sensors, cameras, and some scaffolds to mount them together. A simple device like that would cost no more than £100 (can be even cheaper if using older Rpi modules) and can be easily set up within existing growth chambers to monitor existing plants without much engineering work.
On top of the small prototype we have tested, it would be great to expand the size of the chamber and make it into multiple compartments in future designs, which would allow more than one batch of plants to grow at the same time. Robotic arms and slides for moving cameras to different positions could be explored to complement this multi-compartment system.
In addition to environment monitoring and control features, we would also like to see if it is possible to incorporate common phenotyping techniques into the chamber to further automate regular and common phenotyping workflows.
Our vision is to automatically and regularly perform some common and easy phenotyping operations along with the growth of plants, which would allow more data to be collected and age-associated phenotypes to be assessed directly under plant growth environment without interruption. For example, morphological phenotypes such as plant height, leaf sizes and angels could be easily recorded by implementing more high-resolution cameras at user-defined locations.
Last update: 18.10.21 by ZD
Comments