Prediction of melon sweetness using a mini spectrometer C11708MA
Abstract
This study evaluates the feasibility of using a C11708MA mini-spectrometer for the non-destructive prediction of melon sweetness (°Brix). The spectrometer was integrated with an STM32 microcontroller to acquire and transmit spectral data to a computer for machine-learning-based prediction. Spectra in the range of 640–1050 nm were collected from 50 melons using a multi-point sampling strategy. Preprocessing techniques, including Savitzky–Golay filtering, standard normal variate, multiplicative scatter correction, and their combinations, were applied before developing partial least squares regression (PLS) and support vector regression (SVR) models. SVR generally outperformed PLS, achieving RPD values of about 1.7–1.8, indicating acceptable prediction capability for rapid screening. These results are comparable to previous studies using mini-spectrometers and highlight the potential for developing low-cost handheld spectroscopic devices for rapid fruit quality assessment.
Tóm tắt
Khả năng ứng dụng phổ kế mini C11708MA trong dự đoán không phá hủy độ ngọt (°Brix) của dưa lưới được đánh giá trong nghiên cứu. Phổ kế được tích hợp với vi điều khiển STM32 để thu nhận và truyền dữ liệu phổ về máy tính, nơi mô hình học máy được sử dụng để dự đoán °Brix. Phổ trong dải 640–1050 nm được thu thập từ 50 quả dưa lưới theo chiến lược lấy mẫu đa điểm. Các kỹ thuật tiền xử lý như lọc Savitzky–Golay, biến chuẩn hóa, hiệu chỉnh tán xạ nhân và các tổ hợp của chúng được áp dụng trước khi xây dựng mô hình hồi quy bình phương tối thiểu từng phần (PLS) và vector hỗ trợ (SVR). Kết quả cho thấy SVR thường cho hiệu suất tốt hơn PLS, với RPD khoảng 1,7–1,8, cho thấy khả năng dự đoán chấp nhận được cho các ứng dụng sàng lọc nhanh. Kết quả này tương đương một số nghiên cứu trước đây sử dụng phổ kế mini, cho thấy tiềm năng phát triển thiết bị quang phổ cầm tay chi phí thấp cho đánh giá nhanh chất lượng nông sản.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
References
Cevoli, C., Iaccheri, E., Fabbri, A., & Ragni, L. (2024). Data fusion of FT-NIR spectroscopy and Vis/NIR hyperspectral imaging to predict quality parameters of yellow flesh “Jintao” kiwifruit. Biosystems Engineering, 237, 157–169. https://doi.org/10.1016/j.biosystemseng.2023.12.011
Cozzolino, D., Liu, L., Cynkar, W. U., Dambergs, R. G., Janik, L., Colby, C. B., & Gishen, M. (2007). Effect of temperature variation on the visible and near infrared spectra of wine and the consequences on the partial least square calibrations developed to measure chemical composition. Analytica Chimica Acta, 588(2), 224–230.
https://doi.org/10.1016/j.aca.2007.01.079
Dhanoa, M. S., López, S., Sanderson, R., Lister, S. J., Barnes, R. J., Ellis, J. L., & France, J. (2023). Methodology adjusting for least squares regression slope in the application of multiplicative scatter correction to near-infrared spectra of forage feed samples. Journal of Chemometrics, 37(11), 3511. https://doi.org/10.1002/cem.3511
Ercan, U., Sonmez, I., Kabaş, A., Kabas, O., Calık Zyambo, B., Gölükcü, M., & Paraschiv, G. (2024). Quantitative assessment of brix in grafted melon cultivars: a machine learning and regression-based approach. Foods, 13, 3858. https://doi.org/10.3390/foods13233858
Firago, V. A., Levkovich, N. V., & Shuliko, K. I. (2022). Diffuse Reflectance Spectrophotometers Based on C12880MA and C11708MA Mini-Spectrometers Hamamatsu. Devices and Methods of Measurements, 13(2), 93–104. https://doi.org/10.21122/2220-9506-2022-13-2-93-104
Gómez-García, R., Campos, D. A., Aguilar, C. N., & Madureira, A. R. (2020). Valorization of melon fruit (Cucumis melo L .) by-products : Phytochemical and Biofunctional properties with Emphasis on Recent Trends and Advances. Trends in Food Science & Technology, 99, 507–519. https://doi.org/10.1016/j.tifs.2020.03.033
Hamamatsu Photonics K.K. (2022). Mini-spectrometers (MS series): C10988MA-01 and C11708MA.
https://www.hamamatsu.com/content/dam/hamamatsu-photonics/sites/documents/99_SALES_LIBRARY/ssd/c10988ma-01_etc_kacc1169e.pdf
Han, C., Jifan, Y., Hao, T., Jinshan, Y., & Huirong, X. (2023). Evaluation of the optical layout and sample size on online detection of apple watercore and SSC using Vis/NIR spectroscopy. Journal of Food Composition and Analysis, 123, 105528.
https://doi.org/10.1016/j.jfca.2023.105528
Hotra, O., Firago, V., Levkovich, N., & Shuliko, K. (2022). Investigation of the Possibility of Using Microspectrometers Based on CMOS Photodiode Arrays in Small‐Sized Devices for Optical Diagnostics. Sensors, 22(11). https://doi.org/10.3390/s22114195
Kasampalis, D. S., Tsouvaltzis, P., & Siomos, A. S. (2025). Assessment of melon fruit nutritional composition using VIS / NIR / SWIR spectroscopy coupled with chemometrics. Horticulturae, 11(6), 658. https://doi.org/10.3390/horticulturae11060658
Khumaidi, A., & Raafi’udin, R. (2022). Effects of oversampling smote and spectral transformations in the classification of mango cultivars using near-infrared spectroscopy. International Journal on Advanced Science, Engineering and Information Technology, 12(3), 1047–1053. https://doi.org/10.18517/ijaseit.12.3.16001
Kusumiyati, Mubarok, S., Sutari, W., & Hadiwijaya, Y. (2021). Application of spectra pre-treatments on firmness assessment of intact sapodilla using vis-nir spectroscopy. IOP Conference Series: Earth and Environmental Science, 644, 012001. https://doi.org/10.1088/1755-1315/644/1/012001
Lazim, S. S. R. M., Nawi, M. N., Bejo, S. K., Shariff, A. R. M., & Abdullah, N. (2022). Prediction and classification of soluble solid contents to determine the maturity level of watermelon using visible and shortwave near infrared spectroscopy. International Food Research Journal, 29(6), 1372–1379. https://doi.org/10.47836/ifrj.29.6.13
Li, H., Zhang, M., Shen, M., Zhang, Z., Zhang, B., Zhang, H., Hu, J., Ren, X., Xing, L., & Zhao, J. (2022). Effect of ambient temperature on the model stability of handheld devices for predicting the apple soluble solids content. European Journal of Agronomy, 133, 126430. https://doi.org/10.1016/j.eja.2021.126430
Liu, H., Wei, Z., Lu, M., Gao, P., Li, J., Zhao, J., & Hu, J. (2024). A Vis/NIR device for detecting moldy apple cores using spectral shape features. Computers and Electronics in Agriculture, 220, 108898. https://doi.org/10.1016/j.compag.2024.108898
Mekonnen, B. K., Yang, W., Hsieh, T.-H., Liaw, S.-K., & Yang, F.-L. (2020). Accurate prediction of glucose concentration and identification of major contributing features from hardly distinguishable near-infrared spectroscopy. Biomedical Signal Processing and Control, 59, 101923. https://doi.org/10.1016/j.bspc.2020.101923
Miloš, B., & Bensa, A. (2017). Prediction of soil organic carbon using VIS-NIR spectroscopy: Application to Red Mediterranean soils from Croatia. Eurasian Journal of Soil Science, 6(4), 365–373. https://doi.org/10.3390/s25165045
Pahlawan, M. F. R., Wati, R. K., & Masithoh, R. E. (2021). Development of a low-cost modular VIS/NIR spectroscopy for predicting soluble solid content of banana. IOP Conference Series: Earth and Environmental Science, 644(1). https://doi.org/10.1088/1755-1315/644/1/012047
Pourdarbani, R., Sabzi, S., & Arribas, J. I. (2021). Nondestructive estimation of three apple fruit properties at various ripening levels with optimal Vis-NIR spectral wavelength regression data. Heliyon, 7(9). https://doi.org/10.1016/j.heliyon.2021.e07942
Pratiwi, E. Z. D., Pahlawan, M. F. R., Rahmi, D. N., Amanah, H. Z., & Masithoh, R. E. (2023). Non-destructive evaluation of soluble solid content in fruits with various skin thicknesses using visible-shortwave near-infrared spectroscopy. Open Agriculture, 8(1), 1–12. https://doi.org/10.1515/opag-2022-0183
Products, F., & Inspection, Q. (2019). Applications of Non-destructive Technologies for Agricultural and Food Products Quality Inspection. Sensors, 19, 846. https://doi.org/10.3390/s19040846
Sohaib Ali Shah, S., Zeb, A., Qureshi, W. S., Malik, A. U., Tiwana, M., Walsh, K., Amin, M., Alasmary, W., & Alanazi, E. (2021). Mango maturity classification instead of maturity index estimation: A new approach towards handheld NIR spectroscopy. Infrared Physics and Technology, 115, 103639. https://doi.org/10.1016/j.infrared.2021.103639
Tan, H., Hu, Y., Ma, B., Yu, G., & Li, Y. (2024). An improved DCGAN model : Data augmentation of hyperspectral image for identification pesticide residues of Hami melon. Food Control, 157, 110168. https://doi.org/10.1016/j.foodcont.2023.110168
Wang, C., Luo, X., Guo, Z., Wang, A., Zhou, R., & Cai, J. (2025). Influence of the peel on online detecting soluble solids content of pomelo using Vis-NIR spectroscopy coupled with chemometric analysis. Food Control, 167, 110777. https://doi.org/10.1016/j.foodcont.2024.110777
Wang, G., Luo, Y., Liu, Y., Huo, Y., Ouyang, A., & Zhu, D. (2025). Relationship between optical properties and internal quality of Orah Mandarins during storage. Scientific Reports, 15, 12208.
https://doi.org//10.1038/s41598-025-95261-x 1
Windig, W., Shaver, J., & Bro, R. (2008). Loopy MSC: A simple way to improve multiplicative scatter correction. Applied Spectroscopy, 62(10), 1153–1159. https://doi.org/10.1366/000370208786049097
Wu, G., Abid, M., Zerara, M., Coileain, C. O., Chang, C. R., & Wu, H. C. (2023). Miniaturized Computational Spectrometer. IEEE Nanotechnology Magazine, 17(6), 36–42. https://doi.org/10.1109/MNANO.2023.3316870
Yang, S., Guo, W., Wang, J., Li, S., & Zeng, S. (2024). Optical properties of melon tissues and Monte Carlo simulation of light propagation through melon fruit. Postharvest Biology and Technology, 207, 112616. https://doi.org/10.1016/j.postharvbio.2023.112616
Yang, Y., Ma, S., Qi, F., Wang, F., & Xu, H. (2025). Application of vis/nir spectroscopy in the rapid and non-destructive prediction of soluble solid content in milk jujubes. Agriculture, 15, 1382. https://doi.org/10.3390/agriculture15131382
Yang, Y., Zhao, C., Huang, W., Tian, X., Fan, S., Wang, Q., & Li, J. (2022). Optimization and compensation of models on tomato soluble solids content assessment with online Vis/NIRS diffuse transmission system. Infrared Physics and Technology, 121, 104050. https://doi.org/10.1016/j.infrared.2022.104050
Zeb, A., Qureshi, W. S., Ghafoor, A., Malik, A., Imran, M., Iqbal, J., & Alanazi, E. (2021). Is this melon sweet? A quantitative classification for near-infrared spectroscopy. Infrared Physics & Technology, 114, 103645. https://doi.org/10.1016/J.INFRARED.2021.103645
Zhang, T., Li, Y., & Wang, M. (2024). Prediction of soil organic carbon and total nitrogen affected by mine using Vis – NIR spectroscopy coupled with machine learning algorithms in calcareous soils. Scientific Reports, 14(1), 28014. https://doi.org/10.1038/s41598-024-73761-6 1
Zheng, G., Ryu, D., Jiao, C., Xie, X., & Cui, X. (2019). Visible and Near-Infrared Reflectance Spectroscopy Analysis of a Coastal Soil Chronosequence. Remote Sensing, 11, 2336. https://doi.org/10.3390/rs11202336