Pengembangan Firmware Air Quality Monitoring Menggunakan Sensor Sensirion SPS30 dan MCU STM32 dengan Protokol Komunikasi I2C
I Made Pradhesta Surya Wibawa, Dr. I Wayan Mustika, S.T., M.Eng.; Ir. Agus Bejo, S.T., M.Eng., D.Eng., IPM.
2023 | Skripsi | TEKNIK ELEKTRO
Udara dapat tercemar oleh berbagai macam zat pencemar, salah satunya adalah partikulat (PM2.5 adn PM10). Keberadaan partikulat di udara memiliki dampak yang berbahaya bagi kesehatan makhluk hidup jika terhirup. Penelitian ini memiliki tujuan untuk mengembangkan firmware sistem pemantauan konsentrasi partikulat di udara sehingga dapat diketahui indeks kualitas udaranya berdasarkan standar ISPU dan mempelajari secara detail terkait implementasi protokol komunikasi I2C antara mikrokontroler dan sensor.
Sistem pemantauan bekerja dengan menggunakan sensor Sensirion SPS30 dan mikrokontroler STM32. Hasil pembacaan kemudian ditampilkan pada layar OLED dan disimpan di dalam komputer, yaitu Raspberry Pi 3 Model B. Firmware dikembangkan dengan membuat fungsi-fungsi untuk setiap perintah yang tersedia pada sensor. Dalam proses pengembangannya, pemahaman mengenai komunikasi I2C dibutuhkan agar perintah yang dijalankan sesuai. Algoritma pengukuran konsentrasi partikulat juga harus diperhatikan untuk menghasilkan pengukuran yang sesuai.
Firmware yang dikembangkan berhasil untuk komunikasi antara mikrokontroler dan sensor. Firmware diuji untuk mengukur konsentrasi massa partikulat di tiga lokasi yang berbeda di area UGM Press, yaitu ruang produksi, area outdoor, dan ruang showroom. Hasil pengujian menunjukkan bahwa nilai ISPU di area outdoor adalah yang terendah, yaitu 56,03 sedangkan nilai ISPU di ruang produksi adalah yang tertinggi, yaitu 60,20. Namun, secara umum indeks kualitas udara harian di ketiga lokasi tersebut berada pada level Sedang.
Air can be polluted by various kinds of pollutant, one of them is particulate matter (PM2.5 and PM10). The presence of particulate matter in the air has harmful impacts on the health of living organisms when inhaled. This research aims to develop a particulate matter concentration monitoring system firmware, so that the air quality index can be determined based on the ISPU standard, and to study in detail the implementation ofI2C communication protocol between microcontroller and sensor.
Monitoring system works using Sensirion SPS30 sensor and STM32 microcontroller. The reading results are then displayed on an OLED screen and stored in a computer, which is Raspberry Pi 3 Model B. Firmware is developed by creating functions of all the commands that available on the sensor. In the development process, understanding of I2C communication is necessary, so that the commands run well. The algorithm of particulate matter measurement should also be considered to obtain proper measurements.
The developed firmware successfully enables communication between microcontroller and sensor. The firmware was tested to measure the mass concentration of particulate matter at three different locations, i.e. production room, outdoor area, and showroom. The test result showed that the ISPU value in the outdoor area was the lowest, at 56.03, while the ISPU value in the production room was the highest, at 60.20. However, overall, the daily air quality index in all three locations was at a Moderate level.
Kata Kunci : Indeks kualitas udara, partikulat, Sensirion SPS30, STM32, I2C