sistem monitoring konsentrasi partikulat

167
TUGAS AKHIR SISTEM MONITORING KONSENTRASI PARTIKULAT Diajukan untuk memenuhi salah satu syarat Memperoleh gelar Sarjana Teknik pada Program Studi Teknik Elektro Fakultas Sains dan Teknologi Universitas Sanata Dharma Disusun oleh: LAWI SEPTIANI NIM: 165114052 JURUSAN TEKNIK ELEKTRO FAKULTAS SAINS DAN TEKNOLOGI UNIVERSITAS SANATA DHARMA YOGYAKARTA 2020 PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Upload: others

Post on 07-Jan-2022

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SISTEM MONITORING KONSENTRASI PARTIKULAT

TUGAS AKHIR

SISTEM MONITORING KONSENTRASI

PARTIKULAT

Diajukan untuk memenuhi salah satu syarat

Memperoleh gelar Sarjana Teknik pada

Program Studi Teknik Elektro

Fakultas Sains dan Teknologi Universitas Sanata Dharma

Disusun oleh:

LAWI SEPTIANI

NIM: 165114052

JURUSAN TEKNIK ELEKTRO

FAKULTAS SAINS DAN TEKNOLOGI

UNIVERSITAS SANATA DHARMA

YOGYAKARTA

2020

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 2: SISTEM MONITORING KONSENTRASI PARTIKULAT

i

TUGAS AKHIR

SISTEM MONITORING KONSENTRASI

PARTIKULAT

Diajukan untuk memenuhi salah satu syarat

Memperoleh gelar Sarjana Teknik pada

Program Studi Teknik Elektro

Fakultas Sains dan Teknologi Universitas Sanata Dharma

Disusun oleh:

LAWI SEPTIANI

NIM: 165114052

JURUSAN TEKNIK ELEKTRO

FAKULTAS SAINS DAN TEKNOLOGI

UNIVERSITAS SANATA DHARMA

YOGYAKARTA

2020

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 3: SISTEM MONITORING KONSENTRASI PARTIKULAT

ii

FINAL PROJECT

PARTICULATE CONCENTRATION MONITORING

SYSTEM

In a partial fulfilment of the requirements

for the degree of Sarjana Teknik

Department of Electrical Engineering

Faculty of Science and Technology, Sanata Dharma University

LAWI SEPTIANI

NIM: 165114052

ELECTRICAL ENGINEERING STUDY PROGRAM

DEPARTMENT OF ELECTRICAL ENGINEERING

FACULTY OF SCIENCE AND TECHNOLOGY

SANATA DHARMA UNIVERSITY

YOGYAKARTA

2020

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 4: SISTEM MONITORING KONSENTRASI PARTIKULAT

vi

HALAMAN PERSEMBAHAN DAN MOTTO HIDUP

“Sekalipun aku dapat berkata-kata dengan semua bahasa manusia dan bahasa malaikat,

tetapi jika aku tidak mempunyai kasih,

aku sama dengan gong yang berkumandang dan canang yang gemerincing”

-1Kor 13:1

Skripsi ini saya persembahkan untuk:

Tuhan Yesus Kristus yang selalu memberikan berkat dan pelindungan-Nya,

Kedua orang tua tercinta selalu mendukung dan mengasihi,

Seluruh teman, sahabat, dan orang-orang terdekat

yang selalu memberikan bantuan dan dukungan

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 5: SISTEM MONITORING KONSENTRASI PARTIKULAT

viii

INTISARI

Konsentrasi partikulat (PM) merupakan salah satu polutan yang dapat

membahayakan kesehatan manusia. Pada kota-kota besar yang padat akan kendaraan

bermotor atau aktivitas gunung berapi memiliki tingkat konsentrasi partikulat di udara

cukup tinggi. Alat monitoring konsentrasi partikulat digunakan untuk pemantauan

konsentrasi partikulat berbahaya di udara. Data konsentrasi partikulat dapat di monitoring

pada jarak dekat maupun jarak jauh (Internet Of Things) serta disimpan untuk dilakukan

analisis.

Proses kerja sistem monitoring konsentrasi partikulat dimulai dengan pengukuran

konsentrasi PM2.5 dan PM10 menggunakan sensor menembakkan laser ke udara. Data hasil

pengukuran konsentrasi partikulat diolah dalam ESP32. Proses pengolahan data pada

ESP32 meliputi penampilan data konsentrasi pada LCD dan analisis air quality index

(AQI) pada LED, penyimpanan data, dan pengiriman data pada web server.

Sistem pengukuran konsentrasi PM2.5 dan PM10 dapat berjalan dengan baik, dengan

kesalahan relatif sebesar 8,14% untuk PM10 dan 13,75% untuk PM2.5. Data hasil

pengukuran dan perhitungan AQI mampu ditampikan pada LCD dan LED. Data hasil

pengukuran dapat disimpan dalam file data logger. Sistem monitoring melalui halaman

web (IoT) berjalan dengan baik.

Kata Kunci : Monitoring, konsentrasi partikulat, ESP32, Internet Of Things

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 6: SISTEM MONITORING KONSENTRASI PARTIKULAT

ix

ABSTRACT

Particulate concentration (PM) is one of the pollutants that can endanger human

health. In the metropolis of high density with transportation or volcano activity had a high

concentration of particulate matter. Particulate concentration monitoring devices are used

to monitoring concentrations of hazardous particulates. Particulate concentration data can

be monitored at close range or long distance (Internet of Things) and stored data for

analysis.

Process of monitoring particulate concentration system begins with the

measurement of PM2.5 and PM10 concentrations using sensors with laser scattering. Data

from measurement of particulate concentration is processed in ESP32. Data processing in

ESP32 includes the display of concentration data on the LCD and analysis of air quality

index (AQI) on the LED, data storage, and data transmission on the web server.

PM2.5 and PM10 concentration measurement systems work well, with a relative

error is 8,14% for PM10 and 13,75% for PM2.5. The measurement results and AQI

calculations can be displayed on the LCD and LED. Measurement data can be stored in a

data logger file. The web page monitoring system (IoT) is running well.

Keyword : Monitoring, particulate matter (PM), ESP32, Internet Of Things

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 7: SISTEM MONITORING KONSENTRASI PARTIKULAT

xii

DAFTAR ISI

TUGAS AKHIR ..................................................................................................................... i

FINAL PROJECT ................................................................................................................. ii

HALAMAN PERSETUJUAN ............................................................................................. iii

HALAMAN PERSEMBAHAN ........................................................................................... iv

PERNYATAAN KEASLIAN KARYA ................................................................................ v

HALAMAN PERSEMBAHAN DAN MOTTO HIDUP ..................................................... vi

LEMBAR PERNYATAAN PERSETUJUAN PUBLIKASI KARYA ILMIAH UNTUK

KEPENTINGAN AKADEMIS ........................................................................................... vii

INTISARI ........................................................................................................................... viii

ABSTRACT ......................................................................................................................... ix

KATA PENGANTAR ........................................................................................................... x

DAFTAR ISI ....................................................................................................................... xii

DAFTAR GAMBAR ........................................................................................................... xv

DAFTAR TABEL ............................................................................................................. xvii

BAB I PENDAHULUAN ...................................................................................................... 1

1.1 LATAR BELAKANG ................................................................................................................................. 1

1.2 TUJUAN DAN MANFAAT ......................................................................................................................... 2

1.3 BATASAN MASALAH .............................................................................................................................. 2

1.4 METODE PENELITIAN............................................................................................................................. 2

BAB II DASAR TEORI ........................................................................................................ 4

2.1 PARTICULATE MATTER (PM) .................................................................................................................. 4

2.2 MODUL SENSOR PARTIKULAT PMS5003 [12] .......................................................................................... 6

2.3 ESP WROOM 32 ............................................................................................................................... 7

2.3.1 SPESIFIKASI ESP WROOM 32 [13] ........................................................................................................ 7

2.3.2 PIN ESP WROOM32 .......................................................................................................................... 7

2.4 RTC (REAL TIME CLOCK) DS3231 [14] ................................................................................................... 9

2.5 LED (LIGHT EMITTING DIODE) [15] ....................................................................................................... 10

2.6 LCD 16X2 ........................................................................................................................................ 11

2.7 MODUL MICROSD CARD ..................................................................................................................... 12

2.8 HTML (HYPERTEXT MARKUP LANGUAGE) .............................................................................................. 13

2.9 WEB SERVER [22] .............................................................................................................................. 15

2.10 JAVASCRIPT ....................................................................................................................................... 16

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 8: SISTEM MONITORING KONSENTRASI PARTIKULAT

xiii

2.10.1 AJAX ............................................................................................................................................... 17

BAB III RANCANGAN PENELITIAN ............................................................................. 18

3.1 BLOK DIAGRAM .................................................................................................................................. 18

3.2 PERANCANGAN DESAIN BOX SISTEM MONITORING PARTIKULAT .................................................................. 19

3.3 PERANCANGAN PERANGKAT KERAS ........................................................................................................ 19

3.3.1 PERANCANGAN SENSOR PARTIKULAT PMS5003 ...................................................................................... 20

3.3.2 MODUL MICROSD CARD ...................................................................................................................... 20

3.3.3 RTC DS3231 .................................................................................................................................... 20

3.3.4 PERANCANGAN LCD 16X2 ................................................................................................................... 21

3.3.5 LED INDIKATOR ................................................................................................................................. 22

3.4 PERANCANGAN PERANGKAT LUNAK ....................................................................................................... 22

3.4.1 PERANCANGAN DIAGRAM ALIR UTAMA .................................................................................................. 23

3.4.2 DIAGRAM ALIR DESAIN WEB ................................................................................................................ 24

3.4.3 PERANCANGAN DIAGRAM ALIR SUB-RUTIN SET WAKTU RTC ..................................................................... 25

3.4.4 PERANCANGAN DIAGRAM ALIR SUB-RUTIN PENGAMBILAN DATA SENSOR PARTIKULAT ................................... 26

3.4.5 PERANCANGAN DIAGRAM SUB-RUTIN ALIR PENYIMPANAN DATA ................................................................ 27

3.4.6 PERANCANGAN DIAGRAM ALIR SUB-RUTIN PENGIRIMAN DATA .................................................................. 28

3.4.7 PERANCANGAN DIAGRAM ALIR SUB-RUTIN MENAMPILKAN DATA ............................................................... 29

3.4.8 PERANCANGAN TAMPILAN HALAMAN WEB ............................................................................................. 32

BAB IV HASIL PENGAMATAN DAN PEMBAHASAN ................................................ 33

4.1 PERUBAHAN PERANCANGAN ................................................................................................................. 33

4.1.1 PERUBAHAN PERANCANGAN DESAIN BOX ALAT ....................................................................................... 33

4.1.2 PERUBAHAN PERANCANGAN LCD 16X2 ................................................................................................. 34

4.1.3 PERUBAHAN PERANCANGAN LED INDIKATOR ........................................................................................... 34

4.1.4 PERUBAHAN DIAGRAM ALIR SUB-RUTIN SET WAKTU RTC ......................................................................... 35

4.2 SISTEM MONITORING ALAT .................................................................................................................. 35

4.2.1 SISTEM PENGUKURAN KONSENTRASI PARTIKULAT ..................................................................................... 36

4.2.1.1 PENGUJIAN KONSENTRASI PM2.5 DAN PM10 ........................................................................................... 36

4.2.1.2 PENGUJIAN PROSES PENAMPIL DATA PADA LCD DAN LED INDIKATOR .......................................................... 39

4.2.1.3 PENGUJIAN PROSES PENAMPIL DATA PADA HALAMAN WEB ....................................................................... 40

4.3 PENGUJIAN DAN PEMBAHASAN PERANGKAT LUNAK .................................................................................. 42

4.3.1 PROGRAM MEMBUAT ACCES POINT DAN SERVER ..................................................................................... 42

4.3.2 PROGRAM DESAIN HALAMAN WEB ........................................................................................................ 43

4.3.3 PROGRAM SET WAKTU RTC .................................................................................................................. 45

4.4.3.1 PENGUJIAN PROSES SET WAKTU RTC ...................................................................................................... 46

4.3.4 PROGRAM PENGUKURAN KONSENTRASI PARTIKULAT ................................................................................. 47

4.3.5 PROGRAM PENYIMPANAN DATA............................................................................................................ 50

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 9: SISTEM MONITORING KONSENTRASI PARTIKULAT

xiv

4.3.5.1 PENGUJIAN PROSES PENYIMPANAN DATA ............................................................................................... 50

4.3.6 PROGRAM PENGIRIMAN DATA .............................................................................................................. 51

4.3.7 PROGRAM PENAMPIL DATA .................................................................................................................. 52

BAB V KESIMPULAN ...................................................................................................... 55

5.1 KESIMPULAN ..................................................................................................................................... 55

5.2 SARAN .............................................................................................................................................. 55

DAFTAR PUSTAKA .......................................................................................................... 56

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 10: SISTEM MONITORING KONSENTRASI PARTIKULAT

xv

DAFTAR GAMBAR

Gambar 1.1. Perancangan Blok Diagram .............................................................................. 3

Gambar 2.1. Blok Kerja PMS5003 ........................................................................................ 6

Gambar 2.2. Skematik Pin pada ESP WROOM32 ................................................................ 8

Gambar 2.3. Modul RTC DS3231 ....................................................................................... 10

Gambar 2.4. Rangkaian LED Indikator ............................................................................... 11

Gambar 2.5. LCD 16x2 ....................................................................................................... 12

Gambar 2.6. MicroSD Card Adapter................................................................................... 13

Gambar 2.7. Penggunaan Struktur Dasar HTML ................................................................ 15

Gambar 2.8. Diagram Kerja Web ........................................................................................ 15

Gambar 3.1. Blok Diagram Sistem Monitoring Partikulat .................................................. 18

Gambar 3.2. (a) Desain Alat Tampak Depan (b) Desain Alat Tampak Belakang .............. 19

Gambar 3.3. Rangkaian Sensor PMS5003 .......................................................................... 20

Gambar 3.4. Rangkaian Modul microSD Card ................................................................... 20

Gambar 3.5. Rangkaian RTC DS3231 ................................................................................ 21

Gambar 3.6. Rangkaian LCD 16x2 ..................................................................................... 21

Gambar 3.7. Rangkaian LED Indikator ............................................................................... 22

Gambar 3.8. Diagram Alir Utama ....................................................................................... 23

Gambar 3.9. Diagram Alir Desain Web .............................................................................. 24

Gambar 3.10. Diagram Alir Sub-Rutin Set Waktu RTC ..................................................... 25

Gambar 3.11. Diagram Alir Sub-Rutin Pengambilan Data Sensor Partikulat..................... 27

Gambar 3.12. Diagram Alir Sub-Rutin Penyimpanan Data ................................................ 28

Gambar 3.13. Diagram Alir Sub-Rutin Pengiriman Data ................................................... 29

Gambar 3.15. Rancangan Tampilan Halaman Web ............................................................ 33

Gambar 4.1. Perubahan Desain Box Sistem ........................................................................ 33

Gambar 4.2. Perubahan Perancangan LCD 16x2 ................................................................ 34

Gambar 4.3. Perubahan Perancangan Led Indikator ........................................................... 34

Gambar 4.4. Perubahan Perancangan Diagram Alir Set Waktu RTC ................................. 35

Gambar 4.5. (a) Bentuk Fisik Tampak Depan (b) Bentuk Fisik Tampak Belakang .......... 36

Gambar 4.6. Proses Pengujian Alat ..................................................................................... 37

Gambar 4.7. Grafik Perbandingan Pengukuran PM2.5 ......................................................... 38

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 11: SISTEM MONITORING KONSENTRASI PARTIKULAT

xvi

Gambar 4.8. Grafik Perbandingan Pengukuran PM10 ......................................................... 38

Gambar 4.9. Tampilan konsentrasi PM2.5 pada LCD .......................................................... 40

Gambar 4.10. Tampilan konsentrasi PM10 pada LCD ......................................................... 40

Gambar 4.11. Tampilan Halaman Web ............................................................................... 41

Gambar 4.12. Pengujian Tampilan Halaman Web .............................................................. 42

Gambar 4.13. Listing Program Inisialisasi SSID, Password, dan IP .................................. 42

Gambar 4.14. Listing membuat acces point ........................................................................ 43

Gambar 4.15. Insialisasi HTML .......................................................................................... 43

Gambar 4.16. Deklarasi CSS pada HTML .......................................................................... 43

Gambar 4.17. Listing Program Menampilkan Halaman HTML ......................................... 44

Gambar 4.18. Tampilan Halaman HTML ........................................................................... 44

Gambar 4.19. Listing Program Grafik ................................................................................. 45

Gambar 4.20. Listing Program Mengirim Data Waktu ....................................................... 46

Gambar 4.21. Program Set Waktu RTC .............................................................................. 46

Gambar 4.22. (a) Waktu RTC belum ter-update (b) Waktu RTC sudah ter-update ........... 47

Gambar 4.23. Listing Program Insialisasi Sensor ............................................................... 47

Gambar 4.24. Listing Program Mengambil Nilai Konsentrasi Partikulat ........................... 48

Gambar 4.25. Listing Program Menghitung Nilai Index ..................................................... 48

Gambar 4.26. Listing Program Cek Status microSD Card .................................................. 50

Gambar 4.27. Listing Program Penyimpanan Data ............................................................. 50

Gambar 4.28. File Data Logger ........................................................................................... 51

Gambar 4.29. Listing Program Mengirim Halaman HTML ................................................ 51

Gambar 4.30. Listing Program Set Interval ......................................................................... 51

Gambar 4.31. Listing Program Request Data ...................................................................... 52

Gambar 4.32. Listing Program Kirim Data ......................................................................... 52

Gambar 4.33. Listing Program Menentukan Status Kualitas Udara ................................... 53

Gambar 4.34. Listing Program Menampilkan Konsentrasi Partikulat pada LCD ............... 53

Gambar 4.35. Listing Program Klasifikasi AQI .................................................................. 54

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 12: SISTEM MONITORING KONSENTRASI PARTIKULAT

xvii

DAFTAR TABEL

Tabel 2.1. Batasan konsentrasi PM10 dan PM2.5 untuk AQI ............................................... 5

Tabel 2.2. Deskripsi Pin ESP WROOM32 ............................................................................ 8

Tabel 2.3. Karakteristik LED (Light Emitting Diode) ......................................................... 10

Tabel 2.4. Pin LCD 16x2 ..................................................................................................... 12

Tabel 3.1. Format Data yang Disimpan ............................................................................... 27

Tabel 3.2. Format Data yang Dikirim.................................................................................. 29

Tabel 4.1. Bagian-Bagian Alat ............................................................................................ 36

Tabel 4.2. Data Hasil Pengukuran Konsentrasi PM2.5 ....................................................... 37

Tabel 4.3. Data Hasil Pengukuran Konsentrasi PM10 ......................................................... 38

Tabel 4.4. Data Hasil Pengukuran PM2.5 tanpa polutan ...................................................... 39

Tabel 4.5. Data Hasil Pengukuran PM10 tanpa polutan ....................................................... 39

Tabel 4.6. Keterangan Tampilan Halaman Web ................................................................. 41

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 13: SISTEM MONITORING KONSENTRASI PARTIKULAT

1

BAB I

PENDAHULUAN

1.1 Latar Belakang

Pencemaran udara adalah masuknya atau dimasukkannya zat, energi, dan/atau

komponen lain ke dalam udara ambien oleh kegiatan manusia, sehingga mutu udara

ambien turun sampai ke tingkat tertentu yang menyebabkan udara ambien tidak dapat

memenuhi fungsinya [1]. Saat ini, pencemaran udara merupakan masalah yang sering

dihadapi masyarakat modern. Pencemaran udara tidak hanya dapat melanda kota-kota

besar, bahan-bahan penyebab polusi atau polutan dapat mencemari udara di mana saja.

Bahan pencemar udara dibagi menjadi dua, yaitu bahan pencemar primer dan bahan

pencemar sekunder. Bahan pencemar primer adalah bahan pencemar yang dikeluarkan dari

suatu sumber yang dapat diidentifikasi, seperti SO2, CO, NOx, SOx, partikulat,

hidrokarbon, dan logam [2]. Selain berdampak pada kesehatan, partikulat atau polutan juga

menimbulkan dampak bagi lingkungan dan perubahan iklim.

Partikulat atau particulate matter (PM) merupakan partikel-partikel debu kecil sisa

pembakaran atau proses alami seperti gunung berapi. Ukuran partikulat yang berbahaya

bagi kesehatan umumnya berkisar antara 0.1 mikron sampai dengan 10 mikron. Pada

umumnya ukuran partikulat debu sekitar 5 mikron merupakan yang dapat langsung masuk

ke dalam paru-paru dan mengendap di alveoli [3]. Menurut United States Environmental

Protection Agency (EPA) paparan partikulat yang tinggi dapat menyebabkan kematian dini

pada penderita penyakit jantung dan paru-paru, serangan jantung, detak jantung yang tidak

stabil, memperburuk kondisi penderita asma, dan penurunan fungsi paru-paru. Kelompok

masyarakat dengan dengan penyakit jantung atau paru-paru, anak-anak, dan orang lanjut

usia sangat rentang terkena paparan konsentrasi partikulat [4].

Melihat bahaya yang ditimbulkan oleh partikulat diperlukan sistem bagi masyarakat

atau instansi terkait untuk memantau konsentrasi partikulat yang ada di udara. Sistem

monitoring konsetrasi partikulat tersebut akan menampilkan konsentrasi partikulat dalam

μg/m3 serta melakukan analisis level pencemaran yang terjadi. Data yang diperoleh dapat

diakses melalui halaman web sehingga kelompok masyarakat yang memiliki gangguan

pernafasan atau jantung dapat menghindari daerah-daerah dengan konsetrasi partikulat

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 14: SISTEM MONITORING KONSENTRASI PARTIKULAT

2

tinggi atau melakukan penanggulangan jika bepergian ke daerah tersebut.

1.2 Tujuan dan Manfaat

Tujuan dari Tugas Akhir ini adalah untuk merancang sistem monitoring konsetrasi

partikulat secara real time yang dapat diakses melalui web browser.

Manfaat dari Tugas Akhir ini sebagai berikut:

1. Bagi Masyarakat:

Memberikan kemudahan bagi masyarakat untuk mengetahui konsetrasi partikulat di

suatu tempat.

2. Bagi Pendidikan:

Menjadi acuan, rujukan, dan bahan pertimbangan untuk mengembangkan sistem

monitoring partikulat.

1.3 Batasan Masalah

Adapun batasan masalah mengenai topik dalam Tugas Akhir ini adalah sebagai berikut :

1. Mikrokontroler menggunakan ESP32.

2. Catu daya menggunakan baterai.

3. Resolusi konsentrasi 0 µg/m3

sampai 500 µg/m3.

4. Modul wifi menggunakan ESP32.

5. Konsentrasi partikulat dalam µg/m3.

6. Tampilan web berupa konsetrasi partikulat dan grafik dalam 24 jam terakhir.

7. LED indikator sebagai klasifikasi AQI (air quality index).

1.4 Metode Penelitian

Metode penelitian yang akan dilakukan dalam penulisan Tugas Akhir ini adalah

sebagai berikut :

1. Studi literatur, yaitu proses mempelajari referensi yang berhubungan dengan

permasalahan yang dibahas dalam topik tugas akhir. Referensi dapat berupa buku, e-

book, dan jurnal ilmiah yang membahas PM10 dan PM2.5, pemrograman dengan ESP32,

dan komunikasi jaringan nirkabel.

2. Perancangan perangkat keras meliputi desain layout PCB dan komponen-komponen

yang digunakan. Perancangan perangkat lunak meliputi desain tampilan web dan

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 15: SISTEM MONITORING KONSENTRASI PARTIKULAT

3

pembuatan flowchart pemrograman ESP32. Tahap ini bertujuan untuk menentukan

model sistem yang optimal dan berfungsi sesuai dengan Gambar 1.1

Gambar 1.1 Perancangan Blok Diagram

3. Pembuatan perangkat keras dan perangkat lunak. Pembuatan perangkat keras meliputi

pembuatan PCB dan kerangka sistem, sedangkan pembuatan perangkat lunak meliputi

pemrograman pada ESP32 dengan Arduino IDE dan pemrograman halaman web.

4. Pengambilan data dilakukan setelah proses pembuatan alat sesuai dengan tujuan dan

batasan masalah. Data yang diambil adalah data yang digunakan untuk menganalisis

kinerja alat yaitu, data konsentrasi partikulat di dalam dan di luar ruangan, data hasil

penyimpanan data logger, dan data hasil monitoring jarak jauh. Proses kalibrasi

dilakukan sebelum proses pengambilan data dilakukan. Kalibrasi dilakukan dengan

membandingkan konsentrasi PM2.5 dan PM10 dari sensor PMS5003 dengan sensor

partikulat yang beredar di pasaran dalam satuan µg/m3.

5. Analisis dan penyimpulan hasil percobaan. Analisis dilakukan dengan melihat

kestabilan sistem pengukuran alat dalam beberapa waktu, tingkat akurasi hasil

pengukuran, dan kesesuaian alat dengan tujuan dan batasan masalah. Penyimpulan

hasil dilakukan setelah analisis. Penyimpulan dilakukan dengan menentukan setiap

poin penting yang menggambarkan kinerja alat keseluruhan.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 16: SISTEM MONITORING KONSENTRASI PARTIKULAT

4

BAB II

DASAR TEORI

Bab ini akan menjelaskan mengenai komponen-komponen utama yang digunakan

dalam “Sistem Monitoring Partikulat”. Komponen-komponen yang digunakan yaitu, ESP

WROOM 32, modul sensor PMS5003, modul RTC DS3231, LED, LCD 16x2, dan modul

microSD Card.

2.1 Particulate Matter (PM)

Partikulat dapat didefinisikan sebagai padatan tersuspensi yang melayang di udara

dan partikel cair yang berukuran lebih besar daripada molekul (molekul memiliki rata-rata

0,002 μm) tetapi lebih kecil dari 500 μm di mana ukuran partikulat bervariasi antara 100

sampai lebih kecil dari 0,1 μm dengan waktu tinggal beberapa detik sampai beberapa bulan

[5]. Di samping mengganggu estetika, partikel berukuran kecil di udara dapat terhisap ke

dalam sistem pernafasan dan menyebabkan penyakit gangguan pernafasan dan kerusakan

paru-paru. Partikulat juga merupakan sumber utama haze (kabut asap) yang menurunkan

visibilitas [6].

Partikulat di udara menurut diameter dan proses pembentukan diklasifikasikan

menjadi tiga tipe yaitu tipe nukleasi, akumulasi, dan deposisi. Untuk pembentukan secara

deposisi, terdapat perbedaan kecepatan deposisi pada tiap-tiap jenis partikulat. Perbedaan

ini dapat disebabkan oleh beberapa faktor, seperti kecepatan aliran udara permukaan,

ruangan, ukuran diameter partikulat, dan disipasi panas. Deposisi ini pada akhirnya dapat

mempengaruhi konsentrasi partikulat di dalam suatu ruangan tertutup (indoor) maupun

distribusi ukurannya [3].

Partikulat dengan diameter lebih kecil dari 10µm disebut sebagai PM10, partikulat

dengan ukuran lebih kecil dari 2,5µm yang dinamakan PM2.5 [3]. Kadar PM10 yang

terdapat di udara dapat dijadikan parameter utama dalam pencemaran udara karena PM10

dapat berasosiasi dengan kadar zat-zat pencemar lainnya. Turun naiknya zat pencemar di

udara seperti karbon monoksida (CO), sulfur oksida (SO2), nitrogen oksida (NO2) dapat

berbanding lurus dengan kadar PM10 [7]. PM10 diketahui dapat meningkatkan angka

kematian yang disebabkan oleh penyakit jantung dan pernafasan, pada konsentrasi 140

μg/m3 dapat menurunkan fungsi paru-paru pada anak-anak, sementara pada konsentrasi

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 17: SISTEM MONITORING KONSENTRASI PARTIKULAT

5

350 μg/m3 dapat memperparah kondisi penderita bronkitis [6]. PM2.5 yang terhirup masuk

ke dalam alveoli dapat menimbulkan reaksi radang yang dapat menyebabkan daya

kembang paru-paru menjadi terbatas dan dapat mengakibatkan penurunan fungsi paru-paru

pada manusia [8].

WHO (World Health Organization) memberikan nilai baku mutu konsentrasi

partikulat rata-rata tahunan untuk PM10 sebesar 20 μg/m3 dan 50 μg/m3

rata-rata dalam 24

jam sedangkan rata-rata tahunan untuk PM2.5 sebesar 10 μg/m3 dan 25 μg/m3

rata-rata

dalam 24 jam[9]. Baku mutu udara ambien nasional untuk PM10 adalah 150 μg/m3 untuk

24 jam sedangkan untuk PM2.5 sebesar 65 μg/m3 dalam 24 jam dan 15 μg/m3

untuk 1 tahun

[1]. EPA (Environmental Protection Agency) menerapkan nilai baku mutu konsentrasi

partikulat rata-rata dalam 24 jam untuk PM10 sebesar 150 μg/m3 dan PM2.5 sebesar 35

μg/m3 [10]. Tabel 2.1. adalah batasan konsentrasi PM10 dan PM2.5 untuk AQI (Air Quality

Index) menurut EPA.

Tabel 2.1. Batasan konsentrasi PM10 dan PM2.5 untuk AQI [10]

PM2.5 (μg/m3)

24 jam

PM10 (μg/m3)

24 jam AQI Kategori

0,0 – 12,0 0 – 54 0 – 50 Baik

12,1 – 35,4 55 – 154 51 – 100 Sedang

35,5 – 55,4 155 – 254 101 – 150 Tidak Sehat untuk

Kelompok Tertentu

55,5 – 150,4 255 – 354 151 – 200 Tidak Sehat

150,5 – 250,4 355 – 424 201 – 300 Sangat Tidak Sehat

250,5 – 350,4 425 – 504 301 – 400 Berbahaya

350,5 – 500,4 505 – 604 401 – 500

AQI adalah nilai tertinggi yang dihitung untuk setiap polutan sebagai berikut:

a. Identifikasi konsentrasi tertinggi di antara semua pengawas konsentrasi polutan pada

setiap area.

b. Menggunakan Tabel 2.1 untuk mencari breakpoint yang mengandung konsentrasi.

c. Menggunakan Persamaan 2.1. untuk menghitung indeksnya.

d. Membulatkan indeks ke bilangan bulat terdekat.

Jika konsentrasi sama dengan breakpoint, maka indeks sama dengan nilai indeks

yang sesuai pada Tabel 2.1. Namun, Persamaan 2.1 masih dapat digunakan. Hasilnya akan

sama. Jika konsentrasi berada di antara dua breakpoint, maka hitung indeks polutan

menggunakan Persamaan 2.1. [11].

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 18: SISTEM MONITORING KONSENTRASI PARTIKULAT

6

( )

(2.1)

Di mana:

IP = nilai indeks polutan

CP = nilai konsentrasi polutan yang diukur

BPHi = batas atas breakpoint dari CP

BPLo = batas bawah breakpoint dari CP

IHi = nilai AQI sesuai dengan BPHi

ILo = nilai AQI sesuai dengan BPLo

2.2 Modul Sensor Partikulat PMS5003 [12]

PMS5003 adalah sensor konsentrasi partikel yang dapat digunakan untuk mendeteksi

jumlah partikel yang tersuspensi di udara (konsentrasi partikel) dengan output digital.

Sensor ini dapat di aplikasikan pada air purifier atau perangkat lain untuk mendeteksi

konsentrasi partikulat.

Gambar 2.1. Blok Kerja PMS5003 [12]

Prinsip kerja dari modul sensor PMS5003 pada Gambar 2.1. menggunakan laser

scattering yaitu, membuat hamburan cahaya menggunakan laser untuk dipancarkan

kembali oleh partikel yang tersuspensi di udara. Hasil hamburan cahaya akan dikumpulkan

dan didapat kurva perubahan hamburan cahaya terhadap waktu. Akhirnya partikel dengan

diameter yang sama dan partikel-partikel dengan diameter berbeda-beda per satuan volume

dapat dihitung oleh mikroprosesor berdasarkan teori MIE. Satuan konsentrasi massa

partikel dihitung dalam µg/m3. Spesifikasi dari modul sensor PMS5003 sebagai berikut :

1. Kisaran pengukuran 0,3 – 10 µm

2. Effective range 0 – 500 µg/m3

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 19: SISTEM MONITORING KONSENTRASI PARTIKULAT

7

3. Resolusi 1 µg/m3

4. Maksimal error konsistensi ±10% untuk 100 – 500 µg/m3 dan ±10 µg/m

3 untuk 0 – 500

µg/m3

5. Standar volume 0,1 liter

6. Catu daya 4,5 V – 5,5 V

7. Arus kerja ≤ 100 mA

2.3 ESP WROOM 32

ESP WROOM 32 adalah modul Wi-fi dan Bluetooth yang di desain untuk berbagai

macam aplikasi, mulai dari jaringan sensor berdaya rendah hingga tugas yang berat, seperti

pengkodean suara, streaming musik, dan decoding MP3. Sleep current dari ESP32 kurang

dari 5µA sehingga cocok untuk perangkat elektronis bertenaga baterai dan perangkat

wearable. ESP32 terintegrasi beberapa peripheral mulai dari touch sensors, hall sensors,

SD card interface, Ethernet, high speed SPI, UART, I2S, dan I

2C [6].

2.3.1 Spesifikasi ESP WROOM 32 [13]

Berikut merupakan spesifikasi dari ESP WROOM 32:

1. Xtensa® single-/dual-core 32-bit LX6 microprocessor

2. Wi-fi 2,4GHz – 2,5GHz

3. 802,11 b/g/n (802.11n hingga 150 Mbps)

4. Tegangan kerja 3,0 V – 3,6 V

5. Arus Kerja 80 mA (rata-rata)

6. ROM 448 KB

7. SRAM 520 KB

2.3.2 Pin ESP WROOM32

Pada Gambar 2.2. menunjukkan skematik pin dari ESP WROOM32 dan Table 2.2.

menunjukkan deskripsi setiap pin pada ESP WROOM 32.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 20: SISTEM MONITORING KONSENTRASI PARTIKULAT

8

Gambar 2.2. Skematik Pin pada ESP WROOM32 [13]

Tabel 2.2. Deskripsi Pin ESP WROOM32 [13]

Nama No Tipe Fungsi

GND 1 P Ground

3V3 2 P Power supply

EN 3 I Module-enable signal. Active high.

SENSOR_VP 4 I GPIO36, ADC1_CH0, RTC_GPIO0

SENSOR_VN 5 I GPIO39, ADC1_CH3, RTC_GPIO3

I/O34 6 I GPIO34, ADC1_CH6, RTC_GPIO4

I/O35 7 I GPIO35, ADC1_CH7, RTC_GPIO5

I/O32

8 I/O GPIO32, XTAL_32K_P (32.768 kHz crystal oscillator

input), ADC1_CH4,

TOUCH9, RTC_GPIO9

IO33 9 I/O

GPIO33, XTAL_32K_N (32.768 kHz crystal oscillator

output), ADC1_CH5,

TOUCH8, RTC_GPIO8

IO25 10 I/O GPIO25, DAC_1, ADC2_CH8, RTC_GPIO6,

EMAC_RXD0

IO26 11 I/O GPIO26, DAC_2, ADC2_CH9, RTC_GPIO7,

EMAC_RXD1

IO27 12 I/O GPIO27, ADC2_CH7, TOUCH7, RTC_GPIO17,

EMAC_RX_DV

IO14 13 I/O

GPIO14, ADC2_CH6, TOUCH6, RTC_GPIO16, MTMS,

HSPICLK, HS2_CLK,

SD_CLK, EMAC_TXD2

IO12 14 I/O

GPIO12, ADC2_CH5, TOUCH5, RTC_GPIO15, MTDI,

HSPIQ, HS2_DATA2,

SD_DATA2, EMAC_TXD3

GND 15 P Ground

IO13 16 I/O

GPIO13, ADC2_CH4, TOUCH4, RTC_GPIO14, MTCK,

HSPID, HS2_DATA3,

SD_DATA3, EMAC_RX_ER

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 21: SISTEM MONITORING KONSENTRASI PARTIKULAT

9

Tabel 2.2. (Lanjutan) Deskripsi Pin ESP WROOM32 [13]

Nama No Tipe Fungsi

SHD/SD2* 17 I/O GPIO9, SD_DATA2, SPIHD, HS1_DATA2, U1RXD

SWP/SD3* 18 I/O GPIO10, SD_DATA3, SPIWP, HS1_DATA3,

SCS/CMD* 19 I/O GPIO11, SD_CMD, SPICS0, HS1_CMD, U1RTS

SCK/CLK* 20 I/O GPIO6, SD_CLK, SPICLK, HS1_CLK, U1CTS

SDO/SD0* 21 I/O GPIO7, SD_DATA0, SPIQ, HS1_DATA0, U2RTS

SDI/SD1* 22 I/O GPIO8, SD_DATA1, SPID, HS1_DATA1, U2CTS

IO15 23 I/O

GPIO15, ADC2_CH3, TOUCH3, MTDO, HSPICS0,

RTC_GPIO13, HS2_CMD,

SD_CMD, EMAC_RXD3

IO2 24 I/O GPIO2, ADC2_CH2, TOUCH2, RTC_GPIO12, HSPIWP,

HS2_DATA0, SD_DATA0

IO0 25 I/O GPIO0, ADC2_CH1, TOUCH1, RTC_GPIO11,

CLK_OUT1, EMAC_TX_CLK

IO4 26 I/O

GPIO4, ADC2_CH0, TOUCH0, RTC_GPIO10, HSPIHD,

HS2_DATA1,

SD_DATA1, EMAC_TX_ER

IO16 27 I/O GPIO16, HS1_DATA4, U2RXD, EMAC_CLK_OUT

IO17 28 I/O GPIO17, HS1_DATA5, U2TXD, EMAC_CLK_OUT_180

IO5 29 I/O GPIO5, VSPICS0, HS1_DATA6, EMAC_RX_CLK

IO18 30 I/O GPIO18, VSPICLK, HS1_DATA7

IO19 31 I/O GPIO19, VSPIQ, U0CTS, EMAC_TXD0

NC 32 - -

IO21 33 I/O GPIO21, VSPIHD, EMAC_TX_EN

RXD0 34 I/O GPIO3, U0RXD, CLK_OUT2

TXD0 35 I/O GPIO1, U0TXD, CLK_OUT3, EMAC_RXD2

IO22 36 I/O GPIO22, VSPIWP, U0RTS, EMAC_TXD1

IO23 37 I/O GPIO23, VSPID, HS1_STROBE

GND 38 P Ground

2.4 RTC (Real Time Clock) DS3231 [14]

DS3231 ditunjukkan pada Gambar 2.3. merupakan I2C real time clock yang sangat

akurat dengan sensor suhu dan kristal 32kHz yang terintegrasi. Pada RTC ini terdapat

baterai untuk menjaga ketepatan waktu ketika catu daya utama terganggu. Informasi yang

diambil dari RTC ini berupa detik, menit, jam, hari, tanggal, bulan, dan tahun. Tanggal di

akhir bulan akan disesuaikan secara otomatis pada setiap bulan termasuk untuk tahun

kabisat. Jam dapat dioperasikan dalam format 24 jam atau 12 jam dengan indikator

AM/PM. DS3231 memiliki rentang catu daya mulai dari 2,3 V hingga 5,5 V dan arus kerja

0,2 mA hingga 0,3 mA. Berikut adalah spesifikasi dari modul RTC DS3231:

1. Akurasi ±2ppm dari 0°C hingga 40°C

2. Akurasi ±3.5ppm dari -40°C hingga +85°C

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 22: SISTEM MONITORING KONSENTRASI PARTIKULAT

10

3. Akurasi digital Temp Sensor ±3°C

4. Akurasi RTC ±2 menit per tahun dari -40°C hingga +85°C

Gambar 2.3. Modul RTC DS3231

2.5 LED (Light Emitting Diode) [15]

LED (Light Emitting Diode) adalah jenis diode yang dapat memancarkan cahaya saat

dialiri arus listrik. Salah satu kegunaan LED yang paling sering ditemukan adalah sebagai

lampu indikator, terutama pada indikator ON / OFF sebuah perangkat elektronika. Hal ini

dikarenakan kelebihan LED yang mengonsumsi arus listrik lebih kecil dibandingkan

dengan jenis-jenis lampu lainnya.

LED memiliki arus maju (forward current) maksimum yang cukup rendah sehingga

dalam merangkai LED, kita harus menempatkan sebuah resistor yang berfungsi sebagai

pembatas arus agar arus yang melewati LED tidak melebihi batas maksimum arus maju

LED itu sendiri. Jika tidak, LED akan mudah terbakar dan rusak. Tabel 2.3. adalah tabel

arus maju maksimum dan tegangan maju untuk masing-masing jenis dan warna LED.

Tabel 2.3. Karakteristik LED (Light Emitting Diode) [15]

Jenis LED Warna IF Max VL (typ.) VF Max VR Max

Standard Merah 30mA 1.7V 2.1V 5V

Standard Merah Terang 30mA 2.0V 2.5V 5V

Standard Kuning 30mA 2.1V 2.5V 5V

Standard Hijau 25 mA 2,2 V 2,5 V 5 V

High Intensity Biru 30 mA 4,5 V 5,5 V 5 V

Super Bright Merah 30 mA 1,85 V 2,5 V 5 V

Low Current Merah 30 mA 1,7 V 2,0 V 5 V

Keterangan :

IF Max : Arus maju (forward current) maksimal

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 23: SISTEM MONITORING KONSENTRASI PARTIKULAT

11

VL : Tegangan LED

VF Max : Tegangan maju (forward voltage) maksimal

VR Max : Tegangan terbalik (reverse voltage) maksimal

Menghitung nilai Resistor yang diperlukan untuk rangkaian LED agar LED yang

bersangkutan tidak terbakar atau rusak karena kelebihan arus dan tegangan.

Rumus yang dipakai adalah sebagai berikut : (2.2)

Di mana :

R = Nilai resistor yang diperlukan (Ω)

VS = Tegangan input (V)

VL = Tegangan LED (V)

I = Arus Maju LED (A)

Hal yang perlu diingat dalam perhitungan, arus maju LED (I) tidak boleh melebihi

arus maju maksimal (IF Max) yang telah ditentukan seperti tertera pada Table 2.4. Resistor

yang berfungsi sebagai pembatas arus dipasang secara seri dengan LED seperti rangkaian

LED indikator pada Gambar 2.4.

Gambar 2.4. Rangkaian LED Indikator [15]

2.6 LCD 16x2

LCD atau Liquid Crystal Display adalah jenis device penampil yang menggunakan

teknologi crystal cair. Crystal cair disusun dalam gelas plastik atau kaca kemudian

dilengkapi rangkaian elektronik sehingga dapat dikonfigurasi untuk menampilkan titik,

garis, huruf, angka atau gambar. Gambar 2.5. merupakan bentuk fisik LCD 16x2.

Angka atau huruf yang hendak ditampilkan pada LCD harus dikirim ke chip

pengendali yang terdapat dalam modul LCD. Chip pengendali menyediakan pin-pin data

(D0-D7), R/W, RS (Register Select), dan E (Enable). Pin D0-D7 digunakan untuk

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 24: SISTEM MONITORING KONSENTRASI PARTIKULAT

12

menyalurkan data atau perintah. Pin R/W digunakan untuk memilih siklus baca atau tulis.

Pin RS digunakan untuk menentukan jenis data yang dikirim sebagai data atau perintah.

Pin E digunakan untuk memberikan sinyal tepi turun sebagai pemicu siklus baca/tulis [16].

Penjelasan pin-pin LCD 16x2 terdapat pada Tabel 2.4.

Gambar 2.5. LCD 16x2 [16]

Spesifikasi:

1. Power Supply 4,7 V sampai 5,5 V

2. Terdiri dari 2 baris dan setiap baris dapat menampilkan 16 karakter

3. Setiap karakter terdiri dari 5x8 pixels box

4. 4 bit dan 8 bit interface [17]

Tabel 2.4. Pin LCD 16x2 [17]

No. Simbol Level Fungsi

1 Vss -- 0 V

Power Supply 2 VDD -- +5 V

3 V0 -- LCD

4 RS H/L Register Select: H:Data Input L:Instruction Input

5 RW H/L H = Read L = Write

6 E H/L Enable signal

7 DB0 H/L

Bus data untuk 8 bit 8 DB1 H/L

9 DB2 H/L

10 DB3 H/L

11 DB4 H/L Bus data untuk 4 bit dan 8 bit

12 DB5 H/L

13 DB6 H/L Bus data untuk 4 bit dan 8 bit

14 DB7 H/L

15 BLA -- Backlight +5V

16 BLK -- Backlight 0V

2.7 Modul MicroSD Card

MicroSD card adalah salah satu media penyimpanan data berkapasitas tinggi dengan

spesifikasi SD card tetapi lebih kecil. microSD card memiliki dua protokol komunikasi

yaitu mode SD dan mode SPI. Mode SD memungkinkan untuk transfer data dengan

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 25: SISTEM MONITORING KONSENTRASI PARTIKULAT

13

kecepatan tinggi (4 bit) sedangkan mode SPI mempermudah interface. Mode SPI

memungkinkan untuk mentransfer data 1 bit bus line dengan 2 channel (data in dan data

out). Semua pengiriman data dengan mode SPI menggunakan byte (8 bit) yang bersamaan

dengan sinyal CS [18].

Modul microSD card adapter pada Gambar 2.5. adalah modul yang digunakan untuk

membaca dan menulis kartu microSD dengan Arduino. Penggunaan modul microSD card

adapter untuk berkomunikasi dengan Arduino menggunakan 6 pin di antaranya MOSI,

MISO, SCK, CS dan sisanya ialah pin power yakni VCC dan GND [19].

Gambar 2.6. MicroSD Card Adapter [19]

2.8 HTML (Hypertext Markup Language)

HTML adalah salah satu bahasa yang digunakan untuk perancangan sebuah web page

dan sebagai penerjemah setiap perintah dalam website pada saat diakses. Dokumen HTML

merupakan file teks murni yang dapat dibuat menggunakan editor teks apapun. Dokumen

ini dikenal dengan nama web page. Nantinya dokumen HTML ditampilkan menggunakan

web browser sehingga informasi di dalamnya secara umum bisa dimengerti oleh user.

Dokumen ini umumnya berisikan informasi atau tampilan aplikasi di dalam internet. Ada

beberapa cara membuat sebuah web page yaitu dengan HTML editor atau dengan editor

teks biasa (misalnya notepad). File ekstensi dokumen HTML adalah .htm atau .html. Nama

dokumen di sini bersifat case sensitive, yang apabila ada lebih dari satu dokumen dengan

nama yang sama dan dituliskan dengan case berbeda akan dianggap sebagai dokumen yang

berbeda (misalkan dokumen.html dengan DOKUMEN.html) [20].

HTML berisi perintah-perintah terstruktur menggunakan Tag. Tag-tag pada html

tidak case sensitive sehingga bisa menggunakan huruf kecil maupun huruf besar, output

yang dihasilkan sama. Struktur dasar pada HTML, yaitu:

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 26: SISTEM MONITORING KONSENTRASI PARTIKULAT

14

1. Tag

Adalah teks khusus yang diapit oleh tanda kurung siku buka “<” dan kurung siku tutup

“>”. Pada umumnya tag berpasangan yaitu tag pembuka dan tag penutup, tag penutup

ditambahkan karakter slash di dalam tanda apit di depan teks tag “/”, namun ada

beberapa tag yang tidak berpasangan sehingga bisa disebut dengan tag tunggal seperti

tag untuk membuat baris baru, membuat garis horizontal, dan tag input.

2. Element

Element terdiri atas tiga bagian,yaitu tag pembuka, isi atau konten, dan tag penutup.

3. Attribute

Attribute merupakan property yang ada di dalam tag yang berisi nama property itu

sendiri disertai dengan nilai dari property, contoh property adalah mengatur lebar

(width) dengan nilai lebar sejumlah ukuran piksel yang ditentukan.

4. Element HTML

Element HTML berfungsi untuk mendefinisikan atau memberikan informasi kepada

browser bahwa halaman tersebut adalah halaman HTML.

5. Element Head

Merupakan kepala dari dokumen HTML. Biasa berisi judul dari halaman dan link yang

digunakan untuk dihubungkan dengan file css atau javascript yang digunakan. Element

head berada di dalam element HTML.

6. Element Title

Merupakan judul dari dokumen HTML, yang ditampilkan pada judul jendela browser.

Element title berada pada atau di dalam element head.

7. Element Body

Element ini untuk menampilkan isi dokumen HTML. Element body merupakan atribut-

atribut yang menspesifikasikan khususnya warna dan latar belakang dokumen. Elemen-

elemen lain pembentuk konten halaman web disimpan di bagian body.

8. Komentar

Komentar merupakan barisan program yang tidak dieksekusi. fungsi komentar adalah

untuk memberikan keterangan pada kode HTML [21].

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 27: SISTEM MONITORING KONSENTRASI PARTIKULAT

15

Gambar 2.7. Penggunaan Struktur Dasar HTML [21]

Baris 1 dan 10 pada Gambar 2.7. merupakan contoh penggunaan elemen

html sedangkan baris 2 dan 4 adalah elemen head. Judul dokumen HTML atau elemen title

ditunjukkan pada baris 3. Baris 5 dan 9 merupakan elemen body, di dalam elemen body

terdapat isi dari dokumen HTML.

2.9 Web Server [22]

Web server adalah aplikasi yang digunakan untuk menerima permintaan informasi

dari pengguna melalui web browser, dan mengirimkan kembali informasi yang diterima

melalui HTTP (Hyper Text Transfer Protocol). Biasanya web server diletakkan di

komputer tertentu pada web hosting.

Gambar 2.8. Diagram Kerja Web [22]

Berdasarkan Gambar 2.8. untuk menjalankan web dari sebuah server cukup dengan

memanggil alamat web tersebut, lalu browser akan memunculkan halaman web yang

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 28: SISTEM MONITORING KONSENTRASI PARTIKULAT

16

dimaksud sesuai dengan alamat yang diberikan. Proses yang terjadi adalah, web browser

meminta kepada web server, kemudian web server akan membaca file index (misal:

index.html, index.php atau index.asp), kemudian data-data dari file index tersebut

diterjemahkan dan dikirim kembali ke web browser. Selanjutnya web browser akan

menerjemahkan kode-kode HTML menjadi halaman web. File index adalah file yang

biasanya dibaca otomatis oleh web server.

2.10 JavaScript

JavaScript adalah bahasa script berdasar pada objek yang memperbolehkan

pemakaian untuk mengendalikan banyak aspek interaksi pemakai pada suatu dokumen

HTML. Di mana objek tersebut dapat berupa suatu window, frame, URL, dokumen, form,

button, atau item yang lain. Yang semuanya itu mempunyai property yang saling

berhubungan dengannya, dan masing-masing memiliki nama, lokasi, warna nilai, dan

atribut lain [23].

Cara menulis kode JavaScript ke dalam HTML adalah dengan memanfaatkan tag

<script>. Kode JavaScript ditulis di dalam halaman HTML yang sama dan disimpan

sebagai 1 file. Metode ini digunakan apabila kode JavaScript tidak begitu panjang dan

hanya dimanfaatkan untuk 1 halaman web saja. JavaScript memiliki beberapa aturan

penulisan kode-kode yang harus diketahui:

1. Case Sensitive

Berbeda dengan HTML, JavaScript adalah pemrograman yang bersifat case sensitive,

atau membedakan perbedaan huruf besar dan huruf kecil. Oleh karena itu, cara menulis

fungsi atau method harus benar-benar tepat, huruf per huruf.

2. Whitespace

Whitespace adalah karakter yang tidak terlihat. Beberapa contoh whitespace adalah

spasi, enter, dan tab. Karakter-karakter tersebut akan diabaikan oleh JavaScript.

3. Reserved word

Reserved word adalah kata-kata yang tidak boleh digunakan sebagai nama variabel atau

fungsi. Sebagai contoh, salah satu reserved word adalah final.

4. Semicolon

Semicolon adalah titik-koma yang umumnya digunakan untuk menandai akhir dari

kode JavaScript. Semicolon ini sifatnya opsional sehingga jika pun lupa, maka masih

tak menimbulkan masalah [24].

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 29: SISTEM MONITORING KONSENTRASI PARTIKULAT

17

2.10.1 AJAX

AJAX adalah metode transfer data ke server yang bisa digunakan untuk meng-upload

data di halaman web, tanpa perlu me-load keseluruhan halaman. AJAX dapat me-request

teks, html, xml, atau json dari server remote menggunakan HTTP Get dan HTTP Post.

AJAX juga dapat me-load data eksternal ke bagian tertentu di HTML secara langsung

tanpa mengetik fungsi XMLHTTPRequest.

Ada dua jenis method yang paling umum digunakan untuk mengakomondasikan

request dan respone antara klien dan server, yaitu GET dan POST. GET biasanya hanya

digunakan untuk mengambil data dari server dan bisa mengembalikan data ter-cache.

Sementara POST juga bisa digunakan untuk mengambil data dari server, namun POST

tidak pernah meng-cache data [25].

XMLHttpRequest merupakan sebuah objek yang memungkinkan sebuah halaman

web mengambil data dari web server memalui aktivitas background/asinkron tanpa

mengganggu interaksi dengan user yang sedang dilakukan. Format data yang dipakai

adalah XML, walaupun bisa bekerja dengan baik di beberapa tipe data berbasis teks.

Membuat objek XMLHttpRequest sangat mudah. Pertama, dengan mendefinisikan variabel

yang digunakan untuk menampuk objek. Kedua, dengan membuat instance dari objek dan

menyimpannya ke dalam variabel. Membuat instance objek, method yang digunakan

adalah XMLHttpRequest() [26].

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 30: SISTEM MONITORING KONSENTRASI PARTIKULAT

18

BAB III

RANCANGAN PENELITIAN

Bab ini menjelaskan perancangan “Sistem Monitoring Partikulat” yang terdiri dari

blok diagram, perancangan hardware, dan perancangan software. Sistem ini menggunakan

modul sensor PMS5003 berfungsi mengambil data konsentrasi partikulat di udara. Data

yang telah diperoleh diproses pada mikrokontroler ESP32 dan disimpan pada microSD

Card. Hasil pengukuran ditampilkan pada LCD dan web page berupa konsentrasi

partikulat dalam satuan µg/m3. LED indikator digunakan sebagai penampil level klasifikasi

AQI (Air Quality Index).

3.1 Blok Diagram

Gambar 3.1 Blok Diagram Sistem Monitoring Partikulat

Gambar 3.1 merupakan blok diagram dari “Sistem Monitoring Partikulat”, blok

diagram ini untuk lebih menjelaskan Gambar 1.1. Blok diagram yang terdiri dari modul

sensor partikulat dan RTC sebagai input serta LCD 16x2, enam LED indikator partikulat,

web, dan microSD Card sebagai output. ESP32 digunakan sebagai mikrokontroler dan web

server.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 31: SISTEM MONITORING KONSENTRASI PARTIKULAT

19

Proses kerja monitoring konsentrasi partikulat diawali dengan membaca konsentrasi

partikulat oleh sensor PMS5003. Nilai yang didapat dari hasil pengukuran kemudian diolah

dalam ESP32. Pengolahan data oleh ESP32 membutuhkan modul RTC DS3231 sebagai

sumber pewaktuan pengambilan sampling. Hasil pembacaan sensor disimpan pada file data

logger pada microSD card yang selanjutnya ditampilkan pada LCD 16x2 dan web page.

Hasil pengukuran dalam 24 jam terakhir ditampilkan dalam bentuk grafik pada web page.

LED indikator digunakan sebagai penampil klasifikasi nilai AQI.

3.2 Perancangan Desain Box Sistem Monitoring Partikulat

Pada perancangan box “Sistem Monitoring Partikulat” bahan yang digunakan adalah

akrilik yang dibentuk balok dengan panjang alas 15 cm, lebar 5 cm, dan tinggi 8 cm.

Bagian belakang terdapat lubang berbentuk lingkaran dengan diameter lingkaran luar 1,8

cm dan diameter lingkaran dalam 1,2 cm yang dipergunakan sebagai jalur masuknya udara.

sebagai jalur keluar udara terdapat lubang berbentuk persegi panjang dengan panjang 2 cm

dan lebar 0,5 cm. Pada bagian bawah terdapat switch untuk mengaktifkan/mematikan LED

indikator konsentrasi partikulat dan push button untuk menentukan status kualitas udara

dan konsentrasi PM2.5 atau PM10 yang ditampilkan pada LCD seperti pada Gambar 3.2. (b).

Pada bagian depan akan terdapat LCD 16x2 sebagai penampil nilai konsentrasi partikulat

serta 6 LED indikator sebagai level nilai AQI (Air Quality Index). Pada bagian atas

terdapat button untuk mengaktifkan atau mematikan sistem seperti pada Gambar 3.2. (a).

(a) (b)

Gambar 3.2. (a) Desain Alat Tampak Depan (b) Desain Alat Tampak Belakang

3.3 Perancangan Perangkat Keras

Perancangan perangkat keras terdiri dari perancangan sistem utama yang mendukung

kinerja sistem. Perancangan ini terdiri dari perancangan sensor partikulat PMS5003, RTC

DMS3231, LCD 16x2, LED indikator, dan modul microSD Card.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 32: SISTEM MONITORING KONSENTRASI PARTIKULAT

20

3.3.1 Perancangan Sensor Partikulat PMS5003

Perancangan rangkaian sensor partikulat PMS5003 bertujuan untuk mendeteksi

keluaran dari sensor partikulat. PMS5003 berkomunikasi dengan ESP32 menggunakan

komunikasi Universal Asynchronous Receiver/Transmitter (UART). Pin RX sensor

dihubungkan dengan pin TX0 ESP32 dan pin RX0 dihubungkan dengan pin TX sensor

PMS5003. Keluaran dari sensor partikulat berdasarkan pada konsentrasi partikulat di udara

pada waktu sampling. Gambar 3.3. menunjukkan hubungan setiap pin dari sensor

partikulat PMS5003 dengan mikrokontroler ESP32.

Gambar 3.3. Rangkaian Sensor PMS5003

3.3.2 Modul microSD Card

Perancangan modul microSD card bertujuan menyimpan data konsentrasi partikulat

yang terukur. Pin MISO, MOSI, CLK, dan CS merupakan terminal khusus yang

difungsikan sebagai SPI (Serial Peripheral Interface) pada ESP 32. Gambar 3.4.

menunjukkan koneksi antara modul microSD card dengan ESP32.

Gambar 3.4. Rangkaian Modul microSD Card

3.3.3 RTC DS3231

Perancangan RTC DS3231 berfungsi untuk mengambil keluaran tanggal dan jam

pada RTC DS3231. Pewaktuan pada RTC digunakan sebagai waktu sampling sensor

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 33: SISTEM MONITORING KONSENTRASI PARTIKULAT

21

partikulat PMS5003. Gambar 3.5. menunjukkan koneksi antar modul RTC DS3231 dengan

ESP32. Pin SDA pada mikrokontroler dihubungkan dengan pin SDA pada RTC DS3231

yang digunakan untuk transmisi data. Mengirim/menerima clock menggunakan SCL yang

terdapat pada pin 22 pada ESP32 yang dihubungkan dengan pin SCL RTC DS3231.

Gambar 3.5. Rangkaian RTC DS3231

3.3.4 Perancangan LCD 16x2

Perancangan LCD 16x2 bertujuan untuk menampilkan data konsentrasi PM2.5, PM10,

dan status kualitas udara untuk PM2.5 dan PM10. Nilai-nilai komponen yang digunakan

mengacu pada datasheet yang ada. Nilai potensiometer adalah 20kΩ, potensiometer

digunakan sebagai pengatur kontras pencahayaan pada LCD. Setiap port pada LCD

disesuaikan dengan setiap port pada mikrokontroler ESP32. Pada perancangan ini terdapat

push button yang dihubungkan ke pin 36 ESP32. Push button digunakan untuk memilih

menampilkan status kualitas udara dari PM2.5 atau PM10. Rangkaian LCD 16x2

ditunjukkan pada Gambar 3.6.

Gambar 3.6. Rangkaian LCD 16x2

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 34: SISTEM MONITORING KONSENTRASI PARTIKULAT

22

3.3.5 LED Indikator

Perancangan LED indikator bertujuan untuk mengendalikan LED merah yang

digunakan sebagai LED indikator tingkat kualitas udara, terdapat pada Gambar 3.7. Arus

maksimum yang boleh melewati LED merah adalah 30 mA dan tegangan kerja LED merah

adalah 1,7 V - 2,1 V. Nilai tegangan pada setiap pin mikrokontroler ESP32 adalah 3,3 V

berdasarkan persamaan 2.2 dapat dihitung nilai resistor yang diperlukan agar tidak terjadi

arus berlebih yang menyebabkan LED terbakar.

LED indikator terdiri dari 6 LED merah yang dirangkai seri dengan resistor. Bagian

anoda LED dihubungkan dengan switch yang terhubung dengan ground. Switch digunakan

untuk menghidupkan atau mematikan LED. Ini bertujuan untuk menghemat daya baterai

jika LED indikator tidak diperlukan.

Gambar 3.7. Rangkaian LED Indikator

3.4 Perancangan Perangkat Lunak

Perancangan perangkat lunak terdiri dari perancangan diagram alir dan perancangan

desain tampilan web. Pada perancangan diagram alir terdiri dari beberapa bagian yaitu,

perancangan diagram alir utama, set waktu RTC, pengambilan data sensor partikulat,

penyimpanan data, dan pengiriman data.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 35: SISTEM MONITORING KONSENTRASI PARTIKULAT

23

3.4.1 Perancangan Diagram Alir Utama

Diagram alir utama menjelaskan tentang alur kerja program secara keseluruhan saat

sistem dijalankan. Rancangan diagram alir utama seperti pada Gambar 3.8. dimulai dengan

inisialisasi port mikrokontroler, acces point, dan static IP address yang akan digunakan

untuk menghubungkan peripheral dengan ESP32. Kemudian program akan

menghubungkan ESP32 dengan acces point, jika gagal terhubung dengan acces point

program akan kembali menghubungkan ke acces point. Kondisi tersebut akan terus

berulang sampai ESP32 terhubung dengan acces point. Saat ESP32 terhubung dengan

acces point dilakukan set waktu pada RTC. Set waktu RTC dijelaskan secara detail pada

sub-bab 3.4.2. Selanjutnya sensor partikulat akan mengambil data konsentrasi PM2.5 dan

PM10 yang ada pada udara sekitar. Pengambilan data konsentrasi PM2.5 dan PM10

dilakukan setiap satu menit dengan satuan µg/m3. Waktu dan tanggal pengambilan

sampling diperoleh dari data waktu dan tanggal RTC DS3231. Data yang diperoleh akan

dikonversi dalam bentuk AQI (air quality index) untuk menentukan tingkat kualitas udara.

Pengambilan data konsentrasi partikulat akan dijelaskan lebih detail pada sub-bab 3.4.3.

Gambar 3.8. Diagram Alir Utama

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 36: SISTEM MONITORING KONSENTRASI PARTIKULAT

24

Data pengukuran yang diperoleh maka disimpan pada file data logger pada microSD

card. Proses penyimpanan pada data logger akan lebih dijelaskan pada sub-bab 3.4.5.

Semua data pengukuran dan tingkat kualitas udara selanjutnya akan dikirim pada server

ESP32. Adapun pengiriman data akan lebih dijelaskan pada sub-bab 3.4.4. Data yang

dikirim pada server ESP32 maka ditampilkan pada web page. Selain itu data akan

ditampilkan pada LCD 16x2 dan LED. Proses penampil data akan lebih dijelaskan secara

detail pada sub-bab 3.4.6. Proses utama sistem akan terus berjalan hingga sistem

dimatikan.

3.4.2 Diagram Alir Desain Web

Gambar 3.9. Diagram Alir Desain Web

Diagram alir desain web menjelaskan tentang alur penampilan data yang ditampilkan

pada web page. Diagram alir desain web ditunjukkan pada Gambar 3.9. dimulai dengan

memberikan title pada dokumen HTML yang nantinya digunakan sebagai judul pada web

page. Kemudian dilakukan inisialisasi library chart.js dan mengatur format tampilan web

yang diletakkan pada element head HTML. Pada element body dilakukan pengaturan

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 37: SISTEM MONITORING KONSENTRASI PARTIKULAT

25

desain dan pengaturan informasi yang ditampilkan pada web page. Desain tampilan web

page pada Gambar 3.15. dimuat pada elemen ini. Selanjutnya program akan mengambil

nilai yang terukur dari sensor dan klasifikasi AQI setelah program mengirimkan ajax

request pada server ESP32.

3.4.3 Perancangan Diagram Alir Sub-Rutin Set Waktu RTC

Diagram Alir Sub-Rutin Set Waktu RTC merupakan penjabaran dari proses set waktu

RTC pada Gambar 3.8. Tujuan set waktu RTC adalah untuk sinkronisasi waktu RTC

DS3231 dengan waktu jaringan internet. Pada diagram alir ini set waktu RTC dimulai

dengan set NTP (Network Time Protocol) sesuai dengan zona waktu. Pada zona waktu

Indonesia bagian barat adalah +7 GMT dan satu jam terdiri dari 3600 detik sehingga set

NTP dapat dilakukan dengan 3600 x (+7) untuk zona waktu Indonesia bagian barat. Data

waktu dan tanggal NTP diambil untuk digunakan set data waktu dan tanggal pada RTC

DS3231. Apabila data waktu dan tanggal pada RTC gagal ter-update program kembali

mengambil data tanggal dan waktu pada NTP hingga set tanggal dan waktu RTC berhasil.

Proses ini akan terus berulang-ulang hingga update tanggal dan waktu RTC berhasil.

Diagram alir set waktu RTC terdapat pada Gambar 3.10.

Gambar 3.10 Diagram Alir Sub-Rutin Set Waktu RTC

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 38: SISTEM MONITORING KONSENTRASI PARTIKULAT

26

3.4.4 Perancangan Diagram Alir Sub-Rutin Pengambilan Data Sensor Partikulat

Diagram Alir Sub-Rutin Pengambilan data sensor partikulat merupakan penjabaran

dari proses mengambil data sensor partikulat pada Gambar 3.8. Pada diagram alir ini

dimulai dengan mengubah active mode sebagai default mode sensor menjadi passive mode.

Program kemudian melakukan request pembacaan konsentrasi partikulat pada sensor

sesuai dengan protokol pada Tabel 3.1. Output dari sensor PMS5003 berupa data digital

dalam satuan µg/m3. Pengambilan output sensor menggunakan baudrate sebesar 9600bps.

Tabel 3.1. Pengambilan Data Partikulat

Start

Byte

Start

Byte

Command Data 1 Data 2 Verity

Byte

Verity

Byte

Keterangan

0x42 0x4D 0xE1 0x00 0x00 0x01 0x71 Mengubah ke

passive mode

0x42 0x4D 0xE2 0x00 0x00 0x01 0x71 Request data pada

passive mode

Setelah data konsentrasi partikulat yang diperoleh dilakukan perhitungan nilai AQI,

berdasarkan persamaan 2.1 dan Tabel 2.1. Sebagai contoh nilai rata-rata konsentrasi PM10

yang terukur adalah 120 µg/m3 dan nilai rata-rata konsentrasi PM2.5 adalah 88 µg/m

3.

Menggunakan Tabel 2.1. breakpoint PM10 untuk konsentrasi 120 µg/m3 adalah 55 µg/m

3

dan 154 µg/m3 dan nilai indeks adalah 51 dan 100. Sedangkan nilai breakpoint PM2.5 untuk

88 µg/m3 adalah 55,5 – 150,4 dan nilai indeks AQI adalah 151 dan 200, maka sesuai

dengan persamaan 2.1 nilai indeks PM2.5 dan PM10 dapat diperoleh sebagai berikut:

a. Nilai indeks PM2.5 ( ) ( ) ≈

b. Nilai indeks PM10 ( ) ( ) ≈

AQI adalah nilai tertinggi yang terhitung dari setiap polutan sehingga AQI yang

terukur adalah 168. Setelah proses perhitungan selesai program akan melanjutkan

mengklasifikasi nilai AQI. Pengklasifikasian nilai AQI dijelaskan lebih terperinci pada

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 39: SISTEM MONITORING KONSENTRASI PARTIKULAT

27

sub-bab 3.4.7. Program ini akan berulang setiap satu menit untuk melakukan sampling

konsentrasi partikulat seperti pada Gambar 3.11.

Gambar 3.11. Diagram Alir Sub-Rutin Pengambilan Data Sensor Partikulat

3.4.5 Perancangan Diagram Sub-Rutin Alir Penyimpanan Data

Data hasil pengukuran dirancang untuk disimpan pada microSD card setelah semua

hasil pengukuran di dapat dari sensor. Penyimpanan data hasil pengukuran terlebih dahulu

harus diubah dalam format tertentu. Setelah data diubah dalam bentuk format tertentu

barulah proses penyimpanan dapat dilakukan. Adapun format penyimpanan data

ditunjukkan pada Tabel 3.1.

Tabel 3.1. Format Data yang Disimpan

Jenis Data Format Data

Konsentrasi PM2.5 (µg/m3) Float

Konsentrasi PM10 (µg/m3) Float

Data tanggal dan waktu String

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 40: SISTEM MONITORING KONSENTRASI PARTIKULAT

28

Program dimulai seperti Gambar 3.12. dengan memastikan modul microSD card

terpasang dengan baik. Apabila modul microSD card belum terpasang program tidak akan

melakukan penyimpanan data. Kondisi tersebut akan terjadi berulang-ulang hingga modul

microSD card terpasang dengan benar. Apabila modul microSD card sudah terpasang

dengan benar program akan mengakses file data logger yang sudah dibuat sebelumnya

dalam microSD card. File yang digunakan untuk menyimpan data logger adalah file

dengan format .txt. Selanjutnya program menulis data konsentrasi PM2.5, konsentrasi

PM10, tanggal, dan waktu. Program dirancang untuk menyimpan data setiap pengambilan

sampling dilakukan.

Gambar 3.12. Diagram Alir Sub-Rutin Penyimpanan Data

3.4.6 Perancangan Diagram Alir Sub-Rutin Pengiriman Data

Proses monitoring pada “Sistem Monitoring Partikulat” dirancang agar dapat diakses

jarak jauh tanpa menggunakan kabel penghubung. Data hasil pengukuran dikirim pada

server ESP32. Data dapat terkirim jika ESP32 sudah terhubung dengan server ESP32.

Proses pengiriman data dilakukan secara real time bersamaan dengan proses penyimpanan

data pada data logger. Pengiriman data secara real time menggunakan ajax yang

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 41: SISTEM MONITORING KONSENTRASI PARTIKULAT

29

memungkinkan pengguna dapat meng-update data tanpa melakukan refres pada halaman

web.

Gambar 3.13. Diagram Alir Sub-Rutin Pengiriman Data

Pada pengiriman data dilakukan penyesuaian dengan format data yang dikirim. Data

yang dikirim berupa data konsentrasi PM2.5, konsentrasi PM10, klasifikasi AQI, dan tanggal

dan waktu sampling. Format data yang dikirim ditunjukkan pada Tabel 3.2. Proses

pengiriman data dirancang agar dapat menampilkan grafik konsentrasi PM2.5 dan PM10

dalam 24 jam terakhir. Diagram alir pengiriman data ditunjukkan pada Gambar 3.13.

Tabel 3.2. Format Data yang Dikirim

Jenis Data Format Data

Konsentrasi PM2.5 (µg/m3) String

Konsentrasi PM10 (µg/m3) String

Klasifikasi AQI String

Data tanggal dan waktu String

3.4.7 Perancangan Diagram Alir Sub-Rutin Menampilkan Data

Diagram Alir Sub-Rutin Menampilkan data merupakan penjabaran dari proses

menampilkan data pada Gambar 3.9. Setelah semua proses pengukuran dilakukan sensor

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 42: SISTEM MONITORING KONSENTRASI PARTIKULAT

30

selesai, data-data hasil pengukuran ditampilkan dalam LCD, web page, dan LED. Program

dimulai dengan menampilkan konsentrasi PM2.5 dan PM10 pada web page, selain itu

program menampilkan grafik konsentrasi PM2.5 dan PM10. Selanjutnya program

menampilkan data konsentrasi PM2.5 pada kolom pertama LCD dan konsentrasi PM10 pada

kolom kedua. Diagram alir sub-rutin menampilkan data ditunjukkan pada Gambar 3.14.

Program menampilkan status kualitas udara PM2.5 dan konsentrasi PM2.5 pada LCD

jika push button ditekan. Status kualitas udara PM2.5 antara 0,0 hingga 12,0µg/m3

dikategorikan baik, sedangkan konsentrasi 12,1 hingga 35,4 µg/m3 dikategorikan sedang.

Kategori tidak sehat untuk kelompok tertentu berkisar antara 35,5 hingga 55,4 µg/m3 dan

kategori tidak sehat antara 150,5 hingga 250,4 µg/m3. Konsentrasi PM2.5 antara 250,5

hingga 350,4 µg/m3 dikategorikan sangat tidak sehat dan konsentrasi lebih dari 250,5

µg/m3 dikategorikan berbahaya. Pada penekanan selanjutnya program menampilkan

konsentrasi PM10 dan status kualitas udara PM10. Status kualitas udara PM2.5 dan PM10

diklasifikasikan berdasar pada Tabel 2.1.

Perhitungan nilai AQI yang diperoleh digunakan untuk klasifikasi AQI, nilai AQI

kurang dari 50 diklasifikasikan pada kategori baik. Program selanjutnya menampilkan

“baik” untuk klasifikasi AQI pada halaman web dan menyalakan LED satu. Pada nilai AQI

antar 51 – 100 program menampilkan “sedang” pada halaman web dan menyalakan LED

satu dan LED dua. Jika nilai AQI antara 101 – 150 program menampilkan “tidak sehat

untuk kelompok tertentu” pada halaman web dan menyalakan LED satu, LED dua, dan

LED tiga. Program menampilkan “tidak sehat” pada halaman web untuk nilai AQI 151 –

200 serta menyalakan LED indikator satu, dua, tiga, dan empat. LED satu, dua, tiga,

empat, dan lima menyala jika program mengklasifikasi nilai pada kategori “sangat tidak

sehat” dan menampilkan pada halaman web untuk rentan AQI 201 – 300. Nilai AQI lebih

dari 300 diklasifikasikan berbahaya dan menyalakan semua LED indikator. Klasifikasi

AQI mengacu pada Tabel 2.1.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 43: SISTEM MONITORING KONSENTRASI PARTIKULAT

31

Gambar 3.14 Diagram Alir Sub-Rutin Penampil Data

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 44: SISTEM MONITORING KONSENTRASI PARTIKULAT

32

Gambar 3.14 (Lanjutan) Diagram Alir Sub-Rutin Penampil Data

3.4.8 Perancangan Tampilan Halaman Web

Halaman web merupakan tampilan antarmuka yang berfungsi menampilkan data

hasil pengukuran pada sistem monitoring partikulat. Pembuatan tampilan halaman web

menggunakan Hypertext Markup Language (HTML) dan JavaScript. Informasi yang

ditampilkan berupa klasifikasi nilai AQI, nilai konsentrasi PM2.5, dan konsentrasi PM10

yang terukur. Pada halaman web juga ditampilkan grafik konsentrasi PM2.5 dan PM10 yang

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 45: SISTEM MONITORING KONSENTRASI PARTIKULAT

33

dibatasi pada rentang waktu 24 jam. Adapun rancangan tampilan halaman web ditunjukkan

pada Gambar 3.15.

Gambar 3.15. Rancangan Tampilan Halaman Web

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 46: SISTEM MONITORING KONSENTRASI PARTIKULAT

33

BAB IV

HASIL PENGAMATAN DAN PEMBAHASAN

Bab ini membahas hasil implementasi alat sistem monitoring konsentrasi partikulat

serta hasil pengujian. Hasil pengujian berupa tingkat kesalahan pengukuran konsentrasi

PM2.5 dan PM10 apabila dibandingkan dengan alat ukur lain serta kesesuaian kinerja alat

berdasarkan manfaat, tujuan, dan batasan masalah yang terdapat pada BAB I.

4.1 Perubahan Perancangan

Terdapat perubahan yang terjadi pada alat. Perubahan tersebut meliputi perubahan

susunan box alat, perubahan wiring pada LED dan LCD, dan perubahan program update

RTC. Perubahan tersebut terjadi karena adanya hal-hal yang tidak diperhitungkan pada

awal perancangan sehingga perlu dilakukan penyesuaian ulang.

4.1.1 Perubahan Perancangan Desain Box Alat

Box alat dirancang berukuran cukup kecil agar mudah dipindahkan oleh user.

Perancangan desain box alat yang semula ditunjukkan pada Gambar 3.2. diubah menjadi

Gambar 4.1. dilakukan untuk menyesuaikan dengan ukuran komponen yang digunakan.

Peletakan button dan switch diubah ke bagian atas box untuk mempermudah penggunaan

oleh user. Perubahan ini tidak mempengaruhi fungsi dan kinerja sistem.

Gambar 4.1. Perubahan Desain Box Sistem

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 47: SISTEM MONITORING KONSENTRASI PARTIKULAT

34

4.1.2 Perubahan Perancangan LCD 16x2

LCD 16x2 digunakan sebagai penampil konsentrasi PM2.5 dan PM10 serta status

kualitas udara dari setiap konsentrasi. Perubahan yang dilakukan untuk mempermudah

wiring pada PCB. Perancangan LCD yang semula ditunjukkan pada Gambar 3.6. menjadi

Gambar 4.2. tidak mempengaruhi fungsional dari LCD .

Gambar 4.2. Perubahan Perancangan LCD 16x2

4.1.3 Perubahan Perancangan LED Indikator

Perubahan perancangan pada LED indikator dilakukan untuk mempermudah wiring

LED indikator pada PCB. Perubahan wiring tidak berpengaruh pada fungsi LED sebagai

indikator AQI. Perubahan port yang digunakan yang semula pada Gambar 3.7. diubah

menjadi Gambar 4.3. disesuaikan dengan peletakan LED indikator terhadap port yang

digunakan pada ESP32.

Gambar 4.3. Perubahan Perancangan Led Indikator

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 48: SISTEM MONITORING KONSENTRASI PARTIKULAT

35

4.1.4 Perubahan Diagram Alir Sub-Rutin Set Waktu RTC

Set waktu RTC dilakukan apabila waktu RTC tidak sesuai dengan zona waktu yang

digunakan. Perancangan awal pada Gambar 3.10. NTP tidak memiliki informasi jika

terjadi perubahan zona waktu. Set waktu RTC hanya dilakukan pada zona Waktu

Indonesia bagian Barat (WIB), sehingga perlu dilakukan perubahan program apabila terjadi

perubahan zona waktu.

Perubahan perancangan pada Gambar 4.4. menggunakan waktu browser yang mampu

menyesuaikan dengan zona waktu browser diakses. Apabila button ditekan client

mengirim data waktu pada server. Data waktu yang diterima oleh server digunakan untuk

set waktu RTC. ESP32 mengirimkan status RTC ter-update apabila rtc berhasil di update.

Program tidak akan mengirimkan data waktu apabila button tidak ditekan oleh user.

Gambar 4.4. Perubahan Perancangan Diagram Alir Set Waktu RTC

4.2 Sistem Monitoring Alat

Box sistem monitoring konsentrasi partikulat dibuat menggunakan akrilik putih susu

yang dibentuk persegi panjang. Box memiliki panjang 12cm, lebar 8cm dan tinggi 9 cm.

Bentuk fisik sistem monitoring konsentrasi partikulat ditunjukkan pada Gambar 4.5. Setiap

bagian dari alat dijelaskan pada Tabel 4.1.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 49: SISTEM MONITORING KONSENTRASI PARTIKULAT

36

(a) (b)

Gambar 4.5. (a) Bentuk Fisik Tampak Depan (b) Bentuk Fisik Tampak Belakang

Tabel 4.1. Bagian-Bagian Alat

No. Keterangan

1 Switch untuk LED

2 Sakelar on/off sistem

3 Button LCD

4 LED Indikator

5 LCD display

6 Jalur masuk udara

7 Jalur keluar udara

4.2.1 Sistem Pengukuran Konsentrasi Partikulat

Pengukuran konsentrasi partikulat menggunakan sensor PMS5003 untuk mengukur

konsentrasi PM2.5 dan PM10 di udara. Data yang dihasilkan dalam µg/m3 digunakan untuk

menghitung AQI dan status kualitas udara dari setiap konsentrasi. Hasil pengukuran dan

perhitungan ditampilkan pada LCD, LED indikator dan halaman web.

4.2.1.1 Pengujian Konsentrasi PM2.5 dan PM10

Pengujian konsentrasi partikulat dilakukan untuk mendapatkan kesesuaian antara

pengukuran yang diperoleh oleh alat dengan alat ukur lain (Ageruisi). Melalui pengujian

diketahui tingkat ke tidak sesuaian alat dengan Ageruisi. Proses pengujian alat dilakukan di

dalam kardus berukuran 51 cm x 32 cm yang ditutup rapat (Gambar 4.6.). Sumber polutan

menggunakan obat nyamuk bakar. Adapun spesifikasi alat ukur lain yang dijadikan

pembanding sebagai berikut:

Nama : Ageruisi

Satuan pengukuran : µg/m3

Resolusi : 0-999 µg/m3

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 50: SISTEM MONITORING KONSENTRASI PARTIKULAT

37

Akurasi : 0.0001

Waktu Sampling : 10 detik

Gambar 4.6. Proses Pengujian Alat

Proses pengujian menghasilkan data-data pengukuran yang ditunjukkan pada Tabel

4.2. dan 4.3. Dilakukan perhitungan persentase kesalahan untuk menentukan kesesuaian

alat dengan Ageruisi. Adapun rumus perhitungan persentase kesalahan sebagai berikut:

Berdasarkan perhitungan persentase kesalahan diperoleh rata-rata tingkat kesalahan

sebesar 13,75% untuk PM2.5 dan 8,14% untuk PM10.

Tabel 4.2. Data Hasil Pengukuran Konsentrasi PM2.5

No Percobaan I Percobaan II Percobaan III Rata-rata

Error Alat Ageruisi Alat Ageruisi Alat Ageruisi Alat Ageruisi

1 483 502 469 518 480 516 477,3 512 6,77

2 437 440 427 446 428 441 430,7 442,3 2,64

3 312 347 318 347 310 352 313,3 348,7 10,13

4 227 278 247 272 230 275 234,7 275 14,67

5 205 242 200 240 209 246 204,7 242,7 15,66

6 151 170 157 172 145 168 151 170 11,18

7 110 126 115 128 110 122 111,7 125,3 10,9

8 73 85 77 80 77 82 75,67 82,33 8,1

9 44 45 45 42 43 40 44 42,33 3,94

10 21 15 24 15 21 13 22 14,33 53,49

Rata-Rata Error 13,75

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 51: SISTEM MONITORING KONSENTRASI PARTIKULAT

38

Tabel 4.3. Data Hasil Pengukuran Konsentrasi PM10

No Percobaan I Percobaan II Percobaan III Rata-rata

Error Alat Ageruisi Alat Ageruisi Alat Ageruisi Alat Ageruisi

1 613 582 600 600 651 588 621,3 590 5,31

2 553 510 538 517 548 511 546,3 512,7 6,57

3 411 401 399 402 388 408 399,3 403,7 1,07

4 322 304 315 304 288 319 308,3 309 0,22

5 251 280 256 278 268 285 258,3 281 8,07

6 205 197 202 199 188 194 198,3 196,7 0,85

7 148 146 150 148 134 141 144 145 0,69

8 91 98 93 92 97 95 93,67 95 1,4

9 48 49 51 48 50 46 49,67 47,67 4,2

10 23 17 28 17 24 15 25 16,33 53,1

Rata-Rata Error 8,14

Data hasil pengukuran diolah dalam bentuk grafik seperti pada Gambar 4.7. dan 4.8.

untuk mendapatkan persamaan garis antara pengukuran alat dan Ageruisi. Persamaan garis

yang diperoleh menunjukkan nilai pengukuran dari Ageruisi nilai pengukuran alat sudah

cukup linier.

Gambar 4.7. Grafik Perbandingan Pengukuran PM2.5

Gambar 4.8. Grafik Perbandingan Pengukuran PM10

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 52: SISTEM MONITORING KONSENTRASI PARTIKULAT

39

Dilakukan pengujian kesesuaian alat dan Ageruisi pada kondisi udara tanpa polutan.

Proses pengujian menghasilkan data pada Tabel 4.4. dan Tabel 4.5.

Tabel 4.4. Data Hasil Pengukuran PM2.5 tanpa polutan

Percobaan Ke- Alat Ageruisi

I 20 15

II 22 15

III 22 13

Rata-Rata Pengukuran 21,33 14,33

Tabel 4.5. Data Hasil Pengukuran PM10 tanpa polutan

Percobaan Ke- Alat Ageruisi

I 22 17

II 25 17

III 24 15

Rata-Rata Pengukuran 23,67 16,33

Proses pengujian konsentrasi PM2.5 dan PM10 menunjukkan konsentrasi dari PM2.5

dan PM10 cukup sesuai dengan Ageruisi. Terjadi simpangan yang tidak terlalu signifikan

dari kedua data hasil pengukuran. Dugaan terjadinya simpangan tersebut adalah sebagai

berikut:

1. Terjadinya perbedaan waktu sampling antara alat dan Ageruisi. Perbedaan waktu

sampling mengakibatkan perbedaan konsentrasi yang di peroleh dalam jangka waktu

tertentu.

2. Pengaruh posisi sumber polutan terhadap alat ukur. Semakin dekat alat terhadap

sumber polutan, konsentrasi yang di peroleh akan semakin besar.

Hasil pengukuran konsentrasi PM2.5 dan PM10 memiliki rata-rata error pengukuran

sebesar 13,75% untuk PM2.5 dan 8,14% untuk PM10. Sistem monitoring konsentrasi

partikulat berjalan dengan baik dengan kebenaran relatif pengukuran konsentrasi PM2.5

sebesar 86,25% dan 91,86% untuk PM10.

4.2.1.2 Pengujian Proses Penampil Data pada LCD dan LED Indikator

Proses penampil data pada Sitsem Monitoring Konsentrasi Partikulat telah berhasil

dilakukan. Proses monitoring konsentrasi PM2.5 (Gambar 4.9.) dan konsentrasi PM10

(Gambar 4.10.) pada LCD berjalan dengan baik. Status kualitas udara yang ditampilkan

pada LCD sudah sesuai dengan Tabel 2.1. LCD menampilkan konsentrasi PM2.5 dan status

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 53: SISTEM MONITORING KONSENTRASI PARTIKULAT

40

kualitas udara PM2.5 saat button tidak ditekan. Konsentrasi PM10 serta kualitas udara PM10

ditampilkan saat button ditekan. LED indikator menyala berdasarkan klasifikasi AQI pada

Tabel 2.1.

Gambar 4.9. Tampilan konsentrasi PM2.5 pada LCD

Gambar 4.10. Tampilan konsentrasi PM10 pada LCD

4.2.1.3 Pengujian Proses Penampil Data pada Halaman Web

Halaman web digunakan untuk mempermudah perangkat lain (laptop/telepon

genggam) melakukan monitoring. Agar dapat mengakses halaman web perangkat mobile

(laptop/ telepon genggam) harus terhubung dengan acces point.

Perangkat yang sudah terhubung dengan acces point dapat mengakses halaman web

melalui IP 192.168.1.20. Data yang ditampilkan pada halaman web merupakan data yang

dikirim oleh ESP32. Keterangan halaman web pada Gambar 4.11. ditunjukkan pada Tabel

4.6.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 54: SISTEM MONITORING KONSENTRASI PARTIKULAT

41

Gambar 4.11. Tampilan Halaman Web

Tabel 4.6. Keterangan Tampilan Halaman Web

No Keterangan

1 Kategori AQI

2 Waktu sampling

3 Grafik PM10

4 Grafik PM2.5

5 Nilai konsentrasi PM2.5

6 Nilai konsentrasi PM10

7 Waktu browser

8 Button untuk set waktu RTC

Pengujian monitoring konsentrasi PM2.5 dan PM10 pada halaman web telah berhasil

dilakukan. Hal itu dibuktikan dengan konsentrasi partikulat yang ditampilkan pada LCD

sama dengan yang ditampilkan pada laptop dan telepon genggam. Masing-masing tampilan

ditunjukkan pada Gambar 4.12.

(a) Monitoring PM2.5 pada LCD

(b) Monitoring PM10 pada LCD

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 55: SISTEM MONITORING KONSENTRASI PARTIKULAT

42

(c) Monitoring pada telepon

genggam

(d) Monitoring pada laptop

Gambar 4.12. Pengujian Tampilan Halaman Web

4.3 Pengujian dan Pembahasan Perangkat Lunak

4.3.1 Program Membuat Acces Point dan Server

Pembuatan acces point mula-mula dilakukan dengan inisialisasi SSID, password, dan

IP address yang digunakan. IP yang digunakan adalah 192.168.1.20 yang menggunakan

jaringan lokal. Agar dapat terhubung dengan internet dibutuhkan IP public yang diatur

oleh ISP (Internet Service Provider). SSID yang digunakan adalah Sistem Monitoring dan

menggunakan password 12345678 seperti pada Gambar 4.13.

Gambar 4.13. Listing Program Inisialisasi SSID, Password, dan IP

Gambar 4.14. menunjukkan program untuk membuat access point. Program terlebih

dahulu mematikan wifi untuk menghindari crash dengan saat server dimulai dengan

membuat ssid.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 56: SISTEM MONITORING KONSENTRASI PARTIKULAT

43

Gambar 4.14. Listing membuat acces point

4.3.2 Program Desain Halaman Web

Halaman web merupakan user interface yang menampilkan konsentrasi PM2.5 dan

PM10. Gambar 4.15. digunakan untuk inisialisasi chart.js dan membuat title halaman html.

Gambar 4.15. Insialisasi HTML

CSS (Cascanding Style Sheets) digunakan untuk mengatur format tampilan pada

halaman html. CSS dapat digunakan untuk mengontrol warna, ukuran teks, posisi,

background pada halaman html. Listring program pada Gambar 4.16. digunakan untuk

mendeklarasikan CSS.

Gambar 4.16. Deklarasi CSS pada HTML

Pada Gambar 4.17. mengambil style yang telah dideklarasikan sebelumnya. Style

yang diperoleh memberikan output seperti pada Gambar 4.18.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 57: SISTEM MONITORING KONSENTRASI PARTIKULAT

44

Gambar 4.17. Listing Program Menampilkan Halaman HTML

Gambar 4.18. Tampilan Halaman HTML

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 58: SISTEM MONITORING KONSENTRASI PARTIKULAT

45

Grafik garis dibuat dengan menggunakan fasilitas chart.js dan menampilkan 2

variabel pengukuran. Warna garis untuk PM2.5 menggunakan warna orange dan PM10

merah muda. Listing program grafik ditunjukkan pada Gambar 4.19.

Gambar 4.19. Listing Program Grafik

4.3.3 Program Set waktu RTC

Set waktu dijalankan manual oleh user dengan menekan button pada halaman web.

Program menyimpan data waktu browser pada variabel waktu. Saat button ditekan

program mengirimkan request pada server dan data waktu dengan metode GET (Gambar

4.20.). Jika RTC berhasil ter-update client mendapat respon berupa status RTC. Set waktu

RTC dapat dilakukan secara otomatis dengan membandingkan kesesuaian waktu browser

dengan waktu RTC saat user mengakses halaman web.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 59: SISTEM MONITORING KONSENTRASI PARTIKULAT

46

Gambar 4.20. Listing Program Mengirim Data Waktu

Variabel terimaData digunakan untuk menyimpan data waktu yang terima dari server

dengan nama kirimWaktu. Data yang diterima dipisahkan kembali dalam beberapa variabel

untuk mempermudah set waktu pada RTC. RTC di set sesuai dengan data tahun, bulan,

tanggal, jam, menit, dan detik yang diterima dari browser. Listing program set RTC

ditunjukkan pada Gambar 4.21.

Gambar 4.21. Program Set Waktu RTC

4.4.3.1 Pengujian Proses set waktu RTC

Set waktu pada RTC menggunakan waktu browser berhasil dilakukan. Gambar 4.22.

(a) menunjukkan waktu sampling pada sensor berbeda dengan waktu pada browser. Pada

Gambar 4.22. (b) membuktikan waktu RTC sudah ter-update sesuai dengan waktu pada

browser.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 60: SISTEM MONITORING KONSENTRASI PARTIKULAT

47

(a) (b)

Gambar 4.22. (a) Waktu RTC belum ter-update (b) Waktu RTC sudah ter-update

4.3.4 Program Pengukuran Konsentrasi Partikulat

PMS5003 menggunakan komunikasi UART sehingga sensor memiliki sumber clock

tersendiri. Baudrate yang digunakan yaitu 9600 bps. Pada awal program dilakukan

dilakukan inisialisasi baudrate, parity check, dan port yang digunakan. Mode default

sensor merupakan mode aktif yang melakukan sensing terus menerus. Diperlukan

pengubahan mode sensor menjadi mode passive dengan mengirim isi dari array passive

pada sensor seperti pada Gambar 4.23.

Gambar 4.23. Listing Program Insialisasi Sensor

Pengukuran konsentrasi partikulat dilakukan setiap 60 detik sekali dengan

mengirimkan perintah request. ESP32 menerima beberapa byte data dari sensor. Saat 16

bit kedua atau panjang frame yang diterima sama dengan 28 dilakukan penyimpanan nilai

konsentrasi PM2.5 dan konsentrasi PM10 pada array data25 dan data10 (Gambar 4.24.).

Variabel nilai25 dan nilai10 digunakan untuk menyimpan konsentrasi dari PM2.5 dan PM10

yang nantinya dikirim pada server. Variabel i digunakan untuk menghitung banyak sensing

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 61: SISTEM MONITORING KONSENTRASI PARTIKULAT

48

yang telah dilakukan. Pada saat pengambilan nilai konsentrasi dilakukan pencatatan waktu

sampling.

Gambar 4.24. Listing Program Mengambil Nilai Konsentrasi Partikulat

Nilai konsentrasi yang diterima diklasifikasi untuk menentukan IHi, ILo, BPHi,

BPLo. Variabel string nilai25 dan nilai 10 diubah dalam bentuk integer menggunakan

fungsi toInt() pada arduino. Setiap nilai yang digunakan menghitung nilai index dari PM2.5

dan PM10. Nilai index yang diperoleh dibandingkan untuk memperoleh nilai AQI. Listring

program menghitung nilai index ditunjukkan pada Gambar 4.25.

Gambar 4.25. Listing Program Menghitung Nilai Index

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 62: SISTEM MONITORING KONSENTRASI PARTIKULAT

49

Gambar 4.25. (Lanjutan) Listing Program Menghitung Nilai Index

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 63: SISTEM MONITORING KONSENTRASI PARTIKULAT

50

4.3.5 Program Penyimpanan Data

Proses penyimpanan data pada alat sistem monitoring partikulat dilakukan dengan

mengumpulkan hasil pengukuran ke dalam file .txt yang diletakkan pada microSD card.

Terlebih dahulu dilakukan pengecekan modul microSD card sudah terpasang dengan

benar, jika belum program tidak akan memproses perintah selanjutnya. (Gambar 4.26.).

Gambar 4.26. Listing Program Cek Status microSD Card

Data variabel pengukuran disimpan setiap proses pengukuran konsentrasi partikulat

telah selesai dilakukan. Program mengakses file Konsentrasi Partikulat.txt pada direkstori

microSD card. Apabila file yang dimaksud tidak ditemukan file tersebut akan

ditambahkan. Data variabel ditambahkan pada file Konsentrasi Partikulat.txt apabila file

sudah berhasil diakses. Listing Program penyimpanan data ditunjukkan pada Gambar 4.27.

Gambar 4.27. Listing Program Penyimpanan Data

4.3.5.1 Pengujian Proses Penyimpanan Data

Proses penyimpanan data pada file data logger berhasil dilakukan. File data logger

terdapat pada microSD card dengan nama DataLogger.txt. Data konsentrasi partikulat dan

waktu sampling disimpan setiap satu menit sekali. Gambar 4.28. membuktikan data waktu

yang disimpan berganti setiap satu menit sekali.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 64: SISTEM MONITORING KONSENTRASI PARTIKULAT

51

Gambar 4.28. File Data Logger

4.3.6 Program Pengiriman Data

Proses pengiriman data terjadi ketika ada request dari client. Program akan mengirim

text html pada Gambar 4.29. saat client pertama kali terhubung. Pada server.send(200,

“text/html”, s) 200 merupakan standar respon bahwa request telah berhasil. Sedangkan

text/html adalah tipe konten HTTP yang dikirim pada client.

Gambar 4.29. Listing Program Mengirim Halaman HTML

setInterval() pada Gambar 4.30. merupakan metode yang digunakan untuk

memanggil fungsi pada interval millisecond. setInterval() memanggil Ambildata() dengan

interval 30 detik terus menerus hingga halaman web di tutup.

Gambar 4.30. Listing Program Set Interval

Gambar 4.31. merupakan program yang digunakan untuk melakukan request pada

server dengan metode GET pada uri /kirim. Program juga mengolah data yang dikirim oleh

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 65: SISTEM MONITORING KONSENTRASI PARTIKULAT

52

server yang berupa JSON. split(„,‟) digunakan untuk mengubah variabel string menjadi

array yang dipisahkan dengan koma.

Gambar 4.31. Listing Program Request Data

Data hasil pengukuran dan perhitungan disimpan dalam variabel kirim yang akan

dikirim dengan format json. Setelah request berhasil, server mengirimkan data baru pada

variabel kirim. Listing program pengiriman data ditunjukkan pada Gambar 4.32.

Gambar 4.32. Listing Program Kirim Data

4.3.7 Program Penampil Data

Penampilan data dijalankan setelah semua proses pengukuran dan penyimpanan

berhasil dilakukan. Program menampilkan data-data hasil pengukuran pada LCD, LED

indikator, dan halaman web. Data hasil pengukuran oleh sensor PMS5003 diklasifikasi

berdasarkan status kualitas PM2.5 dan PM10 (Gambar 4.33.). digitalRead (3) == 0 artinya

menampilkan konsentrasi PM2.5 status kualitas udaranya, sedangkan digitalRead (3) == 1

artinya menampilkan konsentrasi PM10 dan status kualitas udara PM10 pada LCD. Program

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 66: SISTEM MONITORING KONSENTRASI PARTIKULAT

53

untuk menampilkan konsentrasi PM2.5 dan PM10 pada LCD ditunjukkan pada Gambar

4.34.

Gambar 4.33. Listing Program Menentukan Status Kualitas Udara

Gambar 4.34. Listing Program Menampilkan Konsentrasi Partikulat pada LCD

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 67: SISTEM MONITORING KONSENTRASI PARTIKULAT

54

Hasil perhitungan nilai index digunakan untuk melakukan diklasifikasi AQI. Variabel

AQI bertujuan untuk menyimpan klasifikasi AQI yang dikirim pada server saat user

mengakses halaman web. LED indikator diberi logika 1 sesuai dengan klasifikasi AQI

yang dilakukan. Listing Program penampil data pada Gambar 4.35.

.

Gambar 4.35. Listing Program Klasifikasi AQI

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 68: SISTEM MONITORING KONSENTRASI PARTIKULAT

55

BAB V

KESIMPULAN

5.1 Kesimpulan

Berdasarkan hasil pengujian alat sistem monitoring konsentrasi partikulat dapat diperoleh

kesimpulan sebagai berikut:

1. Sistem pengukuran konsentrasi partikulat berjalan dengan baik, dengan rata-rata

kesalahan relatif pengukuran sebesar 8,14% untuk PM10 dan 13,75% untuk PM2.5.

2. Alat mampu menampilkan konsentrasi partikulat pada LCD dan halaman web serta

menampilkan klasifikasi AQI pada LED dan halaman web.

3. Alat mampu melakukan penyimpanan data hasil pengukuran.

5.2 Saran

Saran bagi pengembangan sistem selanjutnya sebagai berikut:

1. Monitoring melalui halaman web dirancang menggunakan IP public sehingga dapat

diakses dari jarak yang lebih jauh.

2. Proses set waktu RTC dilakukan secara otomatis.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 69: SISTEM MONITORING KONSENTRASI PARTIKULAT

56

DAFTAR PUSTAKA

[1] Peraturan Pemerintah Republik Indonesia nomor 41 tahun 1999 tentang pengendalian

pencemaran udara.

[2] Machdar, Izarul, 2018, Pengantar Pengendalian Pencemaran: Pencemaran Air,

Pencemaran Udara, dan Kebisingan, 1nd

ed, Deepublish, Yogyakarta.

[3] Wardoyo, Arinto Yudi Ponco, 2016, Emisi Partikulat Kendaraan Bermotor dan

Dampak Kesehatan, 1nd

ed, Universitas Brawijaya Press, Malang.

[4] -----, 2018, Health and Environmental Effects of Particulate Matter (PM),

https://www.epa.gov/pm-pollution/health-and-environmental-effects-particulate-

matter-pm, diakses 28 November 2019.

[5] Gertrudis, 2010, Hubungan antara Kadar Partikulat (PM10) Udara Rumah Tinggal

dengan Kejadian ISPA pada Balita di Sekitar Pabrik Semen PT Indocement

Citeureup Tahun 2010, Tesis, Program Studi Ilmu Kesehatan Masyarakat, Fakultas

Kesehatan Masyarakat, Universitas Indonesia, Depok.

[6] Huboyo, H.S., Sutrisno, E., 2009, Analisis Konsentrasi Particulate Matter 10 (PM10)

Pada Udara Di luar Ruang (Studi Kasus : Stasiun Tawang - Semarang), TEKNIK,

vol. 30, no. 1, hal 44-48.

[7] Aprianto, Y., Nurhasanah, Sanubary, I., 2018, Prediksi Kadar Particulate Matter

(PM10) untuk Pemantauan Kualitas Udara Menggunakan Jaringan Syaraf Tiruan

Studi Kasus Kota Pontianak, POSITRON, vol. 8, no. 1, hal 15-20.

[8] Nirmala, D.S., Prasasti, C.I., 2015, Konsentrasi PM2.5 dan Analisis Karakteristik

Pekerja Terhadap Keluhan Kesehatan Pekerja Pengasapan Ikan di Kelurahan Tambak

Wedi Surabaya, Jurnal Kesehatan Lingkungan, vol. 8, no. 1, hal 57-68.

[9] -----, 2005, WHO Air quality guidelines for particulate matter, ozone, nitrogen

dioxide and sulphur dioxide, Global update 2005, World Health Organization.

[10] -----, 2013, National Ambient Air Quality Standards for Particulate Matter; Final

Rule, Environmental Protection Agency, vol. 78, no. 10, hal 3086-3287.

[11] -----, 1999, Air Quality Index Reporting; Final Rule, Environmental Protection

Agency, Vol. 64, no.149, hal 42530-42549.

[12] -----, 2016, Datasheet PMS5003 Series, Plantower.

[13] -----, 2019, Datasheet ESP32 WROOM 32, Espressif Systems.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 70: SISTEM MONITORING KONSENTRASI PARTIKULAT

57

[14] -----, 2015, Datasheet Real Time Clock DS3231, Maxim Integrated Products.

[15] D. Kho, "Teknik Elektronika," Teknik Elektronika, [Online]. Available:

https://teknikelektronika.com/cara-menghitung-nilai-resistor-untuk-led-light-

emitting-diode/. [Accessed 15 Februari 2020].

[16] Nurcahyo, S., 2012, Aplikasi dan Teknik Permograman Mikrokontroler AVR Atmel,

Penerbit Andi, Yogyakarta.

[17] -----, 2005, Datasheet LCD Module, Shenzhen Eone Electronics.

[18] -----, Datasheet microSDHC memory card, Kingston Technologi.

[19] Handayani, Rima M., 2019, Sistem Instrumentasi Data Logger Parameter Elektrik

Sel Elektrokimia Secara Otomatis Berbasis Arduino Dan Borland Delphi 7, Tugas

Akhir, Jurusan Fisika, Fakultas Matematika dan Ilmu Pengetahuan Alam, Universitas

Lampung, Bandar Lampung.

[20] Sidik, B., Pohan, H.I., 2007, Pemrograman WEB dengan HTML (Disertai lebih dari

200 contoh program beserta tampilan grafisnya), Informatika, Bandung.

[21] Jumardi, Rio, 2019, Website Statis Konsep dan Praktik HTML – CSS, Uwais

Inspirasi Indonesia, Ponorogo.

[22] Oktaviani, Dian P., 2010, Menjadi Programmer Jempolan Menggunakan PHP,

MedianKom, Yogyakarta.

[23] Suryana, T., Koesheryatin, 2014, Aplikasi Internet Menggunakan HTML, CSS, &

JavaScript, PT Elex Media, Jakarta.

[24] Enterprise, Jubilee, 2017, Otodidak Pemrograman JavaScript, PT Elex Media

Komputindo, Jakarta.

[25] Winarno, E., Zaki, A., SmitDev Community, 2014, 3 in 1: JavaScript, jQuery dan

jQuery Mobile, PT Elex Media Komputindo, Jakarta.

[26] Zali, A., Smitdev Community, 2008, Seri Penuntun Praktis AJAX untuk Pemula, PT

Elex Media Komputindo, Jakarta.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 71: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-1

LAMPIRAN

Lampiran 1. Listing program ESP32

#include <LiquidCrystal.h>

#include <WiFiClient.h>

#include <WebServer.h>

#include <WiFi.h>

#include <SPI.h>

#include <SD.h>

#include "RTClib.h"

#include "web.h"

const char* ssid = "Monitoring Partikulat";

const char* password = "12345678";

IPAddress local_ip(192,168,1,20);

IPAddress gateway(192,168,1,1);

IPAddress subnet(255,255,255,0);

RTC_DS3231 rtc;

WebServer server(80);

const int RS = 13, EN = 12, d4 = 14, d5 = 27, d6 = 26, d7 = 25;

LiquidCrystal lcd(RS, EN, d4, d5, d6, d7);

const int CS = 5;

int ch,ch1,IHi25,ILo25,BPHi25,BPLo25,IHi10,ILo10,BPHi10,BPLo10,Ip,Ip1,Ip2;

int passive[] = 0x42, 0x4D, 0xE1, 0x00, 0x00, 0x01, 0x70;

int request[] = 0x42, 0x4D, 0xE2, 0x00, 0x00, 0x01, 0x71;

int konsentrasi[16];

int i=0;

int data25[1440];

int data10[1440];

int copy25[1440];

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 72: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-2

int copy10[1440];

String PM25, grafik25, PM10, grafik10, AQI, dataSimpan, Status25, Status10, waktu,

nilai25 , nilai10, c, yaxis;

unsigned long mulai=0;

void kirimHTML()

String s = MAIN_page;

server.send(200, "text/html", s);

void kirimData()

Serial.println("kirimData");

String kirim =

"\"klasi\":\""+AQI+"\",\"PM25\":\""+String(nilai25)+"\",\"PM10\":\""+String(nilai10)+"\"

,\"G25\":\""+grafik25+"\",\"G10\":\""+String(grafik10)+"\",\"waktuRTC\":\""+waktu+"\",\

"plot\":\""+yaxis+"\"";

server.send(200, "text/plane", kirim);

void RTC()

String terimaData = server.arg("kirimWaktu");

String tanggal = terimaData.substring(0,2);

String bulan = terimaData.substring(3,5);

String tahun = terimaData.substring(6,10);

String jam = terimaData.substring(12,14);

String menit = terimaData.substring(15,17);

String detik = terimaData.substring(18,20);

rtc.adjust(DateTime(tahun.toInt(), bulan.toInt(), tanggal.toInt(), jam.toInt(), menit.toInt(),

detik.toInt()));

String statusRTC = "RTC terupdate";

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 73: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-3

server.send(200, "text/plane", statusRTC);

void setup()

Serial.begin(115200);

Serial2.begin(9600, SERIAL_8N1, 16, 17);

for (int i=0; i<7; i++)

Serial2.write(passive[i]);

lcd.begin(16, 2);

lcd.clear();

WiFi.disconnect();

WiFi.mode(WIFI_OFF);

WiFi.mode(WIFI_AP);

delay(2000);

WiFi.softAP(ssid, password);

WiFi.softAPConfig(local_ip, gateway, subnet);

if (!SD.begin(CS))

return;

if (! rtc.begin())

Serial.flush();

if (rtc.lostPower())

rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 74: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-4

for (int i=0; i<7; i++)

Serial2.write(passive[i]);

server.on("/", kirimHTML);

server.on("/kirim", kirimData);

server.on("/setRTC", RTC);

server.begin();

pinMode(3, INPUT);

pinMode(1, OUTPUT);

pinMode(32, OUTPUT);

pinMode(33, OUTPUT);

pinMode(4, OUTPUT);

pinMode(15, OUTPUT);

pinMode(2, OUTPUT);

void loop()

unsigned long sekarang = millis();

if (sekarang - mulai >= 60000)

mulai = sekarang;

Ambildata();

if (digitalRead(3)==1)

lcd.setCursor(1, 0);

lcd.print("PM2.5=");

lcd.setCursor(7, 0);

lcd.print(nilai25);

lcd.setCursor(11, 0);

lcd.print("ug/m3");

lcd.setCursor(0, 1);

lcd.print(Status25);

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 75: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-5

delay(100);

lcd.clear();

if (digitalRead(3)==0)

lcd.setCursor(1, 0);

lcd.print("PM10=");

lcd.setCursor(7, 0);

lcd.print(nilai10);

lcd.setCursor(11, 0);

lcd.print("ug/m3");

lcd.setCursor(0, 1);

lcd.print(Status10);

delay(200);

lcd.clear();

server.handleClient();

void Ambildata()

for (int j=0; j<7; j++)

Serial2.write(request[j]);

while (Serial2.available())

for (int j=0; j<17; j++)

ch = Serial2.read();

ch1 = Serial2.read();

konsentrasi[j] = word(ch, ch1);

if (konsentrasi[1] == 28)

int kalibrasiPM25=(0.8523*konsentrasi[3])-24.594;

int kalibrasiPM10=(0.758*konsentrasi[4])-20.188;

data25[i]=kalibrasiPM25;

data10[i]=kalibrasiPM10;

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 76: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-6

nilai25=kalibrasiPM25;

nilai10=kalibrasiPM10;

DateTime now = rtc.now();

waktu = String(now.day()) + "/" + String(now.month()) + "/" + String(now.year()) + " "

+ String(now.hour()) + ":" + String(now.minute());

PM25 += String(data25[i]) + ",";

grafik25=PM25;

int pan25 = PM25.length();

grafik25.remove(pan25-1,1);

PM10 += String(data10[i]) + ",";

grafik10=PM10;

int pan10 = PM10.length();

grafik10.remove(pan10-1,1);

c += String(i+1) + ",";

yaxis = c;

int panj = yaxis.length();

yaxis.remove(panj-1,1);

dataSimpan = waktu + " " + "PM2.5 : " + String(data25[i]) + ", PM10 : " +

String(data10[i]);

Simpandata();

Tampildata();

i++;

if (i >= 1440)

PM25="";

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 77: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-7

PM10="";

for (int j=0; j<1440; j++)

copy25[j]=data25[j+1];

copy10[j]=data10[j+1];

for (int j=0; j<1440; j++)

data25[j]=copy25[j];

data10[j]=copy10[j];

PM25 += String(data25[j]) + ",";

PM10 += String(data10[j]) + ",";

void Simpandata ()

File dataFile = SD.open("/DataLogger.txt", FILE_APPEND);

if (dataFile)

dataFile.println(dataSimpan);

dataFile.close();

void Tampildata ()

//Menentukan status kualitas udara PM2.5

if (nilai25.toInt() >= 0 && nilai25.toInt() <= 12)

Status25 = "Baik";

if (nilai25.toInt() >= 13 && nilai25.toInt() <= 35)

Status25 ="Sedang";

if (nilai25.toInt() >= 36 && nilai25.toInt() <= 55)

Status25 ="Tidak Sehat untuk Kelompok Tertentu";

if (nilai25.toInt() >= 56 && nilai25.toInt() <= 150)

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 78: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-8

Status25 ="Tidak Sehat";

if (nilai25.toInt() >= 151 && nilai25.toInt() <= 250)

Status25 ="Sangat Tidak Sehat";

if (nilai25.toInt() >= 251)

Status25 ="Bahaya";

//Menentukan status kualitas udara PM10

if (nilai10.toInt() >= 0 && nilai10.toInt() <= 54)

Status10 ="Baik";

if (nilai10.toInt() >= 55 && nilai10.toInt() <= 154)

Status10 ="Sedang";

if (nilai10.toInt() >= 155 && nilai10.toInt() <= 254)

Status10 ="Tidak Sehat untuk Kelompok Tertentu";

if (nilai10.toInt() >= 255 && nilai10.toInt() <= 354)

Status10 ="Tidak Sehat";

if (nilai10.toInt() >= 355 && nilai10.toInt() <= 424)

Status10 ="Sangat Tidak Sehat";

if (nilai10.toInt() >= 425)

Status10 ="Bahaya";

//Menghitung index PM2.5

if (nilai25.toInt() >= 0 && nilai25.toInt() <= 12)

IHi25=50;

ILo25=0;

BPHi25=12;

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 79: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-9

BPLo25=0;

if (nilai25.toInt() >= 13 && nilai25.toInt() <= 35)

IHi25=100;

ILo25=51;

BPHi25=35;

BPLo25=13;

if (nilai25.toInt() >= 36 && nilai25.toInt() <= 55)

IHi25=150;

ILo25=101;

BPHi25=55;

BPLo25=36;

if (nilai25.toInt() >= 56 && nilai25.toInt() <= 150)

IHi25=200;

ILo25=151;

BPHi25=150;

BPLo25=56;

if (nilai25.toInt() >= 151 && nilai25.toInt() <= 250)

IHi25=300;

ILo25=201;

BPHi25=250;

BPLo25=151;

if (nilai25.toInt() >= 251 && nilai25.toInt() <= 350)

IHi25=400;

ILo25=301;

BPHi25=350;

BPLo25=251;

if (nilai25.toInt() >= 351)

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 80: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-10

IHi25=500;

ILo25=401;

BPHi25=500;

BPLo25=351;

//Menghitung index PM10

if (nilai10.toInt() >= 0 && nilai10.toInt() <= 54)

IHi10=50;

ILo10=0;

BPHi10=54;

BPLo10=0;

if (nilai10.toInt() >= 55 && nilai10.toInt() <= 154)

IHi10=100;

ILo10=51;

BPHi10=154;

BPLo10=55;

if (nilai10.toInt() >= 155 && nilai10.toInt() <= 254)

IHi10=150;

ILo10=101;

BPHi10=254;

BPLo10=155;

if (nilai10.toInt() >= 255 && nilai10.toInt() <= 354)

IHi10=200;

ILo10=151;

BPHi10=354;

BPLo10=255;

if (nilai10.toInt() >= 355 && nilai10.toInt() <= 424)

IHi10=300;

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 81: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-11

ILo10=201;

BPHi10=424;

BPLo10=355;

if (nilai10.toInt() >= 425 && nilai10.toInt() <= 504)

IHi10=400;

ILo10=301;

BPHi10=504;

BPLo10=425;

if (nilai10.toInt() >= 505)

IHi10=500;

ILo10=401;

BPHi10=604;

BPLo10=505;

Ip1=((IHi25-ILo25)/(BPHi25-BPLo25))*(data25[i]-BPLo25)+ILo25;

Ip2=((IHi10-ILo10)/(BPHi10-BPLo10))*(data10[i]-BPLo10)+ILo10;

if (Ip1 > Ip2)

(Ip=Ip1);

else

(Ip=Ip2);

if (Ip >=0 && Ip<= 50)

AQI = "Baik";

digitalWrite(1, HIGH);

digitalWrite(32, LOW);

digitalWrite(2, LOW);

digitalWrite(15, LOW);

digitalWrite(4, LOW);

digitalWrite(33, LOW);

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 82: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-12

if (Ip >=51 && Ip<= 100)

AQI = "Sedang";

digitalWrite(1, HIGH);

digitalWrite(32, HIGH);

digitalWrite(2, LOW);

digitalWrite(15, LOW);

digitalWrite(4, LOW);

digitalWrite(33, LOW);

if (Ip >=101 && Ip<= 150)

AQI = "Tidak Sehat untuk Kelompok Tertentu";

digitalWrite(1, HIGH);

digitalWrite(32, HIGH);

digitalWrite(2, HIGH);

digitalWrite(15, LOW);

digitalWrite(4, LOW);

digitalWrite(33, LOW);

if (Ip >=151 && Ip<= 200)

AQI = "Tidak Sehat";

digitalWrite(1, HIGH);

digitalWrite(32, HIGH);

digitalWrite(2, HIGH);

digitalWrite(15, HIGH);

digitalWrite(4, LOW);

digitalWrite(33, LOW);

if (Ip >=201 && Ip<= 300)

AQI = "Sangat Tidak Sehat";

digitalWrite(1, HIGH);

digitalWrite(32, HIGH);

digitalWrite(2, HIGH);

digitalWrite(15, HIGH);

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 83: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-13

digitalWrite(4, HIGH);

digitalWrite(33, LOW);

if (Ip >=301)

AQI = "Bahaya";

digitalWrite(1, HIGH);

digitalWrite(32, HIGH);

digitalWrite(2, HIGH);

digitalWrite(15, HIGH);

digitalWrite(4, HIGH);

digitalWrite(33, HIGH);

Lampiran 2. Listing Program Web

const char MAIN_page[] PROGMEM = R"=====(

<!DOCTYPE html>

<html>

<head>

<title>Sistem Monitoring Partikulat</title>

<script

src="https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.min.js"></script>

<style>

*text-align:center; font-family:'Times New Roman'; margin:0; padding:0;

.atas

font-weight:150;

height:500px;

width:100%;

.konsentrasi

width: 50%;

height: 50%;

padding-top:20px;

float:left;

canvas

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 84: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-14

-moz-user-select: none;

-webkit-user-select: none;

-ms-user-select: none;

h1font-size:60px; padding-top:50px

h2font-size:40px; padding-top:40px

h3font-size:30px; padding-top:15px

pfont-size:20px; padding-top:15px

</style>

</head>

<body>

<div class="atas">

<h1> Sistem Monitoring Partikulat</h1>

<h2 id="klasifikasi"> - </h2>

<p id="waktu">-</p>

<canvas id="Chart" width="400px" height="400px"></canvas>

<ul class="konsentrasi">

<h2>PM2.5</h2>

<h3 id="PMdualima">- ug/m3</h3>

</ul>

<ul class="konsentrasi">

<h2>PM10</h2>

<h3 id="PMsepuluh">- ug/m3</h3>

</ul>

Locale time : <span id="Localetime">-</span><br>

Status RTC: <span id="status">last update</span><br>

<button type="button" onclick="sendData()">Update RTC</button>

</div>

<script>

var nilai25 = [];

var nilai10 = [];

var axis = [];

var waktu;

function sendData()

waktu = new Date().toLocaleString('en-GB');

var xhttp = new XMLHttpRequest();

xhttp.onreadystatechange = function()

if (this.readyState == 4 && this.status == 200)

document.getElementById("status").innerHTML =

this.responseText;

;

xhttp.open("GET", "setRTC?kirimWaktu="+waktu, true);

xhttp.send();

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 85: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-15

function showGraph()

var ctx = document.getElementById("Chart").getContext('2d');

var Chart2 = new Chart(ctx,

type: 'line',

data:

labels: axis,

datasets: [

label: "PM2.5",

fill: false,

backgroundColor: 'rgba( 243, 156, 18 , 1)',

borderColor: 'rgba( 243, 156, 18 , 1)',

data: nilai25,

,

label: "PM10",

fill: false,

backgroundColor: 'rgba( 243, 156, 156 , 1)',

borderColor: 'rgba( 243, 156, 156 , 1)',

data: nilai10,

],

,

options:

title:

display: true,

text: "Konsentrasi PM2.5 dan PM10"

,

maintainAspectRatio: false,

elements:

line:

tension: 0.5

,

scales:

yAxes: [

ticks:

beginAtZero:true

]

);

window.onload = function()

showGraph();

;

setInterval(function()

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 86: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-16

Ambildata();

, 30000);

function Ambildata()

waktu = new Date().toLocaleString('en-GB');

document.getElementById("Localetime").innerHTML =waktu;

var baru = new XMLHttpRequest();

baru.onreadystatechange = function()

if (this.readyState == 4 && this.status == 200)

var teks = this.responseText;

var obj = JSON.parse(teks);

document.getElementById("klasifikasi").innerHTML = obj.klasi;

document.getElementById("PMdualima").innerHTML = obj.PM25

+ " ug/m3";

document.getElementById("PMsepuluh").innerHTML = obj.PM10

+ " ug/m3";

document.getElementById("waktu").innerHTML = obj.waktuRTC;

var a = obj.G25;

nilai25 = a.split(',');

var c = obj.G10;

nilai10 = c.split(',');

var b = obj.plot;

axis = b.split(',');

showGraph();

;

baru.open("GET", "/kirim", true);

baru.send();

</script>

</body>

</html>

)=====";

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 87: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-17

Lampiran 3 Desain Layout PCB

Lampiran 4 Dokumentasi Pengambilan Data

1. Data nomer 1

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 88: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-18

2. Data nomer 2

3. Data nomer 3

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 89: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-19

4. Data nomer 4

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 90: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-20

5. Data nomer 5

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 91: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-21

6. Data nomer 6

7. Data nomer 7

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 92: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-22

8. Data nomer 8

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 93: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-23

9. Data nomer 9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 94: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-24

10. Data nomer 10

11. Data konsentrasi tanpa polutan

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 95: SISTEM MONITORING KONSENTRASI PARTIKULAT

L-25

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 96: SISTEM MONITORING KONSENTRASI PARTIKULAT

ESP32-WROOM-32Datasheet

Version 2.9

Espressif Systems

Copyright © 2019

www.espressif.com

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 97: SISTEM MONITORING KONSENTRASI PARTIKULAT

About This Document

This document provides the specifications for the ESP32-WROOM-32 module.

Revision History

For revision history of this document, please refer to the last page.

Documentation Change Notification

Espressif provides email notifications to keep customers updated on changes to technical documentation. Please

subscribe at www.espressif.com/en/subscribe.

Certification

Download certificates for Espressif products from www.espressif.com/en/certificates.

Disclaimer and Copyright Notice

Information in this document, including URL references, is subject to change without notice. THIS DOCUMENT IS

PROVIDED AS IS WITH NO WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABIL-

ITY, NON-INFRINGEMENT, FITNESS FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE

ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE.

All liability, including liability for infringement of any proprietary rights, relating to use of information in this docu-

ment is disclaimed. No licenses express or implied, by estoppel or otherwise, to any intellectual property rights

are granted herein. The Wi-Fi Alliance Member logo is a trademark of the Wi-Fi Alliance. The Bluetooth logo is a

registered trademark of Bluetooth SIG.

All trade names, trademarks and registered trademarks mentioned in this document are property of their respective

owners, and are hereby acknowledged.

Copyright © 2019 Espressif Inc. All rights reserved.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 98: SISTEM MONITORING KONSENTRASI PARTIKULAT

Contents

1 Overview 1

2 Pin Definitions 3

2.1 Pin Layout 3

2.2 Pin Description 3

2.3 Strapping Pins 4

3 Functional Description 6

3.1 CPU and Internal Memory 6

3.2 External Flash and SRAM 6

3.3 Crystal Oscillators 6

3.4 RTC and Low-Power Management 7

4 Peripherals and Sensors 8

5 Electrical Characteristics 9

5.1 Absolute Maximum Ratings 9

5.2 Recommended Operating Conditions 9

5.3 DC Characteristics (3.3 V, 25 °C) 9

5.4 Wi-Fi Radio 10

5.5 BLE Radio 11

5.5.1 Receiver 11

5.5.2 Transmitter 11

5.6 Reflow Profile 12

6 Schematics 13

7 Peripheral Schematics 14

8 Physical Dimensions 16

9 Recommended PCB Land Pattern 17

10Learning Resources 18

10.1 Must-Read Documents 18

10.2 Must-Have Resources 18

Revision History 19

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 99: SISTEM MONITORING KONSENTRASI PARTIKULAT

List of Tables1 ESP32-WROOM-32 Specifications 1

2 Pin Definitions 3

3 Strapping Pins 5

4 Absolute Maximum Ratings 9

5 Recommended Operating Conditions 9

6 DC Characteristics (3.3 V, 25 °C) 9

7 Wi-Fi Radio Characteristics 10

8 Receiver Characteristics – BLE 11

9 Transmitter Characteristics – BLE 11

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 100: SISTEM MONITORING KONSENTRASI PARTIKULAT

List of Figures1 ESP32-WROOM-32 Pin Layout (Top View) 3

2 Reflow Profile 12

3 ESP32-WROOM-32 Schematics 13

4 ESP32-WROOM-32 Peripheral Schematics 14

5 Discharge Circuit for VDD33 Rail 14

6 Reset Circuit 15

7 Physical Dimensions of ESP32-WROOM-32 16

8 Recommended PCB Land Pattern 17

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 101: SISTEM MONITORING KONSENTRASI PARTIKULAT

1. Overview

1. Overview

ESP32-WROOM-32 is a powerful, generic Wi-Fi+BT+BLE MCU module that targets a wide variety of applications,

ranging from low-power sensor networks to the most demanding tasks, such as voice encoding, music streaming

and MP3 decoding.

At the core of this module is the ESP32-D0WDQ6 chip*. The chip embedded is designed to be scalable and

adaptive. There are two CPU cores that can be individually controlled, and the CPU clock frequency is adjustable

from 80 MHz to 240 MHz. The user may also power off the CPU and make use of the low-power co-processor to

constantly monitor the peripherals for changes or crossing of thresholds. ESP32 integrates a rich set of peripherals,

ranging from capacitive touch sensors, Hall sensors, SD card interface, Ethernet, high-speed SPI, UART, I²S and

I²C.

Note:

* For details on the part numbers of the ESP32 family of chips, please refer to the document ESP32 Datasheet.

The integration of Bluetooth, Bluetooth LE and Wi-Fi ensures that a wide range of applications can be targeted,

and that the module is all-around: using Wi-Fi allows a large physical range and direct connection to the Internet

through a Wi-Fi router, while using Bluetooth allows the user to conveniently connect to the phone or broadcast

low energy beacons for its detection. The sleep current of the ESP32 chip is less than 5 µA, making it suitable

for battery powered and wearable electronics applications. The module supports a data rate of up to 150 Mbps,

and 20 dBm output power at the antenna to ensure the widest physical range. As such the module does offer

industry-leading specifications and the best performance for electronic integration, range, power consumption,

and connectivity.

The operating system chosen for ESP32 is freeRTOS with LwIP; TLS 1.2 with hardware acceleration is built in as

well. Secure (encrypted) over the air (OTA) upgrade is also supported, so that users can upgrade their products

even after their release, at minimum cost and effort.

Table 1 provides the specifications of ESP32-WROOM-32.

Table 1: ESP32-WROOM-32 Specifications

Categories Items Specifications

Certification

RF certification FCC/CE-RED/IC/TELEC/KCC/SRRC/NCC

Wi-Fi certification Wi-Fi Alliance

Bluetooth certification BQB

Green certification RoHS/REACH

Test Reliablity HTOL/HTSL/uHAST/TCT/ESD

Wi-FiProtocols

802.11 b/g/n (802.11n up to 150 Mbps)

A-MPDU and A-MSDU aggregation and 0.4 µs guard interval

support

Frequency range 2.4 GHz ~ 2.5 GHz

Bluetooth

Protocols Bluetooth v4.2 BR/EDR and BLE specification

Radio

NZIF receiver with –97 dBm sensitivity

Class-1, class-2 and class-3 transmitter

AFH

Espressif Systems 1 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 102: SISTEM MONITORING KONSENTRASI PARTIKULAT

1. Overview

Categories Items Specifications

Audio CVSD and SBC

Hardware

Module interfacesSD card, UART, SPI, SDIO, I2C, LED PWM, Motor PWM, I2S,

IR, pulse counter, GPIO, capacitive touch sensor, ADC, DAC

On-chip sensor Hall sensor

Integrated crystal 40 MHz crystal

Integrated SPI flash 4 MB

Operating voltage/Power supply 3.0 V ~ 3.6 V

Operating current Average: 80 mA

Minimum current delivered by

power supply500 mA

Recommended operating tem-

perature range–40 °C ~ +85 °C

Package size (18.00±0.10) mm × (25.50±0.10) mm × (3.10±0.10) mm

Moisture sensitivity level (MSL) Level 3

Espressif Systems 2 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 103: SISTEM MONITORING KONSENTRASI PARTIKULAT

2. Pin Definitions

2. Pin Definitions

2.1 Pin Layout

Keepout Zone

GND

IO23

IO22

TXD0

RXD0

IO21

NC

IO19

IO18

IO5

IO17

IO16

IO4

IO0

38

37

36

35

34

33

32

31

30

29

28

27

26

25

24

23

22

21

20

19

18

17

16

15

IO2

IO15

SD

1

SD

0

CLK

CM

D

SD

3

SD

2

IO13

GN

D

1

2

3

4

5

6

7

8

9

10

11

12

13

14

GND

3V3

EN

SENSOR_VP

SENSOR_VN

IO34

IO35

IO32

IO33

IO25

IO26

IO27

IO14

IO12

39 GND

Figure 1: ESP32-WROOM-32 Pin Layout (Top View)

2.2 Pin Description

ESP32-WROOM-32 has 38 pins. See pin definitions in Table 2.

Table 2: Pin Definitions

Name No. Type Function

GND 1 P Ground

3V3 2 P Power supply

EN 3 I Module-enable signal. Active high.

SENSOR_VP 4 I GPIO36, ADC1_CH0, RTC_GPIO0

SENSOR_VN 5 I GPIO39, ADC1_CH3, RTC_GPIO3

IO34 6 I GPIO34, ADC1_CH6, RTC_GPIO4

IO35 7 I GPIO35, ADC1_CH7, RTC_GPIO5

IO32 8 I/OGPIO32, XTAL_32K_P (32.768 kHz crystal oscillator input), ADC1_CH4,

TOUCH9, RTC_GPIO9

IO33 9 I/OGPIO33, XTAL_32K_N (32.768 kHz crystal oscillator output), ADC1_CH5,

TOUCH8, RTC_GPIO8

Espressif Systems 3 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 104: SISTEM MONITORING KONSENTRASI PARTIKULAT

2. Pin Definitions

Name No. Type Function

IO25 10 I/O GPIO25, DAC_1, ADC2_CH8, RTC_GPIO6, EMAC_RXD0

IO26 11 I/O GPIO26, DAC_2, ADC2_CH9, RTC_GPIO7, EMAC_RXD1

IO27 12 I/O GPIO27, ADC2_CH7, TOUCH7, RTC_GPIO17, EMAC_RX_DV

IO14 13 I/OGPIO14, ADC2_CH6, TOUCH6, RTC_GPIO16, MTMS, HSPICLK, HS2_CLK,

SD_CLK, EMAC_TXD2

IO12 14 I/OGPIO12, ADC2_CH5, TOUCH5, RTC_GPIO15, MTDI, HSPIQ, HS2_DATA2,

SD_DATA2, EMAC_TXD3

GND 15 P Ground

IO13 16 I/OGPIO13, ADC2_CH4, TOUCH4, RTC_GPIO14, MTCK, HSPID, HS2_DATA3,

SD_DATA3, EMAC_RX_ER

SHD/SD2* 17 I/O GPIO9, SD_DATA2, SPIHD, HS1_DATA2, U1RXD

SWP/SD3* 18 I/O GPIO10, SD_DATA3, SPIWP, HS1_DATA3, U1TXD

SCS/CMD* 19 I/O GPIO11, SD_CMD, SPICS0, HS1_CMD, U1RTS

SCK/CLK* 20 I/O GPIO6, SD_CLK, SPICLK, HS1_CLK, U1CTS

SDO/SD0* 21 I/O GPIO7, SD_DATA0, SPIQ, HS1_DATA0, U2RTS

SDI/SD1* 22 I/O GPIO8, SD_DATA1, SPID, HS1_DATA1, U2CTS

IO15 23 I/OGPIO15, ADC2_CH3, TOUCH3, MTDO, HSPICS0, RTC_GPIO13, HS2_CMD,

SD_CMD, EMAC_RXD3

IO2 24 I/OGPIO2, ADC2_CH2, TOUCH2, RTC_GPIO12, HSPIWP, HS2_DATA0,

SD_DATA0

IO0 25 I/O GPIO0, ADC2_CH1, TOUCH1, RTC_GPIO11, CLK_OUT1, EMAC_TX_CLK

IO4 26 I/OGPIO4, ADC2_CH0, TOUCH0, RTC_GPIO10, HSPIHD, HS2_DATA1,

SD_DATA1, EMAC_TX_ER

IO16 27 I/O GPIO16, HS1_DATA4, U2RXD, EMAC_CLK_OUT

IO17 28 I/O GPIO17, HS1_DATA5, U2TXD, EMAC_CLK_OUT_180

IO5 29 I/O GPIO5, VSPICS0, HS1_DATA6, EMAC_RX_CLK

IO18 30 I/O GPIO18, VSPICLK, HS1_DATA7

IO19 31 I/O GPIO19, VSPIQ, U0CTS, EMAC_TXD0

NC 32 - -

IO21 33 I/O GPIO21, VSPIHD, EMAC_TX_EN

RXD0 34 I/O GPIO3, U0RXD, CLK_OUT2

TXD0 35 I/O GPIO1, U0TXD, CLK_OUT3, EMAC_RXD2

IO22 36 I/O GPIO22, VSPIWP, U0RTS, EMAC_TXD1

IO23 37 I/O GPIO23, VSPID, HS1_STROBE

GND 38 P Ground

Notice:

* Pins SCK/CLK, SDO/SD0, SDI/SD1, SHD/SD2, SWP/SD3 and SCS/CMD, namely, GPIO6 to GPIO11 are connected

to the integrated SPI flash integrated on the module and are not recommended for other uses.

2.3 Strapping Pins

ESP32 has five strapping pins, which can be seen in Chapter 6 Schematics:

Espressif Systems 4 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 105: SISTEM MONITORING KONSENTRASI PARTIKULAT

2. Pin Definitions

• MTDI

• GPIO0

• GPIO2

• MTDO

• GPIO5

Software can read the values of these five bits from register ”GPIO_STRAPPING”.

During the chip’s system reset release (power-on-reset, RTC watchdog reset and brownout reset), the latches

of the strapping pins sample the voltage level as strapping bits of ”0” or ”1”, and hold these bits until the chip

is powered down or shut down. The strapping bits configure the device’s boot mode, the operating voltage of

VDD_SDIO and other initial system settings.

Each strapping pin is connected to its internal pull-up/pull-down during the chip reset. Consequently, if a strapping

pin is unconnected or the connected external circuit is high-impedance, the internal weak pull-up/pull-down will

determine the default input level of the strapping pins.

To change the strapping bit values, users can apply the external pull-down/pull-up resistances, or use the host

MCU’s GPIOs to control the voltage level of these pins when powering on ESP32.

After reset release, the strapping pins work as normal-function pins.

Refer to Table 3 for a detailed boot-mode configuration by strapping pins.

Table 3: Strapping Pins

Voltage of Internal LDO (VDD_SDIO)

Pin Default 3.3 V 1.8 V

MTDI Pull-down 0 1

Booting Mode

Pin Default SPI Boot Download Boot

GPIO0 Pull-up 1 0

GPIO2 Pull-down Don’t-care 0

Enabling/Disabling Debugging Log Print over U0TXD During Booting

Pin Default U0TXD Active U0TXD Silent

MTDO Pull-up 1 0

Timing of SDIO Slave

Pin DefaultFalling-edge Sampling

Falling-edge Output

Falling-edge Sampling

Rising-edge Output

Rising-edge Sampling

Falling-edge Output

Rising-edge Sampling

Rising-edge Output

MTDO Pull-up 0 0 1 1

GPIO5 Pull-up 0 1 0 1

Note:

• Firmware can configure register bits to change the settings of ”Voltage of Internal LDO (VDD_SDIO)” and ”Timing

of SDIO Slave” after booting.

• The module integrates a 3.3 V SPI flash, so the pin MTDI cannot be set to 1 when the module is powered up.

The strapping pins need a setup and hold time before and after the EN signal goes high. For details please refer

to Section Strapping Pins in ESP32 Datasheet.

Espressif Systems 5 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 106: SISTEM MONITORING KONSENTRASI PARTIKULAT

3. Functional Description

3. Functional Description

This chapter describes the modules and functions integrated in ESP32-WROOM-32.

3.1 CPU and Internal Memory

ESP32-D0WDQ6 contains two low-power Xtensa® 32-bit LX6 microprocessors. The internal memory includes:

• 448 KB of ROM for booting and core functions.

• 520 KB of on-chip SRAM for data and instructions.

• 8 KB of SRAM in RTC, which is called RTC FAST Memory and can be used for data storage; it is accessed

by the main CPU during RTC Boot from the Deep-sleep mode.

• 8 KB of SRAM in RTC, which is called RTC SLOW Memory and can be accessed by the co-processor during

the Deep-sleep mode.

• 1 Kbit of eFuse: 256 bits are used for the system (MAC address and chip configuration) and the remaining

768 bits are reserved for customer applications, including flash-encryption and chip-ID.

3.2 External Flash and SRAM

ESP32 supports multiple external QSPI flash and SRAM chips. More details can be found in Chapter SPI in the

ESP32 Technical Reference Manual. ESP32 also supports hardware encryption/decryption based on AES to pro-

tect developers’ programs and data in flash.

ESP32 can access the external QSPI flash and SRAM through high-speed caches.

• The external flash can be mapped into CPU instruction memory space and read-only memory space simul-

taneously.

– When external flash is mapped into CPU instruction memory space, up to 11 MB + 248 KB can be

mapped at a time. Note that if more than 3 MB + 248 KB are mapped, cache performance will be

reduced due to speculative reads by the CPU.

– When external flash is mapped into read-only data memory space, up to 4 MB can be mapped at a

time. 8-bit, 16-bit and 32-bit reads are supported.

• External SRAM can be mapped into CPU data memory space. Up to 4 MB can be mapped at a time. 8-bit,

16-bit and 32-bit reads and writes are supported.

ESP32-WROOM-32 integrates a 4 MB SPI flash, which is connected to GPIO6, GPIO7, GPIO8, GPIO9, GPIO10

and GPIO11. These six pins cannot be used as regular GPIOs.

3.3 Crystal Oscillators

The module uses a 40-MHz crystal oscillator.

Espressif Systems 6 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 107: SISTEM MONITORING KONSENTRASI PARTIKULAT

3. Functional Description

3.4 RTC and Low-Power Management

With the use of advanced power-management technologies, ESP32 can switch between different power modes.

For details on ESP32’s power consumption in different power modes, please refer to section ”RTC and Low-Power

Management” in ESP32 Datasheet.

Espressif Systems 7 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 108: SISTEM MONITORING KONSENTRASI PARTIKULAT

4. Peripherals and Sensors

4. Peripherals and Sensors

Please refer to Section Peripherals and Sensors in ESP32 Datasheet.

Note:

External connections can be made to any GPIO except for GPIOs in the range 6-11. These six GPIOs are connected to

the module’s integrated SPI flash. For details, please see Section 6 Schematics.

Espressif Systems 8 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 109: SISTEM MONITORING KONSENTRASI PARTIKULAT

5. Electrical Characteristics

5. Electrical Characteristics

5.1 Absolute Maximum Ratings

Stresses beyond the absolute maximum ratings listed in Table 4 below may cause permanent damage to the

device. These are stress ratings only, and do not refer to the functional operation of the device that should follow

the recommended operating conditions.

Table 4: Absolute Maximum Ratings

Symbol Parameter Min Max Unit

VDD33 Power supply voltage –0.3 3.6 V

Ioutput1 Cumulative IO output current - 1,100 mA

Tstore Storage temperature –40 150 °C

1. The module worked properly after a 24-hour test in ambient temperature at 25 °C, and the IOs in three domains(VDD3P3_RTC, VDD3P3_CPU, VDD_SDIO) output high logic level to ground. Please note that pins occupied by flashand/or PSRAM in the VDD_SDIO power domain were excluded from the test.

2. Please see Appendix IO_MUX of ESP32 Datasheet for IO’s power domain.

5.2 Recommended Operating Conditions

Table 5: Recommended Operating Conditions

Symbol Parameter Min Typical Max Unit

VDD33 Power supply voltage 3.0 3.3 3.6 V

IV DD Current delivered by external power supply 0.5 - - A

T Operating temperature –40 - 85 °C

5.3 DC Characteristics (3.3 V, 25 °C)

Table 6: DC Characteristics (3.3 V, 25 °C)

Symbol Parameter Min Typ Max Unit

CIN Pin capacitance - 2 - pF

VIH High-level input voltage 0.75×VDD1 - VDD1+0.3 V

VIL Low-level input voltage –0.3 - 0.25×VDD1 V

IIH High-level input current - - 50 nA

IIL Low-level input current - - 50 nA

VOH High-level output voltage 0.8×VDD1 - - V

VOL Low-level output voltage - - 0.1×VDD1 V

IOH

High-level source current VDD3P3_CPU power domain 1, 2 - 40 - mA

(VDD1 = 3.3 V, VOH >= 2.64 V, VDD3P3_RTC power domain 1, 2 - 40 - mA

output drive strength set to the

maximum)VDD_SDIO power domain 1, 3 - 20 - mA

Espressif Systems 9 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 110: SISTEM MONITORING KONSENTRASI PARTIKULAT

5. Electrical Characteristics

Symbol Parameter Min Typ Max Unit

IOL

Low-level sink current

(VDD1 = 3.3 V, VOL = 0.495 V,

output drive strength set to the maximum)

- 28 - mA

RPU Resistance of internal pull-up resistor - 45 - kΩ

RPD Resistance of internal pull-down resistor - 45 - kΩ

VIL_nRST Low-level input voltage of CHIP_PU to power off the chip - - 0.6 V

Notes:

1. Please see Appendix IO_MUX of ESP32 Datasheet for IO’s power domain. VDD is the I/O voltage for a particular powerdomain of pins.

2. For VDD3P3_CPU and VDD3P3_RTC power domain, per-pin current sourced in the same domain is gradually reducedfrom around 40 mA to around 29 mA, VOH>=2.64 V, as the number of current-source pins increases.

3. Pins occupied by flash and/or PSRAM in the VDD_SDIO power domain were excluded from the test.

5.4 Wi-Fi Radio

Table 7: Wi-Fi Radio Characteristics

Parameter Condition Min Typical Max Unit

Operating frequency range note1 - 2412 - 2484 MHz

Output impedance note2 - - note 2 - Ω

TX power note3 11n, MCS7 12 13 14 dBm

11b mode 17.5 18.5 20 dBm

Sensitivity 11b, 1 Mbps - –98 - dBm

11b, 11 Mbps - –89 - dBm

11g, 6 Mbps - –92 - dBm

11g, 54 Mbps - –74 - dBm

11n, HT20, MCS0 - –91 - dBm

11n, HT20, MCS7 - –71 - dBm

11n, HT40, MCS0 - –89 - dBm

11n, HT40, MCS7 - –69 - dBm

Adjacent channel rejection 11g, 6 Mbps - 31 - dB

11g, 54 Mbps - 14 - dB

11n, HT20, MCS0 - 31 - dB

11n, HT20, MCS7 - 13 - dB

1. Device should operate in the frequency range allocated by regional regulatory authorities. Target operating frequencyrange is configurable by software.

2. For the modules that use IPEX antennas, the output impedance is 50 Ω. For other modules without IPEX antennas,users do not need to concern about the output impedance.

3. Target TX power is configurable based on device or certification requirements.

Espressif Systems 10 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 111: SISTEM MONITORING KONSENTRASI PARTIKULAT

5. Electrical Characteristics

5.5 BLE Radio

5.5.1 Receiver

Table 8: Receiver Characteristics – BLE

Parameter Conditions Min Typ Max Unit

Sensitivity @30.8% PER - - –97 - dBm

Maximum received signal @30.8% PER - 0 - - dBm

Co-channel C/I - - +10 - dB

Adjacent channel selectivity C/I

F = F0 + 1 MHz - –5 - dB

F = F0 – 1 MHz - –5 - dB

F = F0 + 2 MHz - –25 - dB

F = F0 – 2 MHz - –35 - dB

F = F0 + 3 MHz - –25 - dB

F = F0 – 3 MHz - –45 - dB

Out-of-band blocking performance

30 MHz ~ 2000 MHz –10 - - dBm

2000 MHz ~ 2400 MHz –27 - - dBm

2500 MHz ~ 3000 MHz –27 - - dBm

3000 MHz ~ 12.5 GHz –10 - - dBm

Intermodulation - –36 - - dBm

5.5.2 Transmitter

Table 9: Transmitter Characteristics – BLE

Parameter Conditions Min Typ Max Unit

RF transmit power - - 0 - dBm

Gain control step - - 3 - dBm

RF power control range - –12 - +9 dBm

Adjacent channel transmit power

F = F0 ± 2 MHz - –52 - dBm

F = F0 ± 3 MHz - –58 - dBm

F = F0 ± > 3 MHz - –60 - dBm

∆ f1avg - - - 265 kHz

∆ f2max - 247 - - kHz

∆ f2avg/∆ f1avg - - –0.92 - -

ICFT - - –10 - kHz

Drift rate - - 0.7 - kHz/50 µs

Drift - - 2 - kHz

Espressif Systems 11 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 112: SISTEM MONITORING KONSENTRASI PARTIKULAT

5. Electrical Characteristics

5.6 Reflow Profile

50 150

0

25

1 ~ 3/s

0

200

250

200

-1 ~ -5/sCooling zone

100

217

50

100 250

Reflow zone

217 60 ~ 90s

Tem

pera

ture

(

)

Preheating zone

150 ~ 200 60 ~ 120s

Ramp-up zone

Peak Temp.

235 ~ 250

Soldering time

> 30s

Time (sec.)

Ramp-up zone — Temp.: <150 Time: 60 ~ 90s Ramp-up rate: 1 ~ 3/s

Preheating zone — Temp.: 150 ~ 200 Time: 60 ~ 120s Ramp-up rate: 0.3 ~ 0.8/s

Reflow zone — Temp.: >217 60 ~ 90s; Peak Temp.: 235 ~ 250 (<245 recommended) Time: 30 ~ 70s

Cooling zone — Peak Temp. ~ 180 Ramp-down rate: -1 ~ -5/s

Solder — Sn&Ag&Cu Lead-free solder (SAC305)

Figure 2: Reflow Profile

Espressif Systems 12 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 113: SISTEM MONITORING KONSENTRASI PARTIKULAT

6.Schem

atics

6. Schematics

SDI/SD1SDO/SD0SCK/CLKSCS/CMDSWP/SD3SHD/SD2CHIP_PU

GPIO35

SCK/CLK

SCS/CMD

SHD/SD2 SWP/SD3

SDI/SD1

SDO/SD0

GPIO34

GP

IO25

GP

IO26

GP

IO27

GP

IO14

GP

IO12

GP

IO15

GP

IO13

GP

IO2

GP

IO0

GPIO5GPIO18

GPIO17

GP

IO4

SENSOR_VP

SENSOR_VN

U0RXDGPIO22

GPIO23

GPIO21

GPIO19

U0TXD

GPIO16GPIO32

SENSOR_VP

SENSOR_VN

GPIO32

GPIO33 GPIO18

U0TXD

U0RXD

GPIO22

GPIO21

GPIO19

GPIO23

CHIP_PU

GPIO34

GPIO35

GPIO25

GPIO26

GPIO27

GPIO14

GPIO12 GPIO0

GPIO4

GPIO16

GPIO5

GPIO17

GPIO13

SHD/SD2

SWP/SD3

SCS/CMD

SCK/CLK

SDO/SD0

SDI/SD1

GPIO15

GPIO2

GP

IO33

GND

GNDGND

GND

GND

VDD33

GND

GND

GND

VDD_SDIO

GND

GND

VDD33

GND GND

GND

GNDGND GND

GND

GND

VDD33

GND

GND

VDD33

GNDGND

GND

GND

VDD33

VDD33

VDD_SDIO

Pin.39GND

Pin.1GND

Pin.15GND

Pin.38GND

Pin.23V3

Pin.3CHIP_PU/EN

Pin.4SENSOR_VP

Pin.5SENSOR_VN

Pin.6IO34

Pin.7IO35

Pin.8IO32

Pin.9IO33

Pin.10IO25

Pin.11IO26

Pin.12IO27

Pin.13IO14

Pin.14IO12

Pin.16IO13

Pin.17SD2

Pin.18SD3

Pin.19CMD

Pin.20CLK

Pin.21SD0

Pin.22SD1

Pin.23IO15

Pin.24IO2

Pin.25IO0

Pin.26IO4

Pin.27IO16

Pin.28IO17

Pin.29IO5

Pin.30IO18

Pin.31IO19

Pin.32NC

Pin.33IO21

Pin.34RXD0

Pin.35TXD0

Pin.36IO22

Pin.37IO23

The values of C14, L4 and C15 vary with the actual selection of a PCB board.

The values of C1 and C2 vary with the selection of a crystal.

C13

10uF

U1

40MHz+/-10ppm

XIN

1

GN

D2

XO

UT

3

GN

D4

C4

0.1uF

C15

TBD

C1

22pF

C11

1uF

R1 20K(5%)

C10

0.1uF

C14 TBDU3

FLASH

/CS1

DO2

/WP3

GN

D4

DI5

CLK6

/HOLD7

VC

C8

D1ESD3.3V88D-C

C19

0.1uF

C2

22pF

C20

1uF

ANT1

PCB ANT

12

C5

10nF/6.3V(10%)

C12

10uF

C18

1uF

C3

100pF

C17

270pF

C16

270pF

C9

0.1uF

U2ESP32-D0WDQ6

VDDA1

LNA_IN2

VDD3P33

VDD3P34

SENSOR_VP5

SENSOR_CAPP6

SENSOR_CAPN7

SENSOR_VN8

CHIP_PU9

VDET_110

VDET_211

32K_XP12

32K

_XN

13

GP

IO25

14

GP

IO26

15

GP

IO27

16

MTM

S17

MTD

I18

VD

D3P

3_R

TC19

MTC

K20

MTD

O21

GP

IO2

22

GP

IO0

23

GP

IO4

24

VDD_SDIO26

GPIO1625

GPIO1727SD_DATA_228SD_DATA_329SD_CMD30SD_CLK31SD_DATA_032

GN

D49

SD_DATA_133GPIO534GPIO1835

GP

IO19

38

CA

P2

47

VD

DA

43X

TAL_

N44

XTA

L_P

45

GPIO2336

U0T

XD

41

GP

IO22

39

GP

IO21

42

VD

D3P

3_C

PU

37

CA

P1

48

VD

DA

46

U0R

XD

40

L4

TBD

C6

3.3nF/6.3V(10%)

Figure 3: ESP32-WROOM-32 Schematics

EspressifS

ystems

13E

SP

32-WR

OO

M-32

DatasheetV

2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 114: SISTEM MONITORING KONSENTRASI PARTIKULAT

7. Peripheral Schematics

7. Peripheral Schematics

5

5

4

4

3

3

2

2

1

1

D D

C C

B B

A A

Espressif Systems

MTDI should be kept at a low electric level when powering up the module.

ENTXDRXD

IO0

MTMSMTDIMTCKMTDO

IO23IO22

IO21

IO19IO18IO5

IO4

IO2

SD

2S

D3

CM

DC

LKS

D0

SD

1

SENSOR_VPSENSOR_VNIO34IO35IO32IO33IO25IO26IO27

IO17IO16

VDD33

GND

VDD33

GND

GNDGND

GND

GND

GND

Title

Size Document Number Rev

Date: Sheet o f

<Doc> 1.0

Application of ESP32-WROOM-32

A4

1 1Wednesday, August 07, 2019

Title

Size Document Number Rev

Date: Sheet o f

<Doc> 1.0

Application of ESP32-WROOM-32

A4

1 1Wednesday, August 07, 2019

Title

Size Document Number Rev

Date: Sheet o f

<Doc> 1.0

Application of ESP32-WROOM-32

A4

1 1Wednesday, August 07, 2019

R2 100R

R4 100R

C1 10uF

U2

JTAG

MTMS1

MTDI2

MTCK3

MTDO4

U1

GND11

3V32

EN3

SENSOR_VP4

SENSOR_VN5

IO346

IO357

IO328

IO339

IO2510

IO2611

IO2712

IO1413

IO1214

GND338

IO2337

IO2236

TXD035

RXD034

IO2133

NC32

IO1931

IO1830

IO529

IO1728

IO1627

IO426

IO025

GN

D2

15

IO13

16

SD

217

SD

318

CM

D19

CLK

20

SD

021

SD

122

IO15

23

IO2

24

P_GND39

R1TBD

C3 TBD

J1

UART DOWNLOAD

123

R3 100R

R5 100R

C2 0.1uF

J2

BOOT OPTION

1 2

Figure 4: ESP32-WROOM-32 Peripheral Schematics

Note:

• Soldering Pad 39 to the Ground of the base board is not necessary for a satisfactory thermal performance. If users

do want to solder it, they need to ensure that the correct quantity of soldering paste is applied.

• To ensure the power supply to the ESP32 chip during power-up, it is advised to add an RC delay circuit at the

EN pin. The recommended setting for the RC delay circuit is usually R = 10 kΩ and C = 0.1 µF. However, specific

parameters should be adjusted based on the power-up timing of the module and the power-up and reset sequence

timing of the chip. For ESP32’s power-up and reset sequence timing diagram, please refer to Section Power Scheme

in ESP32 Datasheet.

VCC

GNDGND GND

VDD33

GND

ESP Module

Discharge Circuit CAP Added By User

Q1

R1100K

D1SW11 2

R2

1K

+ C1

Bulk CAP

Figure 5: Discharge Circuit for VDD33 Rail

Espressif Systems 14 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 115: SISTEM MONITORING KONSENTRASI PARTIKULAT

7. Peripheral Schematics

Note:

The discharge circuit can be applied in scenarios where ESP32 is powered on and off repeatedly by switching the

power rails, and there is a large capacitor on the VDD33 rail. For details, please refer to Section Power Scheme in

ESP32 Datasheet.

5

5

4

4

3

3

2

2

1

1

D D

C C

B B

A A

CHIP_PU

VBAT

GND

GND

Title

Size Document Number Rev

Date: Sheet o f

<Doc> V1

<ResetCirciut>

A4

1 1Thursday, May 31, 2018

Title

Size Document Number Rev

Date: Sheet o f

<Doc> V1

<ResetCirciut>

A4

1 1Thursday, May 31, 2018

Title

Size Document Number Rev

Date: Sheet o f

<Doc> V1

<ResetCirciut>

A4

1 1Thursday, May 31, 2018

R1 0R

R2

100K

U1

Power Supply Supervisor

GND1

VCC3

RESET#2

Figure 6: Reset Circuit

Note:

When battery is used as the power supply for ESP32 series of chips and modules, a supply voltage supervisor is recom-

mended to avoid boot failure due to low voltage. Users are recommended to pull CHIP_PU low if the power supply for

ESP32 is below 2.3 V.

Espressif Systems 15 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 116: SISTEM MONITORING KONSENTRASI PARTIKULAT

8.PhysicalD

imensions

8. Physical Dimensions

PCB Thickness

Module Thickness

3.10±0.10

0.80±0.10

1.27±0.101.50±0.10

17.60±0.10

Module Width

Module Length

1.27±0.10

11.43±0.10

25.50±0.10

18.00±0.10

Unit: mm

16.51±0.10

11.43±0.10

1.50±0.10

1.27±0.10

25.50±0.10

18.00±0.10

15.80±0.10

ESP32-WROOM-32 DIMENSIONS

Top View Side View Bottom View

Antenna Area

4.00±0.10

4.00±0.10

8.65±0.10

6.30±0.10

0.90±0.10

0.85±0.10

6.00±0.10

0.45±0.10

0.90±0.10

∅ 1.00±0.10

3.28±0.10 3.28±0.10

Figure 7: Physical Dimensions of ESP32-WROOM-32

EspressifS

ystems

16E

SP

32-WR

OO

M-32

DatasheetV

2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 117: SISTEM MONITORING KONSENTRASI PARTIKULAT

9. Recommended PCB Land Pattern

9. Recommended PCB Land Pattern

Unit: mm

Copper

Via for thermal pad

Antenna Area

18.00

25

.50

1.5

01

.27

1.27

2.00

0.9

0

5.00

5.0

0

1.3

3

1.33

10

.51

8.00

0.50

0.5

0

1

15 24

38

6.3

0

17.00

Figure 8: Recommended PCB Land Pattern

Espressif Systems 17 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 118: SISTEM MONITORING KONSENTRASI PARTIKULAT

10. Learning Resources

10. Learning Resources

10.1 Must-Read Documents

The following link provides documents related to ESP32.

• ESP32 Datasheet

This document provides an introduction to the specifications of the ESP32 hardware, including overview, pin

definitions, functional description, peripheral interface, electrical characteristics, etc.

• ESP-IDF Programming Guide

It hosts extensive documentation for ESP-IDF ranging from hardware guides to API reference.

• ESP32 Technical Reference Manual

The manual provides detailed information on how to use the ESP32 memory and peripherals.

• ESP32 Hardware Resources

The zip files include the schematics, PCB layout, Gerber and BOM list of ESP32 modules and development

boards.

• ESP32 Hardware Design Guidelines

The guidelines outline recommended design practices when developing standalone or add-on systems

based on the ESP32 series of products, including the ESP32 chip, the ESP32 modules and development

boards.

• ESP32 AT Instruction Set and Examples

This document introduces the ESP32 AT commands, explains how to use them, and provides examples of

several common AT commands.

• Espressif Products Ordering Information

10.2 Must-Have Resources

Here are the ESP32-related must-have resources.

• ESP32 BBS

This is an Engineer-to-Engineer (E2E) Community for ESP32 where you can post questions, share knowledge,

explore ideas, and help solve problems with fellow engineers.

• ESP32 GitHub

ESP32 development projects are freely distributed under Espressif’s MIT license on GitHub. It is established

to help developers get started with ESP32 and foster innovation and the growth of general knowledge about

the hardware and software surrounding ESP32 devices.

• ESP32 Tools

This is a webpage where users can download ESP32 Flash Download Tools and the zip file ”ESP32 Certifi-

cation and Test”.

• ESP-IDF

This webpage links users to the official IoT development framework for ESP32.

• ESP32 Resources

This webpage provides the links to all available ESP32 documents, SDK and tools.

Espressif Systems 18 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 119: SISTEM MONITORING KONSENTRASI PARTIKULAT

Revision History

Revision History

Date Version Release notes

2019.09 V2.9

• Changed the supply voltage range from 2.7 V ~ 3.6 V to 3.0 V ~ 3.6 V;

• Added Moisture sensitivity level (MSL) 3 in Table 1 ESP32-WROOM-32 Specifications;

• Added notes about ”Operating frequency range” and ”TX power” under Table 7 Wi-Fi

Radio Characteristics;

• Updated Section 7 Peripheral Schematics and added a note about RC delay circuit

under it;

• Updated Figure 8 Recommended PCB Land Pattern.

2019.01 V2.8 Changed the RF power control range in Table 9 from –12 ~ +12 to –12 ~ +9 dBm.

2018.10 V2.7Added ”Cumulative IO output current” entry to Table 4: Absolute Maximum Ratings;

Added more parameters to Table 6: DC Characteristics.

2018.08 V2.6

• Added reliability test items the module has passed in Table 1: ESP32-WROOM-32

Specifications, and removed software-specific information;

• Updated section 3.4: RTC and Low-Power Management;

• Changed the module’s dimensions from (18±0.2) mm x (25.5 ±0.2) mm x (3.1±0.15)

mm to (18.00±0.10) mm x (25.50±0.10) mm x (3.10±0.10) mm;

• Updated Figure 8: Physical Dimensions;

• Updated Table 7: Wi-Fi Radio.

2018.06 V2.5

• Changed the module name to ESP32-WROOM-32;

• Deleted Temperature Sensor in Table 1: ESP32-WROOM-32 Specifications;

• Updated Chapter 3: Functional Description;

• Added Chapter 8: Recommended PCB Land Pattern;

Changes to electrical characteristics:

• Updated Table 4: Absolute Maximum Ratings;

• Added Table 5: Recommended Operating Conditions;

• Added Table 6: DC Characteristics;

• Updated the values of ”Gain control step”, ”Adjacent channel transmit power” in Table

9: Transmitter Characteristics - BLE.

2018.03 V2.4 Updated Table 1 in Chapter 1.

2018.01 V2.3

Deleted information on LNA pre-amplifier;

Updated section 3.4 RTC and Low-Power Management;

Added reset circuit in Chapter 7 and a note to it.

2017.10 V2.2

Updated the description of the chip’s system reset in Section 2.3 Strapping Pins;

Deleted ”Association sleep pattern” in Table “Power Consumption by Power Modes” and

added notes to Active sleep and Modem-sleep;

Updated the note to Figure 4 Peripheral Schematics;

Added discharge circuit for VDD33 rail in Chapter 7 and a note to it.

2017.09 V2.1Updated operating voltage/power supply range updated to 2.7 ~ 3.6V;

Updated Chapter 7.

2017.08 V2.0

Changed the sensitivity of NZIF receiver to -97 dBm in Table 1;

Updated the dimensions of the module;

Updated Table “Power Consumption by Power Modes” Power Consumption by Power

Modes, and added two notes to it;

Espressif Systems 19 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 120: SISTEM MONITORING KONSENTRASI PARTIKULAT

Revision History

Date Version Release notes

Updated Table 4, 7, 8, 9;

Added Chapter 8;

Added the link to certification download.

2017.06 V1.9

Added a note to Section 2.1 Pin Layout;

Updated Section 3.3 Crystal Oscillators;

Updated Figure 3 ESP-WROOM-32 Schematics;

Added Documentation Change Notification.

2017.05 V1.8 Updated Figure 1 Top and Side View of ESP32-WROOM-32 (ESP-WROOM-32).

2017.04 V1.7

Added the module’s dimensional tolerance;

Changed the input impedance value of 50Ω in Table 7 Wi-Fi Radio Characteristics to output

impedance value of 30+j10 Ω.

2017.04 V1.6 Added Figure 2 Reflow Profile.

2017.03 V1.5

Updated Section 2.2 Pin Description;

Updated Section 3.2 External Flash and SRAM;

Updated Section 4 Peripherals and Sensors Description.

2017.03 V1.4

Updated Chapter 1 Preface;

Updated Chapter 2 Pin Definitions;

Updated Chapter 3 Functional Description;

Updated Table Recommended Operating Conditions;

Updated Table 7 Wi-Fi Radio Characteristics;

Updated Section 5.6 Reflow Profile;

Added Chapter 10 Learning Resources.

2016.12 V1.3 Updated Section 2.1 Pin Layout.

2016.11 V1.2 Added Figure 7 Peripheral Schematics.

2016.11 V1.1 Updated Chapter 6 Schematics.

2016.08 V1.0 First release.

Espressif Systems 20 ESP32-WROOM-32 Datasheet V2.9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 121: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Digital universal particle concentration sensor

PMS5003 series data manual

Writer Zhou Yong Version V2.3

Verifier Zheng Haoxin Date 2016-06-01

Main characteristics

Zero false alarm rate

Real-time response

Correct data

Minimum distinguishable particle diameter :0.3 micrometer

High anti-interference performance because of the patent structure of six

sides shielding

Optional direction of air inlet and outlet in order to adapt the different

design

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 122: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Overview

PMS5003 is a kind of digital and universal particle concentration sensor,

which can be used to obtain the number of suspended particles in the air,

i.e. the concentration of particles, and output them in the form of digital

interface. This sensor can be inserted into variable instruments related to

the concentration of suspended particles in the air or other environmental

improvement equipments to provide correct concentration data in time.

Working principle

Laser scattering principle is used for such sensor, i.e. produce scattering by

using laser to radiate suspending particles in the air, then collect scattering

light in a certain degree, and finally obtain the curve of scattering light change

with time. In the end, equivalent particle diameter and the number of particles

with different diameter per unit volume can be calculated by microprocessor

based on MIE theory. Please find the functional diagram of each part of sensor

from Figure 1 as follows.

Figure 1 Functional block diagram of sensor

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 123: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Technical Index

Parameter Index unit

Range of measurement 0.3~1.0;1.0~2.5;2.5~10 Micrometer(μ m)

Counting Efficiency 50%@0.3μ m 98%@>=0.5μ m

Effective Range(PM2.5

standard)

0~500 μ g/m³

Maximum Range(PM2.5

standard)*

≥1000 μ g/m³

Resolution 1 μ g/m³

Maximum Consistency Error

(PM2.5 standard data)*

±10%@100~500μ g/m³

±10μ g/m³@0~100μ g/m³

Standard Volume 0.1 Litre(L)

Single Response Time <1 Second(s)

Total Response Time ≤10 Second(s)

DC Power Supply Typ:5.0 Min:4.5 Max: 5.5 Volt(V)

Active Current ≤100 Milliampere(mA)

Standby Current ≤200 Microampere(μ A)

Interface Level L <0.8 @3.3 H >[email protected] Volt(V)

Working Temperature Range -10~+60

Working Humidity Range 0~99%

Storage Temperature Range -40~+80

MTTF ≥3 Year(Y)

Physical Size 50×38×21 Millimeter(mm)

Note 1: Maximum range means that the highest output value of the PM2.5 standard

data is not less than 1000.

Note 2:“PM2.5 standard data” is the “data2” in the appendix.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 124: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Pin Definition

PIN1

Figure 2 Connector Definition

PIN1 VCC Positive power 5V

PIN2 GND Negative power

PIN3 SET Set pin /TTL leve [email protected],high level or

suspending is normal working status, while

low level is sleeping mode.

PIN4 RX Serial port receiving pin/TTL [email protected]

PIN5 TX Serial port sending pin/TTL [email protected]

PIN6 RESET Module reset signal /TTL [email protected],low

reset.

PIN7/8 NC

Output result

Mainly output as the quality and number of each particles with different size

per unit volume, the unit volume of particle number is 0.1L and the unit of

mass concentration is μ g/m³.

There are two options for digital output: passive and active. Default mode

is active after power up. In this mode sensor would send serial data to the

host automatically .The active mode is divided into two sub-modes: stable

mode and fast mode. If the concentration change is small the sensor

would run at stable mode with the real interval of 2.3s.And if the change is

big the sensor would be changed to fast mode automatically with the

interval of 200~800ms, the higher of the concentration, the shorter of the

interval.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 125: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Typical Circuit

Figure 3 Typical Circuit

Typical Output Characteristic

Definition of axis Y: PM2.5 concentration , unit: μ g/m³

Definition of axis X: number of samples, unit: time

Figure 4-1 Consistency at 20

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 126: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Figure 4-2 Consistency at 43

Figure 4-3 Consistency at -5

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 127: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Figure 4-4 Consistency after 30 days’ running

Relationship of Temperature and Consistency

Definition of axis Y: Maximum Error Modulus(%)

Definition of axis X: Temperature()

Figure 5 Consistency Vs Temperature

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 128: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Endurance Characteristics

No Item Test Method Characteristics n

C

1 Long Running 1. 10 closed Lab,,20~25,

humidity 30%~70%,particle

generator and air cleaner

2. DC 5V power supply

3. Check consistency after 720

hours’ running

10 samples during

0~500μ g/m³

0~100μ g/m³

Maximum Error≤

±15μ g/m³

100~500μ g/m³

Maximum Error≤

±15%

FAN does not

screeched

n=30

C=0

2 High

Temperature

Operation

1. 10 constant temperature Lab

2. 43,humidity 70%,

3. particle generator and air

cleaner

4. DC 5V power supply

5. Check consistency

n=10

C=0

3 Cold

Operation

1. 10 constant temperature Lab

2. -5,humidity 30%,

3. particle generator and air

cleaner

4. DC 5V power supply

5. Check consistency

n=10

C=0

4 Vibration 1. 10 closed Lab,,20,humidity

50%,particle generator and air

cleaner

2. DC 5V power supply and check

consistency

3. Frequency:50Hz。

4. acceleration:9.8/ S²。

5. Direction:X、Y、Z

6. Vibration Amplitude:±2mm。

7. Time:X、Y、Z –way, Per 1 hour

n=5

C=0

5 High

Temperature

and Humidity

Storage

1. Constant temperature cabinet

2. 70,humidity 90%~95,

3. Check consistency after 500

hours’ storage

10 samples during

0~500μ g/m³

0~100μ g/m³

Maximum Error≤

±10μ g/m³

100~500μ g/m³

Maximum Error≤

±10%

n=10

C=0

6 Cold Storage 1. Constant temperature cabinet

2. -30,humidity 90%~95,

3. Check consistency after 500

hours’ storage

n=10

C=0

7 Variation of 4. 10 closed Lab,,20,humidity n=5

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 129: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Power Supply 50%,particle generator and air

cleaner

5. Power varies as the cycles of 4.5V

to 5.5V ,then 5.5V to 4.5V with

the pace of 0.1V/min for 2 hours.

6. Check consistency during

Variation

FAN does not

screeched

C=0

8 Power On-Off

Cycle

1. 10 closed Lab,,20,humidity

50%,particle generator and air

cleaner

2. DC 5V power supply,keep On-Off

frequency 0.5Hz for 72 hours and

check consistency

n=10

C=0

9 Sleep Set

On-Off

Cycle

1. 10 closed Lab,,20,humidity

50%,particle generator and air

cleaner

2. DC 5V power supply,keep Sleep

Set Pin High-Low frequency 0.5Hz

for 72 hours and check

consistency

n=10

C=0

10 Laser On-Off

Cycle

1. 10 closed Lab,,20,humidity

50%,particle generator and air

cleaner

2. keep laser On-Off frequency

50Hz for 240 hours and check

consistency

n=10

C=0

11 Salt Spray 5% industrial salt water, hydrolysis

spray 100 hours, clean with

purified water and store for 48

hours

No rust and

discoloration of

metal parts

n=1

C=0

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 130: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Circuit Attentions

1) DC 5V power supply is needed because the FAN should be driven by 5V.

But the high level of data pin is 3.3V. Level conversion unit should be

used if the power of host MCU is 5V.

2) The SET and RESET pins are pulled up inside so they should not be

connected if without usage.

3) PIN7 and PIN8 should not be connected.

4) Stable data should be got at least 30 seconds after the sensor wakeup

from the sleep mode because of the fan’s performance.

Installation Attentions

1) Metal shell is connected to the GND so be careful not to let it shorted with

the other parts of circuit except GND.

2) The best way of install is making the plane of inset and outset closely to

the plane of the host. Or some shield should be placed between inset and

outset in order to prevent the air flow from inner loop.

3) The blowhole in the shell of the host should not be smaller than the inset.

4) The sensor should not be installed in the air flow way of the air cleaner or

should be shielded by some structure.

5) The sensor should be installed at least 20cm higher than the grand in

order to prevent it from blocking by the floc dust.

6) Do not break up the sensor.

7) M2 self-tapping strew should be used to fix the sensor but it should not be

deeper than 5mm into the sensor.

Other Attentions

1) Only the consistency of all the PM sensors of PLANTOWER is promised

and ensured. And the sensor should not be checked with any third party

equipment.

2) The sensor is usually used in the common indoor environment. So some

protection must be added if using in the conditions as followed:

a) The time of concentration ≥300μ g/m³ is longer than 50% of the

whole year or concentration≥500μ g/m³ is longer than20% of the

whole year.

b) Kitchen

c) Water mist condition such as bathroom or hot spring.

d) outdoor

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 131: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Part Number Definition

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 132: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Physical Size (mm)

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 133: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Appendix I:PMS5003 transport protocol-Active Mode

Default baud rate:9600bps Check bit:None Stop bit:1 bit

32 Bytes

Start character 1 0x42 (Fixed)

Start character 2 0x4d (Fixed)

Frame length high 8 bits

…… Frame length=2x13+2(data+check bytes)

Frame length low 8 bits

……

Data 1 high 8 bits …… Data 1 refers to PM1.0 concentration unit

μ g/m3(CF=1,standard particle)*

Data 1 low 8 bits ……

Data 2 high 8 bits …… Data 2 refers to PM2.5 concentration unit

μ g/m3(CF=1,standard particle)

Data 2 low 8 bits ……

Data 3 high 8 bits …… Data 3 refers to PM10 concentration unit

μ g/m3(CF=1,standard particle) Data 3 low 8 bits ……

Data 4 high 8 bits …… Data 4 refers to PM1.0 concentration unit *

μ g/m3(under atmospheric environment)

Data 4 low 8 bits ……

Data 5 high 8 bits …… Data 5 refers to PM2.5 concentration unit

μ g/m3(under atmospheric environment)

Data 5 low 8 bits ……

Data 6 high 8 bits ……. Data 6 refers to concentration unit (under

atmospheric environment) μ g/m3 Data 6 low 8 bits ……

Data 7 high 8 bits …… Data 7 indicates the number of

part ic les with d iameter beyond 0.3 um

in 0.1 L of air. Data 7 low 8 bits ……

Data 8 high 8 bits …… Data 8 indicates the number of

part ic les with d iameter beyond 0.5 um

in 0.1 L of air. Data 8 low 8 bits ……

Data 9 high 8 bits …… Data 9 indicates the number of

part ic les with d iameter beyond 1.0 um

in 0.1 L of air. Data 9 low 8 bits ……

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 134: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Data 10 high 8 bits …… Data 10 indicates the number of part ic les with d iameter beyond 2.5 um in 0.1 L of air.

Data 10 low 8 bits ……

Data 11 high 8 bits …… Data 11 indicates the number of part ic les with d iameter beyond 5.0 um in 0.1 L of air. Data 11 low 8 bits ……

Data 12 high 8 bits …… Data 12 indicates the number of part ic les with d iameter beyond 10 um in 0.1 L of air. Data 12 low 8 bits ……

Data 13 high 8 bits …… Data 13 Reserved

Data 13 low 8 bits ……

Data and check high 8 bits

…… Check code=Start character 1+ Start

character 2+……..+data 13

Low 8 bits

Data and check low 8 bits

……

Note: CF=1 should be used in the factory environment

.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 135: SISTEM MONITORING KONSENTRASI PARTIKULAT

2016 product data manual of PLANTOWER

Appendix II:PMS5003 transport protocol-Passive Mode

Default baud rate:9600bps Check bit:None Stop bit:1 bit

Host Protocol

Start Byte

1

Start Byte

2

Command Data 1 Data 2 Verify Byte

1

Verify Byte

2

0x42 0x4d CMD DATAH DATAL LRCH LRCL

1. Command Definition

CMD DATAH DATAL 说明

0xe2 X X Read in passive

mode

0xe1 X 00H-passive

01H-active

Change mode

0xe4 X 00H-sleep

01H-wakeup

Sleep set

2. Answer

0xe2: 32 bytes , same as appendix I

3. Verify Bytes :

Add of all the bytes except verify bytes.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 136: SISTEM MONITORING KONSENTRASI PARTIKULAT

General DescriptionThe DS3231 is a low-cost, extremely accurate I2C

real-time clock (RTC) with an integrated temperature-

compensated crystal oscillator (TCXO) and crystal.

The device incorporates a battery input, and maintains

accurate timekeeping when main power to the device

is interrupted. The integration of the crystal resonator

enhances the long-term accuracy of the device as well

as reduces the piece-part count in a manufacturing line.

The DS3231 is available in commercial and industrial

temperature ranges, and is offered in a 16-pin, 300-mil

SO package.

The RTC maintains seconds, minutes, hours, day, date,

month, and year information. The date at the end of the

month is automatically adjusted for months with fewer

than 31 days, including corrections for leap year. The

clock operates in either the 24-hour or 12-hour format

with an AM/PM indicator. Two programmable time-of-day

alarms and a programmable square-wave output are

provided. Address and data are transferred serially

through an I2C bidirectional bus.

A precision temperature-compensated voltage reference

and comparator circuit monitors the status of VCC to

detect power failures, to provide a reset output, and to

automatically switch to the backup supply when necessary.

Additionally, the RST pin is monitored as a pushbutton

input for generating a μP reset.

Benefits and Features Highly Accurate RTC Completely Manages All

Timekeeping Functions

• Real-Time Clock Counts Seconds, Minutes, Hours,

Date of the Month, Month, Day of the Week, and

Year, with Leap-Year Compensation Valid Up to 2100

• Accuracy ±2ppm from 0°C to +40°C

• Accuracy ±3.5ppm from -40°C to +85°C

• Digital Temp Sensor Output: ±3°C Accuracy

• Register for Aging Trim

• RST Output/Pushbutton Reset Debounce Input

• Two Time-of-Day Alarms

• Programmable Square-Wave Output Signal

Simple Serial Interface Connects to Most Microcontrollers

• Fast (400kHz) I2C Interface

Battery-Backup Input for Continuous Timekeeping

• Low Power Operation Extends Battery-Backup

Run Time

• 3.3V Operation

Operating Temperature Ranges: Commercial

(0°C to +70°C) and Industrial (-40°C to +85°C)

Underwriters Laboratories® (UL) Recognized

Applications

19-5170; Rev 10; 3/15

Underwriters Laboratories is a registered certification mark of

Underwriters Laboratories Inc.

Ordering Information and Pin Configuration appear at end of data

sheet.

Servers

Telematics

Utility Power Meters

GPS

DS3231

VCC

SCL

RPU

RPU = tR/CB

RPU

INT/SQW

32kHz

VBAT

PUSHBUTTON

RESET

SDA

RST

N.C.

N.C.

N.C.

N.C.

VCC

VCC

GND

VCC

P

N.C.

N.C.

N.C.

N.C.

SCL

SDA

RST

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

Typical Operating Circuit

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 137: SISTEM MONITORING KONSENTRASI PARTIKULAT

Voltage Range on Any Pin Relative to Ground ....-0.3V to +6.0V

Junction-to-Ambient Thermal Resistance (θJA) (Note 1) 73°C/W

Junction-to-Case Thermal Resistance (θJC) (Note 1) ....23°C/W

Operating Temperature Range

DS3231S ............................................................0°C to +70°C

DS3231SN ...................................................... -40°C to +85°C

Junction Temperature ......................................................+125°C

Storage Temperature Range .............................. -40°C to +85°C

Lead Temperature (soldering, 10s) .................................+260°C

Soldering Temperature (reflow, 2 times max) .................+260°C

(see the Handling, PCB Layout, and Assembly section)

(TA = TMIN to TMAX, unless otherwise noted.) (Notes 2, 3)

(VCC = 2.3V to 5.5V, VCC = Active Supply (see Table 1), TA = TMIN to TMAX, unless otherwise noted.) (Typical values are at VCC =

3.3V, VBAT = 3.0V, and TA = +25°C, unless otherwise noted.) (Notes 2, 3)

PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS

Supply Voltage VCC 2.3 3.3 5.5 V

VBAT 2.3 3.0 5.5 V

Logic 1 Input SDA, SCL VIH0.7 x

VCC

VCC +

0.3V

Logic 0 Input SDA, SCL VIL -0.30.3 x

VCCV

PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS

Active Supply Current ICCA (Notes 4, 5)VCC = 3.63V 200

µAVCC = 5.5V 300

Standby Supply Current ICCS

I2C bus inactive, 32kHz

output on, SQW output off

(Note 5)

VCC = 3.63V 110

µA

VCC = 5.5V 170

Temperature Conversion Current ICCSCONVI2C bus inactive, 32kHz

output on, SQW output off

VCC = 3.63V 575µA

VCC = 5.5V 650

Power-Fail Voltage VPF 2.45 2.575 2.70 V

Logic 0 Output, 32kHz, INT/SQW,

SDAVOL IOL = 3mA 0.4 V

Logic 0 Output, RST VOL IOL = 1mA 0.4 V

Output Leakage Current 32kHz,

INT/SQW, SDAILO Output high impedance -1 0 +1 µA

Input Leakage SCL ILI -1 +1 µA

RST Pin I/O Leakage IOL RST high impedance (Note 6) -200 +10 µA

VBAT Leakage Current

(VCC Active)IBATLKG 25 100 nA

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 2

Note 1: Package thermal resistances were obtained using the method described in JEDEC specification JESD51-7, using a four-layer

board. For detailed information on package thermal considerations, refer to www.maximintegrated.com/thermal-tutorial.

Absolute Maximum Ratings

Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. These are stress ratings only, and functional operation of the device at these

or any other conditions beyond those indicated in the operational sections of the specifications is not implied. Exposure to absolute maximum rating conditions for extended periods may affect

device reliability.

Recommended Operating Conditions

Electrical Characteristics

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 138: SISTEM MONITORING KONSENTRASI PARTIKULAT

(VCC = 0V, VBAT = 2.3V to 5.5V, TA = TMIN to TMAX, unless otherwise noted.) (Note 2)

(VCC = 2.3V to 5.5V, VCC = Active Supply (see Table 1), TA = TMIN to TMAX, unless otherwise noted.) (Typical values are at VCC =

3.3V, VBAT = 3.0V, and TA = +25°C, unless otherwise noted.) (Notes 2, 3)

PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS

Active Battery Current IBATAEOSC = 0, BBSQW = 0,

SCL = 400kHz (Note 5)

VBAT = 3.63V 70µA

VBAT = 5.5V 150

Timekeeping Battery Current IBATT

EOSC = 0, BBSQW = 0,

EN32kHz = 1,

SCL = SDA = 0V or

SCL = SDA = VBAT (Note 5)

VBAT = 3.63V 0.84 3.0

µA

VBAT = 5.5V 1.0 3.5

Temperature Conversion Current IBATTC

EOSC = 0, BBSQW = 0,

SCL = SDA = 0V or

SCL = SDA = VBAT

VBAT = 3.63V 575

µA

VBAT = 5.5V 650

Data-Retention Current IBATTDR EOSC = 1, SCL = SDA = 0V, +25°C 100 nA

PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS

Output Frequency fOUT VCC = 3.3V or VBAT = 3.3V 32.768 kHz

Frequency Stability vs.

Temperature (Commercial)Δf/fOUT

VCC = 3.3V or

VBAT = 3.3V,

aging offset = 00h

0°C to +40°C ±2

ppm

>40°C to +70°C ±3.5

Frequency Stability vs.

Temperature (Industrial)Δf/fOUT

VCC = 3.3V or

VBAT = 3.3V,

aging offset = 00h

-40°C to <0°C ±3.5

ppm0°C to +40°C ±2

>40°C to +85°C ±3.5

Frequency Stability vs. Voltage Δf/V 1 ppm/V

Trim Register Frequency

Sensitivity per LSBΔf/LSB Specified at:

-40°C 0.7

ppm+25°C 0.1

+70°C 0.4

+85°C 0.8

Temperature Accuracy Temp VCC = 3.3V or VBAT = 3.3V -3 +3 °C

Crystal Aging Δf/fOAfter reflow,not production tested

First year ±1.0ppm

0–10 years ±5.0

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 3

Electrical Characteristics

Electrical Characteristics (continued)

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 139: SISTEM MONITORING KONSENTRASI PARTIKULAT

(VCC = VCC(MIN) to VCC(MAX) or VBAT = VBAT(MIN) to VBAT(MAX), VBAT > VCC, TA = TMIN to TMAX, unless otherwise noted.) (Note 2)

(TA = TMIN to TMAX)

PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS

SCL Clock Frequency fSCLFast mode 100 400

kHzStandard mode 0 100

Bus Free Time Between STOP

and START ConditionstBUF

Fast mode 1.3µs

Standard mode 4.7

Hold Time (Repeated) START

Condition (Note 7)tHD:STA

Fast mode 0.6µs

Standard mode 4.0

Low Period of SCL Clock tLOWFast mode 1.3

µsStandard mode 4.7

High Period of SCL Clock tHIGHFast mode 0.6

µsStandard mode 4.0

Data Hold Time (Notes 8, 9) tHD:DATFast mode 0 0.9

µsStandard mode 0 0.9

Data Setup Time (Note 10) tSU:DATFast mode 100

nsStandard mode 250

START Setup Time tSU:STAFast mode 0.6

µsStandard mode 4.7

Rise Time of Both SDA and SCL

Signals (Note 11)tR

Fast mode 20 +

0.1CB

300ns

Standard mode 1000

Fall Time of Both SDA and SCL

Signals (Note 11)tF

Fast mode 20 +

0.1CB

300ns

Standard mode 300

Setup Time for STOP Condition tSU:STOFast mode 0.6

µsStandard mode 4.7

Capacitive Load for Each Bus

Line CB (Note 11) 400 pF

Capacitance for SDA, SCL CI/O 10 pF

Pulse Width of Spikes That Must

Be Suppressed by the Input FiltertSP 30 ns

Pushbutton Debounce PBDB 250 ms

Reset Active Time tRST 250 ms

Oscillator Stop Flag (OSF) Delay tOSF (Note 12) 100 ms

Temperature Conversion Time tCONV 125 200 ms

PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS

VCC Fall Time; VPF(MAX) to

VPF(MIN)tVCCF 300 µs

VCC Rise Time; VPF(MIN) to

VPF(MAX)tVCCR 0 µs

Recovery at Power-Up tREC (Note 13) 250 300 ms

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 4

AC Electrical Characteristics

Power-Switch Characteristics

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 140: SISTEM MONITORING KONSENTRASI PARTIKULAT

tRSTPBDB

RST

VCC

tVCCF tVCCR

tREC

VPF(MAX)

VPF VPF

VPF(MIN)

RST

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 5

Pushbutton Reset Timing

Power-Switch Timing

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 141: SISTEM MONITORING KONSENTRASI PARTIKULAT

WARNING: Negative undershoots below -0.3V while the part is in battery-backed mode may cause loss of data.Note 2: Limits at -40°C are guaranteed by design and not production tested.

Note 3: All voltages are referenced to ground.

Note 4: ICCA—SCL clocking at max frequency = 400kHz.

Note 5: Current is the averaged input current, which includes the temperature conversion current.

Note 6: The RST pin has an internal 50kΩ (nominal) pullup resistor to VCC.

Note 7: After this period, the first clock pulse is generated.

Note 8: A device must internally provide a hold time of at least 300ns for the SDA signal (referred to the VIH(MIN) of the SCL sig-

nal) to bridge the undefined region of the falling edge of SCL.

Note 9: The maximum tHD:DAT needs only to be met if the device does not stretch the low period (tLOW) of the SCL signal.

Note 10: A fast-mode device can be used in a standard-mode system, but the requirement tSU:DAT ≥ 250ns must then be met. This is automatically the case if the device does not stretch the low period of the SCL signal. If such a device does stretch the

low period of the SCL signal, it must output the next data bit to the SDA line tR(MAX) + tSU:DAT = 1000 + 250 = 1250ns

before the SCL line is released.

Note 11: CB—total capacitance of one bus line in pF.

Note 12: The parameter tOSF is the period of time the oscillator must be stopped for the OSF flag to be set over the voltage range

of 0.0V ≤ VCC ≤ VCC(MAX) and 2.3V ≤ VBAT ≤ 3.4V.Note 13: This delay applies only if the oscillator is enabled and running. If the EOSC bit is a 1, tREC is bypassed and RST immedi-

ately goes high. The state of RST does not affect the I2C interface, RTC, or TCXO.

SDA

SCL

tHD:STA

tLOW

tHIGH

tRtF

tBUF

tHD:DAT

tSU:DAT REPEATED

START

tSU:STA

tHD:STA

tSU:STO

tSP

STOP START

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 6

Data Transfer on I2C Serial Bus

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 142: SISTEM MONITORING KONSENTRASI PARTIKULAT

(VCC = +3.3V, TA = +25°C, unless otherwise noted.)

SUPPLY CURRENT

vs. SUPPLY VOLTAGE

DS

3231 toc0

2

VBAT (V)I B

AT (

µA

)5.34.33.3

0.7

0.8

0.9

1.0

1.1

1.2

0.62.3

VCC = 0V, BSY = 0,

SDA = SCL = VBAT OR VCC

EN32kHz = 1

EN32kHz = 0

SUPPLY CURRENT

vs. TEMPERATURE

DS

3231 toc0

3

TEMPERATURE (°C)

I BA

T (

µA

)

603510-15

0.7

0.8

0.9

1.0

0.6-40 85

VCC = 0, EN32kHz = 1, BSY = 0,

SDA = SCL = VBAT OR GND

FREQUENCY DEVIATION

vs. TEMPERATURE vs. AGING VALUE

DS

3231 toc0

4

TEMPERATURE (°C)

FR

EQ

UE

NC

Y D

EV

IAT

ION

(pp

m)

603510-15

-30

-20

-10

0

10

20

30

40

50

60

-40-40 85

12732

0

-33

-128

STANDBY SUPPLY CURRENT

vs. SUPPLY VOLTAGE

DS

3231 toc0

1

VCC (V)

I CC

S (

µA

)

5.04.54.03.53.02.5

25

50

75

100

125

150

02.0 5.5

RST ACTIVE

BSY = 0, SCL = SDA = VCC

DELTA TIME AND FREQUENCY

vs. TEMPERATURE

TEMPERATURE (°C)

DE

LTA

FR

EQ

UE

NC

Y (

ppm

)

DE

LTA

TIM

E (

MIN

/YE

AR

)

807050 60-10 0 10 20 30 40-30 -20

-180

-160

-140

-120

-100

-80

-60

-40

-20

0

20

-200

-80

-60

-40

-20

0

-100-40

DS3231 toc05

CRYSTAL

+20ppm

CRYSTAL

-20ppm

TYPICAL CRYSTAL,

UNCOMPENSATED

DS3231

ACCURACY

BAND

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

Maxim Integrated 7www.maximintegrated.com

Typical Operating Characteristics

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 143: SISTEM MONITORING KONSENTRASI PARTIKULAT

CLOCK AND CALENDAR

REGISTERS

USER BUFFER

(7 BYTES)

VOLTAGE REFERENCE;

DEBOUNCE CIRCUIT;

PUSHBUTTON RESET

I2C INTERFACE AND

ADDRESS REGISTER

DECODE

POWER CONTROL

VCC

VBAT

GND

SCL

SDA

TEMPERATURE

SENSOR

CONTROL LOGIC/

DIVIDER

ALARM, STATUS, AND

CONTROL REGISTERS

OSCILLATOR AND

CAPACITOR ARRAYX1

X2

N

32kHz

N

INT/SQW

SQUARE-WAVE BUFFER;

INT/SQW CONTROL

N

RST

VCC

DS3231

1Hz

1Hz

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 8

Block Diagram

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 144: SISTEM MONITORING KONSENTRASI PARTIKULAT

Detailed DescriptionThe DS3231 is a serial RTC driven by a temperature-

compensated 32kHz crystal oscillator. The TCXO provides

a stable and accurate reference clock, and maintains the

RTC to within ±2 minutes per year accuracy from -40°C

to +85°C. The TCXO frequency output is available at the

32kHz pin. The RTC is a low-power clock/calendar with

two programmable time-of-day alarms and a programma-

ble square-wave output. The INT/SQW provides either an

interrupt signal due to alarm conditions or a square-wave

output. The clock/calendar provides seconds, minutes,

hours, day, date, month, and year information. The date at

the end of the month is automatically adjusted for months

with fewer than 31 days, including corrections for leap

year. The clock operates in either the 24-hour or 12-hour

format with an AM/PM indicator. The internal registers are

accessible though an I2C bus interface.

A temperature-compensated voltage reference and com-

parator circuit monitors the level of VCC to detect power fail-

ures and to automatically switch to the backup supply when

necessary. The RST pin provides an external pushbutton

function and acts as an indicator of a power-fail event.

Operation

The block diagram shows the main elements of the

DS3231. The eight blocks can be grouped into four func-

tional groups: TCXO, power control, pushbutton function,

and RTC. Their operations are described separately in the

following sections.

PIN NAME FUNCTION

1 32kHz32kHz Output. This open-drain pin requires an external pullup resistor. When enabled, the output operates on

either power supply. It may be left open if not used.

2 VCCDC Power Pin for Primary Power Supply. This pin should be decoupled using a 0.1µF to 1.0µF capacitor.

If not used, connect to ground.

3 INT/SQW

Active-Low Interrupt or Square-Wave Output. This open-drain pin requires an external pullup resistor connected

to a supply at 5.5V or less. This multifunction pin is determined by the state of the INTCN bit in the Control

Register (0Eh). When INTCN is set to logic 0, this pin outputs a square wave and its frequency is determined by

RS2 and RS1 bits. When INTCN is set to logic 1, then a match between the timekeeping registers and either of

the alarm registers activates the INT/SQW pin (if the alarm is enabled). Because the INTCN bit is set to logic 1

when power is first applied, the pin defaults to an interrupt output with alarms disabled. The pullup voltage can be up to 5.5V, regardless of the voltage on VCC. If not used, this pin can be left unconnected.

4 RST

Active-Low Reset. This pin is an open-drain input/output. It indicates the status of VCC relative to the

VPF specification. As VCC falls below VPF, the RST pin is driven low. When VCC exceeds VPF, for tRST, the

RST pin is pulled high by the internal pullup resistor. The active-low, open-drain output is combined with a

debounced pushbutton input function. This pin can be activated by a pushbutton reset request. It has an internal

50kΩ nominal value pullup resistor to VCC. No external pullup resistors should be connected. If the oscillator is

disabled, tREC is bypassed and RST immediately goes high.

5–12 N.C. No Connection. Must be connected to ground.

13 GND Ground

14 VBAT

Backup Power-Supply Input. When using the device with the VBAT input as the primary power source, this pin

should be decoupled using a 0.1µF to 1.0µF low-leakage capacitor. When using the device with the VBAT input

as the backup power source, the capacitor is not required. If VBAT is not used, connect to ground. The device is

UL recognized to ensure against reverse charging when used with a primary lithium battery.

Go to www.maximintegrated.com/qa/info/ul.

15 SDASerial Data Input/Output. This pin is the data input/output for the I2C serial interface. This open-drain pin

requires an external pullup resistor. The pullup voltage can be up to 5.5V, regardless of the voltage on VCC.

16 SCLSerial Clock Input. This pin is the clock input for the I2C serial interface and is used to synchronize data

movement on the serial interface. Up to 5.5V can be used for this pin, regardless of the voltage on VCC.

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 9

Pin Description

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 145: SISTEM MONITORING KONSENTRASI PARTIKULAT

32kHz TCXOThe temperature sensor, oscillator, and control logic form

the TCXO. The controller reads the output of the on-chip

temperature sensor and uses a lookup table to determine

the capacitance required, adds the aging correction in

AGE register, and then sets the capacitance selection reg-

isters. New values, including changes to the AGE register,

are loaded only when a change in the temperature value

occurs, or when a user-initiated temperature conversion

is completed. Temperature conversion occurs on initial

application of VCC and once every 64 seconds afterwards.

Power Control

This function is provided by a temperature-compensated

voltage reference and a comparator circuit that monitors

the VCC level. When VCC is greater than VPF, the part is

powered by VCC. When VCC is less than VPF but greater

than VBAT, the DS3231 is powered by VCC. If VCC is less

than VPF and is less than VBAT, the device is powered by

VBAT. See Table 1.

To preserve the battery, the first time VBAT is applied

to the device, the oscillator will not start up until VCC exceeds VPF, or until a valid I2C address is written to

the part. Typical oscillator startup time is less than one

second. Approximately 2 seconds after VCC is applied,

or a valid I2C address is written, the device makes a

temperature measurement and applies the calculated

correction to the oscillator. Once the oscillator is running,

it continues to run as long as a valid power source is avail-

able (VCC or VBAT), and the device continues to measure

the temperature and correct the oscillator frequency every

64 seconds.

On the first application of power (VCC) or when a valid I2C

address is written to the part (VBAT), the time and date

registers are reset to 01/01/00 01 00:00:00 (DD/MM/YY

DOW HH:MM:SS).

VBAT OperationThere are several modes of operation that affect the

amount of VBAT current that is drawn. While the device

is powered by VBAT and the serial interface is active,

active battery current, IBATA, is drawn. When the seri-

al interface is inactive, timekeeping current (IBATT),

which includes the averaged temperature conversion

current, IBATTC, is used (refer to Application Note 3644:

Power Considerations for Accurate Real-Time Clocks

for details). Temperature conversion current, IBATTC, is

specified since the system must be able to support the

periodic higher current pulse and still maintain a valid volt-

age level. Data retention current, IBATTDR, is the current

drawn by the part when the oscillator is stopped (EOSC

= 1). This mode can be used to minimize battery require-

ments for times when maintaining time and date informa-

tion is not necessary, e.g., while the end system is waiting

to be shipped to a customer.

Pushbutton Reset FunctionThe DS3231 provides for a pushbutton switch to be con-

nected to the RST output pin. When the DS3231 is not in

a reset cycle, it continuously monitors the RST signal for

a low going edge. If an edge transition is detected, the

DS3231 debounces the switch by pulling the RST low.

After the internal timer has expired (PBDB), the DS3231

continues to monitor the RST line. If the line is still low,

the DS3231 continuously monitors the line looking for a

rising edge. Upon detecting release, the DS3231 forces

the RST pin low and holds it low for tRST.

RST is also used to indicate a power-fail condition. When

VCC is lower than VPF, an internal power-fail signal is

generated, which forces the RST pin low. When VCC returns to a level above VPF, the RST pin is held low for

approximately 250ms (tREC) to allow the power supply

to stabilize. If the oscillator is not running (see the Power

Control section) when VCC is applied, tREC is bypassed

and RST immediately goes high. Assertion of the RST

output, whether by pushbutton or power-fail detection,

does not affect the internal operation of the DS3231.

Real-Time ClockWith the clock source from the TCXO, the RTC provides

seconds, minutes, hours, day, date, month, and year

information. The date at the end of the month is automati-

cally adjusted for months with fewer than 31 days, includ-

ing corrections for leap year. The clock operates in either

the 24-hour or 12-hour format with an AM/PM indicator.

The clock provides two programmable time-of-day alarms

and a programmable square-wave output. The INT/SQW

pin either generates an interrupt due to alarm condition

or outputs a square-wave signal and the selection is con-

trolled by the bit INTCN.

Table 1. Power Control

SUPPLY CONDITION ACTIVE SUPPLY

VCC < VPF, VCC < VBAT VBAT

VCC < VPF, VCC > VBAT VCC

VCC > VPF, VCC < VBAT VCC

VCC > VPF, VCC > VBAT VCC

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 10

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 146: SISTEM MONITORING KONSENTRASI PARTIKULAT

Address MapFigure 1 shows the address map for the DS3231 time-

keeping registers. During a multibyte access, when the

address pointer reaches the end of the register space

(12h), it wraps around to location 00h. On an I2C START

or address pointer incrementing to location 00h, the cur-

rent time is transferred to a second set of registers. The

time information is read from these secondary registers,

while the clock may continue to run. This eliminates the

need to reread the registers in case the main registers

update during a read.

I2C InterfaceThe I2C interface is accessible whenever either VCC or

VBAT is at a valid level. If a microcontroller connected

to the DS3231 resets because of a loss of VCC or other

event, it is possible that the microcontroller and DS3231

I2C communications could become unsynchronized, e.g.,

the microcontroller resets while reading data from the

DS3231. When the microcontroller resets, the DS3231

I2C interface may be placed into a known state by tog-

gling SCL until SDA is observed to be at a high level. At

that point the microcontroller should pull SDA low while

SCL is high, generating a START condition.

Clock and CalendarThe time and calendar information is obtained by reading

the appropriate register bytes. Figure 1 illustrates the RTC

registers. The time and calendar data are set or initialized

by writing the appropriate register bytes. The contents of

the time and calendar registers are in the binary-coded

Note: Unless otherwise specified, the registers’ state is not defined when power is first applied.

Figure 1. Timekeeping Registers

ADDRESSBIT 7

MSBBIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1

BIT 0

LSBFUNCTION RANGE

00h 0 10 Seconds Seconds Seconds 00–59

01h 0 10 Minutes Minutes Minutes 00–59

02h 0 12/24AM/PM

10 Hour Hour Hours1–12 + AM/PM

00–2320 Hour

03h 0 0 0 0 0 Day Day 1–7

04h 0 0 10 Date Date Date 01–31

05h Century 0 0 10 Month MonthMonth/

Century01–12 + Century

06h 10 Year Year Year 00–99

07h A1M1 10 Seconds Seconds Alarm 1 Seconds 00–59

08h A1M2 10 Minutes Minutes Alarm 1 Minutes 00–59

09h A1M3 12/24AM/PM

10 Hour Hour Alarm 1 Hours1–12 + AM/PM

00–2320 Hour

0Ah A1M4 DY/DT 10 DateDay Alarm 1 Day 1–7

Date Alarm 1 Date 1–31

0Bh A2M2 10 Minutes Minutes Alarm 2 Minutes 00–59

0Ch A2M3 12/24AM/PM

10 Hour Hour Alarm 2 Hours1–12 + AM/PM

00–2320 Hour

0Dh A2M4 DY/DT 10 DateDay Alarm 2 Day 1–7

Date Alarm 2 Date 1–31

0Eh EOSC BBSQW CONV RS2 RS1 INTCN A2IE A1IE Control —

0Fh OSF 0 0 0 EN32kHz BSY A2F A1F Control/Status —

10h SIGN DATA DATA DATA DATA DATA DATA DATA Aging Offset —

11h SIGN DATA DATA DATA DATA DATA DATA DATA MSB of Temp —

12h DATA DATA 0 0 0 0 0 0 LSB of Temp —

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 11

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 147: SISTEM MONITORING KONSENTRASI PARTIKULAT

decimal (BCD) format. The DS3231 can be run in either

12-hour or 24-hour mode. Bit 6 of the hours register is

defined as the 12- or 24-hour mode select bit. When high,

the 12-hour mode is selected. In the 12-hour mode, bit 5

is the AM/PM bit with logic-high being PM. In the 24-hour

mode, bit 5 is the 20-hour bit (20–23 hours). The century

bit (bit 7 of the month register) is toggled when the years

register overflows from 99 to 00.

The day-of-week register increments at midnight. Values

that correspond to the day of week are user-defined but

must be sequential (i.e., if 1 equals Sunday, then 2 equals

Monday, and so on). Illogical time and date entries result

in undefined operation.

When reading or writing the time and date registers, sec-

ondary (user) buffers are used to prevent errors when the

internal registers update. When reading the time and date

registers, the user buffers are synchronized to the internal

registers on any START and when the register pointer

rolls over to zero. The time information is read from these

secondary registers, while the clock continues to run. This

eliminates the need to reread the registers in case the

main registers update during a read.

The countdown chain is reset whenever the seconds

register is written. Write transfers occur on the acknowl-

edge from the DS3231. Once the countdown chain is

reset, to avoid rollover issues the remaining time and

date registers must be written within 1 second. The 1Hz

square-wave output, if enabled, transitions high 500ms

after the seconds data transfer, provided the oscillator is

already running.

AlarmsThe DS3231 contains two time-of-day/date alarms.

Alarm 1 can be set by writing to registers 07h to 0Ah.

Alarm 2 can be set by writing to registers 0Bh to 0Dh.

The alarms can be programmed (by the alarm enable

and INTCN bits of the control register) to activate the

INT/SQW output on an alarm match condition. Bit 7 of

each of the time-of-day/date alarm registers are mask

bits (Table 2). When all the mask bits for each alarm

are logic 0, an alarm only occurs when the values in

the timekeeping registers match the corresponding val-

ues stored in the time-of-day/date alarm registers. The

alarms can also be programmed to repeat every second,

minute, hour, day, or date. Table 2 shows the possible

settings. Configurations not listed in the table will result

in illogical operation.

The DY/DT bits (bit 6 of the alarm day/date registers)

control whether the alarm value stored in bits 0 to 5 of

that register reflects the day of the week or the date of

the month. If DY/DT is written to logic 0, the alarm will be

the result of a match with date of the month. If DY/DT is

written to logic 1, the alarm will be the result of a match

with day of the week.

When the RTC register values match alarm register set-

tings, the corresponding Alarm Flag ‘A1F’ or ‘A2F’ bit is

set to logic 1. If the corresponding Alarm Interrupt Enable

‘A1IE’ or ‘A2IE’ is also set to logic 1 and the INTCN bit

is set to logic 1, the alarm condition will activate the

INT/SQW signal. The match is tested on the once-per-

second update of the time and date registers.

Table 2. Alarm Mask Bits

DY/DTALARM 1 REGISTER MASK BITS (BIT 7)

ALARM RATEA1M4 A1M3 A1M2 A1M1

X 1 1 1 1 Alarm once per second

X 1 1 1 0 Alarm when seconds match

X 1 1 0 0 Alarm when minutes and seconds match

X 1 0 0 0 Alarm when hours, minutes, and seconds match

0 0 0 0 0 Alarm when date, hours, minutes, and seconds match

1 0 0 0 0 Alarm when day, hours, minutes, and seconds match

DY/DTALARM 2 REGISTER MASK BITS (BIT 7)

ALARM RATEA2M4 A2M3 A2M2

X 1 1 1 Alarm once per minute (00 seconds of every minute)

X 1 1 0 Alarm when minutes match

X 1 0 0 Alarm when hours and minutes match

0 0 0 0 Alarm when date, hours, and minutes match

1 0 0 0 Alarm when day, hours, and minutes match

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 12

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 148: SISTEM MONITORING KONSENTRASI PARTIKULAT

Special-Purpose RegistersThe DS3231 has two additional registers (control and sta-

tus) that control the real-time clock, alarms, and square-

wave output.

Control Register (0Eh)Bit 7: Enable Oscillator (EOSC). When set to logic 0,

the oscillator is started. When set to logic 1, the oscillator

is stopped when the DS3231 switches to VBAT. This bit

is clear (logic 0) when power is first applied. When the

DS3231 is powered by VCC, the oscillator is always on

regardless of the status of the EOSC bit. When EOSC is

disabled, all register data is static.

Bit 6: Battery-Backed Square-Wave Enable (BBSQW). When set to logic 1 with INTCN = 0 and VCC < VPF, this

bit enables the square wave. When BBSQW is logic 0,

the INT/SQW pin goes high impedance when VCC < VPF.

This bit is disabled (logic 0) when power is first applied.

Bit 5: Convert Temperature (CONV). Setting this bit to

1 forces the temperature sensor to convert the tempera-

ture into digital code and execute the TCXO algorithm to

update the capacitance array to the oscillator. This can

only happen when a conversion is not already in prog-

ress. The user should check the status bit BSY before

forcing the controller to start a new TCXO execution. A

user-initiated temperature conversion does not affect the

internal 64-second update cycle.

A user-initiated temperature conversion does not affect

the BSY bit for approximately 2ms. The CONV bit remains

at a 1 from the time it is written until the conversion is

finished, at which time both CONV and BSY go to 0. The

CONV bit should be used when monitoring the status of a

user-initiated conversion.

Bits 4 and 3: Rate Select (RS2 and RS1). These bits

control the frequency of the square-wave output when

the square wave has been enabled. The following table

shows the square-wave frequencies that can be selected

with the RS bits. These bits are both set to logic 1

(8.192kHz) when power is first applied.

Bit 2: Interrupt Control (INTCN). This bit controls the

INT/SQW signal. When the INTCN bit is set to logic 0,

a square wave is output on the INT/SQW pin. When the

INTCN bit is set to logic 1, then a match between the time-

keeping registers and either of the alarm registers acti-

vates the INT/SQW output (if the alarm is also enabled).

The corresponding alarm flag is always set regardless of

the state of the INTCN bit. The INTCN bit is set to logic 1

when power is first applied.

Bit 1: Alarm 2 Interrupt Enable (A2IE). When set to

logic 1, this bit permits the alarm 2 flag (A2F) bit in the

status register to assert INT/SQW (when INTCN = 1).

When the A2IE bit is set to logic 0 or INTCN is set to logic

0, the A2F bit does not initiate an interrupt signal. The

A2IE bit is disabled (logic 0) when power is first applied.

Bit 0: Alarm 1 Interrupt Enable (A1IE). When set to

logic 1, this bit permits the alarm 1 flag (A1F) bit in the

status register to assert INT/SQW (when INTCN = 1).

When the A1IE bit is set to logic 0 or INTCN is set to logic

0, the A1F bit does not initiate the INT/SQW signal. The

A1IE bit is disabled (logic 0) when power is first applied.

Control Register (0Eh)

SQUARE-WAVE OUTPUT FREQUENCY

BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0

NAME: EOSC BBSQW CONV RS2 RS1 INTCN A2IE A1IE

POR: 0 0 0 1 1 1 0 0

RS2 RS1SQUARE-WAVE OUTPUT

FREQUENCY0 0 1Hz

0 1 1.024kHz

1 0 4.096kHz

1 1 8.192kHz

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 13

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 149: SISTEM MONITORING KONSENTRASI PARTIKULAT

Status Register (0Fh)Bit 7: Oscillator Stop Flag (OSF). A logic 1 in this bit indi-

cates that the oscillator either is stopped or was stopped

for some period and may be used to judge the validity of

the timekeeping data. This bit is set to logic 1 any time

that the oscillator stops. The following are examples of

conditions that can cause the OSF bit to be set:

1) The first time power is applied.

2) The voltages present on both VCC and VBAT are insuf-

ficient to support oscillation.

3) The EOSC bit is turned off in battery-backed mode.

4) External influences on the crystal (i.e., noise, leakage,

etc.).

This bit remains at logic 1 until written to logic 0.

Bit 3: Enable 32kHz Output (EN32kHz). This bit con-

trols the status of the 32kHz pin. When set to logic 1, the

32kHz pin is enabled and outputs a 32.768kHz square-

wave signal. When set to logic 0, the 32kHz pin goes to a

high-impedance state. The initial power-up state of this bit

is logic 1, and a 32.768kHz square-wave signal appears

at the 32kHz pin after a power source is applied to the

DS3231 (if the oscillator is running).

Bit 2: Busy (BSY). This bit indicates the device is busy

executing TCXO functions. It goes to logic 1 when the con-

version signal to the temperature sensor is asserted and

then is cleared when the device is in the 1-minute idle state.

Bit 1: Alarm 2 Flag (A2F). A logic 1 in the alarm 2 flag bit

indicates that the time matched the alarm 2 registers. If the

A2IE bit is logic 1 and the INTCN bit is set to logic 1, the

INT/SQW pin is also asserted. A2F is cleared when written

to logic 0. This bit can only be written to logic 0. Attempting

to write to logic 1 leaves the value unchanged.

Bit 0: Alarm 1 Flag (A1F). A logic 1 in the alarm 1 flag bit

indicates that the time matched the alarm 1 registers. If the

A1IE bit is logic 1 and the INTCN bit is set to logic 1, the

INT/SQW pin is also asserted. A1F is cleared when written

to logic 0. This bit can only be written to logic 0. Attempting

to write to logic 1 leaves the value unchanged.

Aging OffsetThe aging offset register takes a user-provided value to

add to or subtract from the codes in the capacitance array

registers. The code is encoded in two’s complement, with

bit 7 representing the sign bit. One LSB represents one

small capacitor to be switched in or out of the capacitance

array at the crystal pins. The aging offset register capaci-

tance value is added or subtracted from the capacitance

value that the device calculates for each temperature

compensation. The offset register is added to the capaci-

tance array during a normal temperature conversion, if

the temperature changes from the previous conversion, or

during a manual user conversion (setting the CONV bit).

To see the effects of the aging register on the 32kHz out-

put frequency immediately, a manual conversion should

be started after each aging register change.

Positive aging values add capacitance to the array, slow-

ing the oscillator frequency. Negative values remove

capacitance from the array, increasing the oscillator

frequency.

The change in ppm per LSB is different at different tem-

peratures. The frequency vs. temperature curve is shifted

by the values used in this register. At +25°C, one LSB

typically provides about 0.1ppm change in frequency.

Use of the aging register is not needed to achieve the

accuracy as defined in the EC tables, but could be used

to help compensate for aging at a given temperature.

See the Typical Operating Characteristics section for a

graph showing the effect of the register on accuracy over

temperature.

Status Register (0Fh)

Aging Offset (10h)

BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0

NAME: OSF 0 0 0 EN32kHz BSY A2F A1F

POR: 1 0 0 0 1 X X X

BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0

NAME: Sign Data Data Data Data Data Data Data

POR: 0 0 0 0 0 0 0 0

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 14

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 150: SISTEM MONITORING KONSENTRASI PARTIKULAT

Temperature Registers (11h–12h)Temperature is represented as a 10-bit code with a

resolution of 0.25°C and is accessible at location 11h and

12h. The temperature is encoded in two’s complement

format. The upper 8 bits, the integer portion, are at loca-

tion 11h and the lower 2 bits, the fractional portion, are in

the upper nibble at location 12h. For example, 00011001

01b = +25.25°C. Upon power reset, the registers are set

to a default temperature of 0°C and the controller starts

a temperature conversion. The temperature is read on

initial application of VCC or I2C access on VBAT and once

every 64 seconds afterwards. The temperature registers

are updated after each user-initiated conversion and on

every 64-second conversion. The temperature registers

are read-only.

I2C Serial Data BusThe DS3231 supports a bidirectional I2C bus and data

transmission protocol. A device that sends data onto the

bus is defined as a transmitter and a device receiving data

is defined as a receiver. The device that controls the mes-

sage is called a master. The devices that are controlled

by the master are slaves. The bus must be controlled by

a master device that generates the serial clock (SCL),

controls the bus access, and generates the START and

STOP conditions. The DS3231 operates as a slave on the

I2C bus. Connections to the bus are made through the

SCL input and open-drain SDA I/O lines. Within the bus

specifications, a standard mode (100kHz maximum clock

rate) and a fast mode (400kHz maximum clock rate) are

defined. The DS3231 works in both modes.

The following bus protocol has been defined (Figure 2):

Data transfer may be initiated only when the bus is not busy.

During data transfer, the data line must remain stable whenever the clock line is high. Changes in the data

line while the clock line is high are interpreted as con-

trol signals.

Accordingly, the following bus conditions have been

defined:

Bus not busy: Both data and clock lines remain high.

START data transfer: A change in the state of the

data line from high to low, while the clock line is high,

defines a START condition.

STOP data transfer: A change in the state of the

data line from low to high, while the clock line is high,

defines a STOP condition.

Data valid: The state of the data line represents valid

data when, after a START condition, the data line is

stable for the duration of the high period of the clock

signal. The data on the line must be changed during

the low period of the clock signal. There is one clock

pulse per bit of data.

Each data transfer is initiated with a START condition

and terminated with a STOP condition. The number

of data bytes transferred between the START and the

STOP conditions is not limited, and is determined by

the master device. The information is transferred byte-

wise and each receiver acknowledges with a ninth bit.

Acknowledge: Each receiving device, when

addressed, is obliged to generate an acknowledge

after the reception of each byte. The master device

must generate an extra clock pulse, which is associ-

ated with this acknowledge bit.

A device that acknowledges must pull down the SDA

line during the acknowledge clock pulse in such a way

that the SDA line is stable low during the high period of

the acknowledge-related clock pulse. Of course, setup

and hold times must be taken into account. A master

must signal an end of data to the slave by not generat-

Temperature Register (Upper Byte) (11h)

Temperature Register (Lower Byte) (12h)

BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0

NAME: Sign Data Data Data Data Data Data Data

POR: 0 0 0 0 0 0 0 0

BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0

NAME: Data Data 0 0 0 0 0 0

POR: 0 0 0 0 0 0 0 0

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 15

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 151: SISTEM MONITORING KONSENTRASI PARTIKULAT

ing an acknowledge bit on the last byte that has been

clocked out of the slave. In this case, the slave must

leave the data line high to enable the master to gener-

ate the STOP condition.

Figures 3 and 4 detail how data transfer is accomplished

on the I2C bus. Depending upon the state of the R/W bit,

two types of data transfer are possible:

Data transfer from a master transmitter to a slave receiver. The first byte transmitted by the master

is the slave address. Next follows a number of data

bytes. The slave returns an acknowledge bit after each

received byte. Data is transferred with the most signifi-

cant bit (MSB) first.

Data transfer from a slave transmitter to a master receiver. The first byte (the slave address) is transmit-

ted by the master. The slave then returns an acknowl-

edge bit. Next follows a number of data bytes transmit-

ted by the slave to the master. The master returns an

acknowledge bit after all received bytes other than the

Figure 2. I2C Data Transfer Overview

Figure 3. Data Write—Slave Receiver Mode

Figure 4. Data Read—Slave Transmitter Mode

SDA

SCL

IDLE

1–7 8 9 1–7 8 9 1–7 8 9

START

CONDITION STOP CONDITION

REPEATED START

SLAVE

ADDRESS

R/W ACK ACKDATA ACK/

NACK

DATA

MSB FIRST MSB LSB MSB LSB

REPEATED IF MORE BYTES

ARE TRANSFERRED

...AXXXXXXXXA1101000S 0 XXXXXXXX A XXXXXXXX A XXXXXXXX A P

<R/W> <WORD ADDRESS (n)> <DATA (n)> <DATA (n + 1)> <DATA (n + X)

S - START

A - ACKNOWLEDGE (ACK)

P - STOP

R/W - READ/WRITE OR DIRECTION BIT ADDRESS

DATA TRANSFERRED

(X + 1 BYTES + ACKNOWLEDGE)

MASTER TO SLAVESLAVE TO MASTER

<SLAVE

ADDRESS>

...AXXXXXXXXA1101000S 1 XXXXXXXX A XXXXXXXX A XXXXXXXX A P

S - START

A - ACKNOWLEDGE (ACK)

P - STOP

A - NOT ACKNOWLEDGE (NACK)

R/W - READ/WRITE OR DIRECTION BIT ADDRESS

DATA TRANSFERRED

(X + 1 BYTES + ACKNOWLEDGE)

NOTE: LAST DATA BYTE IS FOLLOWED BY A NACK.

MASTER TO SLAVE SLAVE TO MASTER

<R/W> <DATA (n)> <DATA (n + 1)> <DATA (n + 2)> <DATA (n + X)> <SLAVE

ADDRESS>

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 16

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 152: SISTEM MONITORING KONSENTRASI PARTIKULAT

last byte. At the end of the last received byte, a not

acknowledge is returned.

The master device generates all the serial clock pulses

and the START and STOP conditions. A transfer

is ended with a STOP condition or with a repeated

START condition. Since a repeated START condition

is also the beginning of the next serial transfer, the bus

will not be released. Data is transferred with the most

significant bit (MSB) first.

The DS3231 can operate in the following two modes:

Slave receiver mode (DS3231 write mode): Serial

data and clock are received through SDA and SCL.

After each byte is received, an acknowledge bit is

transmitted. START and STOP conditions are recog-

nized as the beginning and end of a serial transfer.

Address recognition is performed by hardware after

reception of the slave address and direction bit. The

slave address byte is the first byte received after the

master generates the START condition. The slave

address byte contains the 7-bit DS3231 address,

which is 1101000, followed by the direction bit (R/W),

which is 0 for a write. After receiving and decoding the

slave address byte, the DS3231 outputs an acknowl-

edge on SDA. After the DS3231 acknowledges the

slave address + write bit, the master transmits a word

address to the DS3231. This sets the register pointer

on the DS3231, with the DS3231 acknowledging the

transfer. The master may then transmit zero or more

bytes of data, with the DS3231 acknowledging each

byte received. The register pointer increments after

each data byte is transferred. The master generates a

STOP condition to terminate the data write.

Slave transmitter mode (DS3231 read mode): The

first byte is received and handled as in the slave

receiver mode. However, in this mode, the direction

bit indicates that the transfer direction is reversed.

Serial data is transmitted on SDA by the DS3231 while

the serial clock is input on SCL. START and STOP

conditions are recognized as the beginning and end

of a serial transfer. Address recognition is performed

by hardware after reception of the slave address and

direction bit. The slave address byte is the first byte

received after the master generates a START condi-

tion. The slave address byte contains the 7-bit DS3231

address, which is 1101000, followed by the direction

bit (R/W), which is 1 for a read. After receiving and

decoding the slave address byte, the DS3231 outputs

an acknowledge on SDA. The DS3231 then begins to

transmit data starting with the register address pointed

to by the register pointer. If the register pointer is not

written to before the initiation of a read mode, the first

address that is read is the last one stored in the regis-

ter pointer. The DS3231 must receive a not acknowl-

edge to end a read.

Figure 5. Data Write/Read (Write Pointer, Then Read)—Slave Receive and Transmit

S - START

Sr - REPEATED START

A - ACKNOWLEDGE (ACK)

P - STOP

A - NOT ACKNOWLEDGE (NACK)

R/W - READ/WRITE OR DIRECTION BIT ADDRESS

<R/W> <WORD ADDRESS (n)> <SLAVE ADDRESS (n)><SLAVE

ADDRESS> <R/W>

AXXXXXXXXA1101000 1101000S Sr0 A1

DATA TRANSFERRED

(X + 1 BYTES + ACKNOWLEDGE)

NOTE: LAST DATA BYTE IS FOLLOWED BY A NACK.

MASTER TO SLAVE SLAVE TO MASTER

AXXXXXXXX XXXXXXXX A XXXXXXXX A XXXXXXXX A P

<DATA (n)> <DATA (n + 1)> <DATA (n + 2)> <DATA (n + X)>

...

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 17

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 153: SISTEM MONITORING KONSENTRASI PARTIKULAT

Handling, PCB Layout, and AssemblyThe DS3231 package contains a quartz tuning-fork

crystal. Pick-and-place equipment can be used, but

precautions should be taken to ensure that

excessive shocks are avoided. Ultrasonic cleaning should be

avoided to prevent damage to the crystal.

Avoid running signal traces under the package, unless

a ground plane is placed between the package and the

signal line. All N.C. (no connect) pins must be connected

to ground.

Moisture-sensitive packages are shipped from the

factory dry packed. Handling instructions listed on the

package label must be followed to prevent damage during

reflow. Refer to the IPC/JEDEC J-STD-020 standard for

moisture-sensitive device (MSD) classifications and reflow

profiles. Exposure to reflow is limited to 2 times maximum.

#Denotes an RoHS-compliant device that may include lead (Pb) that is exempt under RoHS requirements. The lead finish is JESD97 category e3, and is compatible with both lead-based and lead-free soldering processes. A “#” anywhere on the top mark denotes an RoHS-compliant device.

PACKAGE

TYPE

PACKAGE

CODE

OUTLINE

NO.

LAND

PATTERN NO.

16 SO W16#H2 21-0042 90-0107

PART TEMP RANGE PIN-PACKAGEDS3231S# 0°C to +70°C 16 SO

DS3231SN# -40°C to +85°C 16 SO16

15

14

13

12

11

10

9

1

2

3

4

5

6

7

8

32kHz SCL

SDA

VBAT

GND

N.C.

N.C.

N.C.

N.C.

TOP VIEW

SO

VCC

INT/SQW

N.C.

RST

N.C.

N.C.

N.C.

DS3231

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 18

Package InformationFor the latest package outline information and land patterns

(footprints), go to www.maximintegrated.com/packages. Note

that a “+”, “#”, or “-” in the package code indicates RoHS status

only. Package drawings may show a different suffix character, but

the drawing pertains to the package regardless of RoHS status.

Chip InformationSUBSTRATE CONNECTED TO GROUND

PROCESS: CMOS

Pin Configuration Ordering Information

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 154: SISTEM MONITORING KONSENTRASI PARTIKULAT

REVISION

NUMBER

REVISION

DATEDESCRIPTION

PAGES

CHANGED0 1/05 Initial release. —

1 2/05

Changed Digital Temp Sensor Output from ±2°C to ±3°C. 1, 3

Updated Typical Operating Circuit. 1

Changed TA = -40°C to +85°C to TA = TMIN to TMAX. 2, 3, 4

Updated Block Diagram. 8

2 6/05

Added “UL Recognized” to Features; added lead-free packages and removed S from top

mark info in Ordering Information table; added ground connections to the N.C. pin in the

Typical Operating Circuit.

1

Added “noncondensing” to operating temperature range; changed VPF MIN from 2.35V to

2.45V.2

Added aging offset specification. 3

Relabeled TOC4. 7

Added arrow showing input on X1 in the Block Diagram. 8

Updated pin descriptions for VCC and VBAT. 9

Added the I2C Interface section. 10

Figure 1: Added sign bit to aging and temperature registers; added MSB and LSB. 11

Corrected title for rate select bits frequency table. 13

Added note that frequency stability over temperature spec is with aging offset register =

00h; changed bit 7 from Data to Sign (Crystal Aging Offset Register).14

Changed bit 7 from Data to Sign (Temperature Register); correct pin definitions in I2C

Serial Data Bus section.15

Modified the Handing, PC Board Layout, and Assembly section to refer to

J-STD-020 for reflow profiles for lead-free and leaded packages. 17

3 11/05 Changed lead-free packages to RoHS-compliant packages. 1

4 10/06

Changed RST and UL bullets in Features. 1

Changed EC condition “VCC > VBAT” to “VCC = Active Supply (see Table 1).” 2, 3

Modified Note 12 to correct tREC operation. 6

Added various conditions text to TOCs 1, 2, and 3. 7

Added text to pin descriptions for 32kHz, VCC, and RST. 9

Table 1: Changed column heading “Powered By” to “Active Supply”; changed “applied” to

“exceeds VPF” in the Power Control section.10

Indicated BBSQW applies to both SQW and interrupts; simplified temp convert description (bit 5); added “output” to INT/SQW (bit 2).

13

Changed the Crystal Aging section to the Aging Offset section; changed “this bit

indicates” to “this bit controls” for the enable 32kHz output bit.14

5 4/08

Added Warning note to EC table notes; updated Note 12. 6

Updated the Typical Operating Characteristics graphs. 7

In the Power Control section, added information about the POR state of the time and date

registers; in the Real-Time Clock section, added to the description of the RST function.10

In Figure 1, corrected the months date range for 04h from 00–31 to 01–31. 11

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

www.maximintegrated.com Maxim Integrated 19

Revision History

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 155: SISTEM MONITORING KONSENTRASI PARTIKULAT

REVISION

NUMBER

REVISION

DATEDESCRIPTION

PAGES

CHANGED

6 10/08

Updated the Typical Operating Circuit. 1

Removed the VPU parameter from the Recommended DC Operating Conditions table

and added verbiage about the pullup to the Pin Description table for INT/SQW, SDA, and

SCL.

2, 9

Added the Delta Time and Frequency vs. Temperature graph in the Typical Operating

Characteristics section.7

Updated the Block Diagram. 8

Added the VBAT Operation section, improved some sections of text for the 32kHz TCXO

and Pushbutton Reset Function sections.10

Added the register bit POR values to the register tables. 13, 14, 15

Updated the Aging Offset and Temperature Registers (11h–12h) sections. 14, 15

Updated the I2C timing diagrams (Figures 3, 4, and 5). 16, 17

7 3/10Removed the “S” from the top mark in the Ordering Information table and the Pin

Configuration to match the packaging engineering marking specification. 1, 18

8 7/10

Updated the Typical Operating Circuit; removed the “Top Mark” column from the Ordering

Information; in the Absolute Maximum Ratings section, added the theta-JA and theta-

JC thermal resistances and Note 1, and changed the soldering temperature to +260°C

(lead(Pb)-free) and +240°C (leaded); updated the functional description of the VBAT pin

in the Pin Description; changed the timekeeping registers 02h, 09h, and 0Ch to “20 Hour”

in Bit 5 of Figure 1; updated the BBSQW bit description in the Control Register (0Eh)

section; added the land pattern no. to the Package Information table.

1, 2, 3, 4, 6, 9,

11, 12, 13, 18

9 1/13 Updated Absolute Maximum Ratings, and last paragraph in Power Control section 2, 10

10 3/15 Revised Benefits and Features section. 1

Maxim Integrated cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim Integrated product. No circuit patent licenses

are implied. Maxim Integrated reserves the right to change the circuitry and specifications without notice at any time. The parametric values (min and max limits) shown in the Electrical Characteristics table are guaranteed. Other parametric values quoted in this data sheet are provided for guidance.

Maxim Integrated and the Maxim Integrated logo are trademarks of Maxim Integrated Products, Inc.

DS3231 Extremely Accurate I2C-Integrated

RTC/TCXO/Crystal

© 2015 Maxim Integrated Products, Inc. 20

Revision History (continued)

For pricing, delivery, and ordering information, please contact Maxim Direct at 1-888-629-4642, or visit Maxim Integrated’s website at www.maximintegrated.com.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 156: SISTEM MONITORING KONSENTRASI PARTIKULAT

SSHHEENNZZHHEENN EEOONNEE EELLEECCTTRROONNIICCSS CCOO..,,LLTTDD

1602A-1 LCD Module Specification Ver1.0 1

Specification

for

LCD Module

1602A-1

(V1.2)

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 157: SISTEM MONITORING KONSENTRASI PARTIKULAT

SSHHEENNZZHHEENN EEOONNEE EELLEECCTTRROONNIICCSS CCOO..,,LLTTDD

1602A-1 LCD Module Specification Ver1.0 2

1. 0 FEATURES

Display Mode: STN, BLUB

Display Formate: 16 Character x 2 Line

Viewing Direction: 6 O’Clock

Input Data: 4-Bits or 8-Bits interface available

Display Font : 5 x 8 Dots

Power Supply : Single Power Supply (5V±10%)

Driving Scheme : 1/16Duty,1/5Bias

BACKLIGHT(SIDE):LED(WHITE)

2.0 ABSOLUTE MAXIMUM

Item Symbol Min. Max. Unit

Power Supply for logic Vdd -0.3 +7.0 V

Power supply for LCD Drive Vlcd Vdd-10.0 Vdd+0.3 V

Input Voltage Vi -0.3 Vdd+0.3 V

Operating Temperature Ta 0 +50

Storage Temperature Tstg -10 +60

3.0ELECTRICAL CHARACTERISTICS (Ta=25;Vdd=3.0V±10%,otherwise specified)

Item Symbol Test Condition Min. Typ. Max. Unit

Power Supply for Logic Vdd -- 4.7 5.0 5.5 V

Operating Voltage for LCD Vdd-Vo -- -- 5.0 -- V

Input High voltage Vih -- 2.2 -- Vdd V

Input Low voltage Vil -- -0.3 -- 0.6 V

Output High voltage Voh -Ioh=0.2mA 2.4 -- -- V

Output Low voltage Vol Iol=1.2mA -- -- 0.4 V

Power supply current Idd Vdd=3.0v -- 1.1 -- mA

4.0 MECHANICAL PARAMETERS

Item Description Unit

PCB Dimension 80.0*36.0*1.6 mm

View Dimension 69.5*14.5 mm

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 158: SISTEM MONITORING KONSENTRASI PARTIKULAT

SSHHEENNZZHHEENN EEOONNEE EELLEECCTTRROONNIICCSS CCOO..,,LLTTDD

1602A-1 LCD Module Specification Ver1.0 3

5. 0 PIN ASSIGNMENT

No. Symbol Level Function

1 Vss -- 0V 2 Vdd -- +5V Power Supply

3 V0 -- for LCD 4 RS H/L Register Select: H:Data Input L:Instruction Input

5 R/W H/L H--Read L--Write

6 E H,H-L Enable Signal

7 DB0 H/L

8 DB1 H/L

9 DB2 H/L Data bus used in 8 bit transfer

10 DB3 H/L

11 DB4 H/L

12 DB5 H/L Data bus for both 4 and 8 bit transfer

13 DB6 H/L

14 DB7 H/L

15 BLA -- BLACKLIGHT +5V

16 BLK -- BLACKLIGHT 0V-

6.0 BLOCK DIAGRAM

7.0 POWER SUPPLY BLOCK DIAGRAM

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 159: SISTEM MONITORING KONSENTRASI PARTIKULAT

SSHHEENNZZHHEENN EEOONNEE EELLEECCTTRROONNIICCSS CCOO..,,LLTTDD

1602A-1 LCD Module Specification Ver1.0 4

8.0 TIMING CHARACTERISTICS

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 160: SISTEM MONITORING KONSENTRASI PARTIKULAT

SSHHEENNZZHHEENN EEOONNEE EELLEECCTTRROONNIICCSS CCOO..,,LLTTDD

1602A-1 LCD Module Specification Ver1.0 5

9.0 Display control instruction

The display control instructions control the internal state of the ST7066U-0A. Instruction is received from MPU to ST7066U-0A for the display control. The following table shows various instructions.

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 161: SISTEM MONITORING KONSENTRASI PARTIKULAT

SSHHEENNZZHHEENN EEOONNEE EELLEECCTTRROONNIICCSS CCOO..,,LLTTDD

1602A-1 LCD Module Specification Ver1.0 6

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 162: SISTEM MONITORING KONSENTRASI PARTIKULAT

SSHHEENNZZHHEENN EEOONNEE EELLEECCTTRROONNIICCSS CCOO..,,LLTTDD

1602A-1 LCD Module Specification Ver1.0 7

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 163: SISTEM MONITORING KONSENTRASI PARTIKULAT

SSHHEENNZZHHEENN EEOONNEE EELLEECCTTRROONNIICCSS CCOO..,,LLTTDD

1602A-1 LCD Module Specification Ver1.0 8

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 164: SISTEM MONITORING KONSENTRASI PARTIKULAT

SSHHEENNZZHHEENN EEOONNEE EELLEECCTTRROONNIICCSS CCOO..,,LLTTDD

1602A-1 LCD Module Specification Ver1.0 9

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 165: SISTEM MONITORING KONSENTRASI PARTIKULAT

SSHHEENNZZHHEENN EEOONNEE EELLEECCTTRROONNIICCSS CCOO..,,LLTTDD

1602A-1 LCD Module Specification Ver1.0 10

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 166: SISTEM MONITORING KONSENTRASI PARTIKULAT

SSHHEENNZZHHEENN EEOONNEE EELLEECCTTRROONNIICCSS CCOO..,,LLTTDD

1602A-1 LCD Module Specification Ver1.0 11

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI

Page 167: SISTEM MONITORING KONSENTRASI PARTIKULAT

SSHHEENNZZHHEENN EEOONNEE EELLEECCTTRROONNIICCSS CCOO..,,LLTTDD

1602A-1 LCD Module Specification Ver1.0 12

9.EXTERNAL DIMENSIONS

EONE ELECTRONICS CO.,LTD. 深圳市冠晶达电子有限公司

PITCH 2.54X(16-1)=38,10±0,2

BLABLKDB5DB4 DB7DB6DB2DB3R/W E DB0DB1RSV0VDDVSS169 1110 14 1513125 6 873 421

PLAGIAT MERUPAKAN TINDAKAN TIDAK TERPUJI