Soil fertility classification from nitrogen (N), phosphorus (P), and potassium (K) values can be embedded in low-cost devices, but the architecture and hyperparameters of a Backpropagation Neural Network (BPNN) are often chosen by trial and error, and the effect of sensor uncertainty is rarely examined. This study aims to find a lightweight BPNN configuration and evaluate it under simulated sensor noise. A dataset of 200 soil samples from Bengkalis Island and Sungai Pakning, labeled into three fertility classes, was used. Hidden-layer size, learning rate, and number of epochs were explored by grid search with 5-fold stratified cross-validation repeated three times, and Gaussian noise of 0–20% of each feature's range was added to the test data. Networks with at least two hidden neurons reached 100.00% accuracy without noise, whereas one hidden neuron reached 94.50%. Within 25 epochs, accuracy rose from 32.00% at a learning rate of 0.0001 to 100.00% at 0.1. The lightweight 3–2–3 configuration (17 parameters) matched the 3–12–8–3 reference (179 parameters) at every noise level, with 95.87% versus 95.57% accuracy at 10% noise, and trained about 30 times faster. A two-neuron BPNN is therefore sufficient for this dataset. The findings are limited to simulated noise and 200 samples, so validation with real RS485 sensor readings is required.
Copyrights © 2026