SAINS TANAH Ae Journal of Soil Science and Agroclimatology, 22. , 2025, 1-11 SAINS TANAH Ae Journal of Soil Science and Agroclimatology Journal homepage: http://jurnal. id/tanah Development of portable color detector: its application for determination of Munsell Soil Color Heriyanto Syafutra1. Muhammad Khoirul Anam2. Faozan Ahmad3. Desi Nadalia4. Rudi Heryanto5. Ganesha Antarnusa6. Rofiqul Umam7. Hirotaka Takahashi8,9,10 Applied Physics Division. Department of Physics. Faculty of Mathematics and Natural Sciences. IPB University. Bogor. Indonesia Undergraduate Student of Department of Physics. Faculty of Mathematics and Natural Sciences. IPB University. Bogor. Indonesia 3 Theoretical Physics Division. Department of Physics. Faculty of Mathematics and Natural Sciences. IPB University. Bogor. Indonesia 4 Department of Soil Sciences and Land Resources. Faculty of Agriculture. IPB University. Indonesia 5 Department of Chemistry. Faculty of Mathematics and Natural Sciences. IPB University. Bogor. Indonesia 6 Department of Physics Education. Universitas Sultan Ageng Tirtayasa. Serang. Indonesia 7 The Center for Research in Radiation. Isotopes, and Earth System Sciences (CRiES). University of Tsukuba. Japan 8 Research Center for Space Science. Advanced Research Laboratories and Department of Design and Data Science. Tokyo City University. Japan 9 Institute for Cosmic Ray Research (ICRR). The University of Tokyo. Japan 10 Earthquake Research Institute. The University of Tokyo. Tokyo. Japan ARTICLE INFO ABSTRACT Keywords: Color detector Munsell soil color chart Portable device Soil color TCS3200 sensor Soil color is a crucial indicator in soil science and agriculture. it provides information about soil properties and conditions. Typically, surveyors determine soil color by visually comparing the soil samples to the Munsell Soil Color Chart (MSCC). However, the accuracy of this method can be influenced by lighting conditions and the observer's subjectivity, leading to potential inconsistencies. This study introduces a portable color sensor device designed to improve the accuracy and consistency in determining the soil color and its MSCC notation compared to traditional visual methods. The device integrates a TCS3200 color sensor with a microcontroller to automate the color determination process. The device was validated by operating it to determine the color of 12 test paper sheets and four test soil types. The device can determine the color of the tested paper and soil well . % the result is displayed on the Liquid Crystal Display. It consistently achieved 100% accuracy for all measurements with varying ambient light intensity. The device is designed to be portable and easy to use, thus supporting field use for surveyors. Therefore, this device offers significant advantages in soil classification, fertility assessment, and environmental monitoring. Article history Submitted: 2024-06-28 Revised: 2024-12-02 Accepted: 2024-12-10 Available online: 2025-01-10 Published regularly: June 2025 * Corresponding Author Email address: hsyafutra@apps. How to Cite: Syafutra. Anam. Ahmad. Nadalia. Heryanto. Antarnusa. Umam. Takahashi. Development of portable color detector: its application for determination of munsell soil color. Sains Tanah Journal of Soil Science and Agroclimatology, 22. : 1-11. https://doi. org/10. 20961/stjssa. INTRODUCTION Soil color is one of the most visually visible indicators of soil properties, providing important information regarding soil characteristics that is indispensable for soil science and agricultural practice (Ibyyez-Asensio et al. , 2013. Kirillova et , 2021. Simon et al. , 2. In soil science, the color of soil is often the first observable feature noted during soil surveys, and it provides valuable information about the mineral composition, organic matter content, and moisture conditions within the soil. For instance, darker soils are generally rich in organic matter, while red or yellow soils indicate the presence of iron oxides. This visual cue helps soil scientists and agronomists make quick, preliminary soil health and fertility assessments, guiding soil management and land use (Kang et al. , 2024. Lujyn Soto et al. , 2020. Nunes et al. Taneja et al. , 2. In agriculture, soil color is a crucial factor in assessing the land's suitability for different crops (Moshago et al. , 2022. Vasu et al. , 2. The color of the soil offers valuable information about its fertility, drainage characteristics, and even its ability to regulate temperature (Djama et al. , 2023. Liu et al. , 2020. Simon et al. , 2. For instance, dark-colored soil, which retains more heat, is especially advantageous in regions with four distinct seasons, as it can warm up more quickly in the spring, thereby lengthening the growing season for certain crops. Moreover. STJSSA, p-ISSN 1412-3606 e-ISSN 2356-1424 http://dx. org/10. 20961/stjssa. A 2025 The Authors. Published by Universitas Sebelas Maret This is an open-access article under the CC BY NC license . ttp://creativecommons. org/licenses/by/4. Syafutra et al. SAINS TANAH Ae Journal of Soil Science and Agroclimatology, 22. , 2025 the soil color can reveal the presence of essential nutrients, like iron or manganese, which are vital for plant development. Therefore, understanding soil color enables farmers to make well-informed decisions regarding crop selection, planting timelines, and soil management strategies. Soil color is an essential indicator of environmental conditions and land management (Baumann et al. , 2017. Liu et al. , 2. Changes in soil color over time can indicate changes in the chemical and physical characteristics of the soil, which can be caused by erosion, contamination, or changes in vegetation cover (Liu et al. , 2020. SynchezMarayyn et al. , 2015. Simon et al. , 2. Monitoring these changes can provide farmers and environmental scientists with a basis for evaluating land use, climate change, or soil health impacts. Analyzing soil color can give an early warning system essential for sustainable land management and In addition, soil color is vital to classifying and mapping soils. Proper soil mapping is essential for effective land resource management, ensuring that land is used appropriately, including agricultural activities compatible with the soil conditions (Abd-Elmabod et al. , 2019. Liu et al. Vaysse et al. , 2. Soil color also has cultural and historical implications. In certain regions, soil color has historically guided agricultural decisions, settlement, and spiritual practices. Historically, soil color has been associated with fertility and prosperity, shaping the development of ancient civilizations. The Munsell Soil Color Chart (MSCC) has been used globally to describe and classify soils by color, helping to identify soil horizons, understand soil formation processes, and map soil types across landscapes (Fan et al. , 2017. Mancini et al. , 2020. Pegalajar et al. , 2. Developed by Albert H. Munsell in the early 20th century, this chart systematically categorizes colors based on three attributes: hue, value, and chroma (Solys et al. , 2022. Wills et al. , 2. Soil scientists can describe the color of the soil by comparing soil samples to the color patches on the MSCC. However, the traditional use of the MSCC relies heavily on human observation, which is prone to inconsistencies and errors due to varying lighting conditions and individual subjectivity (Kirillova et al. , 2015. Schmidt & Ahn, 2. Several studies have been conducted to develop devices and methods to improve the accuracy and consistency of soil color determination. These devices are expected to overcome the limitations of traditional visual assessment using MSCC to reduce subjectivity and variability caused by human observers and environmental conditions, such as lighting. Researchers have reported the use of smartphone cameras to determine soil color (Fan et al. , 2017. Gymez-Robledo et al. Han et al. , 2016. Kirillova et al. , 2018. Nodi et al. Pegalajar et al. , 2023. Yang et al. , 2. For instance, (Fan et al. , 2. conducted a study, soil color captured by various smartphone cameras under different lighting conditions compared to the color determined by a Although consistent under sunny conditions, accuracy decreased under cloudy conditions. (Nodi et al. , 2. , attempted to adjust pixel intensity for improved alignment with MSCC but highlighted challenges in real-time field applications. (Kirillova et al. , 2018. used flatbed scanners and digital cameras for better consistency but found them impractical for field use. Stiglitz et al. evaluated the NixTM Pro Color Sensor, which provided soil color readings comparable to laboratory-grade colorimeters (Konica Minolta CR-. for dry soils but required manual conversion of CIELab* codes to MSCC notation, reducing its Mancini et al. combined the NixTM Pro with machine learning, achieving high accuracy and consistency with MSCC standards, but the method's reliance on extensive training data, computational resources, and complex model management limits its feasibility for widespread field While significant progress has been made, existing methods have limitations, such as dependency on lighting conditions, portability, calibration requirements, and computational resources (Fan et al. , 2017. Mancini et al. , 2020. Nodi et al. , 2023. Schmidt & Ahn, 2019. Stiglitz et al. , 2016. Yang et al. , 2. Thus, there is a need to develop devices that balance accuracy, ease of use, and practicality for on-site soil surveys. This study focuses on developing and testing the effectiveness of a portable color sensor device designed to determine soil color with high levels of accuracy and The novelty of this research lies in developing an automated, portable device based on the TCS3200 color sensor integrated with a microcontroller to overcome these This approach reduces human error, minimizes dependence on environmental lighting, and offers practical application in the field. The developed device provides consistent and accurate soil color measurements, essential in soil classification, fertility assessment, and environmental monitoring activities. In addition, the portable and easy-touse design of the device makes it an ideal tool for use in the field by land surveyors while strengthening standardization efforts in soil color assessment. MATERIAL AND METHODS This research was conducted at the Department of Physics. Faculty of Mathematics and Natural Sciences, and the Department of Soil Science. Faculty of Agriculture. IPB University. The components of this portable color detection device are readily available on the market and cost-effective. Despite its simplicity, the device accurately determines the color code of soil samples according to the MSCC. The device comprises four main components: the TCS3200 sensor for color detection, an LCD for displaying results, the microcontroller as the central processing unit, and a battery for power. Upon receiving an input signal from the user, the microcontroller activates the LED array, controls the TCS3200 sensor to detect color, and captures the output frequency. This frequency data is then mapped to the RGB value range and compared with pre-stored RGB data in the microcontroller, displaying the final results on the LCD. A schematic illustration of this process is shown in Figure 1a. Electronic Design This instrument uses the TCS3200 sensor to detect object color by converting received light into frequency readable Syafutra et al. SAINS TANAH Ae Journal of Soil Science and Agroclimatology, 22. , 2025 Figure 1. Block diagram of the developed color detector, . probe design, . block diagram of light-to-frequency conversion controlled by the microcontroller, . spectrum of the LED used, and . block diagram of the classification used to associate new data to the database by the microcontroller (Fig. (Lita et al. , 2019. Mohd Khairudin et al. , 2. The research employs an Arduino minimum system with an Atmega328P microcontroller IC, which has a bootloader installed and is supplemented with components such as an external clock . and connections for the reset and power pins (VCC and GND), as shown in Figure 2. To minimize interference from external light during soil color detection, a probe (Fig. is used to house soil samples, and measurements are taken when the probe is The probe contains circuits of the TCS3200 sensor and LEDs as the light source. It is designed as a cylinder with an outer diameter of 5 cm, an inner diameter of 4 cm, and a total height of 38 mm, with the sensor positioned centrally. Surrounding the sensor are four 5 mm holes for super bright white LEDs. Given that the TCS3200 sensor has an optimal detection distance of 10 mm, the probe is designed to ensure the sample is positioned precisely 1 cm below the sensor. stopper on the sample holder maintains a constant distance between the sample and the sensor. The probe cover includes a flat hole for the sensor cable to connect to the system This probe is 3D printed and coated with matte black paint to prevent light reflections from the inner walls, ensuring the sensor reads only light reflected from the The TCS3200 sensor circuit, equipped with LEDs, is shown in Figure 2. This sensor features eight pins: Vcc ( 5V). GND. S0. S1. S2. S3. Out, and OE. The S0 and S1 pins are used to scale the output frequency, while the S2 and S3 pins control the selected photodiode's activation (Mohd Khairudin et al. Detailed functions of the S0 - S3 pin settings are provided in Table 1. These pins are connected to the microcontroller's digital pins based on the configurations in Figure 2. Four super bright LEDs serve as the light source, with peak intensities at wavelengths of 450 nm and 550 nm (Fig. , producing white light. These LEDs are forward-biased at their typical voltage using a 5V supply and a 220 resistor connected in series to ensure stable intensity. The LEDs are configured to be active low, meaning they light up when the Arduino's digital control pin is set to LOW. This setup is designed to minimize the load on the microcontroller when activating the LEDs, as illustrated in Figure 2. The detected object's color determination results are displayed on a Nokia5110 LCD with a pixel resolution of 84x84. This LCD operates optimally with an input voltage of 3-4V. step down the 5V supply from Vcc, a voltage divider circuit consisting of 2k and 1k resistors is used, with a 2k resistor parallel to the LCD input. The LCD's contrast is adjusted by adding a 47nF-100nF capacitor between Vcc and the LCD Table 1. Condition of the TCS3200 sensor pins, which function to control the output frequency and active photodiodes Frequency controller Photodiode controller S 0 S1 Output S2 S3 Active Frequency Scale Photodiode Red Blue Clear Green Syafutra et al. SAINS TANAH Ae Journal of Soil Science and Agroclimatology, 22. , 2025 Figure 2. The electronic circuit schematic of the developed color detector Data Collection and Analysis The microcontroller will read the output frequency from the TCS3200 sensor. This measured frequency consists of 3 types of frequencies that interpret read (R), green (G), and blue (B) values, abbreviated as RGB. These frequency values are then processed into RGB values in the range 0 Ae 255 using linear interpolation in Equation 1. of the best quality and measures 14y14 cm. Soil measurements . our types of soil with predetermined Munsell codes (Munsell Color Company, 2. are conducted in only one condition, using the probe with the soil placed in a sample holder probe, and the measurements were taken in a closed state. The Euclidean distance method is employed to determine the similarity of the new sample's RGB values to those in the database (Ge et al. , 2015. Liu & Duan, 2. This method calculates the Euclidean distance of points in a 3-dimensional system for each value of R. G, and B. The closest value is found by calculating the Euclidean distance for each R. G, and B value using Equation 2. ce Oeyce ) ycu = . ceycu Oeyceycc ) 255 . yc ycc Where x represents the respective values of R. G, and B, fo is the sensor output frequency, fw is the white frequency, and fd is the dark frequency, which serves as the baseline frequency The dark frequency is determined based on the highest frequency value when the sensor detects a black object, while the white frequency is determined based on the lowest value when the sensor detects a white object. These two frequencies are measured initially before measuring the frequencies of other colored objects. Thus, the sensor output frequency for other colored objects falls within the range defined by the white and dark frequencies. To enable the device to predict the color of papers and Munsell soil codes, the RGB values of each type of color paper and soil must be recorded and stored in the microcontroller's memory as the database. The RGB values of standard color paper . were measured under two conditions . ithout the probe and using the prob. to evaluate the influence of environmental light on the measurements. The color paper was produced by Sinar Dunia (Product Name: Origami Color Pape. and purchased through the online marketplace Tokopedia. According to the manufacturer, it is ya. cI, ya, yaA) = Oo. cIycc Oe ycIyc )2 . aycc Oe yayc )2 . aAycc Oe yaAyc )2. Where D (R. B) is the Euclidean distance. Rd. Gd, and Bd are respectively the Red. Green, and Blue values of the data group in the database, while Ru. Gu, and Bu are respectively the values Red. Green and Blue unknown data to be classified. When the sensor sends new data to the microcontroller, it is processed by a classification algorithm using the Euclidean distance method. The nearest Euclidean distance, calculated from Equation 2, determines if the database value matches a color or color code in the MSCC. Figure 1e illustrates this In measurement, precision reflects the consistency and repeatability of a series of measurements (McAlinden et al. Schryder et al. , 2. It shows how closely multiple measurements of the same quantity agree when taken under the same conditions. High precision means repeated Syafutra et al. SAINS TANAH Ae Journal of Soil Science and Agroclimatology, 22. , 2025 measurements yield similar results, which is essential for ensuring reliability. However, the measurement can be precise but not accurate if it consistently produces similar results far from the actual value. The percentage of precision can be calculated using the Coefficient of Variation (CV), which is the percentage of the standard deviation to the The lower CV indicates higher precision, because the measurement values are more consistent with the mean. The precision level of the developed device was evaluated based on how close the RGB value measurement results of the same object were when measured repeatedly, indicated by the small CV value. On the other hand, the accuracy refers to how close a measured value is to the actual or accepted value, indicating the validity of the measurement (McAlinden et al. , 2015. Schryder et al. , 2. High accuracy means minimal systematic errors, resulting in measurements that closely match the exact value. Accuracy is often assessed by calculating the absolute or relative difference between the measured and actual values, with more minor differences indicating greater accuracy. In this study, the accuracy of the measurement results by the developed device was evaluated based on the device's ability to determine the color of the colored paper . est pape. and the Munsell code of the soil . est soi. The RGB values of each type of colored paper and the RGB values of the Munsell code of the soil color have been registered in the device database. If the device can determine the color of the test paper and the code of the test soil color correctly, then the accuracy is 100%. if wrong, 0%. microcontroller system as the central processing unit (CPU). Figure 3a shows the main components of the device including the black probe . ontaining the LED. TCS3200 sensor, and sample holde. , the display screen (Nokia5. for measurement results, the measurement button, the battery charging port, and the power switch, which were compactly arranged in the black box with size 7. 5 cm y 10 cm y 3. 5 cm. Figure 3b-c. shows the device when used to measure color on several colored paper samples, it can be seen that the device can detect the color of the test sample well. Measurement of the output frequency of various test papers color Figure 4a shows the results of frequency measurements of various color papers by the device, which are carried out The frequency measurements are carried out under two conditions: without the probe and using the probe. The condition without the probe means that the probe was directed directly to the test color paper . he probe cover is not use. The condition using the probe means that the test color paper is cut in a circle with a diameter according to the inner diameter of the sample holder, inserted into the sample holder, and the probe is directed directly to the sample holder so that the sample holder covers the probe. For each color of the test paper, the device produces three types of frequencies representing the red, green, and blue filters, with a maximum frequency output scale of 100% (Fan et al. , 2017. Liu & Duan, 2020. Schmidt & Ahn, 2. ee Table 1, for details of filter settings and output frequency scale. The figure shows that the standard deviation of the measurement results of three types of frequencies on the same test paper color is minimal, indicating the high precision or consistency of the device's measurements. Figure 4b shows the percentage reduction in output frequency when measurements are made using the probe. a decrease of more than 60% is seen, which will significantly save the use of microcontroller memory. RESULTS Integration of all components of the color detection A photograph of the developed device can be seen in Figure 3. This soil color detection device uses the TCS3200 sensor as the color detector and the minimum Figure 3. The photograph of . the developed color detector with its features. It is used to detect color paper with color, . orange, and . The developed color detector can determine the color precisely Syafutra et al. SAINS TANAH Ae Journal of Soil Science and Agroclimatology, 22. , 2025 Table 2. The RGB values derived from TCS2300 output frequency conversion when detecting light reflection from standard test soil labeled with Munsell code. Soil color notation Color Description Red Green Blue 10R 7/4 Pale red 105 A 2 57 A 0 3 A 0. 5YR 5/8 Strong brown 7 A 0. 3 A 0. GLEY1 2. 7 A 0. 3 A 0. 3 A 0. GLEY2 8/10B light bluish gray 158 A 2 165 A 1 122 A 0 Measurement Frequency of soil color on MSCC and frequency mapping to the 8-bit RGB value range The measurement results of three types of frequencies from each soil color on MSCC, which were then automatically mapped by the microcontroller to the RGB value range, can be seen in Table 2. The mapping results make the object's color detected by the device in the range of 0 - 255, significantly reducing the microcontroller memory because only 8 bits of memory are needed to store one R. G, or B value. The RGB value of each MSCC notation color is stored in the microcontroller database. Then, it becomes a reference RGB value for determining the notation or color of the soil to be It can be seen that the standard deviation value of RGB measurements conducted repeatedly to the same MSCC notation is minimal, indicating high device measurement accuracy or consistency. namely: 10R 7/4, 7. 5YR 5/8. GLEY1 2. 5/N, and GLEY2 8/10B. The 10R 7/4 and 7. 5YR 5/8 description colors are pale red and strong brown, respectively. Pale red and strong brown soils contain relatively high amounts of iron oxides (Hematite (H. Goethite (G. , and Maghemite (Mg. ) (Hong et al. Long et al. , 2016. Silva et al. , 2. Both Hm and Gt are primary iron oxides found in soils. The Hm is often associated with red hues, while Gt contributes to yellowish-brown Both minerals are critical indicators of soil formation processes and environmental conditions (Hong et al. , 2016. Saparullah et al. , 2024. Silva et al. , 2. Mgh is iron oxide, which is also present in soils and often linked with magnetic It forms under specific climatic conditions and can transform into hematite under high rainfall regimes (Long et , 2. The GLEY1 2. 5/N and GLEY2 8/10B colors are known as gley colors, typically associated with waterlogged conditions, such as those in rice fields. Gley soils often exhibit greenish or olive-gray hues due to ferric iron-rich minerals, such as smectites . ontronite or Fe-rich beidellit. and oxyhydroxides like goethite. These minerals, combined with gray or black components such as manganese compounds and organic matter, create the characteristic gley colors (Gymez Samus et al. , 2021. Harini et al. , 2. Table 4 presents data related to the color notation of the test soil identified by the device and displayed on the LCD screen, as well as the percentage of accuracy of the In each case, the device successfully displayed the color notation on the LCD screen, precisely the same as the soil color notation with the tested soil, with 100% accuracy. These results indicate that the device has a very accurate ability to identify and determine soil color based on the MSCC notation that has been registered in its database. The absence of any difference between the actual soil color and that displayed on the LCD screen indicates that this system is reliable and consistent. Thus, the developed color measurement system is ready to be adopted or applied in various fields that require color determination of observed objects, such as agriculture, soil science, and the environment. Measurement of the accuracy of the device to determine the paper color and the MSCC notation of the test soil Validation and accuracy testing of the device for determining the color of the test paper were carried out in the following manner: the device was used to determine the color of 12 papers with different colors. The test results are shown in Table 3, it can be seen that the device can accurately determine the color of the test paper, as indicated by an accuracy value of 100%. Four types of soil with distinctive colors are used to test the device's accuracy in determining the MSCC notation of the test soil. These four types of soil are first identified and labeled with MSCC notation (Munsell Color Company, 2. Table 3. Validation of the developed device in determining the paper color Paper color Accuracy (%) Observer Developed device Black Black White White Red Red Pink Pink Orange Orange Yellow Yellow Green Green Purple Purple Cyan Cyan Gray Gray Blue Blue Brown Brown DISCUSSION The developed device's small size . 5 cm y 10 cm y 3. provides significant advantages in terms of portability, ease of use, efficiency, and comfort. It is also equipped with a rechargeable battery power source, which, of course, greatly supports survey activities in the field. Devices equipped with rechargeable batteries provide high mobility, ensure sufficient power availability, increase efficiency, reduce dependence on external power sources, and support longer usage duration. Syafutra et al. SAINS TANAH Ae Journal of Soil Science and Agroclimatology, 22. , 2025 Figure 4. The output frequency of the TCS3200 sensor from measuring different colored paper samples without and with the probe, with particular active photodiode conditions, . the percentage decreases in frequency values when measurements were taken within the probe. Notes: In Figure . , the top . ed filte. , middle . reen filte. , and bottom . lue filte. graph shows the output frequency for the particular active photodiode. The condition of the TCS3200 sensor pins to control activated photodiode (Table . , the red filter is S2(L) and S3(L), the green filter is S2(H) and S3(H), and the blue filter is S2(L) and S3(H). It shows that a significant decrease in frequency (>60%) occurs when measurements are taken inside the probe, which will significantly save the microcontroller's memory usage The developed device uses the TCS3200 light sensor to detect color by measuring the intensity of light reflection from the detection object and converting it to frequency so that it can be recorded by the microcontroller (Huynh et al. Mohd Khairudin et al. , 2. To start the measurement, the user presses the measurement button It is equipped with a sensor probe to avoid environmental light during detection, ensuring that the measurement results remain stable and accurate. Measurement results are displayed on the LCD, making it easy for users to read and record color data. The on/off switch button facilitates easy operation and is equipped with the rechargeable battery, supporting field use. Using the ATmega328P microcontroller as the central processing unit, with AVR 8-bit Reduced Instruction Set Computer architecture and clock speeds of up to 20 MHz, ensures measurements can be made quickly and efficiently (Agmal et , 2021. Kim & Seo, 2. All these features make this portable color detector a practical and reliable solution for soil color classification and other color detection that requires high precision. Photographs of the developed device can be seen in Figure 3. Measurement results of three output frequencies of the TCS3200 sensor when receiving reflected light from various colored papers with uniform color density (Fig. Table 4. Validation of developed device in determining the color code of test soil Soil color notation Accuracy (%) Observer Developed Device 10R 7/4 10R 7/4 5YR 5/8 5YR 5/8 GLEY1 2. GLEY1 2. GLEY2 8/10B GLEY2 8/10B These frequencies are the frequencies when the active photodiode of the TCS3200 sensor is the photodiode that detects Red. Green, and Blue colors with the maximum scale (Fan et al. , 2017. Liu & Duan, 2020. Schmidt & Ahn, 2. (Table . This sensor has a high resolution in converting color changes to frequency, which can be seen in the frequency values of black and white colors, which have a very large Color paper with various color variations is used to test the sensor. It can also be seen that testing samples inside the sensor probe can reduce the output frequency value or read by the microcontroller by > 65% (Fig. however, it does not change the detection trend or only reduces the frequency value by a factor that is not significantly different for each color. The decrease is thought to be because the distance between the sensor and the sample inside the probe is more significant . 5 c. than Syafutra et al. SAINS TANAH Ae Journal of Soil Science and Agroclimatology, 22. , 2025 without the probe . 7 c. This reduced output frequency value can save memory usage from the microcontroller. It is also noticeable that, in the test without the probe, the detected frequency value of the white paper is lower than that of the other colors. We suspect this is due to the contribution of light from the surrounding environment. Thus, the measurement carried out inside the probe is a solution to the influence of light from the surrounding environment so that the color detection of the detected object can be carried out precisely (Bao et al. , 2018. Li et al. Nixon et al. , 2020. Ochoa-Lypez et al. , 2. In measuring the output frequency of the TCS3200 sensor against standard soil color at MSCC. The frequency value is mapped to the RGB range using linear interpolation to filter noise at the detected frequency. The RGB value is set in the range 0 - 255. the selection of this range is equivalent to the size of the microcontroller memory of 1 byte. With this small size, more data can be stored (Kim & Seo, 2. In this measurement, the sensor frequency scale is set at 100% (Table . This is done because the soil color chart has a rich color combination, so the significant frequency range value is needed to distinguish adjacent colors (Fan et al. , 2017. Schmidt & Ahn, 2019. Solys et al. , 2. The resulting RGB values of the tested soil types and their labels are presented in Table 2. The RGB value data and the Munsell code for each type of standard soil measured are stored in the microcontroller IC memory as a database. The database will be used as a reference in the classification algorithm embedded in the microcontroller, where new data from the test soil will be compared with the database using the closest Euclidean distance method (Fan et al. , 2017. Nixon et al. , 2020. Pegalajar et al. , 2. New data with the closest RGB value to one of the data groups in the database will be classified into that group, and its color notation will be displayed on the LCD. Table 3 shows the test results of the developed device in determining the color code of the test soil. In this test, four types of test soil were selected with Munsell codes registered in the microcontroller memory database. The tool can be seen to classify the color of the test soil and correctly display the Munsell code of the test soil. From the test results, we found that errors in detecting soil color can occur when measurements are not taken inside the probe, which we suspect is due to interference from ambient light. The portable color detector developed in this research holds significant promise for agricultural applications. Its capabilities extend to assisting farmers in assessing soil fertility, conducting regular soil condition checks, and optimizing fertilizer usage through precise soil color analysis. This is because soil color analysis is closely related to soil properties such as organic matter, iron content, and water Soil organic matter is associated with total nitrogen (N) content, and it will influence the availability of N to plants. This information helps manage organic or inorganic synthetic fertilizers such as N or Fe in location-specific (Moritsuka et al. Moreover, the device offers functionality for determining the optimal timing for planting crops based on soil moisture and temperature levels. To enhance its utility, future studies could focus on advancing soil analysis algorithms, integrating IoT technology for continuous realtime monitoring, conducting extensive field trials, and developing user-friendly applications to aid farmers in interpreting gathered data. The developed device becomes indispensable in promoting more efficient, effective, and environmentally sustainable farming practices. Its potential impact lies in providing farmers with actionable insights derived from comprehensive soil analysis, enabling them to make informed decisions that optimize agricultural output (Schmidt & Ahn, 2. CONCLUSION The developed soil color detection device is portable . cm y 10 cm y 3. 5 c. with the rechargeable battery, making it practical and efficient for field use. It employs a TCS3200 sensor to detect color by measuring reflected light intensity and converting it into frequency, processed by the ATmega328P microcontroller. Using the probe minimizes environmental light interference and ensures consistent and highly accurate color measurements for colored paper and standard soil color notations from the MSCC. The measured frequency outputs are converted into RGB values . and stored in the microcontroller database, enabling soil color classification using the nearest Euclidean distance algorithm. Validation tests demonstrated 100% accuracy in detecting paper colors and soil color notations, establishing the device as reliable for soil color analysis. Its potential applications include agriculture, enabling soil fertility analysis, soil condition monitoring, and optimizing fertilizer use based on soil properties. Further development, such as integrating IoT technology and advanced soil analysis algorithms, could enhance the device's functionality, supporting more efficient, effective, and sustainable agricultural practices. Declaration of Competing Interest The authors declare that no competing financial or personal interests may appear to influence the work reported in this paper. References