Optimization of the automated colorimetric measurement system for pH of liquid

. This article considers the issue of automatic control of the acidity of the aquatic environment, which is relevant in such branches of agriculture as hydroponics and aeroponics. A method for measuring the pH of a liquid using a potentiometric method is considered. This method allows to obtain the most accurate pH values, but has some drawbacks. In particular, the article analyzes the advantages of this method over the use of a universal indicator paper and a color sensor for pH determination, describes the components, the conditions of their operation and storage, describes the basic principles of the measuring system operation. A method for converting a signal received at a pH electrode into a microcontroller suitable for processing is also contemplated. The main goal of the development and application of the measuring system described in the article is to achieve a high degree of autonomy and automation of aeroponic and hydroponic greenhouse complexes.


Introduction
Currently, all-possible methods of growing plants in greenhouse facilities are gaining popularity.Aeroponics, hydroponics and similar methods are developing most intensively [1][2][3].Since the plant develops, obtaining the necessary substances from the liquid, rather than the soil, the issue of maintaining a balance of nutrients can be called one of the most important in these industries.From its solution directly depends on the quality of the harvest and productivity.Automation of monitoring the state of solution, reducing energy costs, reducing operating costs and increasing the degree of system autonomy.
This article is devoted to the analysis and refinement of the method of measuring acidity in the automatic pH control system described in the same name article [4].
Previously, it was proposed to use a universal indicator paper to measure the acidity of the liquid [5].This method is effective in cases when the required accuracy of measurement does not exceed integral units.
During the operation and testing of the mentioned system, it was decided to refine the measuring part in terms of increasing the accuracy.The objectives of such refinement are: elimination of measurement errors, elimination of identified shortcomings, expansion of the target market segment.

Application of the pH electrode
As a measuring device, it is proposed to use a pH electrode that combines in itself a measuring electrode and a reference electrode (Fig. 1).The short principle of its operation is to determine the potential of the measuring electrode in the liquid under investigation with respect to the potential of the reference electrode [6,7].It is not possible to measure directly the absolute value of the potential at the present time.
The voltage at the sensor outputs is small, you need to convert it for processing by the controller [8,9].There are many ways of this transformation.Specialized modules are used to solve this problem.The disadvantage of such modules is the cost.
Self-assembly of the signal conversion circuit will reduce costs.There are many options for building converters.They differ in the accessories, but in all cases the result is the possibility of processing the readings by the microcontroller.
We chose a circuit (Fig. 2 and 3), supporting the I2C interface, which greatly simplifies the integration of the sensor into the measuring system.

I2C interface
Let's consider in more detail the I2C interface and its capabilities.Connection of peripheral devices is simplified, the number of necessary wires is reduced.With the exception of power lines, two connections are required.
The interface provides the ability to connect a large number of compatible devices at the same time, which in the future can be used to monitor pH values in several containers with a nutrient solution by a single controller [10].The benefits of such an opportunity are most noticeable in the automation of a large greenhouse complex with a complex branched structure.In such conditions, the cost of connecting a plurality of sensors and their organization into a single automatic system becomes the most significant.

Arduino Uno
Arduino Uno controller (Fig. 4) is used in this system, which has sufficient capabilities for solving the task [11,12].It is also easy to learn, does not require special skills for working with microprocessor technology, it is often used for teaching students.The programming language supported by this controller allows the user libraries to be used, which greatly increases the functionality and adapts the controller to its needs.Distributed and various programs to simplify the interaction with the controller.Some of them are at the level accessible even for the pupils of the junior school.

Analysis of method of measurement
Measurement is suggested to be performed by moving the electrode from the buffer solution to the test solution [13].The use of a buffer solution is necessary to comply with the conditions of storage and operation of pH electrodes.
These conditions also include the calibration of the electrode in two, and to minimize the measurement error at the three reference pH values, in order to avoid distortion of the readings during long-term operation of the sensor [14][15][16].For these purposes, solutions that support clear preset pH during its shelf life.Depending on the desired accuracy of the measurements, calibration can be made at two or three points.They usually correspond to pH values of 4, 7, 10 (Fig. 5).

Fig. 5. Calibration solutions
Violation of the storage conditions will entail a loss in the accuracy of the measurement and will approximate the time of the output of the electric power [16].However, even if all the requirements are met, the possibility of an electrode failure is not ruled out.To avoid negative consequences, it is necessary to conduct periodic testing of sensors.
The pH value of the meter depends on the temperature.If this factor is not taken into account, the result of the measurements will be far from reality.Any temperature-sensitive temperature sensor with acceptable accuracy can be used for thermal compensation.
Moving is carried out according to the following scheme: 1) the electrode moves from the buffer solution to the test solution, with the help of a specialized drive; 2) there are measurement and transmission of data to the controller; 3) the electrode is returned to the buffer solution, where it waits for the next measurement cycle; 4) the controller processes the received data.The result of the measurement is the pH value, determined to within hundredths of a fraction.To use the system in aeroponics, hydroponics, fish farms, this is more than enough [17].Let us consider aeroponics as examples.
To obtain a good yield, the pH of the nutrient solution needs to be maintained in the range of 5.5-6.5 units.At the same time, the balance of the substances necessary for the plant is ensured, and, consequently, the quality of the crop.Proceeding from this, we conclude that the accuracy of the proposed system is sufficient.
This aspect is especially important in the cultivation of fruit plants, which are more demanding of the nutrient medium than others.In this case, the fruit's balance depends on the balance of trace elements contained in the solution, which directly affects the competitiveness of such a product.It should be noted that some plants require a variable pH value during their life cycle.That is, it is necessary to regulate the amount of mineral additives depending on the growth phase.
The advantages of the potentiometric measurement method have been described above.Let us turn to the consideration of disadvantages.
First, the cost of pH electrode and consumables exceeds the cost of measurement using universal indicator paper.There is also the possibility that the measuring electrode will fail.In this case, its replacement is required, which will entail additional costs.
Secondly, it is necessary to observe the conditions of storage and operation.This means that it is required to monitor the state of buffer and calibration solutions.It is also important to test the electrode.

Conclusion
Application pH electrode is more promising than universal indicator paper [18][19][20].The decision to use the pH electrode was taken after testing the layout of the system with a universal indicator paper (Fig. 6).When selecting components, their advantages and disadvantages were determined, the principles of work were studied, and the instruments were tested.The following is noted: 1) the pH measuring system using an electrode provides greater accuracy; 2) the possibility of using the I2C bus greatly simplifies the connection and operation of the system; 3) the use of thermal compensation and calibration are mandatory.
Based on the results of the study, a model of the measuring system is being developed.
The cost of maintaining the system has increased, but such growth is offset by new opportunities.And since its design used components with relatively low cost, the system is quite competitive in the market of automatic equipment for hydroponics and aeroponics.At this point, testing and development of the system continues.In fact, the scope of its application goes beyond aeroponics and hydroponics.However, they remain prioritized.

Fig. 6 .
Fig. 6.Layout of measuring systems using universal indicator paper