Implementation of Median Filter in Data Processing of Temperature and Humidity Monitoring System with DHT 11 and DHT 22 Sensors
DOI:
https://doi.org/10.58982/krisnadana.v4i2.723Keywords:
DHT11, DHT22, Median Filter, Noise Reduction, Temperature Data AccuracyAbstract
This research focuses on enhancing the accuracy and stability of temperature measurements obtained from DHT11 and DHT22 sensors through the application of a median filter. Data was collected using an ESP32 microcontroller and stored as a time-series dataset in a MySQL database. Given that the DHT11 sensor is more prone to inaccuracies and noise compared to the higher-precision DHT22 sensor, the median filter was implemented to minimize outliers and fluctuations in the recorded readings. The results indicate that the median filter significantly improves data stability for the DHT11 sensor, effectively reducing noise-induced anomalies. Meanwhile, for the DHT22 sensor, the filter has minimal impact due to its already high accuracy and lower susceptibility to noise. These findings demonstrate that the median filter is particularly beneficial for sensors with lower precision, offering a cost-effective method for refining temperature data in monitoring applications. The study underscores the importance of noise reduction techniques in enhancing sensor performance, making the median filter a practical solution for improving data reliability in real-time temperature monitoring systems.
References
S. Hadi, R. P. M. D. Labib, and P. D. Widayaka, “Perbandingan Akurasi Pengukuran Sensor LM35 dan Sensor DHT11 untuk Monitoring Suhu Berbasis Internet of Things,” STRING (Satuan Tulisan Ris. dan Inov. Teknol., vol. 6, no. 3, p. 269, Apr. 2022, doi: 10.30998/string.v6i3.11534.
A. H. Saptadi, “Perbandingan Akurasi Pengukuran Suhu dan Kelembaban Antara Sensor DHT11 dan DHT22,” J. INFOTEL - Inform. Telekomun. Elektron., vol. 6, no. 2, 2014, doi: 10.20895/infotel.v6i2.16.
J. Jumingin, A. Atina, and A. Juanda, “Sistem Penyiraman Tanaman Otomatis Menggunakan Sensor DHT11,” J. Ampere, vol. 7, no. 2, p. 73, Dec. 2022, doi: 10.31851/ampere.v7i2.9172.
A. Alfith, A. Effendi, A. Premadi, and Y. Saputra, “PENGUJIAN SUHU DAN KELEMBAPAN PADA ALAT PENGERING GABAH MENGGUNANAKAN SENSOR DHT11,” Ensiklopedia J., vol. 4, no. 2, 2022, doi: 10.33559/eoj.v4i2.1074.
I. W. Kinnansih and Dzulkiflih, “RANCANG BANGUN ALAT PENGONTROL SUHU DAN KELEMBAPAN PADA TEMPAT PENETASAN TELUR MENGGUNAKAN SENSOR DHT22 DAN MOTOR SWING BERBASIS IoT,” 57Jurnal Inov. Fis. Indones. , vol. 11, no. 3, 2022.
M. Storath and A. Weinmann, “Fast Median Filtering for Phase or Orientation Data,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 40, no. 3, 2018, doi: 10.1109/TPAMI.2017.2692779.
K. D. Sherwin, K. I. K. Wang, P. Thiagaraj, B. Stappers, and O. Sinnen, “Median Filters on FPGAs for Infinite Data and Large, Rectangular Windows,” ACM Trans. Reconfigurable Technol. Syst., vol. 15, no. 4, 2022, doi: 10.1145/3530273.
Y. Song and J. Liu, “An improved adaptive weighted median filter algorithm,” J. Phys. Conf. Ser., vol. 1187, no. 4, 2019, doi: 10.1088/1742-6596/1187/4/042107.
A. Pal, H. M. Rai, S. Agarwal, and N. Agarwal, “Advanced Noise-Resistant Electrocardiography Classification Using Hybrid Wavelet-Median Denoising and a Convolutional Neural Network,” Sensors, vol. 24, no. 21, 2024, doi: 10.3390/s24217033.
N. A. Almujally et al., “Biosensor-Driven IoT Wearables for Accurate Body Motion Tracking and Localization,” Sensors, vol. 24, no. 10, p. 3032, May 2024, doi: 10.3390/s24103032.
M. Zhang, J. Guo, X. Li, and R. Jin, “Data-driven anomaly detection approach for time-series streaming data,” Sensors (Switzerland), vol. 20, no. 19, pp. 1–17, 2020, doi: 10.3390/s20195646.
D. B. Tay, “Sensor network data denoising via recursive graph median filters,” Signal Processing, vol. 189, 2021, doi: 10.1016/j.sigpro.2021.108302.
D. Yulizar, S. Soekirno, N. Ananda, M. A. Prabowo, I. F. P. Perdana, and D. Aofany, Performance Analysis Comparison of DHT11, DHT22 and DS18B20 as Temperature Measurement, vol. 1. Atlantis Press International BV, 2023. doi: 10.2991/978-94-6463-232-3_5.
T. Liu, “Digital relative humidity & temperature sensor DHT11,” 2014, pp. 1–6, 2014, [Online]. Available: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Weather/RHT03.pdf
T. Liu, “Digital-output relative humidity & temperature sensor/module DHT22 (DHT22 also named as AM2302),” Aosong Electron. Co.,Ltd, vol. 22, pp. 1–10, 2015, [Online]. Available: https://www.sparkfun.com/datasheets/Sensors/Temperature/DHT22.pdf

Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Luqman Aji Kusumo

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