**2. Automation in hydroponic systems**

All possible variables in root zone must be monitored for automation of the hydroponic system and sensors of pH, the electrical conductivity (EC), light, the ambient temperature, the temperature of the solution, the humidity and the carbon dioxide, the dissolved oxygen and the oxidation–reduction potential must be considered as they directly affect the growth of hydroponically grown plants (**Figure 7**). The transpiration can be measured with either water ultrasound level sensors or load cells. If the area or volume of culture is large, several sensors must be placed to adequately control the entire crop. Ion sensors (17 essential elements in plant nutrition) are still studied for their durability and stability [8].

## **2.1 Hydroponic system design with real time OS based on microcontroller**

It was developed a complete automation hydroponic system for maintaining stable electrical conductivity, pH, growth light and monitoring CO2, temperature and humidity. The system consisted of an ARM Cortex-M4 microcontroller running ARM (**Figure 8**) embedded operating system, the official real time operating system (RTOS). The system read the pH level and nutrients on the nutrient solution of hydroponics system, as well as the temperature, humidity, CO2 levels and the

**31**

**Figure 8.**

**Figure 7.**

*Automation and Robotics Used in Hydroponic System DOI: http://dx.doi.org/10.5772/intechopen.90438*

*Hydroponics automation system (courtesy of over grower).*

light intensity around the system; in addition there were LED light three lines each a different configuration on each line that was used for the lighting of plants and light

In addition, the system was capable to control desired concentration level with variation of less than 3%, pH sensor showed good accuracy 5.83% from pH value

were turned on at least 17 h/day to fulfill plant light requirement. RTOS gave good performance with latency and jitter less than 15 μs, system overall show good performance and accuracy for automating hydroponic plant in vegetative phase of growth. If the system was turned on, the computer program turned off three pumps (stir

/s therefore, the lights

color was selected and the system data were saved in SD Card.

*ARM cortex-M4 microcontroller (courtesy of developer arm).*

3.23–10. Growing light intensity measurement was 105 μmol/m2

*Automation and Robotics Used in Hydroponic System DOI: http://dx.doi.org/10.5772/intechopen.90438*

### **Figure 7.**

*Urban Horticulture - Necessity of the Future*

**2. Automation in hydroponic systems**

*Robot for hydroponic systems (courtesy of Iron Ox Company).*

All possible variables in root zone must be monitored for automation of the hydroponic system and sensors of pH, the electrical conductivity (EC), light, the ambient temperature, the temperature of the solution, the humidity and the carbon dioxide, the dissolved oxygen and the oxidation–reduction potential must be considered as they directly affect the growth of hydroponically grown plants (**Figure 7**). The transpiration can be measured with either water ultrasound level sensors or load cells. If the area or volume of culture is large, several sensors must be placed to adequately control the entire crop. Ion sensors (17 essential elements in

plant nutrition) are still studied for their durability and stability [8].

*Automatic grow cabinets for growing plants at home (courtesy of HG-hydroponics).*

**2.1 Hydroponic system design with real time OS based on microcontroller**

It was developed a complete automation hydroponic system for maintaining stable electrical conductivity, pH, growth light and monitoring CO2, temperature and humidity. The system consisted of an ARM Cortex-M4 microcontroller running ARM (**Figure 8**) embedded operating system, the official real time operating system (RTOS). The system read the pH level and nutrients on the nutrient solution of hydroponics system, as well as the temperature, humidity, CO2 levels and the

**30**

**Figure 5.**

**Figure 6.**

*Hydroponics automation system (courtesy of over grower).*

### **Figure 8.** *ARM cortex-M4 microcontroller (courtesy of developer arm).*

light intensity around the system; in addition there were LED light three lines each a different configuration on each line that was used for the lighting of plants and light color was selected and the system data were saved in SD Card.

In addition, the system was capable to control desired concentration level with variation of less than 3%, pH sensor showed good accuracy 5.83% from pH value 3.23–10. Growing light intensity measurement was 105 μmol/m2 /s therefore, the lights were turned on at least 17 h/day to fulfill plant light requirement. RTOS gave good performance with latency and jitter less than 15 μs, system overall show good performance and accuracy for automating hydroponic plant in vegetative phase of growth. If the system was turned on, the computer program turned off three pumps (stir

pump, water pump and the dosing pump). After initialized an LCD module, then initialized serial and serial to PC for CO2 sensor. The program read the system configuration data that were stored in the SD card and initialized global variables with the configuration. Later program will update the LCD display. The program started up the sensor to read data sensors, push button to read the buttons provided, mixing to perform compounding nutrients hydroponics, timer flush to set watering plants, timer lights to regulate time lighting plants by LED lights. A timer was started up for minimum water and a sensor to detect the presence of water in nutrients within of a container. Once the water was activated, then timer watered the plants. The pH sensor recorded the initial pH value in the solution, then adding the pH solution up 5 mL and compared the pH sensor measurements obtained with the instrument (**Figure 9**).

A total of 600 s was taken by DHT22 humidity sensor sampling every 30 s and the readings were compared with the measuring instrument. Twenty-five minutes were taken by MH-Z19 sensor with readings every minute in rooms, results were compared with measuring instruments. The system initially provided nutrients for 5 mL and then the system recorded and calculated the amount of nutrients needed. A distance of 30 cm from LED to plant hole was settled to use a meter for Quantum PAR (photosynthetically active radiation). A LED coefficient was obtained by dividing average light intensity (ALI) with lux. The coefficient of LED and ALI can be used to find daily light integral (DLI) during 17 h. RTOS performance was obtained using square wave input signal and measuring input signal versus output signal delay using oscilloscope. The difference of humidity data retrieval between DHT22 sensors and measuring devices was very small. CO2 data retrieval between MH-Z19 sensor and measuring devices at room had a difference for each room relatively equal amount, then for the sensor MH-Z19 in this case with a correction factor, so the results obtained are close to the results of measuring instruments. A correction factor of 260 ppm was used for the MH-Z19 sensor against the initial

**33**

**Figure 10.**

*Experiment of RTOS.*

*Automation and Robotics Used in Hydroponic System DOI: http://dx.doi.org/10.5772/intechopen.90438*

to 10.74 μmol/m2

value. The growing light intensity was measured at 25 cm from light source. The result showed each growing light produces difference intensity ranging from 6.03

results of pH meter sensor, the difference obtained is so small so that the pH meter sensor can be used to read the pH suitably. When taking data for RTOS experiment (**Figure 10**), the main programs still running while the experiment still ongoing. The yellow signal is a given signal and the other signal is a signal output from each thread. Time latency (in microseconds) was very small. The results showed that hydroponic automated system performed well. RTOS ran all the tasks with a latency less than 15 μS. Environment sensor overall showed good result, temperature reading error was less than 4%, humidity reading less than 5.36% and CO2 sensor accuracy was calibrated 260 ppm from initial value. System was capable to mix nutrients in 80 s with error less than 3.48%. Light intensity measurement showed different result for different color spectrum in order to fulfill daily light

**2.2 pH fuzzy logic control system for nutrient solution in embedded and flow** 

The fuzzy-based control system was developed for maintaining a proper acidity level of nutrient solution used in potted flower cultivation of Chrysanthemum embedded and flow hydroponic cultures. Two control valves maintained the nutrient solution pH at a desired set point as follows: (1) acid valve (to manage the addition of acid solution necessary) and (2) base valve (to keep the addition of base solution necessary) (**Figure 11**). The developed control algorithm was based on

Fuzzy rules had 21 linguistic statements to achieve smoothness, by trials and errors using the membership functions based on the operator skills and experience. The fuzzy logic controlled nutrient solution pH and increased the smoothness of the pH the during control course. The culture vessel consisted of six blocks, each of which containing four potted flowers. The nutrient solution flows into and fills the cultivation bench until a certain level, 5–10 cm from pot base. The embedded system kept the plant growth media in 10 min, before it then flows back into the tank and flows into the next block. The flow rate of the nutrition used in this

The control system maintained 0.3 M H3PO4 and 0.4 M KOH, which flowed constantly from Marriott tube. The valve used was of solenoid type with 1/8 in. in diameter. Calibration of the pH-meter was done on voltage basis using PCL-812PG

and the measuring apparatus was Hanna pH-meter

plant requirement we need to turn on the light at least 17 h day<sup>−</sup><sup>1</sup>

grew well and can be harvested in 5 weeks [9].

membership functions of fuzzy arrangement.

**hydroponic culture**

experiment was 2.4 L min<sup>−</sup><sup>1</sup>

(HI8710E model).

/s, to fulfill plant light requirement on at least 17 h day<sup>−</sup><sup>1</sup>

. From the

. The vegetable

**Figure 9.** *Block diagram of system.*

*Automation and Robotics Used in Hydroponic System DOI: http://dx.doi.org/10.5772/intechopen.90438*

*Urban Horticulture - Necessity of the Future*

pump, water pump and the dosing pump). After initialized an LCD module, then initialized serial and serial to PC for CO2 sensor. The program read the system configuration data that were stored in the SD card and initialized global variables with the configuration. Later program will update the LCD display. The program started up the sensor to read data sensors, push button to read the buttons provided, mixing to perform compounding nutrients hydroponics, timer flush to set watering plants, timer lights to regulate time lighting plants by LED lights. A timer was started up for minimum water and a sensor to detect the presence of water in nutrients within of a container. Once the water was activated, then timer watered the plants. The pH sensor recorded the initial pH value in the solution, then adding the pH solution up 5 mL and compared the pH sensor measurements obtained with the instrument (**Figure 9**). A total of 600 s was taken by DHT22 humidity sensor sampling every 30 s and the readings were compared with the measuring instrument. Twenty-five minutes were taken by MH-Z19 sensor with readings every minute in rooms, results were compared with measuring instruments. The system initially provided nutrients for 5 mL and then the system recorded and calculated the amount of nutrients needed. A distance of 30 cm from LED to plant hole was settled to use a meter for Quantum PAR (photosynthetically active radiation). A LED coefficient was obtained by dividing average light intensity (ALI) with lux. The coefficient of LED and ALI can be used to find daily light integral (DLI) during 17 h. RTOS performance was obtained using square wave input signal and measuring input signal versus output signal delay using oscilloscope. The difference of humidity data retrieval between DHT22 sensors and measuring devices was very small. CO2 data retrieval between MH-Z19 sensor and measuring devices at room had a difference for each room relatively equal amount, then for the sensor MH-Z19 in this case with a correction factor, so the results obtained are close to the results of measuring instruments. A correction factor of 260 ppm was used for the MH-Z19 sensor against the initial

**32**

**Figure 9.**

*Block diagram of system.*

value. The growing light intensity was measured at 25 cm from light source. The result showed each growing light produces difference intensity ranging from 6.03 to 10.74 μmol/m2 /s, to fulfill plant light requirement on at least 17 h day<sup>−</sup><sup>1</sup> . From the results of pH meter sensor, the difference obtained is so small so that the pH meter sensor can be used to read the pH suitably. When taking data for RTOS experiment (**Figure 10**), the main programs still running while the experiment still ongoing.

The yellow signal is a given signal and the other signal is a signal output from each thread. Time latency (in microseconds) was very small. The results showed that hydroponic automated system performed well. RTOS ran all the tasks with a latency less than 15 μS. Environment sensor overall showed good result, temperature reading error was less than 4%, humidity reading less than 5.36% and CO2 sensor accuracy was calibrated 260 ppm from initial value. System was capable to mix nutrients in 80 s with error less than 3.48%. Light intensity measurement showed different result for different color spectrum in order to fulfill daily light plant requirement we need to turn on the light at least 17 h day<sup>−</sup><sup>1</sup> . The vegetable grew well and can be harvested in 5 weeks [9].
