ELECTRA : Electrical Engineering Articles
Vol. 7 No. 1 (2026)

PREDIKSI OPERASI POMPA BAWANG MERAH MENGGUNAKAN KNN BERBASIS RASPBERRY PI

irfin Sandra Asti (Politeknik Negeri Malang)
Rizki Dwi Romadhona (Politeknik Negeri Malang)
Hari Kurnia Safitri (Politeknik Negeri Malang)
Nandaru Ramadhan (Politeknik Negeri Malang)
Rhezal Agung Ananto (Politeknik Negeri Malang)



Article Info

Publish Date
30 Sep 2026

Abstract

This study aims to develop an environmental monitoring and irrigation pump control system for shallot plants based on Raspberry Pi using the K-Nearest Neighbor (KNN) method. The system uses soil moisture 1, soil moisture 2, air temperature, and air humidity as input parameters to determine the pump condition, ON /OFF. Sensor data are processed using KNN to generate automatic pump control decisions. The system is also equipped with a web-based monitoring interface accessible via smartphone. Testing was conducted using 30 testing data with several K values. The results showed that K=5 achieved the best performance, with an accuracy of 83.33%, precision of 100.00%, recall of 68.75%, and F1-score of 81.48%. Field testing compared the KNN method with the ON/OFF method. The KNN system used 3.375 L of water, while the ON/OFF method used 11.111 L, resulting in water savings of 7.736 L or 69.62%. These results indicate that implementing KNN on Raspberry Pi has the potential to improve water-use efficiency in an automatic irrigation system for shallot plants. Keywords — shallot, automatic irrigation, K-Nearest Neighbor, Raspberry Pi, smart agriculture

Copyrights © 2026






Journal Info

Abbrev

electra

Publisher

Subject

Control & Systems Engineering Electrical & Electronics Engineering Energy Engineering

Description

Electrical Engineering Articles is scientific journal that publishes articles in the field of Electrical Engineering, Control System and Renewable Energy Application. It is a journal to encourage research publication to research scholars, academicians, professionals and student engaged in their ...