{'fraction_non_alphanumeric': 0.03240877639127092, 'fraction_numerical': 0.02052161570761133, 'mean_word_length': 4.56067083196317, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Investigation of optimal conditions needed for the production of indigo and subsequent dyeing using CO 2 /O 2 sensors and a cellphone camera

An investigation of the process involved in the production of and dyeing with indigo based on a CO 2 /O 2 sensor device and a cellphone-camera is reported. The former involves transforming indican to indigo, and the latter the process by which indigo and indigo-white are produced. During the process of indigo production, a clear and positive correlation can be observed between the concentration of gas levels (either the production of CO 2 or the consumption of O 2 ). The authors found that, for the first time, the changes on concentration levels of CO 2 /O 2 can be used as important parameters for indigo dyeing. The optimal indigo producing timing can be decided by the changes of CO 2 /O 2 concentration levees. It is no long should depending on the experience of a craftsperson. Furthermore, the optimal indigo producing timing also can be decided by the concentration levees of grouse. The color of indigo dyeing can be performed by a camera though the RGB and HSV (hue, saturation, value) values.


Introduction
In the late 16th century, Taiwan began to cultivate indigo plants (such as Indigofera genus, Strobilanthes cusia). In order to expand the scale to cope with increasing market demand, merchants invested large amounts of money in the blue indigo industry, which began to grow in 1800 and reached its peak in 1870. However, in 1897, BASF, a German chemical company, began to successfully mass-produce synthetic indigo dye. 1 After chemical dyes became popular in the world, this had a severe negative impact on the natural indigo industry. This influence spread all over the world, 2 and of course, the indigo industry in Taiwan and the indigo dyeing industry were also affected, leading to a substantial decline in exports. The indigo industry had completely disappeared by 1945. However, indigo plants are still scattered throughout Taiwan, especially along the mountain roads in the suburbs of Taipei. Because of this, coupled with the rise of environmental awareness, in the past ten years, a boom in indigo dyeing has gradually spread throughout the country. There are regular blue dye activities from communities to schools at all levels, from the most basic DIY experience courses to the design of exquisite products.
The chemistry of indigo production/dyeing has a long history and many related studies and documents have been reported. [3][4][5][6][7] In this study, the scale of indigo production/dyeing was reduced to a beaker, and the various chemical changes that occur during these processes, including the production and consumption of gases, as well as reactions that involve color changes were investigated. During the production 4 of indigo, indican, a precursor of indigo dye that is produced in the leaves of indigo plants, is first converted into indoxyl, which is then oxidized to indigo. [8][9][10][11] These processes involve the generation of CO2 and the consumption of O2. Meanwhile, during the indigo dyeing process, indigo is reduced to indigo white, and the color changes from blue to yellow-green, based on the amount of reducing agent, usually sodium dithionite (Na2S2O4) that is used and the reaction time, respectively. In this part of the study, commercially available CO2 and O2 sensors were used for gas detection; a cell phone and the ImageJ software were used for color analysis. 12 The optimized conditions for indigo production, including temperature, water quality, leaf freshness, and the optimized timing for indigo-dyeing, respectively, are all reported in this communication.

Experimental
Commercial CO2 (Figaro, CDM7160) and O2 (Figaro, KE-50) modules were used in this study. The CDM7160 module uses a compact NDIR CO2 sensor; 300~5,000 ppm CO2 with ± (50 ppm + 3%) of reading. The dynamic range can be improved 0 to 10,000 ppm when a evaluation module (EM7160) was used. A NI USB-6008 DAQ (National Instruments, NI; data acquisition) device was used, in which LabVIEW-based software instruments allow users to measure and analyze real-world signals. A LabVIEW program that was constructed in-house was used in all operations. ImageJ is a Java-based image processing program that was used to calculate the RGB color model during the transformation process from indigo to indigo-white. 13 All of the standard 5 gases used in the study were purchased from Fong-Ming Industrial (Taiwan), including ultrapurified (>99.99%) O2, N2 and CO2 and calibration gases (mixture 1: N2, 95% + CO2, 5 %; mixture 2: N2, 80% + N2, 15% + CO2, 5 %), respectively. The indigo plants (Strobilanthes cusia), hot spring water and mountain steam water were donated by a farmer who lives inside the Yangmingshan National Park (Taiwan). A ICPMS (Agilent 7700e) instrument was used for identifying the elements that were present in the hot spring water.  Figure 1A shows a schematic diagram of the homebuilt compact CO2/O2 detection box that was used for indigo production. The leaves (50 g) of indigo plants were chopped and soaked in water (400 mL) for 2 days to solubilize the indigo dye precursors and the resulting solution was filtered and transferred to a 1 L glass bottle. Two holes, with diameters of 6 mm, were opened in the bottle cap and connected to the detection box via two plastic tubes. During this operation, the gases in the bottle were allowed to slowly flow from the bottle to an acrylic gas detention box, in which the CO2/O2 sensors are connected to the DAQ, respectively. In addition to this equipment, a circuit board consisting of power supplies (12V and 5V, respectively), relays (RAYEX IND; LU-5H) and an ULN2003A chip (an array of seven NPN darlington transistors) are also needed (not shown in this diagram). Finally, a personal computer, equipped a LabVIEW program, was used to integrate all of the data described above. When adding 1.5 grams of Ca(OH)2 to the bottle, activating the stirrer and maintaining a stable temperature, the DAQ begins to record data. Figure 1B shows a schematic diagram of the color recoding system used when the indigo is being converted to indigo-white. In the beginning, 3.5 g of indigo paste was placed in the beaker, and 250 mL water was then added. The cellphone camera (iPhone 12 pro) was clamped with two Yclamps, and focused on the surface of the solution. When 0.25 grams of Na2S2O4 were added to the beaker, activating the stirrer and maintaining a stable temperature, the camera starts to take photos.

Results and discussion
Indican, a glycoside, that is produced by the plant but is concentrated almost exclusively in the vacuoles of the leaves, is the major chemical precursor of indigo in plants. 14 Although its concentration can reach as much as a few percent of the wet weight of the leaves, its biological function for the plant is currently not fully understand. The extraction and hydrolysis of indican cleaves the indican into two parts, resulting in the formation of b-D-glucose and indoxyl, as shown in Figure 2A. The hydrolysis is achieved via enzymes, i.e., a b-D-glucosidase, 1,15,16 that is naturally present in the leaves as well as by the actions of microbes that likely utilize b-D-glucose as an energy source. In addition, the concentration of glucose released from the leaves during the indigo-production process is also one of the factors in evaluating the final indigo paste yield. It was found that when 32.7 g leaves were moved into a beaker with 426 g water, after 45 hours the 7 sweetness was found to be 1 degree when a commercially available brix meter was used. As a result, the percentage of indican in the leaves could greater than 20 %.

FIGURE 2
Traditionally, this process is weather-dependent, i.e. dependent on the ambient temperature, and for this reason, indigo is usually produced in the summer. 17 Indigo dye paste can be dried into cakes for ease of transportation and sale. The general chemical reaction is described in Figure   2B. In the meantime, extra oxygen is needed to accelerate this reaction. This is usually accomplished by vigorously stirring or beating the liquid surface forcibly to inject oxygen. In this process, the b-D-glucose is removed by natural metabolism by the action of microbes and is accompanied by the generation of CO2. The amount of CO2 bubbles can be used as an indicator of the degree of the reaction. When CO2 bubbles are no longer produced, this means that the reaction has reached completion. Indigo is only one of the many oxidation products of indoxyl since, under non-ideal conditions, 19 isatin and indirubin can also be formed, thus resulting in dyestuffs with a lower purity with lower quantities of the desired indigo dye. In fact, the process of turning green leaves into a bright blue dye through fermentation has been passed down over thousands of years. Most workers have their own recipes and techniques for producing a natural indigo dye. The Japanese have a different process for extracting indigo from the polygonum plant. The extraction solution is mixed with limestone powder, wheat husk powder, lye ash and sake, and following this, the resultant mix is allowed to ferment for a week with the ultimate 8 formation of a pigment, the so-called "sukumo". Indeed, for an amateur dye maker, the production of these pigments is not easy and requires many years of experience. This is the reason for why we were prompted to develop a novel and more reliable method for manufacturing indigo. mL water) were added to the indoxyl extraction liquid (from 50 g of leaves), respectively. In order to avoid the value deviation caused by the long-term exposure of the gas sensor to the air or poor storage environment, the CO2 and O2 sensors were calibrated before the experiments. By using ultra-purified gases, linear detection range for CO2 can be found (R 2 value of calibration curve: 0.9992; average error: 1.278 %). In addition, linear detection range for O2 also can be found (R 2 value of calibration curve: 0.9997; average error: 1.276 %). In this study, we compared the use of hot spring water, mountain stream, tap water and deionized water, respectively, for use as the extraction solution. The former two types of water were collected from the Yangmingshan National Park (Taiwan) 20 and the other two types of water were obtained from the laboratory. It can be seen that the use of hot spring water produces a higher CO2 concentration in the detection box, ~ 8000 ppm, implying that it might be the best quality of water for making indigo dye. The inset in the Figure 3(B) shows the relationship between the finial yield (indigo in grams: 2.011 g, 1.801, 1.76 g, 1.625 g). The consumption of O2 was also investigated.
It was found that when either hot spring water or the others were used, the consumption of O2 showed a similar tendency with CO2. It was also observed that CO2 was produced first and O2 was then consumed; in this case, 12 ~ 16 seconds after the CO2 concentration begins to increase, the O2 concentration begins to decrease. In the other words, with reference to the general reaction formula shown in Figure 2(B), it can be assumed that the initially formed b-D-glucose is decomposed, either by natural enzyme or microbes with the generation of CO2 to produce the energy needed to produce the combination of O2 and indoxyl. Another experiment was performed to determine the optimized temperature for the extraction of indoxyl. In this case, tap water was used for the sake of convenience. As shown in Figure 3(B), the optimized temperature was found to be 30 ℃. The inset in the Figure 3 The sampling location was very close to the visitor center, where several local residents were living before the national park was established. Some of their ancestors made their living by making indigo dye. For comparison, deionized water was also examined. As a result, the use of hot spring water provided the optimal results. There may be other reasons for why hot spring water works well, such as the types of enzymes or natural bacteria in the water but, at this time, there is no science-based explanation. In short, this may be one of the main reasons why the early Taiwanese ancestors chose the Yangmingshan area for preparing indigo dye. The yield of indigo from fresh versus old leaves was also examined. At the same weight, the yield of indigo from fresh leaves was higher by 10% compared to that from older leaves. The yield from leaves was 1.4-fold higher than that from stems.  Figure 4 show the relationships between the R-values and the time required for indigo to be converted to indigo-white. In this experiment, 3.5 g of indigo paste was added to 250 mL water, 0.25 g of sodium dithionite (Na2S2O4) was then added and the mixture was heated with stirring for 20 minutes after which, a piece of linen (2 cm square) was dyed with the product. The sample was soaked in the dye solution for 10 minutes, rinsed with tap water and then allowed to dry.
Following this, an HP Deskjet 3520 was used to scan the dyed linen, and the resulting ImageJ was used for image analysis. The photos shown in the inset of Figure 5, show the color difference before and after dyeing. After scanning each image, the RGB values were converted into HSV values, in which H values (hue) and S values (saturation) are the main analytical values. When the sample is closer to H=240 and the S value is higher, the dyeing effect is assumed to be better.
According to the results, the dyeing benefit was the highest when the pH of the solution was 12.
When indigo is reduced to indigo-white, the color of the dye solution changes from blue to bluegreen, and then back to blue after oxidation. If an excess amount of sodium dithionite is used, the dye solution will immediately turn a yellow-green color. However, this operation has no effect on the dyeing process, so an appropriate ratio of sodium dithionite and indigo paste is necessary.
This finding shows that the optimized ratio for these ingredients is 1:14. Meanwhile, temperature is also a very important factor and a series of experiments were performed at different temperatures, including 27°C, 30°C, 35°C, 40°C, 45°C, and 50°C, respectively. The results show that the S values of the analysis results after dyeing were almost all between 45 and 50, the H values were all at 205, and the temperature had no obvious effect on this process. However, the optimal temperature was found to be about 30°C. Finally, using the cell phone camera combined with image analysis permitted the optimized timing for dyeing to be determined. After analyzing all phases, the R values and time periods, as shown in Figure 6, we conclude that the process can be divided into three stages: initial (purple color), growth (blue color), and decline (red color) periods, respectively. In the initial period, the R value increases slowly, most of the indigo has not been reduced to indigo white, and dyeing ability is poor. During this period, the average H value was 200, and the S value was 20. In the growth period, from 25 minutes to 70 minutes, the R value rises faster, the surface of the dye solution turns a dark blue-green color and most of the indigo is reduced to indigo white. Dyeing ability increases with time and reaches the maximum at ~70 minutes. The H value during this period is 204, and the average S value is 38. The last 70 ~ 180 minutes is the decay period. The R value decreases with time and, at this time, most of the indigo white is oxidized back to indigo, the color then turns to a dark blue, and the dyeing ability also decreases with time.

Conclusions
The results reported here provides a preliminary confirmation of a correlation between the concentration of CO2/O2 produced/consumed during the production of indigo and the final yield.
The optimal water quality for producing indigo was hot spring water (at 30°C), which was superior to water from a mountain stream tap water or deionized water. However, the time required for this process rapidly decreases when the temperature of the water is greater than 40°C. The yield of indigo from fresh leaves is higher by more than ~10% than that for the same weight of older leaves. The yield obtained from leaves is 1.4-fold greater than that from stems. In the process of indigo dyeing, the optimized pH value of the solution is 12. The optimized ratio of reducing agent (in this case, sodium dithionite) and indigo paste was 1:14. The best dyeing time is ~70 minutes after adding the reducing agent, at which time the indigo is completely converted into indigo white. If it is possible to increase the varieties of indigo plants in various areas in the future and check the conditions/parameters, such as water quality, temperature, and more detailed interrelationships, it would likely lead to more accurate, reliable, and rapid assessment methods.