Klasifikasi Kategori Hidrasi Menggunakan Conditional Statement Berdasarkan Nilai Warna Urin

Bunyamin, Altair Yahya (2026) Klasifikasi Kategori Hidrasi Menggunakan Conditional Statement Berdasarkan Nilai Warna Urin. Other thesis, Institut Teknologi Sepuluh Nopember.

[thumbnail of 2040211084_Undergraduate_Thesis.pdf] Text
2040211084_Undergraduate_Thesis.pdf - Accepted Version
Restricted to Repository staff only

Download (5MB) | Request a copy

Abstract

Penilaian status hidrasi tubuh melalui pengamatan warna urin secara visual bersifat subjektif karena dipengaruhi oleh persepsi individu, kelelahan mata, dan kondisi pencahayaan lingkungan (ambient light). Penelitian ini bertujuan merancang dan menguji prototipe instrumen klasifikasi status hidrasi otomatis yang objektif berbasis pembacaan komponen warna Red, Green, Blue (RGB) menggunakan sensor warna TCS3200 dan mikrokontroler Arduino Mega 2560. Keputusan klasifikasi diproses menggunakan logika pengondisian (conditional statement/if-else) dengan metrik berupa kecerahan rata-rata dari komponen RGB, untuk mengelompokkan sampel ke dalam tiga kategori operasional, yaitu Terhidrasi, Dehidrasi Ringan, dan Dehidrasi Berat, mengacu pada Urine Color Scale (UCS). Sistem diawali kalibrasi hitam-putih yang menetapkan rentang dinamis sensor sebesar 567–679 µs per kanal, dengan ambang klasifikasi kecerahan < 226,5 untuk Terhidrasi, 226,5–231,7 untuk Dehidrasi Ringan, dan ≥ 231,7 untuk Dehidrasi Berat. Pengujian dilakukan pada volume sampel ±150 mL, tinggi kolom cairan 9 cm, dan jarak sensor 1 cm, dengan setiap pembacaan diambil melalui 20 kali pengulangan, di bawah dua kondisi pencahayaan, yaitu kondisi terang dan kondisi gelap. Hasil penelitian menunjukkan bahwa pengendalian cahaya ambient sangat menentukan performa sistem. Pada kondisi terang terjadi saturasi, yaitu pembacaan yang mentok pada batas atas skala (nilai 254–255), dengan rentang pembacaan yang lebar (44,8–255,0) dan menimbulkan 4 kali kesalahan klasifikasi. Sebaliknya, pada kondisi gelap saturasi hilang sepenuhnya, pembacaan mengelompok rapat pada dua klaster (sekitar 219,5 dan 242,7) dengan standar deviasi 0,4–0,8, dan jumlah kesalahan klasifikasi menurun sebesar 50%, dari 4 menjadi 2 kesalahan, yang seluruhnya terjadi pada kategori Dehidrasi Ringan dengan rentang batas paling sempit. Hasil ini menunjukkan bahwa kombinasi sensor TCS3200 dan algoritma if-else di dalam ruang tertutup mampu mengklasifikasikan status hidrasi secara lebih konsisten dan real-time, dengan keluaran ditampilkan pada LCD 20×4 I2C.
===================================================================================================================================
Assessing body hydration status through visual observation of urine color is subjective because it is influenced by individual perception, eye fatigue, and ambient lighting conditions. This study aims to design and test a prototype of an objective, automated hydration status classification instrument based on readings of the Red, Green, and Blue (RGB) color components using a TCS3200 color sensor and an Arduino Mega 2560 microcontroller. Classification decisions are processed using conditional logic (conditional statements/if-else) with a metric based on the average brightness of the RGB components to group samples into three operational categories: Hydrated, Mildly Dehydrated, and Severely Dehydrated, in accordance with the Urine Color Scale (UCS). The system begins with a black-and-white calibration that sets the sensor’s dynamic range at 567–679 µs per channel, with brightness classification thresholds of < 226.5 for Hydrated, 226.5–231.7 for Mild Dehydration, and ≥ 231.7 for Severe Dehydration. Testing was conducted using a sample volume of ±150 mL, a liquid column height of 9 cm, and a sensor distance of 1 cm, with each reading taken over 20 repetitions under two lighting conditions: bright and dark. The results of the study indicate that ambient light control is a critical factor in system performance. Under bright conditions, saturation occurs—that is, readings plateau at the upper limit of the scale (values of 254–255)—with a wide reading range (44.8–255.0), resulting in four classification errors. Conversely, under dark conditions, saturation disappears completely; readings cluster tightly into two groups (around 219.5 and 242.7) with a standard deviation of 0.4–0.8, and the number of classification errors decreases by 50%, from 4 to 2 errors, all of which occur in the Mild Dehydration category with the narrowest range. These results demonstrate that the combination of the TCS3200 sensor and the if-else algorithm in a box is capable of classifying hydration status more consistently and in real time, with the output displayed on a 20×4 I2C LCD.

Item Type: Thesis (Other)
Uncontrolled Keywords: Hidrasi, Warna Urin, Sensor TCS3200, Pernyataan Kondisional, Urine Color Scale, Hydration, Urine Color, TCS3200 Sensor, Conditional Statement, Urine Color
Subjects: T Technology > TK Electrical engineering. Electronics Nuclear engineering > TK7882.B56 Biometric identification
Divisions: Faculty of Vocational > 36304-Automation Electronic Engineering
Depositing User: Altair Yahya Bunyamin
Date Deposited: 10 Aug 2026 01:26
Last Modified: 10 Aug 2026 01:26
URI: http://repository.its.ac.id/id/eprint/144243

Actions (login required)

View Item View Item