rancang bangun monitoring alat ukur suhu, …

114
RANCANG BANGUN MONITORING ALAT UKUR SUHU, KELEMBABAN DAN KECEPATAN ANGIN MENGGUNAKAN LORA BERBASIS MIKROKONTROLLER ATMEGA328 SKRIPSI MULIANSYAH SARAGIH 180821046 DEPARTEMEN FISIKA FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM UNIVERSITAS SUMATERA UTARA MEDAN 2021 Universitas Sumatera Utara

Upload: others

Post on 02-Oct-2021

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

i

RANCANG BANGUN MONITORING ALAT UKUR SUHU,

KELEMBABAN DAN KECEPATAN ANGIN MENGGUNAKAN

LORA BERBASIS MIKROKONTROLLER ATMEGA328

SKRIPSI

MULIANSYAH SARAGIH

180821046

DEPARTEMEN FISIKA

FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM

UNIVERSITAS SUMATERA UTARA

MEDAN

2021

Universitas Sumatera Utara

Page 2: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

i

RANCANG BANGUN MONITORING ALAT UKUR SUHU,

KELEMBABAN DAN KECEPATAN ANGIN MENGGUNAKAN

LORA BERBASIS MIKROKONTROLLER ATMEGA328

SKRIPSI

Diajukan untuk melengkapi tugas dan memenuhi syarat mencapai gelar

Sarjana Sains

MULIANSYAH SARAGIH

180821046

DEPARTEMEN FISIKA

FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM

UNIVERSITAS SUMATERA UTARA

MEDAN

2021

Universitas Sumatera Utara

Page 3: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

i Universitas Sumatera Utara

Page 4: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ii Universitas Sumatera Utara

Page 5: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

iii

PENGHARGAAN

Segala puji dan syukur kepada Tuhan Yang Maha Esa, dengan

limpahan berkatNya kepada penulis sehingga dapat menyelesaikan Skripsi

ini yang berjudul Rancang Bangun Monitoring Alat Ukur Suhu,

Kelembababan Dan Kecepatan Angin Menggunakan Lora Berbasis

Mikrokontroller ATMEGA 328

Skripsi ini merupakan salah satu syarat yang harus dipenuhi untuk

menyelesaikan pendidikan Sarjana Jurusan Fisika Fakultas Matematika

dan Ilmu Pengetahuan Alam Universitas Sumatera Utara.

Adapun judul Tugas Akhir ini adalah :

Penulis menyadari bahwa tersusunnya Skripsi ini dari Doa,

perhatian, bimbingan, motivasi dan dukungan berbagai pihak, sehingga

dengan keikhlasan dan kerendahan hati pada kesempatan ini penulis

mengucapkan terima kasih yang sebesar-besarnya kepada :

1. Bapak Dr. Kerista Sebayang, MS selaku Dekan Fakultas

Matematika dan Ilmu Pengetahuan Alam Universitas

SumateraUtara.

2. Bapak Dr. Perdinan Sinuhaji, MS selaku Ketua

Departemen dan Bapak Awan Magfirah,S.Si M,Si selaku

sekretaris Departemen Program Studi S1 Fisika Fakultas

Matematika dan Ilmu Pengetahuan Alam Universitas

Sumatera Utara.

3. Bapak Herli Ginting, MS selaku pembimbing yang telah

banyak membantu dan mendukung penulis dalam

menyelesaikan Skripsi ini.

4. Bapak Junedi Ginting, M.Si dan Bapak Drs. Aditia

Warman, M.Si selaku Penguji saya yang telah banyak

membantu dalam menyelesaikan Skripsi ini.

Universitas Sumatera Utara

Page 6: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

iv

Universitas Sumatera Utara

Page 7: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

v

RANCANG BANGUN MONITORING ALAT UKUR SUHU, KELEMBABAN

DAN KECEPATAN ANGIN MENGGUNAKAN LORA BERBASIS

MIKROKONTROLLER ATMEGA328

ABSTRAK

Telah dirancang sebuah sistem akuisisi data dengan mengaplikasikan 3 (buah)

parameter berbasis Mikrokontroler ATMega328. Sistem tersebut sudah dilengkapi

dengan modul Lora yang akan digunakan untuk mengirimkan data pada LCD dari

jarak maksimal 10km. Prinsip kerja dari sistem akuisisi data ini adalah Anemometer

dan SHT11 akan mengukursecara langsung besarnya kecepatan angin, suhu dan

kelembaban udara dari suatu lokasi pengukuran, selanjutnya data – data tersebut

akan di akuisisi kan ke dalam mikrokontrolerATMega 328, kemudian

Mikrokontroller mengirim data dengan melalui lora transmitter ke lora receiver dan

akan ditampilkan di LCD

Kata Kunci: Sensor Anenometer, Sensor SHT-11, ATMega328, Lora

Universitas Sumatera Utara

Page 8: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

vi

MONITORING DESIGN TO MEASURE TEMPERATURE,

MOISTURE AND WIND SPEED USING ATMEGA328

MICROCONTROLLER BASED LORA

ABSTRACT

A data acquisition system has been designed by applying 3 (pieces) parameters based

on ATMega328 Microcontroller. The system is equipped with a Lora module which

will be used to transmit data to the LCD from a maximum distance of 10km. The

working principle of this data acquisition system is that the Anemometer and SHT11

will measure directly the amount of wind speed, temperature and air humidity from a

measurement location, then the data will be acquired into the ATMega 328

microcontroller, then the microcontroller sends data via a lora transmitter to the lora

receiver and will be displayed on the LCD

Keywords: Anenometer Sensor, SHT-11 Sensor, ATMega328, Lora

Universitas Sumatera Utara

Page 9: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

vii

DAFTAR ISI

PENGESAHAN SKRIPSI i

PERNYATAAN ORISINALITAS ii

PENGHARGAAN iii

ABSTRAK v

ABSTRACT vi

DAFTAR ISI vii

DAFTAR TABEL ix

DAFTAR GAMBAR x

DAFTAR LAMPIRAN xi

BAB I PENDAHULUAN

1.1 Latar Belakang 1

1.2 Rumusan Masalah 2

1.3 Batasan Masalah 2

1.4 Tujuan Penelitian 2

1.5 Sistematika Penulisan 2

BAB II TINJAUAN PUSTAKA

2.1 Suhu dan Kelembaban Udara 4

2.2 Angin 6

2.3 Liquid Crsytal Display(LCD) 8

2.4 Baterai 11

2.5 SHT11 14

2.6 Sensor Anemometer 16

2.7 Lora 18

2.8 ATMega328 19

2.9 Higrometer 20

Universitas Sumatera Utara

Page 10: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

viii

BAB III METODE PENELITIAN

3.1 Diagram Blok 22

3.2 Peralatan dan Bahan 23

3.3 Diagram Flowchart 23

3.4 Macam-macam Rangkaian Yang Digunakan 26

BAB IV HASIL DAN PEMBAHASAN

4.1 Pengujian 32

4.2 Data 39

4.3 Analisa Data 41

BAB V KESIMPULAN DAN SARAN

5.1 Kesimpulan 44

5.2 Saran 44

DAFTAR PUSTAKA

Universitas Sumatera Utara

Page 11: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ix

DAFTAR TABEL

Nomor Tabel Judul Halaman

2.1 Pin-pin konfigurasi pada LC 9

4.1 Tabel Pengujian Baterai dan Charger 32

4.2.1 Tabel Data Pengujian Alat mendeteksi Kecepatan angin,

Suhu dan Kelembaban 39

4.2.2 Tabel Data Pembanding dari Sensor Anemometer (R2)

dan ukur Hygrometer (HTC-2) 40

Universitas Sumatera Utara

Page 12: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

x

DAFTAR GAMBAR

Nomor Gambar Judul Halaman

2.1 Liqiud Crystal Display (LCD) Character 2x16 8

2.2 Struktur dasar pada LCD 9

2.3 Jenis Baterai Primer 12

2.4 Jenis Baterai Sekunder(Isi Ulang) 14

2.5 Diagram Blok SHT11 15

2.6 Sensor Anemometer 17

2.7 Contoh diagram jaringan Lora 18

2.8 Mikrokontroller ATMega328 20

3.1 Diagram Blok 22

3.2 Diagram Flowchart Transmitter 24

3.3 Diagram Flowchart Receiver 25

3.4 Rangkaian Charger dan Baterai 26

3.5 Rangkaian Regulator 5V 26

3.6 Rangkaian Regulatpr 3,3V 27

3.7 Rangkaian Mikrokontroller ATMega328 27

3.8 Rangkaian Lora 28

3.9 Rangkaian Sensor SHT11 29

3.10 Rangkaian Sensor Anemometer 29

3.11 Rangkaian LCD 30

3.12 Rangkaian Transmitter 30

3.13 Rangkaian Receiver 31

4.1 Hasil Pengujian Mikrokontroller ATMega328 32

4.2 Hasil Pengujian Lora Transmitter 34

4.3 Hasil Pengujian Lora Receiver 35

4.4 Hasil Pengujian Sensor SHT11 36

4.5 Hasil Pengujian Sensor Anemometer 37

4.6 Hasil Pengujian LCD 38

Universitas Sumatera Utara

Page 13: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

xi

DAFTAR LAMPIRAN

Lampiran 1. Foto Kegiatan Pengujian

Lampiran 2.Program lengkap

Lampiran 3.Data Sheet Lora

Lampiran 4.Data Sheet Sensor Anemometer

Lampiran 5.Data Sheet Sensor SHT11

Lampiran 6.Data Sheet Mikrokontroller ATMega328

Lampiran 7.Data Sheet Hygrometer

Universitas Sumatera Utara

Page 14: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

1

BAB I

PENDAHULUAN

1. LATAR BELAKANG

Indonesia merupakan negara tropis yang terletak pada 6o LU-11o LS dan 95o BT-

141o BT, serta di sepanjang garis khatulistiwa. Faktor tersebut menyebabkan

keadaan cuaca di Indonesia cenderung berubah dari waktu kewaktu.Perbandingan

antara daratan/lautan, adalah 1 : (1.919.443 km2: 7.228.138 km2) dan dihuni

±267,7 juta jiwa. Pengamatan akan keadaan cuaca ini sangat penting, mengingat

keadaan geografis Indonesia yang sebagian besar berbentuk kepulauan. Informasi

cuaca sangat diperlukan oleh masyarakat sebagai salah satu pedoman penting

dalammenjalankan aktifitas mereka.

Untuk mengantisipasi fluktuasi cuaca yang selalu berubah dari waktu ke

waktu serta dari satu tempat ke tempat lainnya, diperlukan baik sarana peralatan

pengukur cuaca, komputer canggih untuk analisiscuaca. Alat ukur cuaca

mutlak diperlukan untuk memenuhi kebutuhan akan informasi cuaca.manfaat

lainnya mengetahui infomasi cuaca untu berbagai bidang seperti: bidang

pertanian,bidang kelautan, perencanaan pembangunan bendungan serta

kontruksi hidrologi, transportasi, pariwisata serta untuk penelitian dan lain

sebagainya. Saya membuat alat penelitiandiantaranya adalah Suhu Udara,

Kelembaban Udara, Kecepatan Angin, danTekanan Udara. Pada penelitian ini

digunakan Mikrokontroller ATMega328 dan Lora. Dimana Lora sebagai

gelombang perodik yang akan mentransfer data ke sensor SHT-11 dan Sensor

Anenometer. Sedangkan ATMega328 berfungsi sebagai proses eksekusi data dari

sensor SHT-11 dan Sensor Anenometer sebelum masuk ke LCD.

Kajian tentang parameter angin sangat dibutuhkan untuk pemetaan potensi energi

angin seperti kecepatan dan arah angina di suatu daerah. Untuk mengetahui

potensi angin, maka diperlukan alat ukur yang akurat. Hal tersebut menjadi

penting dalam mengetahui kecepatan angin, agar dapat memetakan potensi energy

angin disuatu tempat.

Alat pengukur kecepatan angin sudah pernah dibuat dalam beberapa penelitian.

Dalam penelitian ini telah merancang dan membuat alat ukur monitoring

kecepatan dan suhu dan kelembaban udara berbasis mikrokontroller Atmega328

menggunakan sistem sensor Anemometer dan SHT11 berbasis mikrokontroller

Atmega328.

Universitas Sumatera Utara

Page 15: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

2

1.2 Rumusan Masalah

Bagaimana pengirim dan penerima data monitoring suhu, kelembaban dan

kecepatan angin akan dibahas pada SkripsiTugas Akhir saya dengan judul

“RANCANG BANGUN MONITORING ALAT UKUR SUHU,

KELEMBABAN DAN KECEPATAN ANGIN MENGGUNAKAN LORA

BERBASIS MIKROKONTROLLER ATMEGA328”.

1.3 Batasan Masalah

Penulis membuat alat RANCANG BANGUN MONITORING ALAT UKUR

SUHU, KELEMBABAN DAN KECEPATAN ANGIN MENGGUNAKAN

LORA BERBASIS MIKROKONTROLLER ATMEGA328, sebagai berikut:

1. Sensor yang digunakan unuk mengukur suhu dan kelembaban adalah sensor

SHT11

2. Sensor anemometer digunakan untuk mengukur kecepatan angin

3. Mikrokontroller yang digunakan adalah Mikrokontroller AT-Mega 328.

1.4 Tujuan Penelitian

Tujuan dilakukannya Tugas Akhir ini adalah sebagai berikut.

1. Untuk mengaplikasikan lora sebagai monitoring jarak jauh.

2. Membandingkan alat pengujian dengan alat yang sudah standar

dan mengetahui persentasi eror pada alat pengujian.

1.5 . Sistematika Penulisan

Untuk mempermudah pembahasan dan pemahaman maka penulis

membuat sistematika pembahasan bagaimana sebenarnya prinsip kerja alat dari

Perancangan Alat Pengirim dan Penerima Untuk Monitoring Suhu, Kelembaban

dan Kecepatan Angin Menggunakan Lora Berbasis Mikrokontroller AT-

Mega328.maka penulis menulis laporan ini sebagai berikut:

BAB I PENDAHULUAN

Pada bab ini berisikan mengenai latar belakang, rumusan masalah, Tujuan

penulisan, batasan masalah, serta sistematika penulisan.

Universitas Sumatera Utara

Page 16: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

3

BAB II DASAR TEORI

Bab ini berisi tentang teori dasar yang digunakan sebagai bahan Acuan tugas

akhir, serta komponen yang perlu diketahui. Untuk mempermudah dalam

memahami sistem kerja alat ini.

BAB III PERANCANGAN DAN PEMBUATAN

Pada bagian ini akan dibahas perancangan dari alat, yaitu diagram blok dari

rangkaian, skematik dari masing-masing rangkaian dan diagram alir dari program

yang akan diisikan ke mikrokontroler AT-Mega328.

BAB IV PENGUJIAN DAN ANALISA

Pada bab ini akan dibahas hasil analisa dari rangkaian dan sistem kerja alat,

penjelasan mengenai program-program yang digunakan untuk mengaktifkan

rangkaian, penjelasan mengenai program yang diisikan.

BAB V KESIMPULAN DAN SARAN

Bab ini merupakan penutup yang meliputi tentang kesimpulan daripembahasan

yang dilakukan dari tugas akhir ini serta saran apakah rangkaian ini dapat dibuat

lebih efisien dan dikembangkan perakitannya pada suatu metode lain yang

mempunyai sistem kerja yang sama.

Universitas Sumatera Utara

Page 17: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

4

BAB II

DASAR TEORI

2.1 Suhu dan Kelembaban Udara

Suhu menunjukkan derajat panas atau dinginnya suatu benda. Mudahnya, semakin

tinggi suhu suatu benda, semakin panas benda tersebut.Sebaliknya semakin

rendah suhu suatu benda, semakin dingin benda tersebut. Secara mikroskopis,

suhu menunjukkan energi yang dimiliki oleh suatu benda.Setiap atom dalam suatu

benda masing-masing bergerak, baik itu dalam bentuk perpindahan maupun

gerakan di tempat getaran.Makin tingginya energi atom-atom penyusun benda,

makin tinggi suhu benda tersebut, suhu juga disebut temperatur.

Dalam pengukuran suhu terdapat empat penetapan skala yang digunakan,

Penetapan skala suhu ini dilihat dari dua peristiwa, yaitu ketika es melebur dan

ketika air mendidih pada tekanan atmosfer standar (tekanan satu atmosfer).

Keempat skala pengukuran suhu ini adalah sebagai berikut:

- Celcius adalah skala suhu dimana titik beku air berada pada nilai 0 derajat dan

titik didih air berada pada nilai 100 derajat pada tekanan satu Atmosfer.

- Fahrenheit adalah skala suhu dimana titik beku air berada pada nilai 32 derajat

Fahrenheit (°F) sedangkan titik didihnya berada pada 212 °F pada tekanan satu

Atmosfer.

- Reamur adalah skala suhu dimana titik beku air berada pada nilai 0 derajat

Réaumur sedangkan titik didih air berada pada nilai 80 derajat pada tekanan satu

Atmosfer.

- Kelvin merupakan skala suhu dimana nol derajat mutlak didefinisikan sebagai

nol Kelvin. Nol Kelvin ini sebagai titik acuan bawah yang mana partikel zat yang

ada di alam semesta tidak lagi mengalami pergerakan. Skala Kelvin adalah Satuan

Internasional untuk pengukuran suhu.

Kelembapan udara (humidity gauge) adalah jumlah uap air diudara

(atmosfer). Kelembapan adalah konsentrasi uap air di udara. Angka konsentasi

ini dapat diekspresikan dalam kelembapan absolut, kelembapan spesifik atau

kelembapan relatif. Alat yang digunakan untuk mengukur kelembapan disebut

dengan Higrometer. Sebuah humidistat digunakan untuk mengatur tingkat

kelembapan udara dalam sebuah bangunan dengan sebuah pengawal lembap

(dehumidifier). Kelembaban udara adalah tingkat kebasahan udara karena dalam

Universitas Sumatera Utara

Page 18: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

5

udara air selalu terkandung dalam bentuk uap air. Kandungan uap air dalam udara

hangat lebih banyak daripada kandungan uap air dalam udara dingin. Kalau udara

banyak mengandung uap air didinginkan maka suhunya turun dan udara tidak

dapat menahan lagi uap air sebanyak itu. Uap air berubah menjadi titik-titik air.

Udara yang mengandung uap air sebanyak yang dapat dikandungnya

disebut udara jenuh.

Dapat dianalogikan dengan sebuah termometer dan termostat untuk suhu udara.

Perubahan tekanan sebagian uap air di udara berhubungan dengan perubahan

suhu. Konsentrasi air di udara pada tingkat permukaan laut dapat mencapai 3%

pada 30 °C (86 °F), dan tidak melebihi 0,5% pada 0 °C (32 °F).Ada dua istilah

kelembapan udara yaitu kelembapan tinggi dan kelembapan rendah. Kelembapan

tinggi adalah jumlah uap air yang banyak diudara, sedangkan kelembapan rendah

adalah jumlah uap air yang sedikit diudara.

Kelembaban udara dapat dipengaruhi oleh berbagai faktor, yaitu:

1. Suhu merupakan derajat panas suatu benda. Kelembaban udara dipengaruhi

oleh suhu udara. Jika suhu suatu udara semakin tinggi, maka kelembaban udara

yang dimiliki semakin rendah. Begitu pun sebaliknya, jika semakin rendah suhu

udara maka kelembaban yang dimiliki pun semakin tinggi.

2. Tekanan Udara yaitu dalam tingkat kelembaban udara berbanding lurus.

Semakin tinggi tekanan udara di suatu tempatmaka udara tersebut semakin

memiliki kelembaban yang tinggi karena udara yangada jumlahnya terbatas.

3. Pergerakan Angin menjadi hal yang berpengaruh bagi kelembaban udara.

Karena adanya angin dapatmempengaruhi proses penguapan pada sumber air dan

menjadi salah satu faktordalam pembentukan awan.

4. Kuantitas dan Kualitas Penyinaran mempengaruhi kelembaban udara. Jika

penyinaran matahari tinggi, maka kelembaban yang tinggi juga menurun. Hal

tersebut dikarenakan kandungan uap air pada suatu udara. Penyinaran matahari

akan menghilangkan kandungan uap air sehingga akan berdampak pada

menurunnya tingkat kelembaban udara.

5. Vegetasi mempengaruhi kelembaban udara karena kerapatannya. Apabila suatu

tempat memiliki kerapatan vegetasi yang tinggi, maka kelembaban udaranya juga

tinggi. Hal tersebut terjadi karena adanya seresah yang menutupi permukaan tanah

dengan rapat, maka menyebabkan uap air terkunci di dalam nya. Sebaliknya,

Universitas Sumatera Utara

Page 19: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

6

apabila kerapatan vegetasinya rendah, maka kelembaban udara ditempat tersebut

juga rendah karena seresah yang menutupi permukaan tanah juga jarang.

6. Ketersedian Air untuk kelembaban udara diukur dari banyaknya uap air yang

terkandung di dalam udara. Daerah yang memiliki ketersediaan air banyak akan

memiliki tingkat kelembaban udara yang tinggi. Sementara tempat yang memiliki

ketersediaan air rendah maka tingkat kelembabannya juga rendah.

7. Ketinggian Tempat mempengaruhi kelembaban udara. Jika berada ditempat

yang tinggi, udara akan terasa lebih dingin daripada ketika berada di tempat yang

lebih rendah. Dikarenakan kandungan uap air yang ada di wilayah ketinggian

lebih banyak daripada di wilayah rendah. Maka dari itu semakin tinggi suatu

tempat maka kelembaban udaranya pun semakin tinggi sebaliknya, semakin

rendah suatu tempat maka kelembaban udaranya pun semakin rendah.

8. Kerapatan Udara saling berkaitan dengan kelembaban udara. Semakin rapat

udara di suatu tempat, maka kelembabannya pun tinggi. Sebaliknya apabila

kerapatan udaranya renggang, maka kelembabannya rendah.

2.2 Angin

Angin merupakan fenomena keseharian yang selalu dirasakan. Secara sederhana,

angin diartikan sebagai massa udara yang bergerak dari suatu tempat ke tempat

lain. Angin terbentuk karena adanya pemuaian udara. Angin adalah aliran udara

dalam jumlah yang besar diakibatkan oleh rotasi bumi dan juga karena adanya

perbedaan tekanan udara di sekitarnya. Angin bergerak dari tempat bertekanan

udara tinggi ke bertekanan udara rendah.Apabila dipanaskan, udara memuai.

Udara yang telah memuai menjadi lebih ringan sehingga naik. Apabila hal ini

terjadi, tekanan udara turun kerena udaranya berkurang. Udara dingin di

sekitarnya mengalir ke tempat yang bertekanan rendah tadi. Udara menyusut

menjadi lebih berat dan turun ke tanah. Di atas tanah udara menjadi panas lagi dan

naik kembali. Aliran naiknya udara panas dan turunnya udara dingin ini

dinamanakan konveksi.

Jenis-Jenis Angin

1. Angin Tetap merupakan angin dengan arah berhembus yang tetap sepanjang

tahunnya. Angin tetap dibagi menjadi dua macam, yakni angin pasat dan angin

anti pasat. Angin pasat; merupakan angin yang bertiup dari daerah subtropik

Universitas Sumatera Utara

Page 20: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

7

menuju khatulistiwa. Angin anti pasat, merupakan angin yang bertiup dari daerah

khatulistiwa menuju daerah subtropik.

2. Angin Muson merupakan angin yang berhembus secara periodik (minimal 3

bulan) dan antara periode yang satu dengan periode lainnya mempunyai pola yang

berlawanan dan berganti arah pada setiap setengah tahunnya. Angin muson

dibedakan menjadi dua macam yaitu:

Angin muson barat yaitu angin yang berhembus dari Asia ke Australia dan

membawa curah hujan sehingga di Indonesia terjadi musim penghujan, angin ini

bertiup pada bulan Oktober-April.

Angin muson timur yaitu angin yang berhembus dari Australia ke Asia dan tidak

membawa curah hujan sehingga di Indonesia terjadi musim kemarau, angin ini

bertiup pada bulan April-Oktober.

3. Angin Darat merupakan angin yang dikeluarkan pada malam hari dari daratan

ke lautan pada pukul 20.00 hingga pukul 16.00 yang biasanya digunakan nelayan

tradisional untuk melaut.

4. Angin Laut merupakan angin yang bergerak dari laut menuju daratan. Angin ini

biasa digunakan nelayan tradisional untuk pulang sehabis melaut.

5. Angin Lembah merupakan angin yang berhembus dari lembah menuju puncak

gunung yang biasanya terjadi di siang hari

6. Angin Gunung merupakan angin yang berhembus dari puncak gunung menuju

ke lembah dan terjadi ada malam hari.

7. Angin Fohn merupakan angin yang terjadi sesuai dengan jenis hujan seperti

hujan orografis. Angin ini terjadi karena adanya pergerakan massa yang naik ke

ketinggian yang lebih dari 200 meter.

- Faktor-Faktor yang Mempengaruhi Terjadinya Angin

1. Tekanan udara, angin bergerak dari tekanan tinggi ke tekanan yang lebih

rendah;

2. Suhu udara, wilayah dengan suhu udara rendah memiliki tekanan udara lebih

tinggi dibandingkan dengan wilayah dengan suhu udara lebih tinggi;

3. Topografi wilayah, semakin tinggi suatu wilayah maka semakin kencang angin

yang bergerak

Universitas Sumatera Utara

Page 21: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

8

2.3 Liquid Crystal Display (LCD)

LCD atau Liquid Crystal Display adalah suatu jenis media display (tampilan)

yang menggunakan kristal cair (liquid crystal) untuk menghasilkan gambar yang

terlihat. Teknologi Liquid Crystal Display (LCD) atau Penampil Kristal Cair

sudah banyak digunakan pada produk-produk seperti layar Laptop, layar Ponsel,

layar Kalkulator, layar Jam Digital, layar Multimeter, Monitor Komputer,

Televisi, layar Game portabel, layar Thermometer Digital dan produk-produk

elektronik lainnya. LCD adalah salah satu komponen elektronika yang berfungsi

sebagai tampilan suatu data, baik karakter, huruf ataupun grafik. LCD (Liquid

Cristal Display) adalah salah satu jenis display elektronik yang dibuat dengan

teknologi CMOS logic yang bekerja dengan tidak menghasilkan cahaya tetapi

memantulkan cahaya yang ada di sekelilingnya terhadap front-lit atau

mentransmisikan cahaya dari back-lit.

Gambar 2.1 Liquid Crystal Display (LCD) Character 2x16

LCD (Liquid Cristal Display) pada dasarnya terdiri dari dua bagian utama yaitu

bagian Backlight (Lampu Latar Belakang) dan bagian Liquid Crystal (Kristal

Cair). Seperti yang disebutkan sebelumnya, LCD tidak memancarkan

pencahayaan apapun, LCD hanya merefleksikan dan mentransmisikan cahaya

yang melewatinya. Oleh karena itu, LCD memerlukan Backlight atau Cahaya latar

belakang untuk sumber cahayanya. Cahaya Backlight tersebut pada umumnya

adalah berwarna putih. Sedangkan Kristal Cair (Liquid Crystal) sendiri adalah

cairan organik yang berada diantara dua lembar kaca yang memiliki permukaan

transparan yang konduktif.

Bagian-bagian LCD atau Liquid Crystal Display diantaranya adalah :

1. Lapisan Terpolarisasi 1 (Polarizing Film 1)

2. Elektroda Positif (Positive Electrode)

3. Lapisan Kristal Cair (Liquid Cristal Layer)

Universitas Sumatera Utara

Page 22: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

9

4. Elektroda Negatif (Negative Electrode)

5. Lapisan Terpolarisasi 2 (Polarizing film 2)

6. Backlight atau Cermin (Backlight or Mirror)

Dibawah ini adalah gambar struktur dasar sebuah LCD :

Gambar 2.2 Struktur dasar pada LCD

LCD (Liquid Cristal Display) berfungsi sebagai penampil data baik dalam bentuk

karakter, huruf, angka ataupun grafik.Material LCD (Liquid Cristal Display) LCD

adalah lapisan dari campuran organik antara lapisan kaca bening dengan elektroda

transparan indium oksida dalam bentuk tampilan seven-segment dan lapisan

elektroda pada kaca belakang. Berikut pada tabel 2.1 dibawah ini merupakan

penjelasan pin-pin yang ada pada LCD

Tabel 2.1 Pin –pin konfigurasi pada LCD

Universitas Sumatera Utara

Page 23: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

10

- Prinsip Kerja LCD (Liquid Crystal Display)

Sekedar mengingatkan pelajaran fisika kita mengenai cahaya putih, cahaya putih

adalah cahaya terdiri dari ratusan cahaya warna yang berbeda. Ratusan warna

cahaya tersebut akan terlihat apabila cahaya putih mengalami refleksi atau

perubahan arah sinar. Artinya, jika beda sudut refleksi maka berbeda pula warna

cahaya yang dihasilkan.

Backlight LCD yang berwarna putih akan memberikan pencahayaan pada Kristal

Cair atau Liquid Crystal. Kristal cair tersebut akan menyaring backlight yang

diterimanya dan merefleksikannya sesuai dengan sudut yang diinginkan sehingga

menghasilkan warna yang dibutuhkan. Sudut Kristal Cair akan berubah apabila

diberikan tegangan dengan nilai tertentu. Karena dengan perubahan sudut dan

penyaringan cahaya backlight pada kristal cair tersebut, cahaya backlight yang

sebelumnya adalah berwarna putih dapat berubah menjadi berbagai warna.

Jika ingin menghasilkan warna putih, maka kristal cair akan dibuka selebar-

lebarnya sehingga cahaya backlight yang berwarna putih dapat ditampilkan

sepenuhnya. Sebaliknya, apabila ingin menampilkan warna hitam, maka kristal

cair harus ditutup serapat-rapatnya sehingga tidak adalah cahaya backlight yang

dapat menembus. Dan apabila menginginkan warna lainnya, maka diperlukan

pengaturan sudut refleksi kristal cair yang bersangkutan.

- Kelebihan dan kekurangan LCD

Kelebihan atau keunggulan lcd yaitu dapat di gunakan dengan tekanan daya

pemakaian listrik yang lebih rendah dari plasma. Selain itu adanya layar non

glossy yang sangat cocok dan pas untuk ruang yang memiliki banyak cendela dan

banyak menerima cahaya atau dalam artian cahaya tidak dapat terpantul.

Kelebihan lcd lainnya yaitu masalah harga, harga dari lcd ini lebih murah di

banding dengan led sehingga mudah di dapatkan dengan harga yang terjangkau.

Kelemahan tersebut yaitu memiliki tampilan yang sedikit gelap atau hitam.

Kemudian kekurangan lainnya juga terdapat pada brightness atau tingkat

pencahayaan dan juga terangnya tidak semua permukaan layar sama persis. Selain

itu juga ada rasio kontras yang nampak lebih rendah.

Universitas Sumatera Utara

Page 24: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

11

2.4 Baterai

Baterai adalah sebuah alat yang dapat merubah energi kimia yang disimpannya

menjadi energi Listrik yang dapat digunakan oleh suatu perangkat Elektronik.

Hampir semua perangkat elektronik yang portabel seperti Handphone, Laptop,

Senter, ataupun Remote Control menggunakan Baterai sebagai sumber listriknya.

Dengan adanya Baterai, kita tidak perlu menyambungkan kabel listrik untuk dapat

mengaktifkan perangkat elektronik kita sehingga dapat dengan mudah dibawa

kemana-mana.

-Jenis-jenis Baterai

1. Baterai Primer (Baterai Sekali Pakai/Single Use)

Baterai Primer atau Baterai sekali pakai ini merupakan baterai yang paling sering

ditemukan di pasaran, hampir semua toko dan supermarket menjualnya. Hal ini

dikarenakan penggunaannya yang luas dengan harga yang lebih terjangkau.

Baterai jenis ini pada umumnya memberikan tegangan 1,5 Volt dan terdiri dari

berbagai jenis ukuran seperti AAA (sangat kecil), AA (kecil) dan C (medium) dan

D (besar). Disamping itu, terdapat juga Baterai Primer (sekali pakai) yang

berbentuk kotak dengan tegangan 6 Volt ataupun 9 Volt.

Jenis-jenis Baterai yang tergolong dalam Kategori Baterai Primer (sekali Pakai /

Single use) diantaranya adalah :

a. Baterai Zinc-Carbon (Seng-Karbon)

Baterai Zinc-Carbon juga disering disebut dengan Baterai “Heavy Duty” yang

sering kita jumpai di Toko-toko ataupun Supermarket. Baterai jenis ini terdiri dari

bahan Zinc yang berfungsi sebagai Terminal Negatif dan juga sebagai

pembungkus Baterainya. Sedangkan Terminal Positifnya adalah terbuat dari

Karbon yang berbentuk Batang (rod). Baterai jenis Zinc-Carbon merupakan jenis

baterai yang relatif murah dibandingkan dengan jenis lainnya.

b. Baterai Alkaline (Alkali)

Baterai Alkaline ini memiliki daya tahan yang lebih lama dengan harga yang lebih

mahal dibanding dengan Baterai Zinc-Carbon. Elektrolit yang digunakannya

adalah Potassium hydroxide yang merupakan Zat Alkali (Alkaline) sehingga

namanya juga disebut dengan Baterai Alkaline. Saat ini, banyak Baterai yang

Universitas Sumatera Utara

Page 25: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

12

menggunakan Alkalline sebagai Elektrolit, tetapi mereka menggunakan bahan

aktif lainnya sebagai Elektrodanya.

c. Baterai Lithium

Baterai Primer Lithium menawarkan kinerja yang lebih baik dibanding jenis-jenis

Baterai Primer (sekali pakai) lainnya. Baterai Lithium dapat disimpan lebih dari

10 tahun dan dapat bekerja pada suhu yang sangat rendah. Karena keunggulannya

tersebut, Baterai jenis Lithium ini sering digunakan untuk aplikasi Memory

Backup pada Mikrokomputer maupun Jam Tangan. Baterai Lithium biasanya

dibuat seperti bentuk Uang Logam atau disebut juga dengan Baterai Koin (Coin

Battery). Ada juga yang memanggilnya Button Cell atau Baterai Kancing.

d. Baterai Silver Oxide

Baterai Silver Oxide merupakan jenis baterai yang tergolong mahal dalam

harganya. Hal ini dikarenakan tingginya harga Perak (Silver). Baterai Silver

Oxide dapat dibuat untuk menghasilkan Energi yang tinggi tetapi dengan bentuk

yang relatif kecil dan ringan. Baterai jenis Silver Oxide ini sering dibuat dalam

dalam bentuk Baterai Koin (Coin Battery) / Baterai Kancing (Button Cell).

Baterai jenis Silver Oxide ini sering dipergunakan pada Jam Tangan, Kalkulator

maupun aplikasi militer.

Gambar 2.3 Jenis Baterai Primer

2. Baterai Sekunder (Baterai Isi Ulang/Rechargeable)

Baterai Sekunder adalah jenis baterai yang dapat di isi ulang atau Rechargeable

Battery. Pada prinsipnya, cara Baterai Sekunder menghasilkan arus listrik adalah

sama dengan Baterai Primer. Hanya saja, Reaksi Kimia pada Baterai Sekunder ini

dapat berbalik (Reversible). Pada saat Baterai digunakan dengan menghubungkan

Universitas Sumatera Utara

Page 26: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

13

beban pada terminal Baterai (discharge), Elektron akan mengalir dari Negatif ke

Positif. Sedangkan pada saat Sumber Energi Luar (Charger) dihubungkan ke

Baterai Sekunder, elektron akan mengalir dari Positif ke Negatif sehingga terjadi

pengisian muatan pada baterai. Jenis-jenis Baterai yang dapat di isi ulang

(rechargeable Battery) yang sering kita temukan antara lain seperti Baterai Ni-cd

(Nickel-Cadmium), Ni-MH (Nickel-Metal Hydride) dan Li-Ion (Lithium-Ion).

Jenis-jenis Baterai yang tergolong dalam Kategori Baterai Sekunder (Baterai Isi

Ulang) diantaranya adalah :

a. Baterai Ni-Cd (Nickel-Cadmium)

Baterai Ni-Cd (NIcket-Cadmium) adalah jenis baterai sekunder (isi ulang) yang

menggunakan Nickel Oxide Hydroxide dan Metallic Cadmium sebagai bahan

Elektrolitnya. Baterai Ni-Cd memiliki kemampuan beroperasi dalam jangkauan

suhu yang luas dan siklus daya tahan yang lama. Di satu sisi, Baterai Ni-Cd akan

melakukan discharge sendiri (self discharge) sekitar 30% per bulan saat tidak

digunakan. Baterai Ni-Cd juga mengandung 15% Tosik/racun yaitu bahan

Carcinogenic Cadmium yang dapat membahayakan kesehatan manusia dan

Lingkungan Hidup. Saat ini, Penggunaan dan penjualan Baterai Ni-Cd (Nickel-

Cadmiun) dalam perangkat Portabel Konsumen telah dilarang oleh EU (European

Union) berdasarkan peraturan “Directive 2006/66/EC” atau dikenal dengan

“Battery Directive”.

b. Baterai Ni-MH (Nickel-Metal Hydride)

Baterai Ni-MH (Nickel-Metal Hydride) memiliki keunggulan yang hampir sama

dengan Ni-Cd, tetapi baterai Ni-MH mempunyai kapasitas 30% lebih tinggi

dibandingkan dengan Baterai Ni-Cd serta tidak memiliki zat berbahaya Cadmium

yang dapat merusak lingkungan dan kesehatan manusia. Baterai Ni-MH dapat

diisi ulang hingga ratusan kali sehingga dapat menghemat biaya dalam pembelian

baterai. Baterai Ni-MH memiliki Self-discharge sekitar 40% setiap bulan jika

tidak digunakan. Saat ini Baterai Ni-MH banyak digunakan dalam Kamera dan

Radio Komunikasi. Meskipun tidak memiliki zat berbahaya Cadmium, Baterai

Ni-MH tetap mengandung sedikit zat berbahaya yang dapat merusak kesehatan

manusia dan Lingkungan hidup, sehingga perlu dilakukan daur ulang (recycle)

dan tidak boleh dibuang di sembarang tempat.

Universitas Sumatera Utara

Page 27: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

14

c. Baterai Li-Ion (Lithium-Ion)

Baterai jenis Li-Ion (Lithium-Ion) merupakan jenis Baterai yang paling banyak

digunakan pada peralatan Elektronika portabel seperti Digital Kamera,

Handphone, Video Kamera ataupun Laptop. Baterai Li-Ion memiliki daya tahan

siklus yang tinggi dan juga lebih ringan sekitar 30% serta menyediakan kapasitas

yang lebih tinggi sekitar 30% jika dibandingkan dengan Baterai Ni-MH. Rasio

Self-discharge adalah sekitar 20% per bulan. Baterai Li-Ion lebih ramah

lingkungan karena tidak mengandung zat berbahaya Cadmium. Sama seperti

Baterai Ni-MH (Nickel- Metal Hydride), Meskipun tidak memiliki zat berbahaya

Cadmium, Baterai Li-Ion tetap mengandung sedikit zat berbahaya yang dapat

merusak kesehatan manusia dan Lingkungan hidup, sehingga perlu dilakukan daur

ulang (recycle) dan tidak boleh dibuang di sembarang tempat.

2.4 Jenis Baterai Sekunder(Isi Ulang)

fungsi baterai adalah:

1. Saat mesin mati sebagai sumber energi untuk menghidupkan asessoris,

penerangan, radio,

2. Saat starter untuk menghidupkan sistem starter

3. Saat mesin hidup sebagai stabiliser suplai listrik pada kendaraan, dimana pada

saat hidup energi listrik bersumber dari alternator.

2.5 SHT11

SHT11 adalah sebuah single chip sensor suhu dan kelembaban relatif dengan

multi modul sensor yang outputnya telah dikalibrasikan secara digital. Dibagian

dalamnya terdapat kapasitif polimer sebagai elemen untuk sensor kelembaban

relative dan sebuah pita regangan yang digunakan sebagai sensor temperatur.

Universitas Sumatera Utara

Page 28: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

15

Output kedua sensor digabungkan dan dihubungkan pada ADC 14 bit dan sebuah

interface serial pada satu chip yang sama.

Sensor ini menghasilkan sinyal keluaran yang baik dengan waktu respon yang

cepat. SHT11 dikalibrasi pada ruangan dengan kelembaban yang teliti

menggunakan hygrometer sebagai referensinya. Koefisien kalibrasinya telah di

programkan kedalam OTP memory. Koefisien tersebut akan digunakan untuk

mengkalibrasi keluaran dari sensor selama proses pengukuran. 2-wire alat

penghubung serial dan regulasi tegangan internal membuat lebih mudah dalam

pengintegrasian sistem. Ukurannya yang kecil dan konsumsi daya yang rendah

membuat sensor ini adalah pilihan yang tepat, bahkan untuk aplikasi yang paling

menuntut. Didalam piranti SHT 11 terdapat suatu surface-mountable LLC

(Leadless Chip Carrier) yang berfungsi sebagai suatu pluggable 4-pin single-in-

line untuk jalur data dan clock, blok diagram chip SHT-11 dapat dilihat pada

Gambar berikut :

Gambar 2.5 Diagram Blok SHT 11

Spesifikasi dari SHT11 ini adalah sebagai berikut:

1. Berbasis sensor suhu dan kelembaban relatif Sensirion SHT11.

2. Mengukur suhu dari -40C hingga +123,8C, atau dari -40F hingga +254,9F dan

kelembaban relatif dari 0%RH hingga 1%RH.

3. Memiliki ketetapan (akurasi) pengukuran suhu hingga 0,5C pada suhu 25C dan

ketepatan (akurasi) pengukuran kelembaban relatif hingga 3,5%RH.

4. Memiliki atarmuka serial synchronous 2-wire, bukan I2C.

5. Jalur antarmuka telah dilengkapi dengan rangkaian pencegah kondisi sensor

lock-up.

6. Membutuhkan catu daya +5V DC dengan konsumsi daya rendah30 μW.

Universitas Sumatera Utara

Page 29: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

16

7. Modul ini memiliki faktor bentuk 8 pin DIP 0,6sehingga memudahkan

pemasangannya.

- Prinsip Kerja Sensor SHT 11

SHT11 adalah sebuah single chip sensor suhu dan kelembaban relatif dengan

multi modul sensor yang outputnya telah dikalibrasi secara digital. Dibagian

dalamnya terdapat kapasitas polimer sebagai eleman untuk sensor kelembaban

relatif dan sebuah pita regangan yang digunakan sebagai sensor temperatur.

Output kedua sensor digabungkan dan dihubungkan pada ADC 14 bit dan sebuah

interface serial pada satu chip yang sama. Sensor ini mengahasilkan sinyal

keluaran yang baik dengan waktu respon yang cepat. SHT11 ini dikalibrasi pada

ruangan denagn kelembaban yang teliti menggunakan hygrometer sebagai

referensinya. Koefisien kalibrasinya telah diprogramkan kedalam OTP memory.

Koefisien tersebut akan digunakan untuk mengaklibrasi keluaran dari sensor

selama proses pengukuran. Sistem sensor yang digunakan untuk mengukur suhu

dan kelembaban adalah SHT11 dengan sumber tegangan 5 Volt dan komunikasi

bidirectonal 2-wire. Sistem sensor ini mempunyai 1 jalur data yang digunakan

untuk perintah pengalamatan dan pembacaan data. Pengambilan data untuk

masing-masing pengukuran dilakukan dengan memberikan perintah pengalamatan

oleh mikrokontroler. Kaki serial Data yang terhubung dengan mikrokontroler

memberikan perintah pengalamatan pada pin Data SHT11 “00000101” untuk

mengukur kelembaban relatif dan “00000011” untuk pengukuran temperatur.

SHT11 memberikan keluaran data kelembaban dan temperatur pada pin Data

secara bergantian sesuai dengan clock yang diberikan mikrokontroler agar sensor

dapat bekerja. Sensor SHT11 memiliki ADC (Analog to Digital Converter) di

dalamnya sehingga keluaran data SHT11 sudah terkonversi dalam bentuk data

digital dan tidak memerlukan ADC eksternal dalam pengolahan data pada

mikrokontroler.

2.6 Sensor Anemometer

Sensor Anemometer adalah sebuah perangkat yang digunakan untuk

mengukur kecepatan angin dan untuk mengukur arah, anemometer merupakan

salah satu instrumen yang sering digunakan oleh balai cuaca seperti Badan

Universitas Sumatera Utara

Page 30: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

17

Metereologi Klimatologi dan Geofisika (BMKG). Kata anemometer berasal dari

Yunani anemos yang berarti angin, Angin merupakan udara yang bergerak ke

segala arah, angin bergerak dari suatu tempat menuju ke tempat yang lain.

Anemometer ini pertama kali diperkenalkan oleh Leon Battista Alberti dari Italia

pada tahun 1450. Anemometer harus ditempatkan di daerah terbuka. Pada saat

tertiup angin, baling-baling atau mangkok yang terdapat pada anemometer akan

bergerak sesuai arah angin. Makin besar kecepatan angin meniup mangkok-

mangkok tersebut, makin cepat pula kecepatan berputarnya piringan mangkok-

mangkok.

Fungsi Anemometer :

1. Mengukur kecepatan angin

2. Memperkirakan cuacah

3. Memperkirakan tinggi gelombang laut

4. Memperkirakan kecepatan dan arah arus

Gambar 2.6 Sensor Anemometer

Cara Menggunakan Anemometer

Untuk mendapatkan fungsi Anemometer dengan semaksimal mungkin, Anda

harus menggunakan Anemometer dengan cara yang baik dan benar tentu sesuai

prosedur penggunaan alat tersebut. Pengukuran Anemometer yang tepat dilakukan

dengan memegang Anemometer secara vertikal. Untuk memastikan Anemometer

bekerja dengan efektif, Anda harus menstabilkan Anemometer dengan penyangga,

agar saat penggunaan alat tersebut berjalan dengn stabil, dan biasanya kecepatan

angin akan muncul secara otomatis pada spedometer yang terdapat pada layar

LCD Anemometer.

Universitas Sumatera Utara

Page 31: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

18

2.7 Lora

LoRa (Long Range) adalah suatu format modulasi yang unik dan mengagumkan

yang dibuat oleh Semtech. modulasi yang dihasilkan menggunakan modulasi FM.

Inti pada pemrosesan menghasilkan nilai frekuensi yang stabil. metode transmisi

juga bisa menggunakan PSK (Phase Shift Keying), FSK(Frequency Shift Keying)

dan lainnya. Nilai frekuansi pada LoRa bermacam-macam sesuai daerahnya, jika

di Asia frekuensi yang digunakan yaitu 433 MHZ, di Eropa nilai frekuensi yang

digunakan yaitu 868 MHZ, sedangkan di Amerika Utara frekuensi yang

digunakan yaitu 915 MHZ.

Fitur-fitur yang tersedia di LoRa adalah :

1. Geolocation, fungsi ini memungkinkan kita dapat mendeteksi lokasi

keberadaan suatu benda tanpa biaya alias gratis.

2. Biaya Rendah, dapat mengurangi biaya dengan 3 cara : mengurangi biaya

infrastruktur, biaya operasional dan sensor-sensor yang mempunyai

jaringanya sendiri.

3. Terstandar, dibuat agar dapat berinteraksi den berfungsi dengan produk atau

sistem lain, sehingga dapat cepat beradaptasi dengan jaringan dan aplikasi

IoT.

4. Daya Rendah, dengan konsumsi daya yang dibutuhkan hanya berkisar dari

13Ma hingga 15Ma. Sehingga baterai dapat bertahan dari 10 higga 20 tahun.

5. Jarak Jauh, satu unit LoRa dapat memancarkan hingga 100KM.

6. Aman, Tertanam end-toend enkripsi AES128

7. Kapasitas Tinggi, Mendukung jutaan pesan per base station, ideal untuk

operator jaringan publik yang melayani banyak pelanggan.

Gambar 2.7 Contoh diagram jaringan Lora

Universitas Sumatera Utara

Page 32: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

19

2.8 Mikrokontroller ATMega328

ATMega328 merupakan mikrokontroler keluarga AVR 8 bit. Beberapa tipe

mikrokontroler yang sama dengan ATMega8 ini antara lain ATMega8535,

ATMega16, ATMega32, ATmega328, yang membedakan antara mikrokontroler

antara lain adalah, ukuran memori, banyaknya GPIO (pininput/output), peripherial

(USART, timer, counter, dll). Dari segi ukuran fisik, ATMega328 memilikiukuran

fisik lebih kecil dibandingkan dengan beberapa mikrokontroler diatas. Namun

untuk segi memori dan periperial lainnya ATMega328 tidak kalah dengan yang

lainnya karena ukuran memori dan periperialnya relatif sama dengan

ATMega8535, ATMega32, hanya saja jumlah GPIO lebih sedikit dibandingkan

mikrokontroler diatas. Mikrokontroler sebagai suatu terobosan teknologi

mikroprosesor danmikrokomputer, hadir memenuhi kebutuhan pasar (market

need) dan teknologibaru.Sebagai teknologi baru, yaitu teknologi

semikonduktor dengan kandungantransistoryang lebih banyak namun hanya

membutuhkan ruang yang kecil sertadapatdiproduksi secara masal (dalam

jumlah banyak) membuat harganya menjadilebihmurah dibandingkan

mikroprosesor. Mikrokontroler adalah sebuah sistem komputer fungsional

dalam sebuah chip.

Mikrokontroler ini memiliki beberapa fitur antara lain:

1. Memiliki EEPROM (Electrically Erasable Programmable Read Only Memory)

sebesar 1KB sebagai tempat penyimpanan data semi permanenkarena EEPROM

tetap dapat menyimpan data meskipun catu daya dimatikan.

2. Memiliki SRAM (Static Random Access Memory) sebesar 2KB.

3. Memiliki pin I/O digital sebanyak 14 pin 6 diantaranya PWM (Pulse Width

Modulation) output.

4. 32 x 8-bit register serba guna.

5. Dengan clock 16 MHz kecepatan mencapai 16 MIPS.

6. 32 KB Flash memory dan pada arduino memiliki bootloader yang

menggunakan 2 KB dari flash memori sebagai bootloader.

7. 130 macam instruksi yang hampir semuanya dieksekusi dalam satu siklus

clock.

Universitas Sumatera Utara

Page 33: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

20

Gambar 2.8 Mikrokontroller ATMega328

Adapun kelebihan dari mikrokontroller adalah sebagai berikut :

1.Penggerak pada mikrokontoler menggunakan bahasa pemrograman

assembly dengan berpatokan pada kaidah digital dasar sehingga

pengoperasian sistem menjadi sangat mudah dikerjakan sesuai dengan logika

sistem.

2.Mikrokontroler tersusun dalam satu chip dimana prosesor, memori, danI/O

terintegrasi menjadi satu kesatuan kontrol sistem.

3.Sistem running bersifat berdiri sendiri tanpa tergantung dengan computer

Sedangkan parameter komputer hanya digunakan untuk download perintah

instruksi atau program.

4.Pada mikrokontroler tersedia fasilitas tambahan untuk pengembangan

memori dan I/O yang disesuaikan dengan kebutuhan sistem.

5.Harga untuk memperoleh alat ini lebih murah dan mudah didapat.

2.9 Higrometer

Higrometer adalah sebuah alat yang dapat digunakan untuk menentukan

kelembaban atmosfer yang mana dapat menunjukkan kelembaban yang relatif.

Maksud dari relatif ini adalah persentase daro kelembaban udara, kelembaban

mutlak, atau dari keduanya. Untuk jenis yang standar, alat ini hanya bisa

digunakan untuk mengukur cuaca yang umum saja, yakni kering dan basah.

Sedangkan untuk jenis lainnya merupakan bagian dari humiditas, sebuah

perangkat yang berkaitan dengan alat ukur kelembaban.

Universitas Sumatera Utara

Page 34: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

21

Berbicara mengenai skalanya, ada 2 skala pada higrometer. Pertama, skala untuk

menunjukkan kelembaban ruangan. Kedua, skala yang menunjukkan temperatur

ruangan. cara kerja dari hygrometer itu? Dalam menjalankan tugasnya, alat ukur

ini menggunakan dua termometer yang berguna untuk mengukur suhu biasa dan

suhu lembap. Untuk jenis pertama, air raksa akan dibiarkan kering untuk

mengetahui suhu yang sebenarnya. Sedangkan untuk jenis kedua akan dibiarkan

basah untuk proses kondensasi uap air.

Fungsi Higrometer, yaitu:

1. Mengetahui dan monitoring kelembapan laboratorium.

2. Mengetahui kelembapan dari ruang penyimpanan.

3. Berguna dalam kegiatan pembuatan tanaman.

4. Diletakkan di dalam Box penyimpanan barang (Misal: dry Box untuk

penyimpanan kamera).

5. Dipakai untuk sebuah penelitian.

Berikut ini adalah bagian-bagian higrometer:

1. Skala Dry.

Bagian ini bisa dikatakan sebagai bagian utama karena fungsinya adalah

untuk mengukur kelembaban udara sekitar.

2. Skala Wet.

Bagian utama yang kedua adalah Skala Wet yang berguna dalam

pengukuran suhu udara yang basah atau jenuh atau lembap.

3. Sumbu.

Sumbu adalah bagian yang berfungsi untuk menghantarkan air ke skala

wet.

4. Tabung.

Tabung pada alat ini berguna dalam penampungan air

5. Air.

Air ini sangat berguna dalam mengetahui suhu basah yang terdapat pada

alat ini.

Universitas Sumatera Utara

Page 35: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

22

BAB III

METODOLOGI PENELITIAN

3.1 Diagram Blok

Diagram Blok sistem yang dirancang dapat diliat dibawah ini :

Max 10 Km

Gambar 3.1 Diagram Blok

Baterai

Mikrokontroller

ATMega328

SHT11

Sensor

Anemometer

LORA

TRANSMITTER

LORA

RECEIVER

Mikrokontroller

ATMega328

LCD

Baterai

Universitas Sumatera Utara

Page 36: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

23

3.1.1 Fungsi Masing – masing Blok

Blok Supply

Sebagai mensupplay arus dan tegangan ke seluruh rangkaian yang ada.

Mikrokontroler ATMEGA328

Sebagai pusat kendali dari seluruh system yang ada.

LCD (Liquid Crystal Display)

Sebagai menampilkan gambar di layar

SHT11

Sebagai alat pengindra suhu dan kelembaban dalam aplikasi pengendali

suhu dan kelembaban ruangan maupun aplikasi pemantau suhu dan

kelembaban relatif ruangan.

Sensor Anemometer

Alat yang digunakan untuk mengukur kecepatan angin dan untuk

mengukur arah.

Lora

Alat monitoring frekuensi dengan radio frekuensi dengan jarak tempuh

yang jauh dengan menggunakan power konsumsi yang rendah

Baterai

Adalah alat yang menyediakan arus listrik bagi peralatan elektronik

3.2. Peralatan dan Bahan

Dari penelitian diagram blok diatas maka dibutuhkan beberapa pelatan

dan komponen utama diantaranya yaitu:

3.2.1 Peralatan 3.2.2 Komponen

Solder Sensor SHT11

Tang Sensor Anenometer

Gerinda Mikrokontroller ATMega328

Bor Timah

Komputer

Multimeter

Obeng

Universitas Sumatera Utara

Page 37: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

24

3.3 Diagram Flowchart

3.3.1 Flowchart Transmitter

Mulai

Inisialisasi

Sensor Mendeteksi Parameter

Mikrokontroller

Data di kirim ke LoRa

Selesai

Gambar 3.2 Diagram flowchart Transmitter

Universitas Sumatera Utara

Page 38: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

25

3.3.2 Flowchart Receiver

Mulai

Inisialisasi

Manunggu data dari

transmitter

Ada data?

Tampilkan data ke LCD

Selesai

T

Y

Gambar 3.3 Diagram flowchart Receiver

Universitas Sumatera Utara

Page 39: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

26

3.4 Macam-Macam Rangkaian Yang Digunakan

3.4.1 Rangkaian Charger dan Baterai

Charger adalah peranti yang digunakan untuk mengisi energi ke dalam

bateraiatau isi ulang dengan memasukkan arus listrik melaluinya.

Sedangkan Baterai adalah alat untuk menghimpun dan membangkitkan

aliran listrik.Berikut pada gambar 3.4 adalah Rangkaian Charger dan

Baterai.

Gambar 3.4 Rangkaian Charger dan Baterai

3.4.2 Rangkaian Regulator 5V

Regulator tegangan 5 volt ini, berapapun input AC yang masuk akan

dikonversi menjadi tegangan output DC stabil 5 Volt. Tentu saja tegangan

input harus dalam batas maksimum spesifikasi yang diperbolehkan.Berikut

pada gambar 3.5 adalah Rangkaian Regulator 5V

Gambar 3.5 Rangkaian Regulator 5V

Universitas Sumatera Utara

Page 40: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

27

3.4.3 Rangkaian Regulator 3,3V

Regulator tegangan 3,3 volt ini, berapapun input AC yang masuk akan

dikonversi menjadi tegangan output DC stabil 3,3 Volt. Tentu saja tegangan

input harus dalam batas maksimum spesifikasi yang diperbolehkan.Berikut

pada gambar 3.6 adalah Rangkaian Regulator 3,3V

Gambar 3.6 Rangkaian Regulator 3,3V

3.4.4 Rangkaian Mikrokontroller

Rangkaian sistem minimum mikrokontoler ATmega328 terdiri dari

rangkaian sistem minimum dengan rangkaian I/O. Rangkaian

minimum mikrokontroler terdiri dari rangkaian clock dan pin reset

diberikan sebuah resistor pull up agar tidak mudah tereset. Berikut

pada gambar 3.7 adalah Rangkaian Mikrokontroller ATMega 328.

Gambar 3.7 Rangkaian Mikrokontroller ATMega 328

Universitas Sumatera Utara

Page 41: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

28

3.4.5 Rangkaian LORA

LoRa (Long Range) adalah suatu format modulasi yang unik dan

mengagumkan yang dibuat oleh Semtech.modulasi yang dihasilkan

menggunakan modulasi FM. Inti pada pemrosesan menghasilkan nilai

frekuensi yang stabil. metode transmisi juga bisa menggunakan PSK (Phase

Shift Keying), FSK(Frequency Shift Keying) dan lainnya. Nilai frekuansi

pada LoRa bermacam-macam sesuai daerahnya, jika di Asia frekuensi yang

digunakan yaitu 433 MHZ, di Eropa nilai frekuensi yang digunakan yaitu 868

MHZ, sedangkan di Amerika Utara frekuensi yang digunakan yaitu 915

MHZ.Berikut pada gambar 3.8 adalah Rangkaian Lora

Gambar 3.8 Rangkaian Lora

3.4.6 Rangkaian Sensor SHT11

Sensor SHT11 adalah module sensor yang berfungsi untuk mensensing objek

suhu dan kelembaban yang memiliki output tegangan analog yang dapat

diolah lebih lanjut menggunakan mikrokontroler.

Kelebihan dari module sensor ini dibanding module sensor lainnya yaitu dari

segi kualitas pembacaan data sensing yang lebih responsif yang memliki

Universitas Sumatera Utara

Page 42: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

29

kecepatan dalam hal sensing objek suhu dan kelembaban, dan data yang

terbaca tidak mudah terinterverensi.

Sensor SHT11 pada umumya memiliki fitur kalibrasi nilai pembacaan suhu

dan kelembaban yang cukup akurat.Berikut pada gambar 3.9 adalah

RangkaianSensor SHT 11

Gambar 3.9 Rangkaian Sensor SHT11

3.4.7 Rangkaian Sensor Anemometer

Anemometer adalah sebuah alat pengukur kecepatan angin yang banyak

dipakai dalam bidang Meteorologi dan Geofisika atau stasiun prakiraan

cuaca.untukmengukur kecepatan angin, alat ini juga dapat mengukur besarnya

tekanan angin. Berikut pada gambar 3.10 adalah Rangkaian Sensor

Anemometer

Universitas Sumatera Utara

Page 43: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

30

Gambar 3.10 Rangkaian Sensor Anemometer

3.4.8 Rangkaian LCD

Liquid crystal display adalah suatu jenis media tampilan yang menggunakan

kristal cair sebagai penampil utama. LCD sudah digunakan di berbagai bidang

misalnya dalam alat-alat elektronik seperti televisi, kalkulator ataupun layar

komputer.Berikut pada gambar 3.11 adalah Rangkaian LCD

Gambar 3.11 Rangkaian LCD

3.4.9 Rangkaian Lengkap Transmitter

Pemancar (Transmitter) adalah sebuah alat untuk memancarkan suatu sinyal..

Berikut pada gambar 3.12 adalah Rangkaian Lengkap TransMitter

Universitas Sumatera Utara

Page 44: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

31

Gambar 3.12 Rangkaian Transmitter

3.4.10 Rangkaian Lengkap Receiver

Receiver adalah merupakan salah satu pesawat elektronika yang bekerjanya

mengubah sinyal modulasi/ gelombang menjadi sinyal audio/getaran suara

yang dapat di dengar oleh telinga manusia

Gambar 3.13 Rangkaian Receiver

Universitas Sumatera Utara

Page 45: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

32

BAB IV

PENGUJIAN RANGKAIAN, DATA DAN ANALISA DATA

4.1 Pengujian Rangkaian

4.1.1 Pengujian Rangkaian mikrokontroller

Pada pengujian ini berhasil dilakukan dengan dikenalinya jenis

mikrokontroler oleh program downloader yaitu USBISP dengan IC

mikrokontroller Atmega328. Pemrograman menggunakan mode ISP (In

System Programming) mikrokontroler harus dapat diprogram langsung pada

papan rangkaian dan rangkaian mikrokontroler harus dapat dikenali oleh program

downloader.

Gambar 4.1 Hasil PengujianMikrokontroller ATMEGA328

Universitas Sumatera Utara

Page 46: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

33

Gambar 4.1. diatas adalah gambar read signature dari mikrokontroller

atmega328. Dengan demikian mikrokontroller telah dirancang dengan rangkaian

yang benar, dan dapat di program dengan program yang di inginkan sesuai dengan

penelitian ini.

4.1.2 Pengujian Rangkaian LORA Transmiter

#include <SPI.h>

#include <LoRa.h>

int counter = 0;

void setup()

Serial.begin(9600);

while (!Serial);

Serial.println("LoRa Sender");

if (!LoRa.begin(433E6))

Serial.println("Starting LoRa failed!");

while (1);

void loop()

Serial.print("Sending packet: ");

Serial.println(counter);

LoRa.beginPacket();

LoRa.print("hello ");

LoRa.print(counter);

LoRa.endPacket();

counter++;

delay(5000);

Universitas Sumatera Utara

Page 47: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

34

Gambar 4.2 Hasil Pengujian LORA Transmitter

4.1.3 Pengujian rangkaian Lora Receiver

#include <SPI.h>

#include <LoRa.h>

void setup()

Serial.begin(9600);

while (!Serial);

Serial.println("LoRa Receiver");

if (!LoRa.begin(433E6))

Serial.println("Starting LoRa failed!");

while (1);

void loop()

int packetSize = LoRa.parsePacket();

if (packetSize)

Universitas Sumatera Utara

Page 48: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

35

Serial.print("Received packet '");

while (LoRa.available())

Serial.print((char)LoRa.read());

Serial.print("' with RSSI ");

Serial.println(LoRa.packetRssi());

Gambar 4.3 Hasil Pengujian LORA Receiver

Universitas Sumatera Utara

Page 49: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

36

4.1.4 Pengujian Rangkaian Sensor SHT11

#include <SHT1x.h>

#define dataPin 6

#define clockPin 8

SHT1x sht1x(dataPin, clockPin);

void setup()

Serial.begin(9600); // Open serial connection to report values to host

Serial.println("Starting up");

void loop()

Serial.print("suhu : ");

Serial.println(sht1x.readTemperatureC());

Serial.print("RH : ");

Serial.println(sht1x.readHumidity()); delay(2000);

Gambar 4.4 Hasil Pengujian Sensor SHT11

Universitas Sumatera Utara

Page 50: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

37

4.1.5 Pengujian Rangkaian sensor Anemometer

void setup()

Serial.begin(9600);

void loop()

floatvolt = analogRead(A0);

volt= volt * 0.004887;

float kec_a = (0.013*volt) + 4.0415;

Serial.print("Anemometer : ");

Serial.println(kec_a);

delay(1000);

Gambar 4.5 Hasil Pengujian Sensor Anenometer

4.1.6 Pengujian Rangkaian LCD

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup()

lcd.begin();

lcd.backlight();

Universitas Sumatera Utara

Page 51: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

38

lcd.print("Hello, world!");

void loop()

Gambar 4.6 Hasil Pengujian LCD

4.1.7 Pengujian Rangkaian Charger dan baterai

Tabel 4.1 Tabel Pengujian Baterai dan Charger

Waktu (Menit) Input (Volt) Baterai (Volt) Indikator (Cas)

10 11.5 7.2 Merah

20 11.7 7.6 Merah

30 11.7 7.8 Merah

40 11.8 7.8 Merah

50 11.9 8.0 Hijau

Universitas Sumatera Utara

Page 52: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

39

4.2 Data

Hasil data yang di dapat menghitung Kecepatan Angin, Suhu dan Kelembaban

di tanah kosong seluas 2 km . Berikut penjelasan tabel dan pembanding

Tabel.4.2.1 Tabel Data Pengujian Alat mendeteksi Kecepatan angin, Suhu dan

Kelembaban

No

Jarak Lora

Transmitter

ke Lora

Receiver

Kecepatan angin

(KM/H) pada alat

yang di uji

Suhu ('C)

pada alat yang di uji

Kelembaban ( %)

pada alat yang di

uji

1 1 m 5,8 35,2 60

2 5 m 8,4 34,1 61

3 10 m 13,6 35,2 66

4 50 m 7,9 35,0 63

5 100 m 8,8 35,9 66

6 200 m 7,6 34,4 62

7 300 m 13,3 34,7 60

8 400 m 6,6 35,1 63

9 500 m 5,6 35,6 61

10 600 m 3,9 35,7 66

11 700 m 8,8 35,9 62

12 800 m 7,0 35,5 63

13 900 m 4,5 35,7 61

14 1 km 3,6 35,7 64

15 2 km 2,6 36,3 62

NB: Jarak diukur menggunakan aplikasi android

Universitas Sumatera Utara

Page 53: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

40

Tabel.4.2.2 Tabel Data Pembanding dari Sensor Anemometer (R2) dan

ukur Hygrometer (HTC-2)

No

Jarak Lora

Transmitter

ke Lora

Receiver

Kecepatan angin

(KM/H) pada Sensor

Anemometer

Suhu ('C)

pada alat

ukur

Hygrometer

Kelembaban (

%)

Pada alat ukur

Hygrometer

1 1 m 5,6 34,8 62

2 5 m 8,4 34,1 61

3 10 m 12,0 35,0 64

4 50 m 8,5 35,3 65

5 100 m 8,8 35,6 63

6 200 m 7,3 34,1 64

7 300 m 13,5 34,0 62

8 400 m 7,0 35,3 63

9 500 m 5,2 35,5 62

10 600 m 3,6 35,6 63

11 700 m 8,4 35,9 62

12 800 m 6,3 35,3 64

13 900 m 4,5 35,1 63

14 1 km 3,5 34,5 64

15 2 km 2,9 34,9 63

NB: Jarak diukur menggunakan aplikasi android

Universitas Sumatera Utara

Page 54: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

41

4.3 Analisa Data

1. Mencari rata-rata Kecepatan angin pada alat Pengujian

Nilai rata-rata kecepatan angin pada alatpengujian =

X1= 5,8+8,4+13,6+7,9+8,8+7,6+13,3+6,6+5,6+3,9+8,8+7,0+4,5+3,6+2,6

15

= 108= 7,2

15

2. Mencari rata-rata Kecepatan angin pada alatpembanding, Sensor

Anemometer

Nilai rata-rata kecepatan angin pada anemometer =

X2 =5,6+8,4+12,0+8,5+8,8+7,3+13,5+7,0+5,2+3,6+8,4+6,3+4,5+3,5+2,9

15

= 105,5 = 7.033

15

3. Mencari rata-rataSuhu pada alat Pengujian

Nilai rata-rata suhu pada alatpengujian =

X3=35,2+34,1+35,2+35,0+35,9+34,4+34,7+35,1+35,6+35,7+35,9+35,5+35,7+35,7+36,3

15

X3 = 530 = 35,33

15

Universitas Sumatera Utara

Page 55: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

42

4. Mencari rata-rata Kecepatan angin pada alatpembanding, alat ukur Hygrometer

Nilai rata-rata suhu pada Hygrometer =

X4 =34,8+34,1+35,0+35,3+35,6+34,1+34,0+35,3+35,5+35,6+35,9+35,3+35,1+34,5+34,9

15

= 525 = 35

15

5. Mencari rata-rata Kelembaban pada alat Pengujian

Nilai rata-rata kelembaban pada alatpengujian =

X5 = 60+61+66+63+66+62+60+63+61+66+62+63+61+64+62

15

=940= 62,67

15

6. Mencari rata-rata Kelembaban pada alat pembanding, alat ukur Hygrometer

Nilai rata-rata kelembaban pada Hygrometer=

X6 = 62+61+64+65+63+64+62+63+62+63+62+64+63+64+63

15

=945 =63

15

7. Mencari Persentasi eror kecepatan angin alat pengujian dengan pembanding

Sensor Anenometer

% e = [

]x 100%

= [

] x 100%

= [0,02374] x 100 % = 2,374%

Universitas Sumatera Utara

Page 56: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

43

8. Mencari Persentasi eror suhu alat pengujian dengan pembanding alat ukur

Hygrometer

% e = [

] x 100%

= [

] x 100%

= [0,00942] x 100 % = 0,942 %

9. Mencari Persentasi eror kelembaban alat pengujian dengan pembanding alat

ukurHygrometer

% e = [

] x 100%

= [

] x 100%

= [-0,00523] x 100 % = 0,523 %

Universitas Sumatera Utara

Page 57: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

44

BAB V

KESIMPULAN DAN SARAN

5.1KESIMPULAN

1. Lora dapat diaplikasikan mudah pada alat dan alat dapat berkomunikasi secara

jauh untuk membaca suhu, kecepatan angin dan kelembaban di suatu lingkungan.

2. Dari analisa data dapat disimpulkan bahwa alat pengujian dengan alat

pembanding standar. Memiliki persentasi eror yang sangat kecil

5.2SARAN

Penulis menyadari bahwa alat ini masih sangat membutuhkan banyak

pengembangan baik dari segi penggunaan dan sistem kerja, maka penulis

mempunyai beberapa saran demi kemajuan dan pengembangan alat ini yakni :

1 Untuk kedepannya fungsi dari alat ini diharapkan bisa diperluas lagi supaya

tidak hanya bisa mengukur dalam jarak sejauh 10kilometer saja, tetapi bisa

mengukur jarak lebih dari 10 kilometer

Universitas Sumatera Utara

Page 58: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

45

DAFTAR PUSTAKA

https://saintif.com/suhu-adalah/

(Diakses pada 9 September 2020)

https://www.gurupendidikan.co.id/pengertian-suhu/

(Diakses pada 9 September 2020)

https://www.alatuji.com/index.php?/article/detail/498/pengertian-dan-jenis-jenis-

alat-ukur-suhu

(Diakses pada 9 September 2020)

https://mbkchallenge.org/pengertian-suhu-rumus/

(Diakses pada 9 September 2020)

https://www.scribd.com/doc/89729664/Pengertian-Kelembaban

(Diakses pada 10 September 2020)

https://haloedukasi.com/kelembaban-udara=

(Diakses pada 10 September 2020)

https://comflit.com/kelembaban-udara-adalah/

(Diakses pada 10 September 2020)

http://artikeldanmakalah-agusra.blogspot.com/2011/06/kelembaban.html

(Diakses pada 10 September 2020)

https://www.geografi.org/2017/11/pengertian-angin-dan-jenis-jenisnya.html

(Diakses pada 11 September 2020)

https://www.ruangguru.com/blog/mengenal-jenis-jenis-angin

(Diakses pada 11 September 2020)

https://www.zenius.net/prologmateri/geografi/a/819/angin

(Diakses pada 11 September 2020)

https://teknikelektronika.com/wp-content/uploads/2018/05/Pengertian-

LCD.png?x91019

(Diakses pada 11 September 2020)

https://elektronika-dasar.web.id/lcd-liquid-cristal-display/

(Diakses pada 11 September 2020)

https://skemaku.com/pengertian-lcd-kelebihan-dan-kekurangan-lcd/

(Diakses pada 11 September 2020)

Universitas Sumatera Utara

Page 59: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

46

https://teknikelektronika.com/pengertian-baterai-jenis-jenis-baterai/

(Diakses pada 11 September 2020)

https://duniapendidikan.co.id/baterai/

(Diakses pada 11 September 2020)

https://www.musbikhin.com/pengenalan-sensor-sht11/

(Diakses pada 11 September 2020)

https://fahmizaleeits.wordpress.com/tag/cara-kerja-sensor-sht11/

(Diakses pada 11 September 2020)

https://dataloggerindonesia.com/apa-aja-sih-jenis-dan-fungsi-anemometer-65

(Diakses pada 12 September 2020)

https://www.alatuji.com/index.php?/article/detail/535/fungsi-dan-cara-

penggunaan-anemometer

(Diakses pada 12 September 2020)

https://www.logicgates.id/blogs/news/apa-itu-lora

(Diakses pada 13 September 2020)

http://repository.usu.ac.id/bitstream/handle/123456789/66836/Chapter%20II.pdf?

sequence=4&isAllowed=y

(Diakses pada 13 September 2020)

http://eprints.polsri.ac.id/164/3/BAB%20II.Mikrokontroller.pdf

(Diakses pada 13 September 2020)

https://www.pengelasan.net/higrometer/

(Diakses pada 13 September 2020)

https://carakerjapro.blogspot.com/2017/02/cara-kerja-hygrometer-alat-

pengukur.html

(Diakses pada 13 September 2020)

Universitas Sumatera Utara

Page 60: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

LAMPIRAN

Foto Mengambil Data

Foto Alat Pengujian dengan alat pembanding yang standar

Universitas Sumatera Utara

Page 61: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

Program Lengkap

1. Program Receiver

#include <SPI.h>

#include <LoRa.h>

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

char temp[10];

char rh[10];

char wind[10];

double suhu;

double kelembaban;

double angin;

void setup()

Serial.begin(9600);

while (!Serial);

Serial.println("LoRa Receiver");

if (!LoRa.begin(433E6))

Serial.println("Starting LoRa failed!");

while (1);

Universitas Sumatera Utara

Page 62: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

lcd.begin();

lcd.backlight();

LoRa.onReceive(onReceive);

LoRa.receive();

void loop()

lcd.setCursor(0,0);

lcd.print("T:");

lcd.print(temp);

lcd.print("'C ");

lcd.setCursor(10,0);

lcd.print("R:");

lcd.print(rh);

lcd.print("% ");

lcd.setCursor(0,1);

lcd.print("WIND:");

lcd.print(wind);

lcd.print(" km/h ");

void onReceive(int packetSize)

Universitas Sumatera Utara

Page 63: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

dtostrf(LoRa.parseFloat(), 1, 1, temp);

dtostrf(LoRa.parseFloat(), 1, 0, rh);

dtostrf(LoRa.parseFloat(), 1, 1, wind);

Serial.print("temp : ");Serial.println(temp);

Serial.print("rh : ");Serial.println(rh);

Serial.print("wind : ");Serial.println(wind);

Serial.print(" with RSSI :");Serial.println(LoRa.packetRssi());

2. Program Transmitter

#include <SPI.h>

#include <LoRa.h>

#include <SHT1x.h>

#define dataPin 6

#define clockPin 8

SHT1x sht1x(dataPin, clockPin);

#include <Wire.h>

#include <Adafruit_ADS1015.h>

Adafruit_ADS1115 ads;

char messages[160];

Universitas Sumatera Utara

Page 64: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

char anemo[10];

char temp_c[10];

char humidity[10];

void setup()

Serial.begin(9600);

while (!Serial);

Serial.println("LoRa Sender");

if (!LoRa.begin(433E6))

Serial.println("Starting LoRa failed!");

while (1);

ads.setGain(GAIN_TWOTHIRDS);

ads.begin();

void loop()

float multiplier = 4.887;

float data = analogRead(A0);;

float volt = data * multiplier;

float kec_a = (0.013*volt) + 4.0415;

if (kec_a < 4.5)kec_a = 0;

dtostrf(sht1x.readTemperatureC(), 1, 2, temp_c);

dtostrf(sht1x.readHumidity(), 1, 2, humidity);

dtostrf(kec_a, 1, 2, anemo);

Universitas Sumatera Utara

Page 65: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

strcpy(messages,temp_c);

strcat(messages,",");

strcat(messages,humidity );

strcat(messages,",");

strcat(messages,anemo);

strcat(messages,"\n");

Serial.print(messages);

LoRa.beginPacket();

delay(1);

LoRa.print(messages);

delay(1);

LoRa.endPacket();

delay(1);

3. Program Pegujian SHT11

#include <SHT1x.h>

#define dataPin 6

#define clockPin 8

SHT1x sht1x(dataPin, clockPin);

void setup()

Serial.begin(9600); // Open serial connection to report values to host

Serial.println("Starting up");

void loop()

Serial.print("suhu : ");

Serial.println(sht1x.readTemperatureC());

Serial.print("RH : ");

Universitas Sumatera Utara

Page 66: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

Serial.println(sht1x.readHumidity()); delay(2000);

4. Program Rangkaian sensor Anemometer

void setup()

Serial.begin(9600);

void loop()

floatvolt = analogRead(A0);

volt= volt * 0.004887;

float kec_a = (0.013*volt) + 4.0415;

Serial.print("Anemometer : ");

Serial.println(kec_a);

delay(1000);

5. Program Rangkaian LCD

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup()

lcd.begin();

lcd.backlight();

lcd.print("Hello, world!");

void loop()

Universitas Sumatera Utara

Page 67: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

Ra-02 LoRa Product Specification V1.1

Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved Page 1 of 2

Ra-02 LoRa Module

Overview

Ra-02 can be used for ultra-long distance

spread spectrum communication, and compatible

FSK remote modulation and demodulation

quickly, to solve the traditional wireless design

can not take into account the distance,

anti-interference and power consumption.

Ra-02 can be widely used in a variety of

networking occasions, for automatic meter

reading, home building automation, security

systems, remote irrigation systems, is the ideal

solution for things networking applications.

Ra-02 is available in SMD package and can

be used for rapid production by standard SMT

equipment. It provides customers with high

reliability connection mode.

- LoRa ™ spread spectrum modulation technology

- Receive sensitivity as low as -141 dBm

- Excellent resistance to blocking

- Supports preamble detection

- Supports half-duplex SPI communication

- Programmable bit rate up to 300Kbps

- Supports FSK, GFSK, MSK, GMSK, LoRa ™

and OOK modulation modes

- Supports automatic RF signal detection, CAD

mode and ultra high speed AFC

- Packets with CRC, up to 256 bytes

- Small package with double volume stamps

Features

Ai-T

hinke

rUniversitas Sumatera Utara

Page 68: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

Ra-02 LoRa Product Specification V1.1

Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved Page 2 of 2

Module Model Ra-02

Package SMD-16

Size 17*16*(3.2 ± 0.1) mm

Interface SPI

Programmable bit rate UP to 300Kbps

Frequency Range 410-525 MHz

Antenna IPEX

Max Transmit Power 18±1 dBm

Power (Typical Values)

433MHz:TX:93mA RX:12.15mA Standby:1.6mA

470MHZ:TX:97mA RX:12.15mA Standby:1.5mA

Power Supply 2.5~3.7V Typical 3.3V

Operating Temperature -30 ~ 85

Storage Environment -40 ~ 90 , < 90%RH

Weight 0.45g

Frequency Spread Factor SNR Sensitivity

433MHz7 -7 -125

10 -15 -13412 -20 -141

470MHz7 -7 -126

10 -15 -13512 -20 -141

Product Specifications

Shenzhen Ai-Thinker Technology Co., Ltd

Address: 6/F, Block C2, Huafeng Industrial Park, Hangcheng Road, Bao'an Road, Baoan District, Shenzhen ,China

Website: www.ai-thinker.com Tel: 0755-29162996 E-mail: [email protected]

Contact US

Receive Sensitivity

Note: The above data are measured by the Semtech Shenzhen laboratory. The test conditions: poweroutput 20dBm, bandwidth 125KHz.

Ai-T

hinke

rUniversitas Sumatera Utara

Page 69: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

Anemometer Wind Speed Sensor w/Analog Voltage Output PRODUCT ID: 1733

Description

An anemometer is a device used for measuring wind speed, and is a common weather station instrument. This well made anemometer is designed to sit outside and measure wind speed with ease. To use, connect the black wire to power and signal ground, the brown wire to 7-24VDC (we used 9V with success) and measure the analog voltage on the blue wire. The voltage will range from 0.4V (0 m/s wind) up to 2.0V (for 32.4m/s wind speed). That's it! The sensor is rugged, and easy to mount. The cable can easily disconnect with a few twists and has a weatherproof connector.

Note: As of 11/06/2014, shipping weight has been changed on this product to match UPS' new dimensional weight regulations.

Universitas Sumatera Utara

Page 70: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

Technical Details Dimensions:

o Height (base to center): 105mm / 4.1" o Center out to Cup: 102mm / 4" o Arm Length: 70mm / 2.8" o Weight: 111.8g

Wire Dimensions:

o Wire Length: 99cm / 39" o Plug Length: 30mm / 1.2" o Diameter (thickness): 4.8mm / 0.2"

Specifications

o Output: 0.4V to 2V o Testing Range: 0.5m/s to 50m/s o Start wind speed: 0.2 m/s o Resolution: 0.1m/s o Accuracy: Worst case 1 meter/s o Max Wind Speed: 70m/s o Connector details: Pin 1 - Power (brown wire), Pin 2 - Ground (black wire), Pin 3 - Signal (blue

wire), Pin 4 not connected

Engineered in NYC Adafruit ®

Universitas Sumatera Utara

Page 71: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

SHT1x / SHT7x Humidity & Temperature Sensor

Evaluation KiAvailable SHT1x

_ Relative humidity and temperature sensors_ Dew point _ Fully calibrated, digital output _ Excellent long-term stability _ No external components required _ Ultra low power consumption _ Surface mountable or 4-pin fully interchangeable_ Small size _ Automatic power down

SHT1x / SHT7x Product Summary The SHTxx is a single chip relative humidity and temperature multi sensor module comprising a calibrated digital output. Application of industrial CMOS processes with patented micro-machining (CMOSens® technology) ensures highest reliability and excellent long term stability. The device includes a capacitive polymer sensing element for relative humidity and a bandgap temperature sensor. Both are seamlessly coupled to a 14bit analog to digital converter and a serial interface circuit on the same chip. This results in superior signal quality, a fast response time and insensitivity to external disturbances (EMC) at a very competitive price. Each SHTxx is individually calibrated in a precision humidity chamber with a chilled mirror hygrometer as reference. The

calibration coefficients are programmed into the OTP memory. These coefficients are used internally during measurements to calibrate the signals from the sensors. The 2-wire serial interface and internal voltage regulation allows easy and fast system integration. Its tiny size and low power consumption makes it the ultimate choice for even the most demanding applications. The device is supplied in either a surface-mountable LCC (Leadless Chip Carrier) or as a pluggable 4-pin single-in-line type package. Customer specific packaging options may be available on request.

1

Applications _ HVAC _ Automotive _ Consumer Goods _ Weather Stations _ (De-) Humidifiers

VDD

GND

SCK

DATA

Calibration Memory%RH

Sensor

Temp. Sensor

Digital 2-wire

Interface&

CRC generatorA

D 14-bit

Ampl

ifica

tion

Block Diagram

Ordering Information

Part Number

Humidity accuracy

[%RH]

Temperature accuracy

[°C] Package

SHT11 ±3.5 ±0.5 @ 25 °C SMD (LCC) SHT15 ±2.0 ±0.4 @ 5-40 °C SMD (LCC) SHT71 ±3.5 ±0.5 @ 25 °C 4-pin single-in-line SHT75 ±2.0 ±0.4 @ 5-40 °C 4-pin single-in-line

www.sensirion.com Sensirion, Eggbühlstr. 14, 8052 Zürich, Switze

tSHT7x

_ Test & Measurement_ Data Logging _ Automation _ White Goods _ Medical

rland, Tel: +41 1 306 40 00, Fax: +41 1 306 40 30 v2.01 Universitas Sumatera Utara

Page 72: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

SHT1x / SHT7x Relative Humidity & Temperature Sensor System

www.sensirion.com v2.01 Marc

1 Sensor Performance Specifications

Parameter Conditions Min. Typ. Max. Units Humidity Resolution (2) 0.5 0.03 0.03 %RH 8 12 12 bit Repeatability ±0.1 %RH Accuracy (1)

Uncertainty linearized see figure 1

Interchangeability Fully interchangeable raw data ±3 %RH Nonlinearity linearized <<1 %RH

Range 0 100 %RH Response time 1/e (63%)

slowly moving air 4 s

Hysteresis ±1 %RH Long term stability typical < 1 %RH/yrTemperature

0.04 0.01 0.01 °C 0.07 0.02 0.02 °F

Resolution (2)

12 14 14 bit ±0.1 °C Repeatability ±0.2 °F

Accuracy see figure 1 -40 123.8 °C Range -40 254.9 °F

Response Time 1/e (63%) 5 30 s Table 1 Sensor Performance Specifications

2 Interface Specifications

SHT1x(slave)

uC(master)

DATA

SCKVdd 2.4 - 5.5V

GNDVdd

Figure 2 Typical application circuit

2.1 Power Pins The SHTxx requires a voltage supply between 2.4 and 5.5 V. After powerup the device needs 11ms to reach its sleep state. No commands should be sent before that time. Power supply pins (VDD, GND) may be decoupled with a 100 nF capacitor.

2.2 Serial Interface (Bidirectional 2-wire) The serial interface of the SHTxx is optimized for sensor readout and power consumption and is not compatible with I2C interfaces, see FAQ for details. (1) Each SHTxx is tested to be fully within RH accuracy specifications at 25 °C (7(2) The default measurement resolution of 14bit (temperature) and 12bit (humidity

%RH

Relative Humidity absolute accuracy

± 0

± 1

± 2

± 3

± 4

± 5

0 30 402010 8050 10070 9060

Temperature accuracy

0 °C

±1 °C

±2 °C

-40°C 0°C 40°C 80°C 120°C

±3 °C

Dewpoint accuracy @ 25 °C (typical)

±0 °C

±1 °C

±2 °C

±3 °C

±4 °C

±5 °C

0 30 402010 8050 10070 9060

0 °F

±1.8 °F

±3.6 °F

±5.4 °F

%RH

±1.8 °F

±3.6 °F

±7.2 °F

±5.4 °F

±9.0 °F

-40°F 32°F 104°F 176°F 248°F

%RH

SHT11/71

SHT15/75

SHT11/71

SHT15/75

SHT11/71

SHT15/75

Figure 1 Rel. Humidity, Temperature and Dewpoint accuracies

h 2003 2/9

2.2.1 Serial clock input (SCK) The SCK is used to synchronize the communication between a microcontroller and the SHTxx. Since the interface consists of fully static logic there is no minimum SCK frequency.

2.2.2 Serial data (DATA) The DATA tristate pin is used to transfer data in and out of the device. DATA changes after the falling edge and is valid on the rising edge of the serial clock SCK. During transmission the DATA line must remain stable while SCK is high. To avoid signal contention the microcontroller should only drive DATA low. An external pull-up resistor (e.g. 10 kΩ ) is required to pull the signal high. (See Figure 2) Pull-up resistors are often included in I/O circuits of microcontrollers. See Table 5 for detailed IO characteristics.

7 °F) and 48 °C (118.4 °F) ) can be reduced to 12 and 8 bit through the status register.

Universitas Sumatera Utara

Page 73: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

SHT1x / SHT7x Relative Humidity & Temperature Sensor System

www.sensirion.com v2.01 March 2003 3/9

2.2.3 Sending a command To initiate a transmission, a Transmission Start sequence has to be issued. It consists of a lowering of the DATA line while SCK is high, followed by a low pulse on SCK and raising DATA again while SCK is still high.

DATA

SCK

Figure 3 "Transmission Start" sequence

The subsequent command consists of three address bits (only 000 is currently supported) and five command bits. The SHTxx indicates the proper reception of a command by pulling the DATA pin low (ACK bit) after the falling edge of the 8th SCK clock. The DATA line is released (and goes high) after the falling edge of the 9th SCK clock.

Table 2 SHTxx list of commands

2.2.4 Measurement sequence (RH and T) After issuing a measurement command (00000101 for RH, 00000011 for Temperature) the controller has to wait for the measurement to complete. This takes approximately 11/55/210 ms for a 8/12/14bit measurement. The exact time varies by up to ±15% with the speed of the internal oscillator. To signal the completion of a measurement, the SHTxx pulls down the data line. The controller must wait for this data ready signal before starting to toggle SCK again.

Two bytes of measurement data and one byte of CRC checksum will then be transmitted. The uC must acknowledge each byte by pulling the DATA line low. All values are MSB first, right justified. (e.g. the 5th SCK is MSB for a 12bit value, for a 8bit result the first byte is not used). Communication terminates after the acknowledge bit of the CRC data. If CRC-8 checksum is not used the controller may terminate the communication after the measurement data LSB by keeping ack high. The device automatically returns to sleep mode after the measurement and communication have ended. Warning: To keep self heating below 0.1 °C the SHTxx should not be active for more than 15% of the time (e.g. max. 3 measurements / second for 12bit accuracy).

2.2.5 Connection reset sequence If communication with the device is lost the following signal sequence will reset its serial interface: While leaving DATA high, toggle SCK 9 or more times. This must be followed by a Transmission Start sequence preceding the next command. This sequence resets the interface only. The status register preserves its content.

DATA

SCK

Transmission Start

1 2 3 4 -8 9

Figure 4 Connection reset sequence

2.2.6 CRC-8 Checksum calculation The whole digital transmission is secured by a 8 bit checksum. It ensures that any wrong data can be detected and eliminated. Please consult application note CRC-8 Checksum Calculation for information on how to calculate the CRC.

DATA

SCK

a2 a1 C0 a0 C4 C3 C2 C1 ack

DATA

SCK

low low 8low low 11 10 9 ack 7 6 0 5 4 3 2 1 ack

MSB LSB

6 05 4 3 2 1 ack

LSB

DATA

SCK

7

MSB

Transmission Start Address='000' Command='00101'

Measurement~55ms for 12 bit~11ms for 8 bit

Bold = SHT1xx controls DATA linePlain = uC controls DATA line

Measurement is finished when the

SHTxx pulls down the DATA line

Skip acknowledge to end transmission(if no CRC is used)

12 bit humidity data

CRC-8 Checksum

Skip acknowledge to end transmission

wait for next measurement Transmission Start

Figure 5 Example RH measurement sequence for value 00001001 00110001= 2353 = 75.79 %RH (without temperature compensation)

Command Code Reserved 0000x Measure Temperature 00011 Measure Humidity 00101 Read Status Register 00111 Write Status Register 00110 Reserved 0101x-1110xSoft reset, resets the interface, clears the status register to default values wait minimum 11 ms before next command

11110

Universitas Sumatera Utara

Page 74: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

SHT1x / SHT7x Relative Humidity & Temperature Sensor System

www.sensirion.com v2.01 March 2003 4/9

Command

wait for data ready

MSB

LSB

Checksum LS

B

ack

ack

ack

ack

0 TS

0

0

0

Figure 6 Overview of Measurement Sequence (TS = Transmission Start)

2.3 Status Register Some of the advanced functions of the SHTxx are available through the status register. The following section gives a brief overview of these features. A more detailed description is available in the application note Status Register

Command

Status Reg a

ck

ack

TS

Bit 70 0 01 1000

Figure 7 Status Register Write

Command

Status Reg a

ck

ack

TS

Bit 7

Checksum ack

B

it 70 0 1 1000 1

Figure 8 Status Register Read

Bit Type Description Default 7 reserved 0 6 R End of Battery (low voltage detection)

0 for Vdd > 2.47 1 for Vdd < 2.47

X No default value, bit is only updated after a measurement

5 reserved 0 4 reserved 0 3 For Testing only, do not use 0 2 R/W Heater 0 off 1 R/W no reload from OTP 0 reload 0 R/W 1 = 8bit RH / 12bit Temperature resolution

0 = 12bit RH / 14bit Temperature resolution 0 12bit RH

14bit Temp.

Table 3 Status Register Bits

2.3.1 Measurement resolution The default measurement resolution of 14bit (temperature) and 12bit (humidity) can be reduced to 12 and 8bit. This is especially useful in high speed or extreme low power applications.

2.3.2 End of Battery The End of Battery function detects VDD voltages below 2.47 V. Accuracy is ±0.05 V

2.3.3 Heater An on chip heating element can be switched on. It will increase the temperature of the sensor by approximately 5°C (9 °F). Power consumption will increase by ~8 mA @ 5 V. Applications: By comparing temperature and humidity values before and

after switching on the heater, proper functionality of both sensors can be verified. • In high (>95 %RH) RH environments heating the sensor

element will prevent condensation, improve response time and accuracy

Warning: While heated the SHTxx will show higher temperatures and a lower relative humidity than with no heating.

2.4 Electrical Characteristics(1) VDD=5V, Temperature = 25 °C unless otherwise noted Parameter Conditions Min. Typ. Max. UnitsPower supply DC 2.4 5 5.5 V

measuring 550 µASupply current average 2(2) 28(3) µA

sleep 0.3 1 µALow level output voltage 0 20% Vdd High level output voltage 75% 100% Vdd Low level input voltage Negative going 0 20% Vdd High level input voltage Positive going 80% 100% Vdd Input current on pads 1 µAOutput peak current on 4 mA Tristated (off) 10 µA

Table 4 SHTxx DC Characteristics

Parameter Conditions Min Typ. Max. UnitVDD > 4.5 V 10 MHzFSCK SCK frequency VDD < 4.5 V 1 MHzOutput load 5 pF 3.5 10 20 ns TRFO DATA fall time Output load 100 pF 30 40 200 ns

TCLx SCK hi/low time 100 ns TV DATA valid time 250 ns TSU DATA set up time 100 ns THO DATA hold time 0 10 ns TR/TF SCK rise/fall time 200 ns

Table 5 SHTxx I/O Signals Characteristics

SCK

DATA

TSU

TFTR

THO

TCLH

FSCK

TV

Figure 9 Timing Diagram

1) Parameters are periodically sampled and not 100% tested (2) With one measurement of 8 bit accuracy without OTP reload per second (3) With one measurement of 12bit accuracy per second

Universitas Sumatera Utara

Page 75: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

SHT1x / SHT7x Relative Humidity & Temperature Sensor System

www.sensirion.com v2.01 March 2003 5/9

3 Converting Output to Physical Values 3.1 Relative Humidity To compensate for the non-linearity of the humidity sensor and to obtain the full accuracy it is recommended to convert the readout with the following formula1:

2RH3RH21linear SOcSOc c RH •+•+=

SORH c1 c2 c3 12 bit -4 0.0405 -2.8 * 10-6 8 bit -4 0.648 -7.2 * 10-4

Table 6 Humidity conversion coefficients

For simplified, less computation intense conversion formulas see application note RH and Temperature Non-Linearity Compensation. The humidity sensor has no significant voltage dependency.

0 500 1000 1500 2000 2500 30000%

20%

40%

60%

80%

100%

SORH sensor readout (12bit)

%RH

Figure 10 Conversion from SORH to relative humidity

3.1.1 Compensation of RH/Temperature dependency For temperatures significantly different from 25 °C (~77 °F) the temperature coefficient of the RH sensor should be considered:

linearRH21Ctrue RH)SOt (t25) - (T RH +•+•= ° SORH t1 t2 12 bit 0.01 0.00008 8 bit 0.01 0.00128

Table 7 Temperature compensation coefficients

This equals ~0.12 %RH / °C @ 50 %RH

1 Where SORH is the sensor output for relative humidity

3.2 Temperature The bandgap PTAT (Proportional To Absolute Temperature) temperature sensor is very linear by design. Use the following formula to convert from digital readout to temperature:

T21 SOdd eTemperatur •+= VDD d1 [°C] d1 [°f] SOT d2 [°C] d2 [°f] 5V -40.00 -40.00 14bit 0.01 0.018 4V -39.75 -39.50 12bit 0.04 0.072

3.5V -39.66 -39.35 3V -39.60 -39.28

2.5V -39.55 -39.23

Table 8 Temperature conversion coefficients

For improved accuracies in extreme temperatures with more computation intense conversion formulas see application note RH and Temperature Non-Linearity Compensation.

3.3 Dewpoint Since humidity and temperature are both measured on the same monolithic chip, the SHTxx allows superb dewpoint measurements. See application note Dewpoint calculation for more.

Universitas Sumatera Utara

Page 76: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

SHT1x / SHT7x Relative Humidity & Temperature Sensor System

www.sensirion.com v2.01 March 2003 6/9

4 Applications Information 4.1 Operating and Storage Conditions

0

20

40

-40 0 10040 80 120

60

80

100

[°C]

[%RH]

6020-20

Maximum operating

conditions

Normal operating

conditions

Figure 11 Recommended operating conditions

Conditions outside the recommended range may temporarily offset the RH signal up to ±3 %RH. After return to normal conditions it will slowly return towards calibration state by itself. See 4.3 Reconditioning Procedure to accelerate this process. Prolonged exposure to extreme conditions may accelerate ageing.

4.2 Exposure to Chemicals Vapors may interfere with the polymer layers used for capacitive humidity sensors. The diffusion of chemicals into the polymer may cause a shift in both offset and sensitivity. In a clean environment the contaminants will slowly outgas. The reconditioning procedure described below will accelerate this process. High levels of pollutants may cause permanent damage to the sensing polymer.

4.3 Reconditioning Procedure The following reconditioning procedure will bring the sensor back to calibration state after exposure to extreme conditions or chemical vapors. 80-90 °C (176-194°F) at < 5 %RH for 24h (baking) followed by 20-30 °C (70-90°F) at > 74 %RH for 48h (re-hydration)

4.4 Qualifications Extensive tests were performed in various environments. Please contact SENSIRION for additional information. Environment Norm Results(1) Temperature Cycles

JESD22-A104-B -40 °C / 125°C, 1000cy

Within Specifications

HAST Pressure Cooker

JESD22-A110-B 2.3bar 125°C 85%RH

Reversible shift by +2 %RH

Salt Atmosphere DIN-50021ss Within Spec. Condensing Air - Within Spec. Freezing cycles fully submerged

-20 / +90°C, 100cy 30min dwell time

Reversible shift by +2 %RH

Various Automotive Chemicals

DIN 72300-5 Within Specifications

Cigarette smoke Equivalent to 15years in a mid-size car

Within Specifications

Table 9 Qualification tests (excerpt)

4.5 ESD (Electrostatic Discharge) ESD immunity is qualified according to MIL STD 883E, method 3015 (Human Body Model at ±2 kV)). Latch-up immunity is provided at a force current of ±100 mA with Tamb = 80 °C according to JEDEC 17. See application note ESD, Latchup and EMC for more information.

4.6 Temperature Effects The relative humidity of a gas strongly depends on its temperature. It is therefore essential to keep humidity sensors at the same temperature as the air of which the relative humidity is to be measured. If the SHTxx shares a PCB with electronic components that give off heat it should be mounted far away and below the heat source and the housing must remain well ventilated. To reduce heat conduction copper layers between the SHT1x and the rest of the PCB should be minimized and a slit may be milled in between. ( See figure 14 )

4.7 Materials Used for Sealing / Mounting Many materials absorb humidity and will act as a buffer, increasing response times and hysteresis. Materials in the vicinity of the sensor must therefore be carefully chosen. Recommended materials are: All Metals, LCP, POM (Delrin), PTFE (Teflon), PE, PEEK, PP, PB, PPS, PSU, PVDF, PVF For sealing and gluing (use sparingly): High filled epoxy for electronic packaging (e.g. glob top, underfill), and Silicone are recommended.

4.8 Membranes A membrane can be used to prevent dirt from entering the housing and to protect the sensor. It will also reduce peak concentrations of chemical vapors. For optimal response times air volume behind the membrane must be kept to a minimum.

4.9 Light The SHTxx is not light sensitive. Prolonged direct exposure to sunshine or strong UV radiation may age the housing.

4.10 Wiring Considerations and Signal Integrity Carrying the SCK and DATA signal parallel and in close proximity (e.g. in wires) for more than 10cm may result in cross talk and loss of communication. This may be resolved by routing VDD and/or GND between the two data signals. Please see the application note ESD, Latchup and EMC for more information. Power supply pins (VDD, GND) should be decoupled with a 100 nF capacitor if wires are used.

(1) The temperature sensor passed all tests without any detectable drift. Package and electronics also passed 100%

Universitas Sumatera Utara

Page 77: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

SHT1x / SHT7x Relative Humidity & Temperature Sensor System

5 Package Information 5.1 SHT1x (surface mountable)

Table 10 SHT1x Pin Description

5.1.1 Package type The SHT1x is supplied in a surface-mountable LCC (Leadless Chip Carrier) type package. The sensors housing consists of a Liquid Crystal Polymer (LCP) cap with epoxy glob top on a standard 0.8 mm FR4 substrate. The device is free of lead, Cd and Hg. Device size is 7.42 x 4.88 x 2.5 mm (0.29 x 0.19 x 0.1 inch) Weight 100 mg The production date is printed onto the cap in white numbers in the form wwy. e.g. 351 = week 35, 2001.

5.1.2 Delivery Conditions The SHT1x are shipped in standard IC tubes by 80 units per tube or in 12mm tape. Reels are individually labelled with barcode and human readable labels.

Cover Tape

Carrier Tape Leader Tape500mm minimum

Trailer Tape300mm minimum

Components

Figure 12 Tape configuration and unit orientation

5.1.3 Mounting Examples

housingsinghou gsih nggou

PCB Figure 13 SHT1x housing mounting example

Figure 14 SHT1x PCB Mounting example

5.1.4 Soldering Information Standard reflow soldering ovens may be used at maximum 235 °C for 20 seconds. For manual soldering contact time must be limited to 5 seconds at up to 350 °C. After soldering the devices should be stored at >74 %RH for at least 24h to allow the polymer to rehydrate. Please consult the application note Soldering procedure for more information.

Pin Name Comment 1 GND Ground 2 DATA Serial data, bidirectional 3 SCK Serial clock, input 4 VDD Supply 2.4 5.5 V NC Remaining pins must be left unconnected

7.08 (0.278)

No

copp

er in

side

this

fiel

d

e View Recommended PCB Footprint

4.61

(0.

2)

0.8

(0.0

3)

0.47

(0.0

18)

1.8(0.07)

1.8(0.07)

3.48 (0.137)

1.27

(0.0

5)1.

271.

27

Slit to minimize heat transfer from the PCB

1.27

7.42

(0.

29)

4.88 (0.19)

1.81

(0.0

7)

2.44(0.1)

3.99

(0.1

6)

1

2

3

4

sensor opening

NC

NC

NC

NC

NC

NC

1.9(0.07)

5.22

(0.

2)0.

6(0

.02)

1.49(0.06)

(0.0

5)

6.88

(0.2

7)

1.15(0.04)

2.5

(0.1

)

actual size

0.8

(0.0

3)

Top View Sid

Figure 15 SHT1x drawing and footprint dimensions in mm (inch)

www.sensirion.com v2.01 March 2003 7/9 Universitas Sumatera Utara

Page 78: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

SHT1x / SHT7x Relative Humidity & Temperature Sensor System

www.sensirion.com v2.01 March 2003 8/9

5.2 SHT7x (4-pin single-in-line)

Table 11 SHT7x Pin Description

5.2.1 Package type1 The device is supplied in a single-in-line pin type package. The sensor housing consists of a Liquid Crystal Polymer (LCP) cap with epoxy glob top on a standard 0.6 mm FR4 substrate. The device is Cd and Hg free. The sensor head is connected to the pins by a small bridge to minimize heat conduction and response times. The gold plated back side of the sensor head is connected to the GND pin. A 100nF capacitor is mounted on the back side between VDD and GND. All pins are gold plated to avoid corrosion. They can be soldered or mate with most 1.27 mm (0.05) sockets e.g.: Preci-dip / Mill-Max 851-93-004-20-001 or similar Total weight: 168 mg, weight of sensor head: 73 mg The production date is printed onto the cap in white numbers in the form wwy. e.g. 351 = week 35, 2001.

5.2.2 Delivery Conditions The SHT7x are shipped in 32 mm tape. These reeled parts in standard option are shipped with 500 units per 13 inch diameter reel. Reels are individually labelled with barcode and human readable labels.

Cover Tape

Carrier Tape

Leader Tape500mm minimum

Trailer Tape300mm minimum

Components Figure 16 Tape configuration and unit orientation

5.2.3 Soldering Information Standard wave SHT7x soldering ovens may be used at maximum 235 °C for 20 seconds. For manual soldering contact time must be limited to 5 seconds at up to 350 °C. After wave soldering the devices should be stored at >74 %RH for at least 24h to allow the polymer to rehydrate. Please consult the application note Soldering procedure for more information.

1 Other packaging options may be available on request.

Pin Name Comment 1 SCK Serial clock input 2 VDD Supply 2.4 5.5 V 3 GND Ground 4 DATA Serial data bidirectional

3.7

13

.51.27

5.08

3.4

3.71.2

0.46~

6

2.2

3.1

0.6

0.2

2

(0.15)

(0.05)

(0.2)

(0.05)(0.018) (0.01)

(0.08)

(0.024)

(0.12)

(0.09)

(0.1

3)(0

.15)

(~0.

24)

(0.5

3)

0.4

(0.0

2)

1 2 43

Figure 17 SHT7x dimensions in mm (inch)

Universitas Sumatera Utara

Page 79: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

SHT1x / SHT7x Relative Humidity & Temperature Sensor System

www.sensirion.com v2.01 March 2003 9/9

6 Revision history Date Version Page(s) Changes February 2002 Preliminary 1-9 First public release June 2002 Preliminary Added SHT7x information March 2003 Final v2.0 1-9 Major remake, added application information etc.

Various small modifications The latest version of this document and all application notes can be found at: www.sensirion.com/en/download/humiditysensor/SHT11.htm

7 Important Notices 7.1 Warning, personal injury Do not use this product as safety or emergency stop devices or in any other application where failure of the product could result in personal injury. Failure to comply with these instructions could result in death or serious injury. Should buyer purchase or use SENSIRION AG products for any such unintended or unauthorized application, Buyer shall indemnify and hold SENSIRION AG and its officers, employees, subsidiaries, affiliates and distributors harmless against all claims, costs, damages and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that SENSIRION AG was negligent regarding the design or manufacture of the part.

7.2 ESD Precautions The inherent design of this component causes it to be sensitive to electrostatic discharge (ESD). To prevent ESD-induced damage and/or degradation, take normal ESD precautions when handling this product. See application note ESD, Latchup and EMC for more information.

7.3 Warranty SENSIRION AG makes no warranty, representation or guarantee regarding the suitability of its product for any particular purpose, nor does SENSIRION AG assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Typical parameters can and do vary in different applications. All operating parameters, including Typical must be validated for each customer applications by customers technical experts. SENSIRION AG reserves the right, without further notice, to change the product specifications and/or information in this document and to improve reliability, functions and design. Copyright© 2001-2003, SENSIRION AG. All rights reserved.

Headquarters and Sales Office SENSIRION AG Phone: + 41 (0)1 306 40 00 Eggbühlstr. 14 Fax: + 41 (0)1 306 40 30 P.O. Box e-mail: [email protected] CH-8052 Zürich http://www.sensirion.com/ Switzerland

Czujniki temperatury i wilgotnosci rozprowadza: ELEKTRO-SYSTEM s.c.

99-300 Kutno, ul. Sienkiewicza 25 tel. +48 (024) 355-05-73 www.elektro-system.pl

email: [email protected] POLSKA

[email protected]

Universitas Sumatera Utara

Page 80: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

8-bit Microcontroller with 4/8/16/32K Bytes In-SystemProgrammable Flash

ATmega48AATmega48PAATmega88AATmega88PAATmega168AATmega168PAATmega328ATmega328P

Summary

Rev. 8271BS–AVR–04/10

Features• High Performance, Low Power AVR® 8-Bit Microcontroller• Advanced RISC Architecture

– 131 Powerful Instructions – Most Single Clock Cycle Execution– 32 x 8 General Purpose Working Registers– Fully Static Operation– Up to 20 MIPS Throughput at 20 MHz– On-chip 2-cycle Multiplier

• High Endurance Non-volatile Memory Segments– 4/8/16/32K Bytes of In-System Self-Programmable Flash program memory – 256/512/512/1K Bytes EEPROM – 512/1K/1K/2K Bytes Internal SRAM – Write/Erase Cycles: 10,000 Flash/100,000 EEPROM– Data retention: 20 years at 85°C/100 years at 25°C(1)

– Optional Boot Code Section with Independent Lock BitsIn-System Programming by On-chip Boot ProgramTrue Read-While-Write Operation

– Programming Lock for Software Security• Peripheral Features

– Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture

Mode– Real Time Counter with Separate Oscillator– Six PWM Channels– 8-channel 10-bit ADC in TQFP and QFN/MLF package

Temperature Measurement– 6-channel 10-bit ADC in PDIP Package

Temperature Measurement– Programmable Serial USART– Master/Slave SPI Serial Interface– Byte-oriented 2-wire Serial Interface (Philips I2C compatible)– Programmable Watchdog Timer with Separate On-chip Oscillator– On-chip Analog Comparator– Interrupt and Wake-up on Pin Change

• Special Microcontroller Features– Power-on Reset and Programmable Brown-out Detection– Internal Calibrated Oscillator– External and Internal Interrupt Sources– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby,

and Extended Standby• I/O and Packages

– 23 Programmable I/O Lines– 28-pin PDIP, 32-lead TQFP, 28-pad QFN/MLF and 32-pad QFN/MLF

• Operating Voltage:– 1.8 - 5.5V

• Temperature Range:– -40°C to 85°C

• Speed Grade:– 0 - 4 [email protected] - 5.5V, 0 - 10 [email protected] - 5.5.V, 0 - 20 MHz @ 4.5 - 5.5V

• Power Consumption at 1 MHz, 1.8V, 25°C– Active Mode: 0.2 mA– Power-down Mode: 0.1 µA– Power-save Mode: 0.75 µA (Including 32 kHz RTC)

Universitas Sumatera Utara

Page 81: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

1. Pin Configurations

Figure 1-1. Pinout ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

12345678

2423222120191817

(PCINT19/OC2B/INT1) PD3(PCINT20/XCK/T0) PD4

GNDVCCGNDVCC

(PCINT6/XTAL1/TOSC1) PB6(PCINT7/XTAL2/TOSC2) PB7

PC1 (ADC1/PCINT9)PC0 (ADC0/PCINT8)ADC7GNDAREFADC6AVCCPB5 (SCK/PCINT5)

32 31 30 29 28 27 26 25

9 10 11 12 13 14 15 16

(PC

INT

21/O

C0B

/T1)

PD

5(P

CIN

T22

/OC

0A/A

IN0)

PD

6(P

CIN

T23

/AIN

1) P

D7

(PC

INT

0/C

LKO

/ICP

1) P

B0

(PC

INT

1/O

C1A

) P

B1

(PC

INT

2/S

S/O

C1B

) P

B2

(PC

INT

3/O

C2A

/MO

SI)

PB

3(P

CIN

T4/

MIS

O)

PB

4

PD

2 (I

NT

0/P

CIN

T18

)P

D1

(TX

D/P

CIN

T17

)P

D0

(RX

D/P

CIN

T16

)P

C6

(RE

SE

T/P

CIN

T14

)P

C5

(AD

C5/

SC

L/P

CIN

T13

)P

C4

(AD

C4/

SD

A/P

CIN

T12

)P

C3

(AD

C3/

PC

INT

11)

PC

2 (A

DC

2/P

CIN

T10

)

TQFP Top View

1234567891011121314

2827262524232221201918171615

(PCINT14/RESET) PC6(PCINT16/RXD) PD0(PCINT17/TXD) PD1(PCINT18/INT0) PD2

(PCINT19/OC2B/INT1) PD3(PCINT20/XCK/T0) PD4

VCCGND

(PCINT6/XTAL1/TOSC1) PB6(PCINT7/XTAL2/TOSC2) PB7

(PCINT21/OC0B/T1) PD5(PCINT22/OC0A/AIN0) PD6

(PCINT23/AIN1) PD7(PCINT0/CLKO/ICP1) PB0

PC5 (ADC5/SCL/PCINT13)PC4 (ADC4/SDA/PCINT12)PC3 (ADC3/PCINT11)PC2 (ADC2/PCINT10)PC1 (ADC1/PCINT9)PC0 (ADC0/PCINT8)GNDAREFAVCCPB5 (SCK/PCINT5)PB4 (MISO/PCINT4)PB3 (MOSI/OC2A/PCINT3)PB2 (SS/OC1B/PCINT2)PB1 (OC1A/PCINT1)

PDIP

12345678

2423222120191817

32 31 30 29 28 27 26 25

9 10 11 12 13 14 15 16

32 MLF Top View

(PCINT19/OC2B/INT1) PD3(PCINT20/XCK/T0) PD4

GNDVCCGNDVCC

(PCINT6/XTAL1/TOSC1) PB6(PCINT7/XTAL2/TOSC2) PB7

PC1 (ADC1/PCINT9)PC0 (ADC0/PCINT8)ADC7GNDAREFADC6AVCCPB5 (SCK/PCINT5)

(PC

INT

21/O

C0B

/T1)

PD

5(P

CIN

T22

/OC

0A/A

IN0)

PD

6(P

CIN

T23

/AIN

1) P

D7

(PC

INT

0/C

LKO

/ICP

1) P

B0

(PC

INT

1/O

C1A

) P

B1

(PC

INT

2/S

S/O

C1B

) P

B2

(PC

INT

3/O

C2A

/MO

SI)

PB

3(P

CIN

T4/

MIS

O)

PB

4

PD

2 (I

NT

0/P

CIN

T18

)P

D1

(TX

D/P

CIN

T17

)P

D0

(RX

D/P

CIN

T16

)P

C6

(RE

SE

T/P

CIN

T14

)P

C5

(AD

C5/

SC

L/P

CIN

T13

)P

C4

(AD

C4/

SD

A/P

CIN

T12

)P

C3

(AD

C3/

PC

INT

11)

PC

2 (A

DC

2/P

CIN

T10

)

NOTE: Bottom pad should be soldered to ground.

1234567

21201918171615

28 27 26 25 24 23 22

8 9 10 11 12 13 14

28 MLF Top View

(PCINT19/OC2B/INT1) PD3(PCINT20/XCK/T0) PD4

VCCGND

(PCINT6/XTAL1/TOSC1) PB6(PCINT7/XTAL2/TOSC2) PB7

(PCINT21/OC0B/T1) PD5

(PC

INT

22/O

C0A

/AIN

0) P

D6

(PC

INT

23/A

IN1)

PD

7(P

CIN

T0/

CLK

O/IC

P1)

PB

0(P

CIN

T1/

OC

1A)

PB

1(P

CIN

T2/

SS

/OC

1B)

PB

2(P

CIN

T3/

OC

2A/M

OS

I) P

B3

(PC

INT

4/M

ISO

) P

B4

PD

2 (I

NT

0/P

CIN

T18

)P

D1

(TX

D/P

CIN

T17

)P

D0

(RX

D/P

CIN

T16

)P

C6

(RE

SE

T/P

CIN

T14

)P

C5

(AD

C5/

SC

L/P

CIN

T13

)P

C4

(AD

C4/

SD

A/P

CIN

T12

)P

C3

(AD

C3/

PC

INT

11)

PC2 (ADC2/PCINT10)PC1 (ADC1/PCINT9)PC0 (ADC0/PCINT8)GNDAREFAVCCPB5 (SCK/PCINT5)

NOTE: Bottom pad should be soldered to ground.

28271BS–AVR–04/10 Universitas Sumatera Utara

Page 82: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

1.1 Pin Descriptions

1.1.1 VCCDigital supply voltage.

1.1.2 GNDGround.

1.1.3 Port B (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). ThePort B output buffers have symmetrical drive characteristics with both high sink and sourcecapability. As inputs, Port B pins that are externally pulled low will source current if the pull-upresistors are activated. The Port B pins are tri-stated when a reset condition becomes active,even if the clock is not running.

Depending on the clock selection fuse settings, PB6 can be used as input to the inverting Oscil-lator amplifier and input to the internal clock operating circuit.

Depending on the clock selection fuse settings, PB7 can be used as output from the invertingOscillator amplifier.

If the Internal Calibrated RC Oscillator is used as chip clock source, PB7...6 is used asTOSC2...1 input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set.

The various special features of Port B are elaborated in and ”System Clock and Clock Options”on page 26.

1.1.4 Port C (PC5:0)Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). ThePC5...0 output buffers have symmetrical drive characteristics with both high sink and sourcecapability. As inputs, Port C pins that are externally pulled low will source current if the pull-upresistors are activated. The Port C pins are tri-stated when a reset condition becomes active,even if the clock is not running.

1.1.5 PC6/RESETIf the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical char-acteristics of PC6 differ from those of the other pins of Port C.

If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this pinfor longer than the minimum pulse length will generate a Reset, even if the clock is not running.The minimum pulse length is given in Table 28-12 on page 323. Shorter pulses are not guaran-teed to generate a Reset.

The various special features of Port C are elaborated in ”Alternate Functions of Port C” on page86.

1.1.6 Port D (PD7:0)Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). ThePort D output buffers have symmetrical drive characteristics with both high sink and sourcecapability. As inputs, Port D pins that are externally pulled low will source current if the pull-upresistors are activated. The Port D pins are tri-stated when a reset condition becomes active,even if the clock is not running.

38271BS–AVR–04/10 Universitas Sumatera Utara

Page 83: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

The various special features of Port D are elaborated in ”Alternate Functions of Port D” on page89.

1.1.7 AVCC

AVCC is the supply voltage pin for the A/D Converter, PC3:0, and ADC7:6. It should be externallyconnected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC

through a low-pass filter. Note that PC6...4 use digital supply voltage, VCC.

1.1.8 AREFAREF is the analog reference pin for the A/D Converter.

1.1.9 ADC7:6 (TQFP and QFN/MLF Package Only)In the TQFP and QFN/MLF package, ADC7:6 serve as analog inputs to the A/D converter.These pins are powered from the analog supply and serve as 10-bit ADC channels.

48271BS–AVR–04/10 Universitas Sumatera Utara

Page 84: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

2. OverviewThe ATmega48A/48PA/88A/88PA/168A/168PA/328/328P is a low-power CMOS 8-bit microcon-troller based on the AVR enhanced RISC architecture. By executing powerful instructions in asingle clock cycle, the ATmega48A/48PA/88A/88PA/168A/168PA/328/328P achieves through-puts approaching 1 MIPS per MHz allowing the system designer to optimize power consumptionversus processing speed.

2.1 Block Diagram

Figure 2-1. Block Diagram

The AVR core combines a rich instruction set with 32 general purpose working registers. All the32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent

PORT C (7)PORT B (8)PORT D (8)

USART 0

8bit T/C 2

16bit T/C 18bit T/C 0 A/D Conv.

InternalBandgap

AnalogComp.

SPI TWI

SRAMFlash

EEPROM

WatchdogOscillator

WatchdogTimer

OscillatorCircuits /

ClockGeneration

PowerSupervisionPOR / BOD &

RESET

VC

C

GN

D

PROGRAMLOGIC

debugWIRE

2

GND

AREF

AVCC

DAT

AB

US

ADC[6..7]PC[0..6]PB[0..7]PD[0..7]

6

RESET

XTAL[1..2]

CPU

58271BS–AVR–04/10 Universitas Sumatera Utara

Page 85: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

registers to be accessed in one single instruction executed in one clock cycle. The resultingarchitecture is more code efficient while achieving throughputs up to ten times faster than con-ventional CISC microcontrollers.

The ATmega48A/48PA/88A/88PA/168A/168PA/328/328P provides the following features:4K/8K bytes of In-System Programmable Flash with Read-While-Write capabilities,256/512/512/1K bytes EEPROM, 512/1K/1K/2K bytes SRAM, 23 general purpose I/O lines, 32general purpose working registers, three flexible Timer/Counters with compare modes, internaland external interrupts, a serial programmable USART, a byte-oriented 2-wire Serial Interface,an SPI serial port, a 6-channel 10-bit ADC (8 channels in TQFP and QFN/MLF packages), a pro-grammable Watchdog Timer with internal Oscillator, and five software selectable power savingmodes. The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, USART, 2-wireSerial Interface, SPI port, and interrupt system to continue functioning. The Power-down modesaves the register contents but freezes the Oscillator, disabling all other chip functions until thenext interrupt or hardware reset. In Power-save mode, the asynchronous timer continues to run,allowing the user to maintain a timer base while the rest of the device is sleeping. The ADCNoise Reduction mode stops the CPU and all I/O modules except asynchronous timer and ADC,to minimize switching noise during ADC conversions. In Standby mode, the crystal/resonatorOscillator is running while the rest of the device is sleeping. This allows very fast start-up com-bined with low power consumption.

The device is manufactured using Atmel’s high density non-volatile memory technology. TheOn-chip ISP Flash allows the program memory to be reprogrammed In-System through an SPIserial interface, by a conventional non-volatile memory programmer, or by an On-chip Boot pro-gram running on the AVR core. The Boot program can use any interface to download theapplication program in the Application Flash memory. Software in the Boot Flash section willcontinue to run while the Application Flash section is updated, providing true Read-While-Writeoperation. By combining an 8-bit RISC CPU with In-System Self-Programmable Flash on amonolithic chip, the Atmel ATmega48A/48PA/88A/88PA/168A/168PA/328/328P is a powerfulmicrocontroller that provides a highly flexible and cost effective solution to many embedded con-trol applications.

The ATmega48A/48PA/88A/88PA/168A/168PA/328/328P AVR is supported with a full suite ofprogram and system development tools including: C Compilers, Macro Assemblers, ProgramDebugger/Simulators, In-Circuit Emulators, and Evaluation kits.

2.2 Comparison Between ProcessorsThe ATmega48A/48PA/88A/88PA/168A/168PA/328/328P differ only in memory sizes, bootloader support, and interrupt vector sizes. Table 2-1 summarizes the different memory and inter-rupt vector sizes for the devices.

Table 2-1. Memory Size Summary

Device Flash EEPROM RAM Interrupt Vector Size

ATmega48A 4K Bytes 256 Bytes 512 Bytes 1 instruction word/vector

ATmega48PA 4K Bytes 256 Bytes 512 Bytes 1 instruction word/vector

ATmega88A 8K Bytes 512 Bytes 1K Bytes 1 instruction word/vector

ATmega88PA 8K Bytes 512 Bytes 1K Bytes 1 instruction word/vector

ATmega168A 16K Bytes 512 Bytes 1K Bytes 2 instruction words/vector

68271BS–AVR–04/10 Universitas Sumatera Utara

Page 86: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P support a real Read-While-Write Self-Pro-gramming mechanism. There is a separate Boot Loader Section, and the SPM instruction canonly execute from there. In ATmega 48A/48PA there is no Read-While-Write support and noseparate Boot Loader Section. The SPM instruction can execute from the entire Flash.

3. Resources A comprehensive set of development tools, application notes and datasheets are available fordownload on http://www.atmel.com/avr.

Note: 1.

ATmega168PA 16K Bytes 512 Bytes 1K Bytes 2 instruction words/vector

ATmega328 32K Bytes 1K Bytes 2K Bytes 2 instruction words/vector

ATmega328P 32K Bytes 1K Bytes 2K Bytes 2 instruction words/vector

Table 2-1. Memory Size Summary

Device Flash EEPROM RAM Interrupt Vector Size

78271BS–AVR–04/10 Universitas Sumatera Utara

Page 87: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

4. Register SummaryAddress Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Page

(0xFF) Reserved – – – – – – – –

(0xFE) Reserved – – – – – – – –

(0xFD) Reserved – – – – – – – –

(0xFC) Reserved – – – – – – – –

(0xFB) Reserved – – – – – – – –

(0xFA) Reserved – – – – – – – –

(0xF9) Reserved – – – – – – – –

(0xF8) Reserved – – – – – – – –

(0xF7) Reserved – – – – – – – –

(0xF6) Reserved – – – – – – – –

(0xF5) Reserved – – – – – – – –

(0xF4) Reserved – – – – – – – –

(0xF3) Reserved – – – – – – – –

(0xF2) Reserved – – – – – – – –

(0xF1) Reserved – – – – – – – –

(0xF0) Reserved – – – – – – – –

(0xEF) Reserved – – – – – – – –

(0xEE) Reserved – – – – – – – –

(0xED) Reserved – – – – – – – –

(0xEC) Reserved – – – – – – – –

(0xEB) Reserved – – – – – – – –

(0xEA) Reserved – – – – – – – –

(0xE9) Reserved – – – – – – – –

(0xE8) Reserved – – – – – – – –

(0xE7) Reserved – – – – – – – –

(0xE6) Reserved – – – – – – – –

(0xE5) Reserved – – – – – – – –

(0xE4) Reserved – – – – – – – –

(0xE3) Reserved – – – – – – – –

(0xE2) Reserved – – – – – – – –

(0xE1) Reserved – – – – – – – –

(0xE0) Reserved – – – – – – – –

(0xDF) Reserved – – – – – – – –

(0xDE) Reserved – – – – – – – –

(0xDD) Reserved – – – – – – – –

(0xDC) Reserved – – – – – – – –

(0xDB) Reserved – – – – – – – –

(0xDA) Reserved – – – – – – – –

(0xD9) Reserved – – – – – – – –

(0xD8) Reserved – – – – – – – –

(0xD7) Reserved – – – – – – – –

(0xD6) Reserved – – – – – – – –

(0xD5) Reserved – – – – – – – –

(0xD4) Reserved – – – – – – – –

(0xD3) Reserved – – – – – – – –

(0xD2) Reserved – – – – – – – –

(0xD1) Reserved – – – – – – – –

(0xD0) Reserved – – – – – – – –

(0xCF) Reserved – – – – – – – –

(0xCE) Reserved – – – – – – – –

(0xCD) Reserved – – – – – – – –

(0xCC) Reserved – – – – – – – –

(0xCB) Reserved – – – – – – – –

(0xCA) Reserved – – – – – – – –

(0xC9) Reserved – – – – – – – –

(0xC8) Reserved – – – – – – – –

(0xC7) Reserved – – – – – – – –

(0xC6) UDR0 USART I/O Data Register 196

(0xC5) UBRR0H USART Baud Rate Register High 200

(0xC4) UBRR0L USART Baud Rate Register Low 200

(0xC3) Reserved – – – – – – – –

(0xC2) UCSR0C UMSEL01 UMSEL00 UPM01 UPM00 USBS0 UCSZ01 /UDORD0 UCSZ00 / UCPHA0 UCPOL0 198/213

88271BS–AVR–04/10 Universitas Sumatera Utara

Page 88: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

(0xC1) UCSR0B RXCIE0 TXCIE0 UDRIE0 RXEN0 TXEN0 UCSZ02 RXB80 TXB80 197

(0xC0) UCSR0A RXC0 TXC0 UDRE0 FE0 DOR0 UPE0 U2X0 MPCM0 196

(0xBF) Reserved – – – – – – – –

(0xBE) Reserved – – – – – – – –

(0xBD) TWAMR TWAM6 TWAM5 TWAM4 TWAM3 TWAM2 TWAM1 TWAM0 – 245

(0xBC) TWCR TWINT TWEA TWSTA TWSTO TWWC TWEN – TWIE 242

(0xBB) TWDR 2-wire Serial Interface Data Register 244

(0xBA) TWAR TWA6 TWA5 TWA4 TWA3 TWA2 TWA1 TWA0 TWGCE 245

(0xB9) TWSR TWS7 TWS6 TWS5 TWS4 TWS3 – TWPS1 TWPS0 244

(0xB8) TWBR 2-wire Serial Interface Bit Rate Register 242

(0xB7) Reserved – – – – – – –

(0xB6) ASSR – EXCLK AS2 TCN2UB OCR2AUB OCR2BUB TCR2AUB TCR2BUB 165

(0xB5) Reserved – – – – – – – –

(0xB4) OCR2B Timer/Counter2 Output Compare Register B 163

(0xB3) OCR2A Timer/Counter2 Output Compare Register A 163

(0xB2) TCNT2 Timer/Counter2 (8-bit) 163

(0xB1) TCCR2B FOC2A FOC2B – – WGM22 CS22 CS21 CS20 162

(0xB0) TCCR2A COM2A1 COM2A0 COM2B1 COM2B0 – – WGM21 WGM20 159

(0xAF) Reserved – – – – – – – –

(0xAE) Reserved – – – – – – – –

(0xAD) Reserved – – – – – – – –

(0xAC) Reserved – – – – – – – –

(0xAB) Reserved – – – – – – – –

(0xAA) Reserved – – – – – – – –

(0xA9) Reserved – – – – – – – –

(0xA8) Reserved – – – – – – – –

(0xA7) Reserved – – – – – – – –

(0xA6) Reserved – – – – – – – –

(0xA5) Reserved – – – – – – – –

(0xA4) Reserved – – – – – – – –

(0xA3) Reserved – – – – – – – –

(0xA2) Reserved – – – – – – – –

(0xA1) Reserved – – – – – – – –

(0xA0) Reserved – – – – – – – –

(0x9F) Reserved – – – – – – – –

(0x9E) Reserved – – – – – – – –

(0x9D) Reserved – – – – – – – –

(0x9C) Reserved – – – – – – – –

(0x9B) Reserved – – – – – – – –

(0x9A) Reserved – – – – – – – –

(0x99) Reserved – – – – – – – –

(0x98) Reserved – – – – – – – –

(0x97) Reserved – – – – – – – –

(0x96) Reserved – – – – – – – –

(0x95) Reserved – – – – – – – –

(0x94) Reserved – – – – – – – –

(0x93) Reserved – – – – – – – –

(0x92) Reserved – – – – – – – –

(0x91) Reserved – – – – – – – –

(0x90) Reserved – – – – – – – –

(0x8F) Reserved – – – – – – – –

(0x8E) Reserved – – – – – – – –

(0x8D) Reserved – – – – – – – –

(0x8C) Reserved – – – – – – – –

(0x8B) OCR1BH Timer/Counter1 - Output Compare Register B High Byte 139

(0x8A) OCR1BL Timer/Counter1 - Output Compare Register B Low Byte 139

(0x89) OCR1AH Timer/Counter1 - Output Compare Register A High Byte 139

(0x88) OCR1AL Timer/Counter1 - Output Compare Register A Low Byte 139

(0x87) ICR1H Timer/Counter1 - Input Capture Register High Byte 139

(0x86) ICR1L Timer/Counter1 - Input Capture Register Low Byte 139

(0x85) TCNT1H Timer/Counter1 - Counter Register High Byte 139

(0x84) TCNT1L Timer/Counter1 - Counter Register Low Byte 139

(0x83) Reserved – – – – – – – –

(0x82) TCCR1C FOC1A FOC1B – – – – – – 138

(0x81) TCCR1B ICNC1 ICES1 – WGM13 WGM12 CS12 CS11 CS10 137

(0x80) TCCR1A COM1A1 COM1A0 COM1B1 COM1B0 – – WGM11 WGM10 135

Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Page

98271BS–AVR–04/10 Universitas Sumatera Utara

Page 89: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

(0x7F) DIDR1 – – – – – – AIN1D AIN0D 250

(0x7E) DIDR0 – – ADC5D ADC4D ADC3D ADC2D ADC1D ADC0D 267

(0x7D) Reserved – – – – – – – –

(0x7C) ADMUX REFS1 REFS0 ADLAR – MUX3 MUX2 MUX1 MUX0 263

(0x7B) ADCSRB – ACME – – – ADTS2 ADTS1 ADTS0 266

(0x7A) ADCSRA ADEN ADSC ADATE ADIF ADIE ADPS2 ADPS1 ADPS0 264

(0x79) ADCH ADC Data Register High byte 266

(0x78) ADCL ADC Data Register Low byte 266

(0x77) Reserved – – – – – – – –

(0x76) Reserved – – – – – – – –

(0x75) Reserved – – – – – – – –

(0x74) Reserved – – – – – – – –

(0x73) Reserved – – – – – – – –

(0x72) Reserved – – – – – – – –

(0x71) Reserved – – – – – – – –

(0x70) TIMSK2 – – – – – OCIE2B OCIE2A TOIE2 164

(0x6F) TIMSK1 – – ICIE1 – – OCIE1B OCIE1A TOIE1 140

(0x6E) TIMSK0 – – – – – OCIE0B OCIE0A TOIE0 112

(0x6D) PCMSK2 PCINT23 PCINT22 PCINT21 PCINT20 PCINT19 PCINT18 PCINT17 PCINT16 75

(0x6C) PCMSK1 – PCINT14 PCINT13 PCINT12 PCINT11 PCINT10 PCINT9 PCINT8 75

(0x6B) PCMSK0 PCINT7 PCINT6 PCINT5 PCINT4 PCINT3 PCINT2 PCINT1 PCINT0 75

(0x6A) Reserved – – – – – – – –

(0x69) EICRA – – – – ISC11 ISC10 ISC01 ISC00 72

(0x68) PCICR – – – – – PCIE2 PCIE1 PCIE0

(0x67) Reserved – – – – – – – –

(0x66) OSCCAL Oscillator Calibration Register 37

(0x65) Reserved – – – – – – – –

(0x64) PRR PRTWI PRTIM2 PRTIM0 – PRTIM1 PRSPI PRUSART0 PRADC 42

(0x63) Reserved – – – – – – – –

(0x62) Reserved – – – – – – – –

(0x61) CLKPR CLKPCE – – – CLKPS3 CLKPS2 CLKPS1 CLKPS0 37

(0x60) WDTCSR WDIF WDIE WDP3 WDCE WDE WDP2 WDP1 WDP0 55

0x3F (0x5F) SREG I T H S V N Z C 9

0x3E (0x5E) SPH – – – – – (SP10) 5. SP9 SP8 12

0x3D (0x5D) SPL SP7 SP6 SP5 SP4 SP3 SP2 SP1 SP0 12

0x3C (0x5C) Reserved – – – – – – – –

0x3B (0x5B) Reserved – – – – – – – –

0x3A (0x5A) Reserved – – – – – – – –

0x39 (0x59) Reserved – – – – – – – –

0x38 (0x58) Reserved – – – – – – – –

0x37 (0x57) SPMCSR SPMIE (RWWSB)5. – (RWWSRE)5. BLBSET PGWRT PGERS SELFPRGEN 294

0x36 (0x56) Reserved – – – – – – – –

0x35 (0x55) MCUCR – BODS(6) BODSE(6) PUD – – IVSEL IVCE 45/69/93

0x34 (0x54) MCUSR – – – – WDRF BORF EXTRF PORF 55

0x33 (0x53) SMCR – – – – SM2 SM1 SM0 SE 40

0x32 (0x52) Reserved – – – – – – – –

0x31 (0x51) Reserved – – – – – – – –

0x30 (0x50) ACSR ACD ACBG ACO ACI ACIE ACIC ACIS1 ACIS0 248

0x2F (0x4F) Reserved – – – – – – – –

0x2E (0x4E) SPDR SPI Data Register 176

0x2D (0x4D) SPSR SPIF WCOL – – – – – SPI2X 175

0x2C (0x4C) SPCR SPIE SPE DORD MSTR CPOL CPHA SPR1 SPR0 174

0x2B (0x4B) GPIOR2 General Purpose I/O Register 2 25

0x2A (0x4A) GPIOR1 General Purpose I/O Register 1 25

0x29 (0x49) Reserved – – – – – – – –

0x28 (0x48) OCR0B Timer/Counter0 Output Compare Register B

0x27 (0x47) OCR0A Timer/Counter0 Output Compare Register A

0x26 (0x46) TCNT0 Timer/Counter0 (8-bit)

0x25 (0x45) TCCR0B FOC0A FOC0B – – WGM02 CS02 CS01 CS00

0x24 (0x44) TCCR0A COM0A1 COM0A0 COM0B1 COM0B0 – – WGM01 WGM00

0x23 (0x43) GTCCR TSM – – – – – PSRASY PSRSYNC 144/166

0x22 (0x42) EEARH (EEPROM Address Register High Byte) 5. 21

0x21 (0x41) EEARL EEPROM Address Register Low Byte 21

0x20 (0x40) EEDR EEPROM Data Register 21

0x1F (0x3F) EECR – – EEPM1 EEPM0 EERIE EEMPE EEPE EERE 21

0x1E (0x3E) GPIOR0 General Purpose I/O Register 0 25

Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Page

108271BS–AVR–04/10 Universitas Sumatera Utara

Page 90: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

Note: 1. For compatibility with future devices, reserved bits should be written to zero if accessed. Reserved I/O memory addresses should never be written.

2. I/O Registers within the address range 0x00 - 0x1F are directly bit-accessible using the SBI and CBI instructions. In these registers, the value of single bits can be checked by using the SBIS and SBIC instructions.

3. Some of the Status Flags are cleared by writing a logical one to them. Note that, unlike most other AVRs, the CBI and SBI instructions will only operate on the specified bit, and can therefore be used on registers containing such Status Flags. The CBI and SBI instructions work with registers 0x00 to 0x1F only.

4. When using the I/O specific commands IN and OUT, the I/O addresses 0x00 - 0x3F must be used. When addressing I/O Registers as data space using LD and ST instructions, 0x20 must be added to these addresses. The ATmega48A/48PA/88A/88PA/168A/168PA/328/328P is a complex microcontroller with more peripheral units than can be supported within the 64 location reserved in Opcode for the IN and OUT instructions. For the Extended I/O space from 0x60 - 0xFF in SRAM, only the ST/STS/STD and LD/LDS/LDD instructions can be used.

5. Only valid for ATmega88A/88PA/168A/168PA/328/328P.6. BODS and BODSE only available for picoPower devices ATmega48PA/88PA/168PA/328P

0x1D (0x3D) EIMSK – – – – – – INT1 INT0 73

0x1C (0x3C) EIFR – – – – – – INTF1 INTF0 73

0x1B (0x3B) PCIFR – – – – – PCIF2 PCIF1 PCIF0

0x1A (0x3A) Reserved – – – – – – – –

0x19 (0x39) Reserved – – – – – – – –

0x18 (0x38) Reserved – – – – – – – –

0x17 (0x37) TIFR2 – – – – – OCF2B OCF2A TOV2 164

0x16 (0x36) TIFR1 – – ICF1 – – OCF1B OCF1A TOV1 140

0x15 (0x35) TIFR0 – – – – – OCF0B OCF0A TOV0

0x14 (0x34) Reserved – – – – – – – –

0x13 (0x33) Reserved – – – – – – – –

0x12 (0x32) Reserved – – – – – – – –

0x11 (0x31) Reserved – – – – – – – –

0x10 (0x30) Reserved – – – – – – – –

0x0F (0x2F) Reserved – – – – – – – –

0x0E (0x2E) Reserved – – – – – – – –

0x0D (0x2D) Reserved – – – – – – – –

0x0C (0x2C) Reserved – – – – – – – –

0x0B (0x2B) PORTD PORTD7 PORTD6 PORTD5 PORTD4 PORTD3 PORTD2 PORTD1 PORTD0 94

0x0A (0x2A) DDRD DDD7 DDD6 DDD5 DDD4 DDD3 DDD2 DDD1 DDD0 94

0x09 (0x29) PIND PIND7 PIND6 PIND5 PIND4 PIND3 PIND2 PIND1 PIND0 94

0x08 (0x28) PORTC – PORTC6 PORTC5 PORTC4 PORTC3 PORTC2 PORTC1 PORTC0 93

0x07 (0x27) DDRC – DDC6 DDC5 DDC4 DDC3 DDC2 DDC1 DDC0 93

0x06 (0x26) PINC – PINC6 PINC5 PINC4 PINC3 PINC2 PINC1 PINC0 93

0x05 (0x25) PORTB PORTB7 PORTB6 PORTB5 PORTB4 PORTB3 PORTB2 PORTB1 PORTB0 93

0x04 (0x24) DDRB DDB7 DDB6 DDB5 DDB4 DDB3 DDB2 DDB1 DDB0 93

0x03 (0x23) PINB PINB7 PINB6 PINB5 PINB4 PINB3 PINB2 PINB1 PINB0 93

0x02 (0x22) Reserved – – – – – – – –

0x01 (0x21) Reserved – – – – – – – –

0x0 (0x20) Reserved – – – – – – – –

Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Page

118271BS–AVR–04/10 Universitas Sumatera Utara

Page 91: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

5. Instruction Set SummaryMnemonics Operands Description Operation Flags #Clocks

ARITHMETIC AND LOGIC INSTRUCTIONS

ADD Rd, Rr Add two Registers Rd ← Rd + Rr Z,C,N,V,H 1

ADC Rd, Rr Add with Carry two Registers Rd ← Rd + Rr + C Z,C,N,V,H 1

ADIW Rdl,K Add Immediate to Word Rdh:Rdl ← Rdh:Rdl + K Z,C,N,V,S 2

SUB Rd, Rr Subtract two Registers Rd ← Rd - Rr Z,C,N,V,H 1

SUBI Rd, K Subtract Constant from Register Rd ← Rd - K Z,C,N,V,H 1

SBC Rd, Rr Subtract with Carry two Registers Rd ← Rd - Rr - C Z,C,N,V,H 1

SBCI Rd, K Subtract with Carry Constant from Reg. Rd ← Rd - K - C Z,C,N,V,H 1

SBIW Rdl,K Subtract Immediate from Word Rdh:Rdl ← Rdh:Rdl - K Z,C,N,V,S 2

AND Rd, Rr Logical AND Registers Rd ← Rd • Rr Z,N,V 1

ANDI Rd, K Logical AND Register and Constant Rd ← Rd • K Z,N,V 1

OR Rd, Rr Logical OR Registers Rd ← Rd v Rr Z,N,V 1

ORI Rd, K Logical OR Register and Constant Rd ← Rd v K Z,N,V 1

EOR Rd, Rr Exclusive OR Registers Rd ← Rd ⊕ Rr Z,N,V 1

COM Rd One’s Complement Rd ← 0xFF − Rd Z,C,N,V 1

NEG Rd Two’s Complement Rd ← 0x00 − Rd Z,C,N,V,H 1

SBR Rd,K Set Bit(s) in Register Rd ← Rd v K Z,N,V 1

CBR Rd,K Clear Bit(s) in Register Rd ← Rd • (0xFF - K) Z,N,V 1

INC Rd Increment Rd ← Rd + 1 Z,N,V 1

DEC Rd Decrement Rd ← Rd − 1 Z,N,V 1

TST Rd Test for Zero or Minus Rd ← Rd • Rd Z,N,V 1

CLR Rd Clear Register Rd ← Rd ⊕ Rd Z,N,V 1

SER Rd Set Register Rd ← 0xFF None 1

MUL Rd, Rr Multiply Unsigned R1:R0 ← Rd x Rr Z,C 2

MULS Rd, Rr Multiply Signed R1:R0 ← Rd x Rr Z,C 2

MULSU Rd, Rr Multiply Signed with Unsigned R1:R0 ← Rd x Rr Z,C 2

FMUL Rd, Rr Fractional Multiply Unsigned R1:R0 ← (Rd x Rr) << 1 Z,C 2

FMULS Rd, Rr Fractional Multiply Signed R1:R0 ← (Rd x Rr) << 1 Z,C 2

FMULSU Rd, Rr Fractional Multiply Signed with Unsigned R1:R0 ← (Rd x Rr) << 1 Z,C 2

BRANCH INSTRUCTIONS

RJMP k Relative Jump PC ← PC + k + 1 None 2

IJMP Indirect Jump to (Z) PC ← Z None 2

JMP(1) k Direct Jump PC ← k None 3

RCALL k Relative Subroutine Call PC ← PC + k + 1 None 3

ICALL Indirect Call to (Z) PC ← Z None 3

CALL(1) k Direct Subroutine Call PC ← k None 4

RET Subroutine Return PC ← STACK None 4

RETI Interrupt Return PC ← STACK I 4

CPSE Rd,Rr Compare, Skip if Equal if (Rd = Rr) PC ← PC + 2 or 3 None 1/2/3

CP Rd,Rr Compare Rd − Rr Z, N,V,C,H 1

CPC Rd,Rr Compare with Carry Rd − Rr − C Z, N,V,C,H 1

CPI Rd,K Compare Register with Immediate Rd − K Z, N,V,C,H 1

SBRC Rr, b Skip if Bit in Register Cleared if (Rr(b)=0) PC ← PC + 2 or 3 None 1/2/3

SBRS Rr, b Skip if Bit in Register is Set if (Rr(b)=1) PC ← PC + 2 or 3 None 1/2/3

SBIC P, b Skip if Bit in I/O Register Cleared if (P(b)=0) PC ← PC + 2 or 3 None 1/2/3

SBIS P, b Skip if Bit in I/O Register is Set if (P(b)=1) PC ← PC + 2 or 3 None 1/2/3

BRBS s, k Branch if Status Flag Set if (SREG(s) = 1) then PC←PC+k + 1 None 1/2

BRBC s, k Branch if Status Flag Cleared if (SREG(s) = 0) then PC←PC+k + 1 None 1/2

BREQ k Branch if Equal if (Z = 1) then PC ← PC + k + 1 None 1/2

BRNE k Branch if Not Equal if (Z = 0) then PC ← PC + k + 1 None 1/2

BRCS k Branch if Carry Set if (C = 1) then PC ← PC + k + 1 None 1/2

BRCC k Branch if Carry Cleared if (C = 0) then PC ← PC + k + 1 None 1/2

BRSH k Branch if Same or Higher if (C = 0) then PC ← PC + k + 1 None 1/2

BRLO k Branch if Lower if (C = 1) then PC ← PC + k + 1 None 1/2

BRMI k Branch if Minus if (N = 1) then PC ← PC + k + 1 None 1/2

BRPL k Branch if Plus if (N = 0) then PC ← PC + k + 1 None 1/2

BRGE k Branch if Greater or Equal, Signed if (N ⊕ V= 0) then PC ← PC + k + 1 None 1/2

BRLT k Branch if Less Than Zero, Signed if (N ⊕ V= 1) then PC ← PC + k + 1 None 1/2

BRHS k Branch if Half Carry Flag Set if (H = 1) then PC ← PC + k + 1 None 1/2

BRHC k Branch if Half Carry Flag Cleared if (H = 0) then PC ← PC + k + 1 None 1/2

BRTS k Branch if T Flag Set if (T = 1) then PC ← PC + k + 1 None 1/2

BRTC k Branch if T Flag Cleared if (T = 0) then PC ← PC + k + 1 None 1/2

BRVS k Branch if Overflow Flag is Set if (V = 1) then PC ← PC + k + 1 None 1/2

BRVC k Branch if Overflow Flag is Cleared if (V = 0) then PC ← PC + k + 1 None 1/2

128271BS–AVR–04/10 Universitas Sumatera Utara

Page 92: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

BRIE k Branch if Interrupt Enabled if ( I = 1) then PC ← PC + k + 1 None 1/2

BRID k Branch if Interrupt Disabled if ( I = 0) then PC ← PC + k + 1 None 1/2

BIT AND BIT-TEST INSTRUCTIONS

SBI P,b Set Bit in I/O Register I/O(P,b) ← 1 None 2

CBI P,b Clear Bit in I/O Register I/O(P,b) ← 0 None 2

LSL Rd Logical Shift Left Rd(n+1) ← Rd(n), Rd(0) ← 0 Z,C,N,V 1

LSR Rd Logical Shift Right Rd(n) ← Rd(n+1), Rd(7) ← 0 Z,C,N,V 1

ROL Rd Rotate Left Through Carry Rd(0)←C,Rd(n+1)← Rd(n),C←Rd(7) Z,C,N,V 1

ROR Rd Rotate Right Through Carry Rd(7)←C,Rd(n)← Rd(n+1),C←Rd(0) Z,C,N,V 1

ASR Rd Arithmetic Shift Right Rd(n) ← Rd(n+1), n=0...6 Z,C,N,V 1

SWAP Rd Swap Nibbles Rd(3...0)←Rd(7...4),Rd(7...4)←Rd(3...0) None 1

BSET s Flag Set SREG(s) ← 1 SREG(s) 1

BCLR s Flag Clear SREG(s) ← 0 SREG(s) 1

BST Rr, b Bit Store from Register to T T ← Rr(b) T 1

BLD Rd, b Bit load from T to Register Rd(b) ← T None 1

SEC Set Carry C ← 1 C 1

CLC Clear Carry C ← 0 C 1

SEN Set Negative Flag N ← 1 N 1

CLN Clear Negative Flag N ← 0 N 1

SEZ Set Zero Flag Z ← 1 Z 1

CLZ Clear Zero Flag Z ← 0 Z 1

SEI Global Interrupt Enable I ← 1 I 1

CLI Global Interrupt Disable I ← 0 I 1

SES Set Signed Test Flag S ← 1 S 1

CLS Clear Signed Test Flag S ← 0 S 1

SEV Set Twos Complement Overflow. V ← 1 V 1

CLV Clear Twos Complement Overflow V ← 0 V 1

SET Set T in SREG T ← 1 T 1

CLT Clear T in SREG T ← 0 T 1

SEH Set Half Carry Flag in SREG H ← 1 H 1

CLH Clear Half Carry Flag in SREG H ← 0 H 1

DATA TRANSFER INSTRUCTIONS

MOV Rd, Rr Move Between Registers Rd ← Rr None 1

MOVW Rd, Rr Copy Register Word Rd+1:Rd ← Rr+1:Rr None 1

LDI Rd, K Load Immediate Rd ← K None 1

LD Rd, X Load Indirect Rd ← (X) None 2

LD Rd, X+ Load Indirect and Post-Inc. Rd ← (X), X ← X + 1 None 2

LD Rd, - X Load Indirect and Pre-Dec. X ← X - 1, Rd ← (X) None 2

LD Rd, Y Load Indirect Rd ← (Y) None 2

LD Rd, Y+ Load Indirect and Post-Inc. Rd ← (Y), Y ← Y + 1 None 2

LD Rd, - Y Load Indirect and Pre-Dec. Y ← Y - 1, Rd ← (Y) None 2

LDD Rd,Y+q Load Indirect with Displacement Rd ← (Y + q) None 2

LD Rd, Z Load Indirect Rd ← (Z) None 2

LD Rd, Z+ Load Indirect and Post-Inc. Rd ← (Z), Z ← Z+1 None 2

LD Rd, -Z Load Indirect and Pre-Dec. Z ← Z - 1, Rd ← (Z) None 2

LDD Rd, Z+q Load Indirect with Displacement Rd ← (Z + q) None 2

LDS Rd, k Load Direct from SRAM Rd ← (k) None 2

ST X, Rr Store Indirect (X) ← Rr None 2

ST X+, Rr Store Indirect and Post-Inc. (X) ← Rr, X ← X + 1 None 2

ST - X, Rr Store Indirect and Pre-Dec. X ← X - 1, (X) ← Rr None 2

ST Y, Rr Store Indirect (Y) ← Rr None 2

ST Y+, Rr Store Indirect and Post-Inc. (Y) ← Rr, Y ← Y + 1 None 2

ST - Y, Rr Store Indirect and Pre-Dec. Y ← Y - 1, (Y) ← Rr None 2

STD Y+q,Rr Store Indirect with Displacement (Y + q) ← Rr None 2

ST Z, Rr Store Indirect (Z) ← Rr None 2

ST Z+, Rr Store Indirect and Post-Inc. (Z) ← Rr, Z ← Z + 1 None 2

ST -Z, Rr Store Indirect and Pre-Dec. Z ← Z - 1, (Z) ← Rr None 2

STD Z+q,Rr Store Indirect with Displacement (Z + q) ← Rr None 2

STS k, Rr Store Direct to SRAM (k) ← Rr None 2

LPM Load Program Memory R0 ← (Z) None 3

LPM Rd, Z Load Program Memory Rd ← (Z) None 3

LPM Rd, Z+ Load Program Memory and Post-Inc Rd ← (Z), Z ← Z+1 None 3

SPM Store Program Memory (Z) ← R1:R0 None -

IN Rd, P In Port Rd ← P None 1

OUT P, Rr Out Port P ← Rr None 1

PUSH Rr Push Register on Stack STACK ← Rr None 2

Mnemonics Operands Description Operation Flags #Clocks

138271BS–AVR–04/10 Universitas Sumatera Utara

Page 93: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

Note: 1. These instructions are only available in ATmega168PA and ATmega328P.

POP Rd Pop Register from Stack Rd ← STACK None 2

MCU CONTROL INSTRUCTIONS

NOP No Operation None 1

SLEEP Sleep (see specific descr. for Sleep function) None 1

WDR Watchdog Reset (see specific descr. for WDR/timer) None 1

BREAK Break For On-chip Debug Only None N/A

Mnemonics Operands Description Operation Flags #Clocks

148271BS–AVR–04/10 Universitas Sumatera Utara

Page 94: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

6. Ordering Information

6.1 ATmega48A

Note: 1. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities.

2. Pb-free packaging complies to the European Directive for Restriction of Hazardous Substances (RoHS directive).Also Halide free and fully Green.

3. See ”Speed Grades” on page 321.4. NiPdAu Lead Finish.5. Tape & Reel.

Speed (MHz) Power Supply Ordering Code(2) Package(1) Operational Range

20(3) 1.8 - 5.5

ATmega48A-AUATmega48A-AUR(5)

ATmega48A-MMH(4)

ATmega48A-MMHR(4)(5)

ATmega48A-MUATmega48A-MUR(5)

ATmega48A-PU

32A32A28M128M132M1-A32M1-A28P3

Industrial(-40°C to 85°C)

Package Type

32A 32-lead, Thin (1.0 mm) Plastic Quad Flat Package (TQFP)

28M1 28-pad, 4 x 4 x 1.0 body, Lead Pitch 0.45 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

32M1-A 32-pad, 5 x 5 x 1.0 body, Lead Pitch 0.50 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

28P3 28-lead, 0.300” Wide, Plastic Dual Inline Package (PDIP)

158271BS–AVR–04/10 Universitas Sumatera Utara

Page 95: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

6.2 ATmega48PA

Note: 1. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities.

2. Pb-free packaging complies to the European Directive for Restriction of Hazardous Substances (RoHS directive).Also Halide free and fully Green.

3. See ”Speed Grades” on page 321.4. NiPdAu Lead Finish.5. Tape & Reel.

Speed (MHz) Power Supply Ordering Code(2) Package(1) Operational Range

20(3) 1.8 - 5.5

ATmega48PA-AUATmega48PA-AUR(5)

ATmega48PA-MMH(4)

ATmega48PA-MMHR(4)(5)

ATmega48PA-MUATmega48PA-MUR(5)

ATmega48PA-PU

32A32A28M128M132M1-A32M1-A28P3

Industrial(-40°C to 85°C)

Package Type

32A 32-lead, Thin (1.0 mm) Plastic Quad Flat Package (TQFP)

28M1 28-pad, 4 x 4 x 1.0 body, Lead Pitch 0.45 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

32M1-A 32-pad, 5 x 5 x 1.0 body, Lead Pitch 0.50 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

28P3 28-lead, 0.300” Wide, Plastic Dual Inline Package (PDIP)

168271BS–AVR–04/10 Universitas Sumatera Utara

Page 96: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

6.3 ATmega88A

Note: 1. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities.

2. Pb-free packaging complies to the European Directive for Restriction of Hazardous Substances (RoHS directive).Also Halide free and fully Green.

3. See ”Speed Grades” on page 321.4. NiPdAu Lead Finish.5. Tape & Reel.

Speed (MHz) Power Supply Ordering Code(2) Package(1) Operational Range

20(3) 1.8 - 5.5

ATmega88A-AUATmega88A-AUR(5)

ATmega88A-MMH(4)

ATmega88A-MMHR(4)(5)

ATmega88A-MUATmega88A-MUR(5)

ATmega88A-PU

32A32A28M128M132M1-A32M1-A28P3

Industrial(-40°C to 85°C)

Package Type

32A 32-lead, Thin (1.0 mm) Plastic Quad Flat Package (TQFP)

28M1 28-pad, 4 x 4 x 1.0 body, Lead Pitch 0.45 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

32M1-A 32-pad, 5 x 5 x 1.0 body, Lead Pitch 0.50 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

28P3 28-lead, 0.300” Wide, Plastic Dual Inline Package (PDIP)

178271BS–AVR–04/10 Universitas Sumatera Utara

Page 97: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

6.4 ATmega88PA

Note: 1. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities.

2. Pb-free packaging complies to the European Directive for Restriction of Hazardous Substances (RoHS directive).Also Halide free and fully Green.

3. See ”Speed Grades” on page 321.4. NiPdAu Lead Finish.5. Tape & Reel.

Speed (MHz) Power Supply (V) Ordering Code(2) Package(1) Operational Range

20(3) 1.8 - 5.5

ATmega88PA-AUATmega88PA-AUR(5)

ATmega88PA-MMH(4)

ATmega88PA-MMHR(4)(5)

ATmega88PA-MUATmega88PA-MUR(5)

ATmega88PA-PU

32A32A28M128M132M1-A32M1-A28P3

Industrial(-40°C to 85°C)

Package Type

32A 32-lead, Thin (1.0 mm) Plastic Quad Flat Package (TQFP)

28M1 28-pad, 4 x 4 x 1.0 body, Lead Pitch 0.45 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

32M1-A 32-pad, 5 x 5 x 1.0 body, Lead Pitch 0.50 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

28P3 28-lead, 0.300” Wide, Plastic Dual Inline Package (PDIP)

188271BS–AVR–04/10 Universitas Sumatera Utara

Page 98: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

6.5 ATmega168A

Note: 1. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities.

2. Pb-free packaging complies to the European Directive for Restriction of Hazardous Substances (RoHS directive).Also Halide free and fully Green.

3. See ”Speed Grades” on page 3214. NiPdAu Lead Finish.5. Tape & Reel.

Speed (MHz)(3) Power Supply (V) Ordering Code(2) Package(1) Operational Range

20 1.8 - 5.5

ATmega168A-AUATmega168A-AUR(5)

ATmega168A-MMH(4)

ATmega168A-MMHR(4)(5)

ATmega168A-MUATmega168A-MUR(5)

ATmega168A-PU

32A32A28M128M132M1-A32M1-A28P3

Industrial(-40°C to 85°C)

Package Type

32A 32-lead, Thin (1.0 mm) Plastic Quad Flat Package (TQFP)

28M1 28-pad, 4 x 4 x 1.0 body, Lead Pitch 0.45 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

32M1-A 32-pad, 5 x 5 x 1.0 body, Lead Pitch 0.50 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

28P3 28-lead, 0.300” Wide, Plastic Dual Inline Package (PDIP)

198271BS–AVR–04/10 Universitas Sumatera Utara

Page 99: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

6.6 ATmega168PA

Note: 1. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities.

2. Pb-free packaging complies to the European Directive for Restriction of Hazardous Substances (RoHS directive).Also Halide free and fully Green.

3. See ”Speed Grades” on page 321.4. NiPdAu Lead Finish.5. Tape & Reel.

Speed (MHz)(3) Power Supply (V) Ordering Code(2) Package(1) Operational Range

20 1.8 - 5.5

ATmega168PA-AUATmega168PA-AUR(5)

ATmega168PA-MMH(4)

ATmega168PA-MMHR(4)(5)

ATmega168PA-MUATmega168PA-MUR(5)

ATmega168PA-PU

32A32A28M128M132M1-A32M1-A28P3

Industrial(-40°C to 85°C)

Package Type

32A 32-lead, Thin (1.0 mm) Plastic Quad Flat Package (TQFP)

28M1 28-pad, 4 x 4 x 1.0 body, Lead Pitch 0.45 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

32M1-A 32-pad, 5 x 5 x 1.0 body, Lead Pitch 0.50 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

28P3 28-lead, 0.300” Wide, Plastic Dual Inline Package (PDIP)

208271BS–AVR–04/10 Universitas Sumatera Utara

Page 100: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

6.7 ATmega328

Note: 1. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities.

2. Pb-free packaging complies to the European Directive for Restriction of Hazardous Substances (RoHS directive).Also Halide free and fully Green.

3. See Figure 28-1 on page 321.4. Tape & Reel

Speed (MHz) Power Supply (V) Ordering Code(2) Package(1) Operational Range

20(3) 1.8 - 5.5

ATmega328-AUATmega328-AUR(4)

ATmega328-MUATmega328-MUR(4)

ATmega328-PU

32A32A32M1-A32M1-A28P3

Industrial(-40°C to 85°C)

Package Type

32A 32-lead, Thin (1.0 mm) Plastic Quad Flat Package (TQFP)

28P3 28-lead, 0.300” Wide, Plastic Dual Inline Package (PDIP)

32M1-A 32-pad, 5 x 5 x 1.0 body, Lead Pitch 0.50 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

218271BS–AVR–04/10 Universitas Sumatera Utara

Page 101: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

6.8 ATmega328P

Note: 1. This device can also be supplied in wafer form. Please contact your local Atmel sales office for detailed ordering information and minimum quantities.

2. Pb-free packaging complies to the European Directive for Restriction of Hazardous Substances (RoHS directive).Also Halide free and fully Green.

3. See Figure 28-1 on page 321.4. Tape & Reel.

Speed (MHz) Power Supply Ordering Code(2) Package(1) Operational Range

20(3) 1.8 - 5.5

ATmega328P-AUATmega328P-AUR(4)

ATmega328P-MUATmega328P-MUR(4)

ATmega328P-PU

32A32A32M1-A32M1-A28P3

Industrial(-40°C to 85°C)

Package Type

32A 32-lead, Thin (1.0 mm) Plastic Quad Flat Package (TQFP)

28P3 28-lead, 0.300” Wide, Plastic Dual Inline Package (PDIP)

32M1-A 32-pad, 5 x 5 x 1.0 body, Lead Pitch 0.50 mm Quad Flat No-Lead/Micro Lead Frame Package (QFN/MLF)

228271BS–AVR–04/10 Universitas Sumatera Utara

Page 102: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

7. Packaging Information

7.1 32A

2325 Orchard Parkway San Jose, CA 95131

TITLE DRAWING NO.

R

REV.

32A, 32-lead, 7 x 7 mm Body Size, 1.0 mm Body Thickness,0.8 mm Lead Pitch, Thin Profile Plastic Quad Flat Package (TQFP)

B32A

10/5/2001

PIN 1 IDENTIFIER

0˚~7˚

PIN 1

L

C

A1 A2 A

D1

D

e E1 E

B

Notes: 1. This package conforms to JEDEC reference MS-026, Variation ABA. 2. Dimensions D1 and E1 do not include mold protrusion. Allowable

protrusion is 0.25 mm per side. Dimensions D1 and E1 are maximum plastic body size dimensions including mold mismatch.

3. Lead coplanarity is 0.10 mm maximum.

A – – 1.20

A1 0.05 – 0.15

A2 0.95 1.00 1.05

D 8.75 9.00 9.25

D1 6.90 7.00 7.10 Note 2

E 8.75 9.00 9.25

E1 6.90 7.00 7.10 Note 2

B 0.30 – 0.45

C 0.09 – 0.20

L 0.45 – 0.75

e 0.80 TYP

COMMON DIMENSIONS(Unit of Measure = mm)

SYMBOL MIN NOM MAX NOTE

238271BS–AVR–04/10 Universitas Sumatera Utara

Page 103: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

7.2 28M1

TITLE DRAWING NO. GPC REV. Package Drawing Contact: [email protected] 28M1ZBV B

28M1, 28-pad, 4 x 4 x 1.0 mm Body, Lead Pitch 0.45 mm, 2.4 x 2.4 mm Exposed Pad, Thermally Enhanced Plastic Very Thin Quad Flat No Lead Package (VQFN)

10/24/08

SIDE VIEW

Pin 1 ID

BOTTOM VIEW

TOP VIEW

Note: The terminal #1 ID is a Laser-marked Feature.

D

E

e

K

A1

C

A

D2

E2

y

L

1

2

3

b

1

2

3

0.45 COMMON DIMENSIONS(Unit of Measure = mm)

SYMBOL MIN NOM MAX NOTE

A 0.80 0.90 1.00

A1 0.00 0.02 0.05

b 0.17 0.22 0.27

C 0.20 REF

D 3.95 4.00 4.05

D2 2.35 2.40 2.45

E 3.95 4.00 4.05

E2 2.35 2.40 2.45

e 0.45

L 0.35 0.40 0.45

y 0.00 – 0.08

K 0.20 – –

R 0.20

0.4 Ref(4x)

248271BS–AVR–04/10 Universitas Sumatera Utara

Page 104: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

7.3 32M1-A

2325 Orchard Parkway San Jose, CA 95131

TITLE DRAWING NO.

R

REV. 32M1-A, 32-pad, 5 x 5 x 1.0 mm Body, Lead Pitch 0.50 mm, E32M1-A

5/25/06

3.10 mm Exposed Pad, Micro Lead Frame Package (MLF)

COMMON DIMENSIONS(Unit of Measure = mm)

SYMBOL MIN NOM MAX NOTE

D1

D

E1 E

eb

A3A2

A1 A

D2

E2

0.08 C

L

1

2

3

P

P

01

2

3

A 0.80 0.90 1.00

A1 – 0.02 0.05

A2 – 0.65 1.00

A3 0.20 REF

b 0.18 0.23 0.30

D

D1

D2 2.95 3.10 3.25

4.90 5.00 5.10

4.70 4.75 4.80

4.70 4.75 4.80

4.90 5.00 5.10

E

E1

E2 2.95 3.10 3.25

e 0.50 BSC

L 0.30 0.40 0.50

P – – 0.60

– – 12o

Note: JEDEC Standard MO-220, Fig. 2 (Anvil Singulation), VHHD-2.

TOP VIEW

SIDE VIEW

BOTTOM VIEW

0

Pin 1 ID

Pin #1 Notch(0.20 R)

K 0.20 – –

K

K

258271BS–AVR–04/10 Universitas Sumatera Utara

Page 105: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

7.4 28P3

2325 Orchard Parkway San Jose, CA 95131

TITLE DRAWING NO.

R

REV. 28P3, 28-lead (0.300"/7.62 mm Wide) Plastic Dual Inline Package (PDIP) B28P3

09/28/01

PIN1

E1

A1

B

REF

E

B1

C

L

SEATING PLANE

A

0º ~ 15º

D

e

eB

B2(4 PLACES)

COMMON DIMENSIONS(Unit of Measure = mm)

SYMBOL MIN NOM MAX NOTE

A – – 4.5724

A1 0.508 – –

D 34.544 – 34.798 Note 1

E 7.620 – 8.255

E1 7.112 – 7.493 Note 1

B 0.381 – 0.533

B1 1.143 – 1.397

B2 0.762 – 1.143

L 3.175 – 3.429

C 0.203 – 0.356

eB – – 10.160

e 2.540 TYP

Note: 1. Dimensions D and E1 do not include mold Flash or Protrusion.Mold Flash or Protrusion shall not exceed 0.25 mm (0.010").

268271BS–AVR–04/10 Universitas Sumatera Utara

Page 106: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

8. Errata

8.1 Errata ATmega48AThe revision letter in this section refers to the revision of the ATmega48A device.

8.1.1 Rev. D• Analog MUX can be turned off when setting ACME bit

1. Analog MUX can be turned off when setting ACME bit

If the ACME (Analog Comparator Multiplexer Enabled) bit in ADCSRB is set while MUX3 inADMUX is '1' (ADMUX[3:0]=1xxx), all MUX'es are turned off until the ACME bit is cleared.

Problem Fix/WorkaroundClear the MUX3 bit before setting the ACME bit.

8.2 Errata ATmega48PAThe revision letter in this section refers to the revision of the ATmega48PA device.

8.2.1 Rev. D• Analog MUX can be turned off when setting ACME bit

1. Analog MUX can be turned off when setting ACME bit

If the ACME (Analog Comparator Multiplexer Enabled) bit in ADCSRB is set while MUX3 inADMUX is '1' (ADMUX[3:0]=1xxx), all MUX'es are turned off until the ACME bit is cleared.

Problem Fix/WorkaroundClear the MUX3 bit before setting the ACME bit.

8.3 Errata ATmega88AThe revision letter in this section refers to the revision of the ATmega88A device.

8.3.1 Rev. F• Analog MUX can be turned off when setting ACME bit

1. Analog MUX can be turned off when setting ACME bit

If the ACME (Analog Comparator Multiplexer Enabled) bit in ADCSRB is set while MUX3 inADMUX is '1' (ADMUX[3:0]=1xxx), all MUX'es are turned off until the ACME bit is cleared.

Problem Fix/WorkaroundClear the MUX3 bit before setting the ACME bit.

278271BS–AVR–04/10 Universitas Sumatera Utara

Page 107: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

8.4 Errata ATmega88PAThe revision letter in this section refers to the revision of the ATmega88PA device.

8.4.1 Rev. F• Analog MUX can be turned off when setting ACME bit

1. Analog MUX can be turned off when setting ACME bit

If the ACME (Analog Comparator Multiplexer Enabled) bit in ADCSRB is set while MUX3 inADMUX is '1' (ADMUX[3:0]=1xxx), all MUX'es are turned off until the ACME bit is cleared.

Problem Fix/WorkaroundClear the MUX3 bit before setting the ACME bit.

8.5 Errata ATmega168AThe revision letter in this section refers to the revision of the ATmega168A device.

8.5.1 Rev. E• Analog MUX can be turned off when setting ACME bit

1. Analog MUX can be turned off when setting ACME bit

If the ACME (Analog Comparator Multiplexer Enabled) bit in ADCSRB is set while MUX3 inADMUX is '1' (ADMUX[3:0]=1xxx), all MUX'es are turned off until the ACME bit is cleared.

Problem Fix/WorkaroundClear the MUX3 bit before setting the ACME bit.

8.6 Errata ATmega168PAThe revision letter in this section refers to the revision of the ATmega168PA device.

8.6.1 Rev E• Analog MUX can be turned off when setting ACME bit

1. Analog MUX can be turned off when setting ACME bit

If the ACME (Analog Comparator Multiplexer Enabled) bit in ADCSRB is set while MUX3 inADMUX is '1' (ADMUX[3:0]=1xxx), all MUX'es are turned off until the ACME bit is cleared.

Problem Fix/WorkaroundClear the MUX3 bit before setting the ACME bit.

288271BS–AVR–04/10 Universitas Sumatera Utara

Page 108: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

8.7 Errata ATmega328 The revision letter in this section refers to the revision of the ATmega328 device.

8.7.1 Rev D• Analog MUX can be turned off when setting ACME bit

1. Analog MUX can be turned off when setting ACME bit

If the ACME (Analog Comparator Multiplexer Enabled) bit in ADCSRB is set while MUX3 inADMUX is '1' (ADMUX[3:0]=1xxx), all MUX'es are turned off until the ACME bit is cleared.

Problem Fix/WorkaroundClear the MUX3 bit before setting the ACME bit.

8.7.2 Rev CNot sampled.

8.7.3 Rev B• Analog MUX can be turned off when setting ACME bit• Unstable 32 kHz Oscillator

1. Unstable 32 kHz OscillatorIf the ACME (Analog Comparator Multiplexer Enabled) bit in ADCSRB is set while MUX3 inADMUX is '1' (ADMUX[3:0]=1xxx), all MUX'es are turned off until the ACME bit is cleared.

Problem Fix/WorkaroundClear the MUX3 bit before setting the ACME bit.

2. Unstable 32 kHz OscillatorThe 32 kHz oscillator does not work as system clock. The 32 kHz oscillator used as asyn-chronous timer is inaccurate.

Problem Fix/ WorkaroundNone.

8.7.4 Rev A• Analog MUX can be turned off when setting ACME bit• Unstable 32 kHz Oscillator

1. Unstable 32 kHz OscillatorIf the ACME (Analog Comparator Multiplexer Enabled) bit in ADCSRB is set while MUX3 inADMUX is '1' (ADMUX[3:0]=1xxx), all MUX'es are turned off until the ACME bit is cleared.

Problem Fix/WorkaroundClear the MUX3 bit before setting the ACME bit.

2. Unstable 32 kHz OscillatorThe 32 kHz oscillator does not work as system clock. The 32 kHz oscillator used as asyn-chronous timer is inaccurate.

Problem Fix/ WorkaroundNone.

298271BS–AVR–04/10 Universitas Sumatera Utara

Page 109: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

8.8 Errata ATmega328PThe revision letter in this section refers to the revision of the ATmega328P device.

8.8.1 Rev D• Analog MUX can be turned off when setting ACME bit

1. Analog MUX can be turned off when setting ACME bit

If the ACME (Analog Comparator Multiplexer Enabled) bit in ADCSRB is set while MUX3 inADMUX is '1' (ADMUX[3:0]=1xxx), all MUX'es are turned off until the ACME bit is cleared.

Problem Fix/WorkaroundClear the MUX3 bit before setting the ACME bit.

8.8.2 Rev CNot sampled.

8.8.3 Rev B• Analog MUX can be turned off when setting ACME bit• Unstable 32 kHz Oscillator

1. Unstable 32 kHz OscillatorIf the ACME (Analog Comparator Multiplexer Enabled) bit in ADCSRB is set while MUX3 inADMUX is '1' (ADMUX[3:0]=1xxx), all MUX'es are turned off until the ACME bit is cleared.

Problem Fix/WorkaroundClear the MUX3 bit before setting the ACME bit.

2. Unstable 32 kHz OscillatorThe 32 kHz oscillator does not work as system clock. The 32 kHz oscillator used as asyn-chronous timer is inaccurate.

Problem Fix/ WorkaroundNone.

8.8.4 Rev A• Unstable 32 kHz Oscillator

1. Unstable 32 kHz OscillatorThe 32 kHz oscillator does not work as system clock. The 32 kHz oscillator used as asyn-chronous timer is inaccurate.

Problem Fix/ WorkaroundNone.

308271BS–AVR–04/10 Universitas Sumatera Utara

Page 110: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

ATmega48A/48PA/88A/88PA/168A/168PA/328/328P

9. Datasheet Revision HistoryPlease note that the referring page numbers in this section are referred to this document. Thereferring revision in this section are referring to the document revision.

9.1 Rev. 8271B-04/10

9.2 Rev. 8271A-12/09

1. Updated Table 8-8 with correct value for timer oscilliator at xtal2/tos2

2. Corrected use of SBIS instructions in assembly code examples.

3. Corrected BOD and BODSE bits to R/W in Section 9.11.2 on page 45, Section 11.5 on page 69and Section 13.4 on page 93

4. Figures for bandgap characterization added, Figure 29-34 on page 349, Figure 29-81 on page374, Figure 29-128 on page 399, Figure 29-175 on page 424, Figure 29-222 on page 449, Fig-ure 29-269 on page 474, Figure 29-316 on page 499 and Figure 29-363 on page 523.

5. Updated ”Packaging Information” on page 546 by replacing 28M1 with a correct correspondingpackage.

1. New datasheet 8271 with merged information for ATmega48PA, ATmega88PA,ATmega168PA and ATmega48A, ATmega88A andATmega168A. Also includedinformation on ATmega328 and ATmega328P

2 Changes done:

– New devices added: ATmega48A/ATmega88A/ATmega168A and ATmega328

– Updated Feature Description

– Updated Table 2-1 on page 6

– Added note for BOD Disable on page 40.

– Added note on BOD and BODSE in ”MCUCR – MCU Control Register” on page 93 and ”Register Description” on page 294

– Added limitation informatin for the application ”Boot Loader Support – Read-While-Write Self-Programming” on page 279

– Added limitiation information for ”Program And Data Memory Lock Bits” on page 296

– Added specified DC characteristice per processor

– Added typical characteristics per processor

– Removed execption information in ”Address Match Unit” on page 223.

318271BS–AVR–04/10 Universitas Sumatera Utara

Page 111: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

Headquarters International

Atmel Corporation2325 Orchard ParkwaySan Jose, CA 95131USATel: 1(408) 441-0311Fax: 1(408) 487-2600

Atmel AsiaUnit 1-5 & 16, 19/FBEA Tower, Millennium City 5418 Kwun Tong RoadKwun Tong, KowloonHong KongTel: (852) 2245-6100Fax: (852) 2722-1369

Atmel EuropeLe Krebs8, Rue Jean-Pierre TimbaudBP 30978054 Saint-Quentin-en-Yvelines CedexFranceTel: (33) 1-30-60-70-00 Fax: (33) 1-30-60-71-11

Atmel Japan9F, Tonetsu Shinkawa Bldg.1-24-8 ShinkawaChuo-ku, Tokyo 104-0033JapanTel: (81) 3-3523-3551Fax: (81) 3-3523-7581

Product Contact

Web Sitewww.atmel.com

Technical [email protected]

Sales Contactwww.atmel.com/contacts

Literature Requestswww.atmel.com/literature

Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to anyintellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDI-TIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORYWARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULARPURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDEN-TAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OFTHE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes norepresentations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specificationsand product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically providedotherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel’s products are not intended, authorized, or warranted for useas components in applications intended to support or sustain life.

© 2010 Atmel Corporation. All rights reserved. Atmel®, Atmel logo and combinations thereof, AVR®, AVR® logo and others are registered trade-marks or trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others.

8271BS–AVR–04/10Universitas Sumatera Utara

Page 112: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

DATA SHEET HYGROMETER THERMOMETER HTC-2

Isi Paket:

1Unit HTC-2

1Pcs 1,5V Batery AAA

1Pcs Manual Book SKU: htc2Category: Hygrometer

DESCRIPTION

ADDITIONAL INFORMATION

Hygrometer Thermometer HTC-2 merupakan sebuah alat yang digunakan untuk

mengukur suhu dan juga kelembaban suatu ruangan. tidak hanya suhu di dalam ruangan

saja, HTC-2 juga dapat digunakan untuk mengukur suhu di luar ruangan karena untuk tipe

HTC-2 sudah dilengkapi dengan sensor kabel dengan panjang 1,5M yang dapat

diletakkan di bagian lain dari alat ini.

Selain dapat mengukur suhu dan kelembapan di dalam maupun di luar ruangan, HTC-2

juga dapat digunakan sebagai penjadwal kegiatan harian anda karena telah dilengkapi

dengan display jam serta juga fungsi alarm.

HTC-2 bias digunakan oleh perkantoran, sekolah, industri, peternakan dan lainnya yang

memerlukan pemantauan suhu serta juga kelembaban di suatu ruangan.

Fitur :

1. Display Besar dengan 3 baris yang memisahkan antara hasil pengukuran luar dan dalam ruangan serta juga jam

2. Dapat mengubah suhu dari C ke F 3. Format jam 12/24 dalam sehari 4. Dapat di setting berbunyi setiap jam 5. Memiliki fitur Alarm yang hanya sekali setting dan akan berbunyi setiap hari 6. Terdapat fungsi menampilkan Suhu Max dan Min.

Spesifikasi :

Jarak Pengukuran Suhu : -50 °C ~ 70 °C (-58 °F ~ 158 °F) Keakurasian Suhu : ±1 °C (1,8 °F) Resolusi Suhu : 0,1 °C (0,2 °F) Jarak Pengukuran kelembapan : 10 % RH ~ 99 % RH

Universitas Sumatera Utara

Page 113: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

Keakurasian Pengukuran Kelembapan : ± 5% RH Resolusi Kelembapan : 1 % Daya : 1,5V AAA Baterai

Fungsi Tombol :

LOKASI NAMA KETERANGAN

DEPAN

MODE

Digunakan untuk memindahkan jam sesuai dengan saat ini dan juga untuk mengatur alarm. serta juga mengubah sistem tanggal dan waktu 12 / 24 jam sehari.

ADJ Digunakan untuk menyesuaikan atau mengatur nilai dari penyetingan

MEMORI

1. Untuk menampilkan hasil pengukuran suhu dan kelembapan MIN dan MAX saat pengukuran.

2. Menghapus hasil data MAX dan MIN

3. Memindahkan suhu dari Celcius ke

Fahrenheit

BELAKANG RESET Untuk menghapus semua pengaturan yang telah ada dan dikembalikan ke pengaturan pabrikan

Cara Penggunaan :

1. Buka tempat baterai dan pasangkan baterai dan pastikan sesuai dengan kutupnya. 2. Setelah baterai di pasang dan layar sudah menyala, Hygrometer Thermometer

HTC-2 sudah siap untuk digunakan. 3. Tekan mode selama 2 detik untuk melakukan penyesuaian nilai dari jam saat ini.

Setelah itu tekan tombol ADJ untuk melakukan pengaturan menit dan tekantombol MODE untuk mengarahkan ke pengaturan tanggal dan format jam.

4. Saat berada di mode jam, tekan MODE untuk memindahkan ke penyetelan alarm. Dan setelah itu tekan SDJ untuk mengubah alarm.

5. Tekan MEMORI untuk melihat suhu dan kelembaban MIN dan MAX yang sudah tersimpan di memori HTC-2.

6. Untuk menghapus memori yang sudah tersimpan, tekan selama 2 detik tombol MEMORI.

Peringatan :

1. Lakukan RESET ketika hasil pengukuran dari Hygrometer Thermometer Sudah tidak sesuai

2. Lakukan RESET juka ketika pertama kali penggunaan dan juga saat penggantian baterai.

Universitas Sumatera Utara

Page 114: RANCANG BANGUN MONITORING ALAT UKUR SUHU, …

Universitas Sumatera Utara