Software for Calculation of Nutrient Solution for Fruits and Leafy Vegetables in NFT Hydroponic System Software for Calculation of Nutrient Solution for Fruits and Leafy Vegetables in NFT Hydroponic System

Information technology is present in virtually all areas of science as a productivity tool, assisting professionals in these areas in their daily work. In this sense, the objective of the research was the development of a free software for use over the Internet, with a friendly interface and intuitive navigation, for calculation of nutrient solution for fruit vegetables and leaves in hydroponic NFTsystem. To develop the software, we used the technologies PHP5 (Programming Language), MYSQL (Database), CSS5 (Style Language), HTML5 (Markup Language) and CodeIgniter (Framework). The software has among its functions the user registration, calculation of the nutrient solution and the issuance of reports in PDF format. Calculation of the nutrient solution is available for various crops. The calculation proposes the quantity of different fertilizers needed to prepare the nutrient solution for the chosen hydroponic crops. Two software known as Hidrosolun and Hidrosical (registration number BR 51201400613 – 1 and BR 51201400614 – 0) were created and registered at the National Institute of Industrial Property (INPI), a federal agency responsible for the registration of intellectual property rights for the industry. The software developed is easy to use, without the need to install hardware with high configurations.


Introduction
The importance of agriculture in the lives of human beings is undeniable and is a fundamental activity for the survival of civilization. Brazil stands out as one of the world's great producers in the area of olericulture, due to its great territorial area, favorable climate, with soil of easy handling and availability of abundant water. Among the various techniques of plant cultivation, hydroponics is the technique of growing plants without soil, where the roots develop in balanced nutrient solution, with all the nutrients essential to the development of the plant, being a technique of cultivation in economically protected environments feasible and environmentally sound. Proper plant nutrition also increases crop tolerance to pest and disease attack.
For the success of the hydroponic cultivation, it is necessary to develop adequate computational tools that will assist the producer in the calculation of the correct dosages of the solutions, since there are many crops to be considered, as well as a large amount of inputs for fertilization.
A computerized system to calculate the hydroponic solution allows to offer more accurate and fast results. Using software, the grower who grows in a hydroponic system will have a better facility to calculate the correct dosage of nutrients, obtaining more satisfactory results with a lower cost. In this context, accessing tools via the Internet makes it easier to use programs, regardless of geographical location, and there is no need to install programs on personal computers.
In this sense, the objective of the research was the development of a free software for use over the Internet, with a friendly interface and intuitive navigation, for calculation of nutrient solution for fruit vegetables and leaves in hydroponic NFT system.

Hydroponic system cultivation
According to Embrapa [1], protected cultivation allows farmers to offer the market products with good visual quality in periods of low supply and high prices, contributing to a good profitability, which justifies the investment with the protected structures. Brazil has more than 30,000 hectares of protected cultivation, being the country with the largest cultivated area in this system, in South America.
Protected cultivation, which has the potential to double the productivity reached in the open field, emerges as a technique capable of reconciling high yields with quality in environmental conditions that are potentially stressful to plants and may compromise the production of vegetables. In the last two decades, the protected crop, worldwide, increased 400%, from 700,000 to 3.7 million hectares. The use of hydroponics in protected crops has been used as a tool to solve a wide range of problems, including the reduction of soil and groundwater contamination, and the nutritional biofortification of olive trees [2].
Among the several hydroponic systems that do not use substrates, "Nutrient Film Technique-NFT" is the most widespread in Brazil and in the world [3]. This technique favors the continuous or intermittent circulation of the nutrient solution in culture channels, which can be varied in size and made by different materials, being the most common PVC, polyethylene, polypropylene and masonry [4]. In this agricultural production system, there is still a need for the development of new technologies, notably the need for new software to assist the producer in calculating the nutrient solution [5], since the correct calculation of the nutrient solution is fundamental for success in production. The supply of nutrients at levels suitable for growth, minimizing production losses and providing better quality to fruit vegetables [6]. With the use and advancement of information technologies in the development of software for the Internet, IT stands out as a cross-cutting area for all sectors, gaining its space in agriculture, increasing competitiveness and optimizing production [7].
Hydroponics is an off-the-ground crop technology that promotes the diversification of activities related to agribusiness, as it generates a differentiated product of good quality and of great acceptance in the market, although it cannot be certified As organic cultivation, since hydroponics is not a natural method of cultivation [8,9]. It is a technique of cultivation in protected environment, in which the soil is replaced by the nutrient solution, in which are contained all the nutrients essential to the development of the plants [10].
Hydroponics has been growing substantially in Brazil, driven by the demand of the consumer market for differentiated vegetables, as well as the higher value added to the product, thus generating significant growth in the hydroponic cultivation of fruit and leafy vegetables [3]. This technique has many advantages over traditional soil cultivation, as it eliminates traditional agricultural operations, such as requiring less human effort, lack of competition for plants for nutrients and water, significant increase in productivity, precocity in the harvest and less occurrence of phytosanitary problems, with less application of pesticides, which generates a better final product quality [11].

Hydroponic cultivation system: NFT
In Brazil, the hydroponic crop is predominantly made by the NFT system. Many of these hydroponic crops are not successful, mainly due to the lack of knowledge of the formulation and the adequate management of nutrient solutions [12]. In the NFT system, the plants grow having their root system in a channel through which the nutrient solution circulates. The pioneer of this technique was Allen Cooper, at the Glasshouse Crop Research Institute, Littlehampton, England, in 1965, who determined that the thickness of the flow of the nutrient solution passing through the roots of the plants should be small (laminar) in such a way that the roots are not completely submerged, lacking the necessary oxygen [13]. In this system, there is no need to place any material inside the channels, such as stones, sand, expanded clay and burnt rice straw, and the canals contain only the roots of the plants and the nutrient solution. The nutrient solution is stored in a reservoir, from where it is repressed to the top of the cultivation bed (bench), passing through the channels, being collected at the bottom of the bed, to return to the tank [14].

Mineral nutrition of plants
One of the basic principles for plant production, in both soil and nonsoil cultivation systems, (hydroponics) is to provide all the nutrients the plant needs. If there is a nutrient imbalance in the environment in which the plant grows, the production will be reduced, hence the need to supply all the elements that the plants need, in the correct dose, according to the requirements of each crop [15].
Several chemical elements are essential for the development of plants, which are presented in Table 1. These elements can be classified according to their origin in: • Nonmineral macronutrients: C, H, O; • Mineral macronutrients: N, P, K, Ca, Mg, S; • Micronutrients: Mn, Fe, B, Zn, Cu, Mo, Cl.
The division between macronutrients and micronutrients takes into account only the amount that the plant absorbs from each nutrient to complete its productive cycle. The plants have about 90-95% of their weight in C, H, O, which are elements that come from air and water, and are abundant in nature. Therefore, in the nutrient solution, the emphasis is on the mineral elements [10].

Water as an essential element in hydroponics
In soilless cultivation, water quality is essential, as it will dissolve the essential elements that will nourish the plants. The water used must be potable and may be from artesian wells, water courses or rainfall collection [13]. In hydroponics, all nutrients are supplied to the plants in the solution that is prepared with different fertilizers. There are several salts that provide the same nutrients for plants; one should opt for those that are easier to dissolve in water, inexpensive and easily found in the trade. Table 2 presents some of the most used fertilizers in hydroponics.

Suggestions for nutritional solutions
Tables 3-6 present nutritional solutions for the cultivation of tomato, cucumber and lettuce.
The difference between solution A and solution B is in the amount of calcium nitrate used. Solution A is used in the growing phase of the plant and solution B is used in the fruiting phase. For the formation of the fruits, there is a greater absorption of calcium and nitrogen by the plants, a greater quantity of these nutrients being necessary in that phase. These quantities are used to prepare 450 mL stock solution. Hot water should be used to dissolve fertilizers well. Use 150 mL of the micronutrient-containing solution per 1000 L of culture solution.
In order to be efficiently absorbed by the roots, the iron must be chelated, so a solution containing 10 mg/mL of Fe must be prepared, to dissolve separately in each 450 mL of water, 50 g of ferrous sulfate and 60 g of disodium EDTA. After dissolution, add EDTA to the ferrous sulfate solution.
Make the air bubble in the solution obtained until complete dissolution of any precipitate formed. Store in a dark bottle and protect from light. If the producer prefers, he may purchase commercial products to be used as a nutrient solution for hydroponic cultivation, intended for various leafy vegetables and already used by many producers on a commercial scale.
In their preparation, the amounts of fertilizers are used, as shown in Table 6. Table 7 presents suggestions for the preparation of nutrient solutions in the NFT system for different types of hardwood vegetables.

Calculation of nutrient solution
The calculation of the nutrient solution is done in a simplified way, dividing the fertilizers by nutrients, taking as starting point the fertilizers containing nitrate (NO À3 ) in its formulation, such as calcium nitrate and potassium nitrate, if the formula: For each 100g of the fertilizer chosen, it is multiplied by the recommended amount of nutrient in the solution, which in this first stage can be calcium (Ca) or potassium (K), and then divided by the concentration of Ca or K in the fertilizer, thus obtaining the amount of fertilizer chosen.
Generally, the fertilizer used contains other nutrients necessary for the crop, making it necessary the calculation for its use, using the following formula for the calculation.
The value of F1 is the amount obtained in formula (1), which stipulates the amount of fertilizer to supply Ca or K, multiplied by the concentration (%) of the other nutrient in the fertilizer, divided by 100, which corresponds to 100 g. Once the result of F2 is obtained, if this result is lower than the recommended amount for the crop, the process will be redone, starting with F1, using another fertilizer.
In a second step, the fertilizers containing potassium (K) are used, such as potassium phosphate monobasic, potassium chloride (white) or potassium sulfate. After choosing the fertilizer, it must be checked if there is potassium leftover from the first calculation, and if this happens, the following formula should be used: If there is no "leftover," this formula is used in the same way as previously used, based on the fertilizer chosen.
This is done until all the macronutrients are calculated by calculating the recommended amounts for each crop.
In a final step of the calculation, not visible to the user, the calculations are made using the micronutrient contents of the fertilizers: boric acid, copper sulfate, manganese sulfate, zinc sulfate, sodium molybdate and ferrous sulfate. To calculate the macronutrients, the formula (1) is used.
Finally, the results are converted to the capacity of the chosen tank, and for 1000 L, the results are multiplied by 1, if they are 2000 L, the results are multiplied by 2, so successively up to the maximum value of 5000 L.
Next, a report is presented, which can be converted to PDF format for print, and the PHP library, mPDF that converts HTML to PDF, was used for this task. The report contains: Fertilizers: option where all the fertilizers used to calculate nutrient solutions are visualized.
In the "Help" section, you can find the following options: Tutorial, where you can access a tutorial explaining the steps to create a solution and calculate it and get information to contact the system developers, as well as the tools used.
In the current version of the system, there is an administrative area, where it is possible to measure the number of users registered, where the "Administrators" group that associates with the user was added, restricting access to this area only to users belonging to this group. With the option "User Report," the name of the users with a totalizer is listed, leaving the structure open for more options for this area.

PHP5 programming language
PHP (recursive acronym for: PHP5: Hypertext Preprocessor) is a programming language widely used today to generate content for the WEB [17]. PHP was created in 1995 by Rasmus Lerdorf, initially being a CGI package to replace Perl Scripts. PHP initially allowed developers to create simple web applications. Currently available the "PHP 5" version released in 2004, PHP 5 was designed based on Zend Engine 2.0 and brought several innovations. The object orientation of this version of PHP has been fully rewritten to meet the new needs [18].
PHP has source code available for everyone at no cost. The license to use and edit is Open Source, meaning no one can market any modified version of PHP, and any modification must continue with Open Source code for users to explore and modify. This license system does not bring profit to developers because they make everything available to the public for free, and the public, in turn, helps by reporting bugs and helping to modify the source code. Many companies support PHP developers because they do not aim for profit by creating and developing the program. PHP is heavily used with Linux and MySQL, two other Open Source programs [18].
Other advantages of the system are: to be totally free, to work on any operating system in which it is possible to install a web server (multi-platform) and to be able to be easily connected with OpenData Base Connectivity (ODBC) standard systems [19].
Due to its great autonomy, it is a language that allows to create dynamic web sites, allowing a user interaction through forms, URL parameters and links. The difference of PHP with respect to languages similar to Javascript is that the PHP code can be executed on the server, being sent to the client only pure html. In this way, it is possible to interact with existing databases and applications on the server, with the advantage of not exposing the source code to the client. This can be useful when the program is dealing with passwords or any kind of confidential information.

The MySQL relational database system
MySQL is a relational database management system. A relational database stores data in separate tables instead of putting all the data in one place. This provides speed and flexibility [20].
SQL is the most common default language used for database access and is defined by the ANSI/ ISO SQL standard. The SQL standard has been evolving since 1986, and there are several versions [21].
The MySQL is an Open Source software. Open Source means that it is possible for anyone to use and modify the program. Anyone can download MySQL over the Internet and use it without paying for it [22].
The MySQL database server is extremely fast, reliable, and easy to use. The MySQL Server also has a set of very practical features developed with the cooperation of users [21].
The MySQL Server was originally developed to handle very large databases much faster than existing solutions and has been used successfully in high demand production environments for several years [20].
The MySQL Database Program is a client/server system consisting of a multitasking SQL server that supports different accesses, various client programs and libraries, administrative tools and various programming interfaces [21].

The cascading style sheets: CSS3
Cascading Style Sheets, or Cascade Style Sheets, are formatting files for HTML documents. Its great advantage is in the association with HTML pages, which greatly facilitates the process of formatting serial pages. For example, suppose there is a site consisting of dozens of pages, and at some point it is necessary to make a change in the formatting, the background, the format of the tables, and so on. With CSS, you can associate all of these pages with a single formatting file, so that by changing the CSS file, all HTML pages associated with it are automatically cascaded, that is, when the browser reads a style sheet format the document in accordance with it [21].
The various additions to CSS 3 are extremely useful for replacing various types of images that are used to add colors and shapes to HTML elements, which you could not do with just CSS. In addition to the reduction of files to work and the absence of external dependencies that impact on the performance of the sites, the flexibility of these properties allows several combinations, which generate different styles that offer greater simplicity when creating with CSS only [23].

The HTML5 markup language
HTML is the abbreviation for Hypertext Markup Language, or Hypertext Markup Language. It is not exactly a programming language, but rather a pattern for representing elements of a web page that can be viewed in a browser program. The HTML code is sent from the server to the client computer, and the client has the task of translating this code into user-readable information [18].
The code of an HTML page consists of tags called tags, which are used to identify elements present on a page, such as text with paragraphs, line breaks, links, images, tables and so on. Each of these elements has a specific tag that identifies it. The tags are represented by the character "<", followed by the specific tag name, plus the ">"character, to start tagging [18]. Example: <Html>. <Head>.
This is an example page. <B > This text is bold </ b>.
With the evolution of technology, new version appeared and was called HTML5 and the emergence of HTML5 has changed many things in the world of web development, with new elements, new features and several other new features that enable better experiences and integrations that were previously only wishes and dreams of the developers. Even with some features still in the process of definition, it is already possible to take advantage of many of the new features that HTML5 has brought to the world [20].
A crucial point of these changes is that one can define several independent sections, each with its own hierarchy. For example, it is possible to have 2 h1 elements, each in its section; or you can create a header for the header of a blog, with the title and navigation links, and each post, properly created in a chapter, have a header with the title of the post and the date it was published, for example. This can be very useful for architecting more modular pages and for improving the quality and maintainability of developed code [24].
6. Software Hidrosical and Hidrosolun 6.1. Operating the Hidrosolun software When accessing the system, the user will be redirected to the calculation screen of the solution (Figure 1), where you can choose the desired solution, and if you do not have any solution created, you can use the standard solution, choose the culture and the quantity of the reservoir in which the solution will be diluted, and then click next.   In this step, as in the next, the system will present some fertilizers necessary to compose the solution, starting with nitrate ( Figure 2), choose an option and click next.
The next step is to supply the solution with potassium (Figure 3), choose the desired fertilizer and click next. You can return the process if you have chosen the wrong fertilizer by clicking back.
It is possible that the fertilizers used do not meet the needs of the chosen crop, being necessary the use of other fertilizers. The system calculates and lists the fertilizers that can be used ( Figure 4) to be part of the solution, after choosing click next.  After the solution calculation process, this report ( Figure 5) represents the result of the calculations, with the requirements of the crop, already counting the calculation of the macronutrients and micronutrients in grams.
With the possibility of generating a PDF file, just click Generate PDF. The calculations are based on nutrient solutions, which contain the amounts of nutrients that each crop needs, and knowing this, the Hidrosolun, offers an option to create nutritious solutions. On the menu bar, click Create Nutrition Solution ( Figure 6).   On this screen, all the nutrient solutions created, which can be used in the calculations, will be listed, and by clicking on the icon that appears in the table of actions, the nutrient amounts per culture can be checked (Figure 7).
In When you click the end and save button, the solution immediately appears in the solutions table, and you can use it in future calculations. A new option (delete- Figure 9) becomes available for each solution created, and after you click delete, the solution is no longer accessible to the user ( Figure 10).

Operating the Hidrosical software
After opening the browser to the Internet, enter the address www.siscopgeo.com.br, it will appear an initial screen of presentation of the program, as well as the request of typing of the user data and the password of access. The address www.siscopgeo.com.br is a domain registered in the site "Registro.br," that is a department of the "Nucleus of Information and Coordination of Point BR" (NIC.br), a civil entity without lucrative ends, that Since December 2005 has implemented the decisions and projects of the "Internet Management Committee in Brazil," as explained in the notice to the public and in the bylaws of NIC.br. This core is responsible for registration and maintenance of domain names that use the ".br" extension.
In the pages of the system, the user can use some links that support the same and can access some entities such as Embrapa, State Secretariat of Agriculture, Ministry of Agriculture, and FAEMG, all of which contain useful information on related activities with the agricultural area.
In the pages are also found access to the site "CLIMATEMPO", for queries about weather and temperature forecasts. In the footer of the pages is an application that provides the right time to visitors and also information on the number of people who have visited the site so far ( Figure 11).   If the user is already registered, you must enter your username and password; Otherwise, you must register by clicking the "Register" button and fill in the requested data ( Figure 12). At the end, the "Send" button must be clicked in order for the data to be recorded. You should then return to the main screen to log in.
After typing the user name and password, click on the "Enter System" option; and you will be directed to the "Main System Menu" screen, where you can make changes to the registry, perform nutrient solution calculation, issue reports and obtain online help for system operations (Figures 13 and 14).  To change the owner data, the user must access the "Owner" option in the menu and change the data as requested and, at the end, click on the "Send" button, this being the moment in which the data will be recorded ( Figure 15).
To register the properties, the user must access the "Property" option in the menu and fill in the data as requested and, at the end, click on the "Send" button ( Figure 16).
To perform the calculation of the nutrient solution, the user must choose the "Calculation" option in the menu ( Figure 17) and fill in the data requested in the form fields. Upon accessing the nutrient solution calculation screen, the name of the user who logged in to the system will be automatically filled in the "Owner Name" field. Next, the field with the date of the calculation must be filled in, the capacity of the reservoir chosen, the lowest value being 1000 L and the maximum value 5000 L, varying 1000 L between each option. Next, the culture will be listed, in this case (e.g., lettuce). After completing all the data, the user of the system should click with the mouse on the option Send (located in the footer of the form), occasion that the system will perform the calculations and will store the data in the database.   On the main screen of the system, the user finds the option to "report." There are several options that can be chosen: owner data report; property report; and hydroponic solution calculation report. At that point, the user has the option to view the report with the results as well as to send the report to be printed (Figures 18 and 19).
Issuing the report is important, because through the report the user obtains data output information from the database (Figures 20 and 21). Reports can be made according to the users' needs.  By choosing the menu option reports, a new window will open, allowing you to choose by report type, which may be the owner, property or result of the calculation of the solution.
By choosing the "Owner" option, the owner data report will be displayed on the screen, presenting the option to send to the printer.
By choosing the "Property" option, the property report will be displayed on the screen, with the option to be sent to the printer ( Figure 16).        Software for Calculation of Nutrient Solution for Fruits and Leafy Vegetables in NFT Hydroponic System http://dx.doi.org/10.5772/intechopen.72243 In the "Calculation" option, the report on the calculation data of the solution will be shown on screen and can be sent to the printer (Figure 22).
In the main menu screen of the System, the user has the "On-line Help" available, where the procedures for the operation of the system are described, in their entirety, from registration, calculation and reporting (Figures 23-26).

Final considerations
The software for calculation of nutrient solution for fruit and leaf vegetables in hydroponic system-NFT is easy to use, has simple interface with little input data and does not need installation, since it is an application available on the Internet.  The system calculates the amount of fertilizers needed to meet the needs of each crop available in the software, and it is possible to size the reservoir of the nutrient solution. It is a tool of extreme importance, especially for professionals in the area of Agrarian Sciences, who provide advice in the area of Mineral Fertilization and Plants.
The developed system calculates the amount of fertilizers used in the preparation of the nutrient solution, used in the hydroponic system, for hardwood vegetables, facilitating the calculation of the solution. The software is available for access on the WEB, without the need to download the program, and can still be used on mobile devices, such as cell phones or smartphones.