Colorimeter design for dry food-products inspection using TCS3200 sensor and Arduino Mega-2560

Sulistyo Prabowo, Chandra Kadwa Utama Sutrisno, Krishna Purnawan Candra, Anton Rahmadi, Yuliani Yuliani


This report describes the successful construction of a Colorimeter CK20.1 prototype using a TCS3200 sensor based on the Arduino Mega-2560 microcontroller for solid foodstuffs inspection. The sample color exposed is presented in RGB form. In this experiment, a commercial colorimeter (ColorFlex EZ Spectrophotometer, with the output, is in L*a*b* form) was applied as a validator of the prototype quality performance on color reading for green beans, wheat flour, palm sugar, ground coffee, and cocoa powder. Data were analyzed for mean comparison using t-test or Mann-Whitney for normally or not normally distributed data, respectively. Before data analysis, the RGB data provided by the prototype was transformed to L*a*b* by the template available from and vice versa for the data provided by the ColorFlex EZ. The results showed that color component measurement data from the Colorimeter CK20.1 prototype and the Color FlexEZ were significantly different (p<0.05) for all the foodstuffs observed; however, the color produced by each color component is likely very similar visually. Further development of the CK2.1 prototype is being done to provide a cheap and practical color detector.


Arduino Mega 2560; Color analyzer; Colorimeter; Food color; TCS3200 sensor

Full Text:



Ammann, J., Stucki, M., and Siegrist, M. (2020) ‘True colours : Advantages and challenges of virtual reality in a sensory science experiment on the influence of colour on flavour identification’, Food Quality and Preference, 86, pp. 1-10

ams-OSRAM AG (2022) TCS3200 Color Sensor, [Online]. Available at: (Accessed: 23 November 2022)

Annette, M. and Stafford, L. D. (2023) ‘How colour influences taste perception in adult picky eaters’, Food Quality and Preference, 105, pp. 1-7

Arduino (2022) Ardunio hardware, [Online]. Available at: (Accessed: 22 November 2022).

Arduino (2023) Product Reference Manual SKU: A000067, Arduino® MEGA 2560 Rev3 [Online]. Available at: (Accessed: 12 January 2023).

Chen, J. and Zhu, X. (1996) ‘White balance tester with color sensor for industrial applications’, in Mu, G., Jin, G., and Sincerbox, G. T. (eds) Proceeding SPIE 2866, International Conference on Holography and Optical Information Processing (ICHOIP ’96). Nanjing, China: SPIE Press, pp. 443–445

Colorizer (2020) Color picker [Online]. Available at: (Accessed: 23 November 2020).

Dang, D. S., Buhler, J. F., Stafford, C. D., Taylor, M. J., Shippen, J. E., Dai, X., England, E. M., and Matarneh, S. K. (2021) ‘Nix Pro 2 and Color Muse as potential colorimeters for evaluating color in foods’, LWT, 147, pp. 1-8

Dejan (2022) Ultrasonic Sensor HC-SR04 and Arduino - Complete guide, [Online]. Available at: (Accessed: 23 November 2023)

HunterLab (2012) Measuring Color using Hunter L, a, b versus CIE 1976 L*a*b* [Online]. Available at: https:// (Accessed: 23 November 2020)

HunterLab (2012) Spectrophotometer [Online]. Available at: (Accessed: 3 January 2023)

ITEAD Studio (2011) NX4832K035 - Nextion, [Online]. Available at: (Accessed: 23 November 2020)

Iwanto, Suryadi, D. and Priyatman, H. (2018) ‘Rancang bangun alat pendeteksi kadar boraks pada makanan menggunakan sensor warna TCS3200 berbasis Arduino Uno R3 (Design of a tool for detecting borax levels in food using the TCS3200 color sensor based on Arduino Uno R3)’, Jurnal Teknik Elektro Universitas Tanjung Pura, 2(1), pp. 1-9 [In Indonesian]

Kennedy, O. B., Stewart-Knox, B. J., Mitchell, P. C., and Thurnham, D. I., (2005) ‘Flesh colour dominates consumer preference for chicken’, Appetite, 44, pp. 181–186

Kutlu, N., Pandiselvam, R., Kamiloglu, A., Saka, I., Sruthi, N. U., Kothakota, A., Socol, C. T., and Maerescu, C. M. (2022) ‘Impact of ultrasonication applications on color profile of foods’, Ultrasonics Sonochemistry, 89, pp. 1-17

Lan, T., Wang, J., Yuan, Q., Lei, Y., Peng, W., Zhang, M., Li, X., Sun, X., and Ma, T. (2022) ‘Evaluation of the color and aroma characteristics of commercially available Chinese kiwi wine via intelligent sensory technology and gas chromatography-mass spectrometry’, Food Chemistry: X, 15, pp. 1-10

Li, Q., Xioang, Y., Yang, W. L., and Han, J., and Liang, H. (2014) ‘Study on color analyzer based on the multiplexing of TCS3200 color sensor and microcontroller’, International Journal of Hybrid Information Technology, 7(5), pp. 167–174

Li, Y., and Zhang, L. (2011) ‘An automatic determination method based on color sensor at the end point of the titration’, Proceeding 2nd International Conference on Mechanic Automation and Control Engineering, MACE 2011, pp. 3836–3838

Meutia, Y. R., Susanti, I. and Siregar, N. C. (2019) ‘Uji stabilitas warna hasil kopigmentasi asam tanat dan asam sinapat pada pigmen brazilin asal kayu Secang (Caesalpinia sappan L.) (Color stability test of tannic acid and cinnamic acid co-pigmentation results on brazilin pigment from Secang wood (Caesalpinia sappan L.)’, Warta IHP, 36(1), pp. 30–39 [In Indonesian]

Pratama, H., Haritman, E. and Gunawan, T. (2012) ‘Akuisisi data kinerja sensor ultrasonik berbasis sistem komunikasi serial menggunakan mikrokontroler Atmega 32 (Acquisition of ultrasonic sensor performance data based on a serial communication system using an Atmega 32 microcontroller)’, Electrans, 11(2), pp. 36–43 [In Indonesian]

Ratnawati, D. and Vivianti (2018) ‘Alat pendeteksi warna menggunakan sensor warna TCS3200 dan Arduino Nano (The color detection tool uses the TCS3200 color sensor and Arduino Nano)’, Prosiding Seminar Nasional Vokasi Indonesia. pp. 167–170 [In Indonesian]

Ririn, N., and Usman, A. (2011) Pengembangan Metode Pengukuran Warna Menggunakan KamAera CCD (Charge Coupled Device) dan Image Processing (Development of Color Measurement Method Using KamAera CCD (Charge Coupled Device) and Image Processing). Undergraduate Theses. Institut Pertanian Bogor, Bogor [In Indonesian]

Styandi, A. D., Syauqy, D. and Kurniawan, W. (2019) ‘Klasifikasi umur padi berdasarkan data sensor warna dengan menggunakan metode K-NN (Rice age classification based on color sensor data using the K-NN method)’, Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, 3(9), pp. 8343–8350 [In Indonesian]

Thao, D. T. V., Weng, W. T., Hieu N, V., Chang, C. C., and Wang, G. J. (2022) ‘A flexible and stretchable photonic crystal film with sensitive structural color-changing properties for spoiled milk detection’, Food Chemistry: X, 16, pp. 1-8

Usman, A. (2005) Pengolahan Citra Digital dan Teknik Pemrogramannya (Digital Image Processing and Programming Techniques). Yogyakarta: Graha Ilmu.

Zhou, J., Wang, M., Carrillo, C., Hassoun, A., Collado, M. C., and Babra, F. J. (2022) ‘Application of omics in food color’, Current Opinion in Food Science, 46, pp 1-9

Zulkarnain, I., Ramadhan, M. and Anwar, B. (2019) ‘Implementasi alat pendeteksi warna benda menggunakan fuzzy logic dengan sensor TCS3200 berbasis arduino (Implementation of an object color detector using fuzzy logic with an arduino-based TCS3200 sensor)’, Jurnal Teknologi Sistem Informasi dan Sistem Komputer TGD, 2(2), pp. 106–117 [In Indonesian]



  • There are currently no refbacks.

Copyright (c) 2023 Sulistyo Prabowo, Chandra Kadwa Utama Sutrisno, Krishna Purnawan Candra, Anton Rahmadi, Yuliani Yuliani

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.