Smart Farming Shelf - Final Report

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

SMART FARMING SHELF

MASTER ISC-AM-S9 (2020/2021)


ANTOINE LALANGE
VÉTÉA PAUL

ABSTRACT

This study is about a soilless agriculture prototyping, including ultraponics and deep water culture
technologies. It presents the conception and resulting prototyping of a full instrumented, wireless
communicating and automated device able to grow vegetables mostly alone for a low price in terms of
purchase price and consumption. The prototype allowed to correctly grow lettuce during the
germination phase without any human intervention for 15 days. The prototype is able act and react
alone and in function of its environment.
TABLE OF CONTENTS

Abstract ................................................................................................................................................... 1
1. Introduction .................................................................................................................................... 3
2. State of the Art ................................................................................................................................ 4
2.1. Germination Phase .................................................................................................................. 4
2.2. Vegetative Phase ..................................................................................................................... 6
3. Specifications................................................................................................................................... 7
4. Development and prototyping ...................................................................................................... 10
4.1. Water container & plant slots ............................................................................................... 11
4.2. Power Supply......................................................................................................................... 11
4.3. Ultraponics Root Tray ............................................................................................................ 12
4.3.1. Mist maker .................................................................................................................... 12
4.3.2. Water level measurement ............................................................................................. 13
4.4. Real time clock ...................................................................................................................... 14
4.5. Lighting .................................................................................................................................. 14
4.5.1. Measurement of ambient Light ..................................................................................... 14
4.5.2. Artificial Lighting Source ................................................................................................ 15
4.5.3. Lighting Regulation ........................................................................................................ 15
4.6. NutrientS ............................................................................................................................... 17
4.6.1. Peristaltic pump............................................................................................................. 17
4.6.2. Basic regulation for adding nutrients ............................................................................ 18
4.6.3. New regulation for adding nutrients ............................................................................. 18
4.7. Deep Water Culture .............................................................................................................. 18
4.8. Water Temperature .............................................................................................................. 19
4.9 Potential of hydrogen ............................................................................................................ 19
5. Observations ................................................................................................................................. 20
5.1. Growth of the salads ............................................................................................................. 20
6. Conclusion ..................................................................................................................................... 21
REFERENCES .......................................................................................................................................... 22
1. INTRODUCTION

In the frame of the Master’s degree in Complex Systems Engineering with an option in
Advanced Mechatronics, the “Smart Farming Shelf” (SFS) project was proposed. The goal in this project
is to develop a device capable of growing food plants, such as salads, using soilless culture techniques.

The SFS aims to solve some of the modern challenges linked with food life cycle, security, and
quality. It would allow people to grow their own food easily and in a sustainable way, also removing the
need for the transportation. This project will therefore focus on a device for resolving some vegetables
problems during the growing phase. The classical grounded agriculture is the most common way of
providing vegetables, but it is limited by the environment, the weather, the temperature, the quality of
the ground in terms of nutrients etc... Moreover, not everyone can access to this agriculture and must
import vegetables, it is also a method that is inefficiency in terms of the use of resources.

Thus, some solutions already exist to provide a soilless method to solves these problems, such
as aeroponics culture, which uses the misting principle of the water, the traditional hydroponics, with
the roots inside a nutrient-rich water solution, and the aquaponics which is the hydroponics method
with fishes to produce the nutrients.

The efficiency is far better; if the growing method is well chosen and mastered the taste can be
delicious and extremely hard to reproduce by a classic agriculture, also, the vegetables can grow
anywhere. These solutions are already developed and commonly used by big companies, and after that
exported to the consumers. There are not a lot of devices that allows to use this kind of agriculture in
a house environment for example, or directly for someone living where the weather general conditions
are not so good. There are few of them, and they are usually expensive and requires a based knowledge
about the soilless agriculture to allow a good use of the device.

So, one of the additional aims is to allow anyone to grow vegetables at home for a low-price
and without any specific knowledge about it, thanks to a high-level automatization. As introduced, there
are many ways to grow vegetables with a soilless method. In this project we will use the hydroponics
Deep Water Culture (DWC) method and ultraponics method.

In summary, the shelf must provide a solution that allows to grow vegetables on an everyday
environment at home, be cheap in comparison of what already exist, have a low consumption
architecture, be intelligent and autonomous for managing its resources, be wireless to communicate
with the user at distance, and give instructions of what to do to the user. For this study the salad, and
more precisely the lettuce, is the chosen vegetable because it is a common and strong plant, it does
not need some very precise parameters about the water solution and the atmosphere to grow.

This project is the result of a mechatronic system, it starts from nothing, so everything is
developed for this application. The project management and definition aspects are handled, a tray with
its salad’s container and a structure to hold some lights is designed, all the electronic (including also the
schematics) to manage the several actuators and sensors of the system is done and the programming
part (using an Arduino nano) associated to it also.
The system must control all parameters that the plants need:

- Water management and quality


o Nutrients
o oxygenation
o pH
o Temperature
o Level
- Air quality
o Temperature
o airing
o Humidity
- Light
o Amount
o Photosynthetically Active Radiation (PAR)

2. STATE OF THE ART

For our application, we will take the example of the Lettuce, which is commonly referred as a
simple vegetable to grow. As a plant, the growth of the Lettuce can be decomposed in three main
phases:

 The germination, where the roots of the plant will start developing.
 The vegetative phase, where the plants develop their leaves.
 The flowering phase, where the flowers appear and later turn into fruits.

As we will be working on growing salads to eat them, we will only concentrate on the
germination and vegetative phases: if the growth of salad is kept further in time, it will begin to grow
seeds, which are not needed for consumption.

In our experiment, we want to minimize the time required to grow the plants from seed to
harvest. Our goal is to combine two different soil-less culture techniques and decompose the growth
of the plants in two separate phases: the early growth of the plants will be driven by an aeroponics
technique called Ultraponics, where the roots are sprayed with a very fine mist, enhancing their
development. When the roots reach a certain point in their development, plants are moved to a Deep
Water Culture (DWC) system, where the leaves can develop better.

2.1. GERMINATION PHASE

In the first phase of the growth process, we aim to maximize the volume of roots, so a soil-less
technique named “Ultraponics” will be implemented in the system.

Ultraponics is derived from the “Aeroponics” techniques: the goal is to create a fog of very thin
droplets which will be absorbed by the roots.

There are two main method to grow vegetables using a soil-less technique. The hydroponics
method, where the roots grow directly in a water solution. There are many derivatives to this method
(DWC, NFT etc...) the principle stays the same but the way of doing it and some detail can change. The
aquaponic method is also a derivative of the hydroponic and is an advanced technique which use some
fishes which live in the water solution, by their lifestyle they create an ecosystem and develop naturally
the nutrient for the vegetables. These solutions are
either very expensive or not highly efficient for the
germination phase.

The second way of doing is the aeroponics


techniques, here the roots are in the air and a fog is ELEC

created and absorbed by the roots. There are also


many ways of creating this fog (low pressure, high FIGURE 1
pressure methods etc …), the chosen one is the ultraponic technique [FIGURE 1]. This one is the most
advanced one in terms of efficiency and droplets size.

An ultrasonic mist maker is composed of a piezoelectric transducer element driven by an


oscillator coupled with power electronics to run at frequencies around 2MHz [1] therefore creating
cavitation into the water, vaporizing it into very thin droplets. The mist created has a density slightly
higher than air and fills the culture chamber without escaping.

The first step is to place the seeds on a substrate to allow the roots to grow in
it, this is the only thing to do with the vegetable itself. Then a mist maker is placed in
the water [FIGURE 2]; this device size can change depending on the volume of water
in which it is used.
FIGURE 2
In this example we can see three heads, each one of them will vibrate at a frequency at least upper
than 20 kHz to create ultrasounds, these vibrations will propagate in the water and make it vibrate also,
the frequency of vibration of the water is so high that it creates a fog a its surface. The droplets of this
fog are around 5 µm, in comparison with a high pressure aeroponics method we obtain droplets around
50 µm, it is ten times more than the ultraponics method. The roots can absorb the fog easier if the
droplets are about 5 µm than 50 µm.

The black part in the middle of the three heads is a sensor to detect the level of the water, most of
the ultraponics mist maker are equipped with this feature to stop the device if the water level is lower
than this sensor. In facts, these devices are created to work only under water and can be deteriorated
if it runs in the air, it is a security feature to protect the component. Usually, the perfect water level is
1 cm above the said sensor to guaranty the best working conditions, thus sometimes a buoy is used to
keep the mist maker 1 cm under the water level.

As said before, this device can vary in size, it can have only 1 head or 5 or even 10 heads if needed,
it will depend on the water tank dimensions. A Known issue of this method is the water heating that it
may induce, so it is important to well determine the size of the mist maker or to solve this issue by
another way if needed.

For now, this technique is mostly used by big companies specialized in soil-less agriculture, this is a
very efficient method in terms of energy and resources consumption. The only necessary electric part
is the mist maker, all the possible added instrumentation depends on the will of the user. The electric
consumption is therefore very low, and it is also the method which have the lowest consumption of
water. For these reasons it is an appreciated solution by companies and as it is a new technology each
company wants to be the first to master and improve it. However, this does not solve the issue of being
able to grow everywhere as these companies are usually implanted in classic cities for economic
reasons, and it does not break the import/export chain. The vegetables are still sold to supermarket
and then to the final user. Some devices which propose a house friendly use can be purchased to break
this limit, but it is expensive and not with a high level of automatization. This is again why this project
aim solve these issues.
Thanks to the experiments found in the literature it is known that this method is the most efficient
one to make the roots grow a maximum and quickly. This is therefore a very good way of starting the
growing phase of a vegetable, to make it strong and give it the best possibilities to absorb a maximum
of water solution by the future. In facts, this method is not that good for growing the leaves of the
vegetables as it is for the roots, thus another technique is required to keep the process as efficient as
possible during the vegetative phase.

2.2. VEGETATIVE PHASE

In this second phase the plant has to grow its leaves a maximum to provide a good amount of
food. Thus, the ultraponics method is replaced by a technique which is design to grow these leaves.

Some of the best ways of growing vegetables during the vegetative phase are found in the
hydroponics techniques, and one of the easiest and efficient method to implement and to manage is
the Deep Water Culture (DWC).

As explained before, here the roots are immersed directly in the water solution. With the
ultraponics method only some water and some nutrients were required, here this method is a bit
different. The vegetables are placed on a container
filled with some clay pebbles, for example, to maintain
the plant. The roots are then immersed in a water
solution (water and nutrient as with the ultraponics
method) constantly oxygenated by an air pump.
Usually some air stones are used, the pump insufflate
AIRP the air in the water through these air stones in order to
amplify the oxygenation phenomenon. [FIGURE 3]
FIGURE 3 The more the water is oxygenated, the easier
the roots will develop, it increases a lot the growing process and facilitate also the nutrient absorption
capabilities of the vegetables. This is also why it is important to develop a maximum the roots during
the germination phase, with bigger roots the DWC wanted effects will be easier to observe.

For now, the DWC technology is one of the most used in the world, its popularity is due to the
facts that it is a very simple and well-known technology, with few maintenance and good results. Thus,
some big companies use this method but the same issues as the ones explained with the ultraponics
remain. As it is very simple to implement a lot of small devices using this technology are commercialized
for few euros, it works but it is often just a “starter-pack” with no instrumentation and no
automatization.

As we can see these two methods has already made their proofs and give good results. They
are already implemented in a lot of applications but with no automatization, advanced instrumentation,
often costly or with a low level of consideration for the lyfe-cycle and the consumption. For all of this
reasons our project aims to answer to these issues and provide an eco-responsible, inexpensive, easy
to use, automatized and efficient device that merged various technologies.
3. SPECIFICATIONS

This project starts from zero, so its specifications must be set. The main idea here is to develop a
product which can be placed in a living space such as a living room, kitchen, or a cafeteria, meaning
that some characteristics as the aesthetic, the consumption or the noise level must be well
dimensioned.

In the beginning of the project, we established a list of functions and constraints applicable to our
system in the form of an octopus diagram and its corresponding description.

FIGURE 4

FP1 (Fonction principale) Provide nutritive solution to the roots


FP2 Regulate air temperature
FP3 Regulate air hygrometry
FP4 Monitor water / nutients levels (tanks & flowing into the system)
FP5 Safe for the user (Electrical hazard due to presence of water)
FP6 Trays must be accessible and can be moved in/out of the system
FP7 Provide lighting to enable photosynthesis
FP8 Regulate the flow of water to the roots
FP9 Regulate the nutriments amount in the solution
FP10 Monitor water quality
FP11 Monitor air quality
FP12 Provide oxygen to the roots in the water
FP13 Provide feedback of all parameters to the user
FP14 Working alone during few weeks
FP15 Structure of the shelf must be robust

FC1 (Fonction de contrainte) Standard water connection to a regular house


FC2 Standard electric connection to a regular house
FC3 Being movable (ergonomic, weight)
FC4 Being aesthetic
FC5 Being isolated from external atmosphere conditions
TABLEAU 1
As we began working on the project, specification evolved and were reported into different
tools such as 3D design and schematics.

Our shelf will include 4 levels of 40 cm each, allowing to grow a maximum number of vegetables
on a reduced area.

A 3D CAD design have been created to


illustrate the dimensions and layout of the device.
[FIGURE 5] Here, the top level is shown as an
exploded view.

The ground floor of the shelf is reserved as a


technical space, and each upper level is composed
of three main elements:

- Soilless plant trays


- Ventilation
- Lighting

The plant trays are the core of the system:


they hold the plants with their roots inside and
leaves outside, as well as being equipped with the
two types of culture previously mentioned (Ultra &
DWC). To reduce costs and improve reliability and
toughness, it has been chosen to use European
stackable containers (bacs gerbables) as they are
generic parts and are relatively inexpensive. These
containers dimensions are 600x400x120mm,
adding to a total surface area of 1.92m² for the
whole shelf. FIGURE 5

All floors will be separated


and enclosed so the air conditions in
each one can be controlled
independently as plants require
different climates depending on the
growth phase and plant type. An air
temperature and humidity sensor is
placed in the center of each level and
used to trigger fans [FIGURE 6]. The air
flow comes in through air filters, fills
FIGURE 6 the chamber with fresh air and is then
extracted by the fans.

We aim to improve our energy consumption by using as many natural light as possible, however
it might not be enough to match the plant requirements especially in winter when the days are shorter
and the weather is less favorable. We will use artificial lighting to compensate the lack of sunlight when
needed. At best, the transparent side panels would be covered with a one-way reflective film to keep
the artificial light from leaking out of the system and harvest the maximum efficiency out of it.
The ground floor hosts a control box
equipped with all needed components: electrical
power, control electronics, pumps … This all-in-one
control box [FIGURE 7] connects to the sensors and
actuators in the upper shelf with air tubing and
electrical wiring running on the legs of the shelf.
The final system must use plug-and-play
connectors to ease the setup of the device.

FIGURE 7
A structural block diagram has been established to give details about the organization of the
sub-parts of the system [FIGURE 8]. The diagram divides the system into two main parts: the physical
layer and the software layer. Interactions between the different sub-systems are represented by
arrows. Special attention must be paid to their direction: they can be uni- or bi-directional.

FIGURE 8

The software layer presents several functions: first, the regulation units are programming
blocks that control the actuators according to variables like time or sensors measurements. A second
block handles time schedules, and a third block records data from the different states of the system. A
last block will act as a web server to control the networking aspects.

The physical layer manages the electrical input and output signals coming from the sensors and
powering the actuators. Each component will be equipped with its specific control electronics. As we
need to manage time schedules (for example for the lighting part), a real-time clock module is needed
to keep current time in any case, even when power is shut down. A wireless module will be used to
communicate and publish data on the web.

A diagram of the layout of the shelf [APPENDIX – FOLIO1] has been created to show the
placement of the different main components. As the size of the plants is smaller in the germination
phase, only two ultraponics trays will be used to grow the roots of the plants, which will then be
transferred to the 6 DWC trays.
4. DEVELOPMENT AND PROTOTYPING

By taking in consideration the available resources, the amount of time allocated and for
practical reasons, we decided to begin by developing a single ultraponics/DWC root tray with 4 plant
slots. The main aspects of the project are designed [FIGURE 9]: the main structure of one level, the mist
making part for the ultraponics technique, the air pump for the DWC technique (in the same container),
the water level measurement, the nutrients levels measurement, the nutrient pump, the artificial lights
and the external luminosity measurement, the automation of all these features with a microcontroller
and the consumption measurements for the electric power and the water. Our experiment has been
placed on a trolley with wheels to get a compact solution and enable us with mobility. [FIGURE 10]
shows the prototyping board that have been designed. The development of all these elements will be
detailed in this part.

Artificial
Lighting
&
Water Level, pH,
Ambient Light
Temperature, EC
Sensor
Sensors

Water Nutrient Pump


Container & Level Sensor
& Plant Slots

Power Supply
Air pump &
& Energy
control
Counter
Electronics for
FIGURE 9
Sensors &
Actuators

FIGURE 10
4.1. WATER CONTAINER & PLANT SLOTS

Plastic containers [FIGURE 11] were


available at the laboratory, and one of them
was used in our experiment as the main water
tank of the prototype. A plastic cover was cut
from a larger sheet available at the Polytech
building. Four screws are placed at each corner
of the cover to hold it on the container. Holes
have been drilled to host the 4 plant slots. The
plant slots were made from PVC pipes that
were bought to a local hardware store [FIGURE
12].

FIGURE 11

We were not able to find an adequate substrate at the


time, and instead used packaging foam that was retrieved
from parcels received at the laboratory. It was cut to fit the
diameter of the PVC pipes [FIGURE 12]. The roots will begin
their growth by spreading into the foam until they reach the
bottom of it. Thereafter, the roots will be completely exposed
to the mist of the ultraponic chamber and will start expanding
FIGURE 12
thanks to the implemented technique.

4.2. POWER SUPPLY

To run all the features of the prototype we need a set of several voltages: 230VAC, 12VDC and
5VDC. To get the 230VAC, we must use a standard power outlet of the building and it is available in
every house. Devices such as the mist maker or the air pump run use the 230VAC. Equipment like the
LED lighting or the nutrient pump operate under 12VDC, and control electronics or sensors run on
5VDC. A 250W desktop computer ATX power supply was retrieved to supply the different DC voltages.
It was especially used for being able to keep up with the DC current consumption needs, as well as
being protected against short-circuits & over-boundaries conditions. To activate the ATX power supply,
a green wire originally controlled by the PC’s motherboard must be tied to the ground. This is here
achieved by connecting a small cable between the green and a black wire on the connector [FIGURE
13]. The general 230VAC from the power socket passes through a domestical energy counter in order
to measure the total consumption of the prototype. [FIGURE 14] represents the power supply of the
system drawn as a single-line diagram.

FIGURE 13

FIGURE 14
4.3. ULTRAPONICS ROOT TRAY

4.3.1. MIST MAKER

The ultrasonic mist maker is the main component needed


by the ultraponics technique to bring the water solution to the
roots. A 5 heads ultrasonic mist maker capable of misting 400ml/h
of water was implemented. The size of the created droplets is
specified by the manufacturer to be under 5µm. The mist maker
unit requires a voltage of 24VAC, supplied by the electrical
transformer provided by the manufacturer [FIGURE 15].
FIGURE 15
Our goal is to control the mist maker using our microcontroller. Such voltage and current
cannot be handled by the Arduino Nano, and a power interface is therefore needed. The mist maker
only allows two states (on or off) and does not allow to vary the amount of mist produced. To control
this device, and as we want to maximize power efficiency, the electrical input of the transformer will
be controlled, allowing to disconnect the mist maker including its transformer, that still consumes a bit
of power even if its output is not loaded.

As a ON/OFF device, and with its characteristics of 230VAC/1A, the mist maker will be driven
by an electromechanical relay. From the available parts we had, a relay controlled by a voltage of 12VDC
was chosen, allowing to switch a 230VAC load with a continuous current up to 10Amps. The
microcontroller can only generate about 5.0VDC/100mA on its outputs, so a matching circuit was
created for coupling the relay’s coil. [FIGURE 16]

FIGURE 16

In this configuration, a 5VDC digital output from the µC is used to control an optocoupler
(4N05), reducing the power consumption of the µC and separating the power and control circuits. The
output of the optocoupler is bridged to the base of a bipolar transistor (BC547) that can handle
switching the 12VDC relay’s coil. Passive components
such as resistors and a flyback diode were added to
match the components requirements. Once the
connections were done, the Arduino could manage the
mist maker, and it was then placed under the water in
the root chamber. However, the surface of the water
must be around 1 to 2cm above the ultrasonic
transducers. We made a basic floater out of some
expanded polystyrene to keep the device at the right
position [FIGURE 17]. A simple code was created to
activate the mist maker for 10 seconds every 5 minutes
FIGURE 17
as a test cycle.
4.3.2. WATER LEVEL MEASUREMENT

The aim here is to manage the water level in


the root chamber. If there is not enough water the
mist maker can be deteriorated in case of an issue
with its incorporated water level sensor. Moreover,
the system must know when there is not enough
water, to fill again the water tank, because the mist
maker does not return this information despite its
ability to measure it. So, it is important to keep an
eye on the level. A water level sensor is therefore
required, and we made it using an expanded
FIGURE 18
polystyrene floater attached to a potentiometer
using a wood bar [FIGURE 18].

The floater always stays at the surface of water, driving the wood bar to change the angle
applied on the potentiometer, therefore varying its resistance. With this known, we will perform some
tests to characterize our sensor according to the water level.

The value measured by the potentiometer must be converted into a variable. A potentiometer
has three pins that can easily be arranged to create a voltage divider bridge. The upper pin must be
connected to the Vref pin of the Arduino board as it is the reference voltage for the Analog Digital
Converter (ADC). The center pin is connected to an Analog Input pin, and the lower pin is tied to the
ground [FIGURE 19]. When the resistance of the potentiometer changes, a voltage variation occurs and
is converted into a variable using the ADC.

FIGURE 19

The value is next managed as follow: a function is created to read the value, the Arduino analog
input convert the value to a scale from 0 to 1023 (8bits), it is then transformed by the code to a voltage
value between 0 and 5VDC. By knowing the height of the mist maker, the minimum acceptable water
level is also known. Thus, by reading the corresponding value the minimum amount of water can be
set.

If the water level falls under this value an alarm signal is triggered to inform the user. This is
done by a red led and a message “NIVEAU EAU INSUFFISANT !!!” displayed on a monitor. Moreover,
the mist maker is also stopped to keep it safe. For the time being, the alarm signal appears on the serial
monitor of the Arduino IDE interface. Once the water level goes back to a correct level the system works
again as usual.

To keep a precise monitoring of the water level and to manage the amount of nutrient to give
to the solution, it is better to know the quantity of water which is consumed or added. A
characterization of the sensor is therefore required, and we followed the method described next.
We started with the water tank empty
and the sensor therefore at its minimum level. Water level sensor characterization
After adding 1 Liter of water, we reported the 1.2
value of the sensor into a table. The operation
was repeated for each added liter and a graph 1
was plotted [FIGURE 20]

Returned voltage (Vs)


0.8 y = 0.0601x + 0.5386
R² = 0.9839
The slope of this function is 0.06. We can
understand that the voltage of the sensor (Vs) is 0.6
equal to 0.06 * the quantity of water (L) added
0.4
to the tank + 0.54 approximately.
0.2
Vs = 0.06L + 0.54.

The code is therefore able to determine 0


0 2 4 6 8 10 12
the quantity of water added in function of the
voltage variation. L = (Vs – 0.54) / 0.06. Water level (L)

FIGURE 20

4.4. REAL TIME CLOCK

Microcontrollers such as the Arduino do not provide


integrated time management abilities. Using time is thus complicated
and often stuck the microcontroller in delays. Therefore, we needed
an external component capable of handling time measurements: the
DS1307 real time clock module [FIGURE 21] was borrowed from
personal material as it can keep trace FIGURE 22
of the current date and time, even if
the system’s power is interrupted. The
DS1307 module communicates with
the microcontroller via the I²C bus
[FIGURE 22]. This module will allow us
to precisely manage the different
elements of the system according to
FIGURE 21
time schedules.

4.5. LIGHTING

Plants grow thanks to a chemical process called photosynthesis, which enable them to
synthesize organic matter using light energy. We want our system to be as efficient as possible, in terms
of light apport for the plant, but also of energy consumption.

4.5.1. MEASUREMENT OF AMBIENT LIGHT

Therefore, we chose to maximize our efficiency by considering the light received from the sun.
A light sensor has been implemented to measure the amount of sunlight received. This sensor is based
on a Light Dependent Resistor (LDR) or Photoresistor: the resistance of the component changes
depending on the number of photons received on the surface of the photo-sensitive cell. A voltage
divider bridge is built around the LDR using a 1KOhm resistor bridged to the ground [FIGURE 23]. This
allows to convert the resistance variations into voltage variations that can be acquired by the
microcontroller’s integrated Analog to Digital Converter (ADC).

FIGURE 23

4.5.2. ARTIFICIAL LIGHTING SOURCE

Even if the device is well exposed to sunlight, the amount of light can vary depending on the
weather and season.

An extra source of light is therefore needed to enable a better control of the growth of the
plants. To be as energy efficient as possible, we selected an artificial lighting source composed of
different Light Emitting Diodes (LEDs). The LED technology is well known for its high-efficiency and
ability to be tweaked to different light spectrums. To maximize
the energetical efficiency, the artificial lighting source was
chosen considering the absorption spectrum of the chlorophylls
that enable photosynthesis. [FIGURE 24] [2] shows that these
spectrums correspond to wavelengths ranging mainly from
400nm to 500nm corresponding to a blue color, and around
650nm being red. The figure also gives the information that
photosynthesis in not enabled by the green wavelengths. This
allows to remove colors ranging from 500nm to 600nm from our
lighting source and therefore save as much energy as possible FIGURE 24
(about 1/3 of the power of a white light here).

Lighting bars composed of red and blue LEDs were used in this project, as these colors
correspond to the main absorption spectrum of plants. Our time schedule as well as the requirements
of the university did not allow to order a specific material for our project, so personal material was
borrowed. LEDs, while being highly efficient, are not perfect and dissipate a certain amount of heat that
must be dissipated to preserve the lifetime of components. Here, the LEDs and their individual
resistances are soldered on an aluminum PCB mounted on an aluminum heatsink, allowing a heat
transfer by convection with air.

4.5.3. LIGHTING REGULATION

The measured amount of light allows us to control the artificial lighting in consequence. Salads
often need around 16 hours of sunlight and 8h of dark in their vegetative phase [3]. Depending on the
seasons, the sunlight cannot provide all needed requirements of the plants, and the amount of light
varies throughout the day depending on the weather.

Our regulation system allows compensating the lack of


sunlight by modulating the power supply to the lighting bars. This
power modulation is achieved using the Pulse Width Modulation
(PWM) principle. PWM is based on the use of a fixed frequency (often
a few kHz) of which the duty cycle will be varied as shown in [FIGURE
25] [4]. A low duty cycle means a low power output, and the other way

FIGURE 25
around. This principle has been adopted for its efficiency, reliability and simple implementation with
minimum hardware and software needs.

The artificial lighting uses a voltage of 12V. The current consumption for the two bars has been
measured using the “10A” continuous-current measurement function of a multimeter and estimated
to be around 1.5A at full power. As the microcontroller can handle just a few mA, a Field Effect
Transistor (FET) was used combined with an optocoupler in order to deal with the current consumption
of the lighting LEDs.

The IRF520 FET was used as it can handle up to 9.5 continuous Amps, and a few of them were
available at the laboratory. The source of the FET is connected to the ground, and its drain directly
drives the LED bars. To be properly driven, the gate of the IRF520 is connected to the emitter of a 4N35
optocoupler that was retrieved from old circuit boards. This transistor must be driven under 12V to
avoid an overheating of the component. This optocoupler also enables to physically separate the
control circuit from the power circuit and avoid wrong wirings as well as reducing the current drawn
from the microcontroller output. [FIGURE 26] shows the arrangement of the electronic circuit. The
digital pin from the microcontroller must be compatible with PWM functions.

FIGURE 26

Our code was here based on the use of the time, and a function that allows ranging different
variables even if their size if different, combined with a “enough light” condition.

Using the hour variable provided by the RTC module, a lighting period was defined using a
double condition. The lighting is here allowed from 06:00 to 22:00, giving the plants a total of 16 hours
of stable lighting per day, these values were determined to respect the logic of day and night and as
experimental values to test.

The variable corresponding to the amount of light measured (1024 values) was correlated with
the variable commanding the duty cycle of the PWM controller (256 values) using the “map” function.
Less light measured corresponds to a higher duty cycle. Beyond a certain sunlight amount considered
as “efficient enough” to grow the plants, the LED bars completely turn off as they are not needed at
the time. The system has therefore several levels of different duty cycle and adapt the added amount
of light in real time.

[FIGURE 27] shows the LED lighting at its


maximum power as the time was 18:00 and the
sun has disappeared already. The light sensor had
to be oriented towards the window not to be
perturbated by of lighting present in the room.

FIGURE 27
4.6. NUTRIENTS

To create the water solution which allows the salads to grow under the better conditions we
need to enrich the water with some nutrients. The aim is to have a liquid nutrients container and
automatically inject it into the water when required. To reach this objective we use a 12VDC peristaltic
pump to inject the nutrients into the solution, and a level sensor inside the nutrients bottle to have a
feedback about the remaining level.

4.6.1. PERISTALTIC PUMP

The pump is rated for 12VDC, however the flow rate under these conditions seemed too high
for our application. We chose to control the pump using the PWM principle and be able to vary the
speed of its motor and therefore change the flow rate [FIGURE 28]. This was done using the same
components as in the lighting part as there were available.

FIGURE 28

Each nutrient provider will give its recommendations about the way of using the solution, so
the concentration in mL per Liter. The first step was to calculate this value. The manufacturer
recommended to pour 1 cap (the cap of the bottle) for 5L of water. We measured the cap to be
approximately 20mL by filling it with water and transferring it into a graduated 50mL beaker. The
volume of 20mL/5L represents a concentration of 0.4%.

We now had to characterize the peristaltic pump [FIGURE 29] to


determine its flowrate in mL/s and include this value into the regulation
program.

We filled our 50mL beaker and set our program to enable the pump
indefinitely with a 40% duty cycle, corresponding to a mean voltage of
approximately 5VDC. The inlet of the pump was inserted into the beaker and
the outlet was put into a plastic bottle. We estimated the flow rate by
measuring the time needed by the pump to draw 20mL of water. Here we
measured 65 seconds for pumping 20mL and converted these values into the
FIGURE 29
flowrate, being 0.31mL/s or 3.25s/mL.

An optical level sensor was implanted into the nutrients bottle and provide a feedback to the
microcontroller if the level is getting critically low (around 100mL remaining in the bottle). This sensor
returns a low logic state when in the air, and a high logic stage when submerged. Two wires are used
to provide power to the sensor, and a third is used to a digital input of the Arduino [FIGURE 30].

FIGURE 30
4.6.2. BASIC REGULATION FOR ADDING NUTRIENTS

By the beginning of the project, we did not have a way to measure the concentration of
nutrients, so we created a basic way to regulate the amount of nutrient added into the water by using
the water level measurement. Thus, when some water is added to the water container the Arduino can
know the amount of water (thanks to water level measurement) and add the corresponding amount of
nutrient by running the pump during the associated time. For example, if the system detects that the
level of the water raised of 5 Liters it knows that 20mL of nutrients
must be added and will run the pump for 65 seconds. Moreover,
the system must wait for the water tank to be filled with the
wanted amount of water, otherwise the pump will add the
nutrient in real time and might add some just because of waves
Peristaltic Pump
for example. This is something that is obviously unwanted. Thus,
a threshold is implemented to calculate the amount of liquid Nutrients Bottle
nutrients to add only if the system detect that more than 1 Liter
Ntr. Level sensor
has been added. Once this threshold is exceeded the system wait
for 30s to allow the filling of the water tank and calculate the
added volume after that. The time to run the nutrient pump is
then calculated thanks to the concentration value and the added
water value and the correct amount of nutrient is injected in the FIGURE 31
water tank [FIGURE 31]. The math logic can be seen in appendix.

4.6.3. NEW REGULATION FOR ADDING NUTRIENTS

The solution previously expressed was temporary and cannot provide enough precision over
the regulation of nutrients. To achieve a better control, we need to be able to measure the quantity of
nutrients into the water solution. This can be achieved by measuring the Total Dissolved Solids (TDS) in
the solution. A nutrient solution is composed of ions, which will conduct electricity differently
depending on the concentration. If there is a high concentration of nutrient in the water, its ability to
conduct the electricity will be higher, and vice versa. Moreover, the required electroconductivity or
concentration of a water solution is something that is often specified by nutrients manufacturers. A TDS
meter is capable to determine a value expressed in PPM (Parts Per Million) representative of the
concentration of nutrients dissolved into the water. The measured value will be compared to a setpoint,
and the peristaltic pump will be driven to compensate the difference. The TDS sensor came late into
the project and has been implemented into the prototype even though the code was not created yet.

4.7. DEEP WATER CULTURE

To allow a good growth during the vegetative phase we chose to implement the DWC technique
to our system. As explained in the state of the art it requires the roots to be submerged in the nutritive
solution. For this prototype we chose to use the same water container for the two techniques, by later
increasing the water level to submerge the roots when they are developed enough. Concerning the
water solution, the same instrumentation is used to monitor its quality, so the nutrient part, the TDS,
the water level measurement, and the lighting parts remain unchanged. The water level measurement
might include a new minimum level depending on the tray level, a simple constant is added in the code.

An air pump was added to provide the oxygenation that the water requires to facilitate the
absorption capabilities of the roots. The air pump operates under 230VAC, and the circuit used to
FIGURE 32

control the mist maker was duplicated [FIGURE 32]. Unfortunately, we did not order the air stones
required at the output of the air pump to uniformize the oxygenation of the water, it is the only
component that is
missing to complete the
DWC implementation. A
pressure switch shall be
implemented to get a
feedback on the state of
the air pump and inform
the user in case of a
failure [FIGURE 33]. FIGURE 33

4.8. WATER TEMPERATURE

The temperature is an important factor for the salad to grow correctly as the roots require
temperatures between 4°C and 15°C, without exceeding 25°C [5]. To provide the best conditions for
our plants, we must therefore measure the temperature of the solution. A waterproof temperature
sensor (DS18B20) was borrowed from personal material and implemented into the system. The
DS18B20 packs a temperature sensor as well as built-in electronics and an integrated data
communication protocol (1-Wire). The device is powered with 5VDC and ground. The data pin connects
to the microcontroller using a general purpose I/O pin [FIGURE 34].

FIGURE 34

Once immersed for the first time, the measured temperature was 23°C, which was also the
ambient temperature. Thus, it confirms that we must monitor the water temperature. To be able to
make a correlation between an action to monitor the temperature and its effect on the water
temperature we need to stock this measurement over the time. This is a software part which will be
implemented later by a data logger.

4.9 POTENTIAL OF HYDROGEN

For more precise control over the quality of the nutritive solution, its pH (Potential of Hydrogen)
could also be monitored. Depending on the quality of the tap water, the amount of nutrients into the
solution or the time since last filling, the pH of the solution can vary. Plants often require a solution with
a pH of about 6. Depending on future results, the management of this parameter could be considered
useful, and a pH sensor was added to the system, the Arduino is not yet able to communicate with it.
Moreover, a peristaltic pump and a pH correcting solution would be added to the system.
5. OBSERVATIONS

5.1. GROWTH OF THE SALADS

The first seeds were planted around the


15 of December. From the 18th of December to
th

the 4th of January, the laboratory was closed for


Christmas holidays and the system was left to run
on its own for about two weeks. Before leaving, we
were concerned about the water consumption,
and the misting cycle was therefore reduced to 10
seconds every 15 minutes. This way we were sure
that the system could run during more than 15
days without any human interaction to refill the
container with water. The system ran in total
autonomy for 18 days. When we came back the 4th
FIGURE 35
January, the first leaves had appeared [FIGURE 35]
and roots with an approximate length of 8cm were
starting to expand [FIGURE 36], proving the system
worked. It was very encouraging and
demonstrated that the system worked as
intended.

Later, we decided to change the misting


cycle to 20 seconds of mist every 5 minutes to
provide more nutritive solution to the roots and
accelerate the growth process. We changed the
misting cycle when we observed that the mist had
totally vanished after about 5 minutes staying in
suspension in the container. FIGURE 36

A few days later 3 plants out of 4 died and the water temperature has increased to about 40°C.
This can be the result of the exposition of the water tank to the sun, these days were sunny, the shutters
were more open than during the holydays, and the water tank was stored just behind a window,
moreover the tank is black and made with a thin plastic, which is very bad for heat insulation. Using a
more insulated water tank against the sun’s rays should solve this problem, a white and thicker one is
a better choice to put the shelf under the sun rays again.

The second possibility was the mist maker. This device may heat up when it runs, we cannot
have a precise measure of it because the device will work only if it is immersed. Thus, the storing place
of the shelf was changed for a place with less sun. Each new day when we came to the laboratory the
water was hot, and each day, after letting the room’s door open only 15 minutes the water cooled
down. Thus, this issue is only due to the sun and the ambient room temperature.

We then changed this cycle for 20 seconds of mist every 5 minutes. With this configuration
there is more mist, so we can see if it changes the growing capabilities of the lettuce. Also 3 new seeds
were planted and started growing.

A second issue was noted the 11th of January. We observed apparition of algae, proving that a
better control over the quality of the nutritive solution must be implemented. However, it did not seem
to not affect the salads, the one which survived still grown in these conditions and the 3 seed also. The
water was in the tank for 5 weeks and seemed to be clean the 4th of January. This is the result of the
temperature of the water and the stagnation of the water.

This second issue can be solved by keeping the water in movement, this can be done with the
air pump and as an additional effect it will oxygen the water even during the germination phase. We
added a fan which insufflate new air in the water tank, it helps to reduce the overheating phenomenon
and renewed the atmosphere inside the water tank.

This device gives a lot of feedback thanks to the various measurements that it does, it also
sometimes requires some inputs like the wanted concentration of nutrient for example (which will
depend on the purchased one), all these values must be accessible from a smartphone via an
application to be able to have a feedback of the system state or change a value if needed. This should
be done by a WIFI module added to the Arduino and an application for the smartphone. This part is not
yet totally developed but these values are already accessible from a computer via the serial port of the
Arduino. It is thus only a matter of user interface to develop.

6. CONCLUSION

This project was developed to provide a device able to grow vegetables in an efficient way, with
a good resource management, a low consumption in terms of resources and energy, with a high-level
automatization and a user-friendly design. All of this for a low price to implement in houses or school’s
cafeteria for example.

The project has provided some satisfying results in this way and must be improved. Some work
is still required on the prototype before starting the second version of the product, the one supposed
to be the final design. The regulation of the water temperature must be improved; the fan cannot
handle it alone if the ambient temperature is too high. Thus, a data logger must be implemented to be
able to do some relevant observations about the different effects of the several tests to solve this kind
of problems. This data logger can be applied for each measurement if required. The DWC
implementation must be improved by adding some air stones to have a better oxygenation of the water.
The PH and electroconductivity must be managed by the Arduino to correctly finish the water
management. Some other tests must be done once these improvements implemented to improve the
growing abilities of the lettuces. Finally, the WIFI and the user interface (mobile app) must be finished
to make the device easy to use.

There is still some work to do but the current system showed us that it is able to run alone as
it did for 18 days and gave us 4 lettuce with a respectable roots length and a low consumption of
resources and energy. It already includes a lot of instrumentation well characterized and running
automatically. The system already answers and respect various aspects of the determined
specifications.
REFERENCES

[1] S. S. Murugan and P. Vijayakumar, “Identification of ultrasonic frequency for water mist generation
using piezoelectric transducer,” Arch. Mater. Sci. Eng., vol. 83, pp. 74–78, Jan. 2017.
[2] “Figure 2. Chlorophyll a, b and carotenoids absorbance spectra.,” ResearchGate.
https://www.researchgate.net/figure/Chlorophyll-a-b-and-carotenoids-absorbance-
spectra_fig1_317151195 (accessed Jan. 13, 2021).
[3] R. Hiroki, H. Shimizu, A. Ito, H. Nakashima, J. Miyasaka, and K. Ohdoi, “IDENTIFYING THE OPTIMUM
LIGHT CYCLE FOR LETTUCE GROWTH IN A PLANT FACTORY,” Acta Hortic., no. 1037, pp. 863–868,
May 2014, doi: 10.17660/ActaHortic.2014.1037.115.
[4] “PWM.” https://www.arduino.cc/en/Tutorial/Foundations/PWM (accessed Jan. 14, 2021).
[5] L. D. Costa et al., “The Effect of Growth Medium Temperature on Corn Salad [Valerianella locusta
(L.) Laterr] Baby Leaf Yield and Quality,” HortScience, vol. 46, no. 12, pp. 1619–1625, Dec. 2011,
doi: 10.21273/HORTSCI.46.12.1619.
[6] Anna Heiney "Farming for the future", NASA. www.nasa.gov/missions/science/biofarming.html

You might also like