Elimensi Journal of Electrical Engineering
Vol. 4 No. 01 (2026): Elimensi : Journal of Electrical Engineering

Design of Rhodamine-B Detection System for Ketchup Based on Internet of Things (IoT) Using TCS3200 and K-NN

Mohamad Jauharul Muhsin (Kadiri Islamic University)
Diah Arie Widhining Kusumastutie (Kadiri Islamic University)
Danang Erwanto (Kadiri Islamic University)



Article Info

Publish Date
17 Sep 2026

Abstract

Rhodamin B is a synthetic dye that is prohibited from being used in food because it can harm health. This study aims to design a Rhodamin B detection system in tomato sauce based on the Internet of Things (IoT) using TCS3200 color sensors and the K-Nearest Neighbor (K-NN) method. The sensor TCS3200 used to read the RGB value of the sauce sample that had been reacted using the Rhodamin B Test Kit, then the data was processed using the K-NN method to determine the classification results. The detection results are displayed on the LCD and sent to the Firebase Realtime Database using the ESP32 so that they can be monitored in real-time. This study used a dataset consisting of 250 training samples (divided into five Level 0 to Level 4 classes with 50 samples per class) and used 10 sauce samples and tested 3 times in each with a total of 30 tests. Based on the results of testing on various K values, the following accuracy levels were produced: K=1 (86.67%), K=3 (93.33%), K=5 (96.67%), and K=7 (93.33%). The K=5 value provided the best performance by accurately classifying 29 out of 30 test samples, of which only one sample was misclassified. In addition, the quality of lighting also affects the results of sensor readings so that it affects the classification process. Thus, the system is able to detect Rhodamin B in tomato sauce well and can be used as a practical IoT-based detection alternative.

Copyrights © 2026






Journal Info

Abbrev

elimensi

Publisher

Subject

Automotive Engineering Computer Science & IT Electrical & Electronics Engineering Engineering Mechanical Engineering

Description

Articles published in cover key areas in electrical engineering such as : Electrical power and energy: Transmission and distribution, high voltage, electrical energy conversion, power electronics and drive. Telecomunication and Signal Processing: Antenna and wave propagation, network and systems, ...