Post on 25-Mar-2019
i
APLIKASI SISTEM KENDALI PADA PENETAS TELUR
BURUNG KENARI SECARA OTOMATIS
TUGAS AKHIR
KARYA TULIS INI DIAJUKAN SEBAGAI SALAH SATU
SYARAT UNTUK MEMPEROLEH GELAR AHLI MADYA DARI
POLITEKNIK NEGERI BALIKPAPAN
STEFANUS KRISTIAJI
140309247893
POLITEKNIK NEGERI BALIKPAPAN
JURUSAN TEKNIK ELEKTRONIKA
2017
ii
LEMBAR PENGESAHAN
APLIKASI SISTEM KENDALI PADA PENETAS TELUR
BURUNG KENARI SECARA OTOMATIS
Diajukan oleh
STEFANUS KRISTIAJI
140309247893
Dosen Pembimbing 1 Dosen Pembimbing 2
Hilmansyah, ST., MT. Saiful Ghozi, S.Pd., M.Pd.
NIP : 1976082020210011013 NIP: 198105032014041001
Dosen Penguji 1 Dosen Penguji 2
Nur Yanti, S.T., M.T. Fathur Zaini R., ST.,MT.
NIP: 197611292007012020 NIP : 198508252014041002
Mengetahui,
Ketua Jurusan Teknik Elektronika
Drs. Suhaedi M.
iii
SURAT PERNYATAAN
Yang bertanda tangan di bawah ini:
Nama : Stefanus Kristiaji
Tempat/Tgl Lahir : Pati, 01 Agustus 1996
NIM : 140309247893
Menyatakan bahwa tugas akhir yang berjudul “APLIKASI SISTEM KENDALI
PADA PENETAS TELUR BURUNG KENARI SECARA OTOMATIS” adalah
bukan merupakan hasil karya tulisan orang lain, kecuali kutipan yang penulisan
cantumkan sumbernya.
Demikian pernyataan kami buat dengan sebenar-benarnya dan apabila ada
kekeliruan dengan pernyataan ini bisa dibicarakan kedepannya. Terima kasih.
Balikpapan, 28 Juli 2017
Mahasiswa,
Stefanus Kristiaji
NIM : 140309247893
iv
SURAT PERNYATAAN PERSETUJUAN
PUBLIKASI KARYA ILMIAH KEPENTINGAN AKADEMIS
Sebagai civitas akademis Politeknik Negeri Balikpapan, saya yang bertanda
tangan di bawah ini:
Nama : Stefanus Kristiaji
NIM : 140309247893
Program Studi : Teknik Elektronika
Judul TA : Aplikasi sistem kendali pada penetas telur bururng kenari
secara otomatis.
Demi pengembangan ilmu pengetahuan, saya menyetujui untuk memberikan
hak kepada Politeknik Negeri Balikpapan untuk menyimpan, mangalik media atau
format-kan, mengelola dalam bentuk pangkalan data (database), merawat dan
mempublikasikan tugas akhir saya selama tetap mencantumkan nama saya sebagai
penulis/pencipta.
Dibuat di : Balikpapan
Pada Tanggal : 07 Juli 2017
Yang menyatakan:
Stefanus Kristiaji
NIM : 140309247893
v
Tugas Akhir ini kupersembahkan
Kepada Ayah dan Ibu Terkasih
Bpk.Sudiarso dan Ibu Suratmi
Saudaraku yang kusayangi
Bernando Cahya Krisanda
Teruntuk teman – teman seperjuangan sekaligus keluarga
3 TE 1 angkatan 2014
vi
ABSTRACT
For hatching the canary eggs are generally done manually. In manual hatching of
canary eggs is usually a lot of failure due to lack of temperature and humidity are not
stable. For that we try to create a tool so that breeders can easily monitor the canary's
eggs according to the temperature and humidity specified. Temperature and humidity
will be displayed on the LCD. To measure the temperature and humidity used DHT
11 sensor.
Keywords: Egg canary, dht sensor 11, LCD
vii
ABSTRAK
Untuk penetasan telur burung kenari umumnya dilakukan secara manual. Pada
penetasan telur burung kenari secara manual biasanya banyak terjadi kegagalan
karena kurangnya suhu dan kelembaban yang tidak stabil. Untuk itu kami mencoba
menciptakan suatu alat sehingga peternak bisa dengan mudah memantau telur burung
kenari sesuai suhu dan kelembaban yang ditentukan. Suhu dan kelembaban akan
ditampilkan pada LCD. Untuk mengukur suhu dan kelembaban digunakan sensor
DHT 11.
Kata kunci : Telur burung kenari, sensor dht 11, LCD
viii
KATA PENGANTAR
Puji syukur kehadirat Tuhan Yang Maha Esa, karena berkat atas rahmat-Nya
penulis dapat menyelesaikan kegiatan Praktek Kerja Lapangan dan menyusun laporan
Tugas Akhir tepat waktu dan tanpa adanya halangan yang berarti. Laporan Tugas
Akhir ini disusun berdasarkan apa yang telah penulis lakukan pada saat mengerjakan
suatu alat. Laporan Tugas Akhir ini merupakan salah syarat wajib yang harus
ditempuh dalam jurusan Teknik Elektronika. Selain untuk menuntaskan jurusan yang
penulis tempuh, Laporan Tugas Akhir ini banyak memberikan manfaat kepada
penulis baik dari segi hardskill maupun softskill.
Penulisan laporan ini didasarkan pada observasi di lapangan, diskusi dengan
pembimbing dan kajian pustaka yang dilakukan selama melakukan pengerjaan
Laporan Tugas Akhir. Dengan ini, penulis juga menyampaikan terima kasih kepada :
1. Tuhan Yang Maha Esa. karena telah memberikan kelancaran, keberkahan,
dan keselamatan selama pembuatan laporan Tugas Akhir.
2. Orang tua dan keluarga yang telah memberikan dukungan baik materil
maupun spiritual.
3. Bapak Drs. Suhaedi, M.T., selaku Ketua Jurusan Teknik Elektronika
Politeknik Negeri Balikpapan.
4. Bapak Hilmansyah, S.T., M.T., selaku Dosen Pembimbing 1 di jurusan
Teknik Elektronika Industri Politeknik Negeri Balikpapan yang telah
meluangkan waktunya untuk membimbing penulis.
5. Bapak Saiful Ghozi, S.Pd., M.Pd., selaku Dosen Pembimbing 2 di jurusan
Teknik Elektronika Industri Politeknik Negeri Balikpapan yang telah
meluangkan waktunya untuk membimbing penulis.
6. Bapak Ramli,S.E.,M.M selaku Wali Dosen penulis di jurusan Teknik
Elektronika Industri Politeknik Negeri Balikpapan yang telah meluangkan
waktunya untuk membimbing penulis.
ix
7. Mbak Erna dan Mbak Desi yang telah membantu urusan administrasi
penulis di Jurusan Teknik Elektronika Politeknik Negeri Balikpapan.
8. Rekan-rekan mahasiswa jurusan Teknik Elektronika Industri yang sudah
memberikan semangat kepada penulis dan pihak-pihak lain yang belum
dapat penulis sebutkan satu persatu.
Laporan ini merupakan tulisan yang dibuat berdasarkan hasil pengerjaan
Tugas Akhir. Tentu ada kelemahan dalam teknik pelaksanaan maupan tata penulisan
laporan ini. Maka saran-saran dari pembaca dibutuhkan dalam tujuan menemukan
referensi untuk peningkatan mutu dari laporan serupa dimasa mendatang. Akhir kata,
selamat membaca dan terima kasih.
Balikpapan, 7 Juli 2017
Stefanus Kristiaji
x
DAFTAR ISI
Halaman
HALAMAN JUDUL .......................................................................................... i
LEMBAR PENGESAHAN ................................................................................ ii
SURAT PERNYATAAN ..................................................................................iii
SURAT PERNYATAAN PERSETUJUAN PUBLIKASI ............................... iv
SURAT PERSEMBAHAN ................................................................................ v
ABSTRACT........................................................................................................ vi
ABSTRAK ........................................................................................................ vii
KATA PENGANTAR ..................................................................................... viii
DAFTAR ISI ...................................................................................................... x
DAFTAR GAMBAR ...................................................................................... xii
DAFTAR TABEL ........................................................................................... xiv
BAB I PENDAHULUAN
1.1 Latar Belakang ............................................................................................... 1
1.2 Rumusan Masalah .......................................................................................... 4
1.3 Batasan Masalah ............................................................................................ 4
1.4 Tujuan Penelitian ........................................................................................... 4
1.5 Manfaat Penelitian ......................................................................................... 5
BAB II LANDASAN TEORI
2.1 Arduino .......................................................................................................... 6
2.1.1 Arduino Uno R3 .......................................................................................... 7
2.1.2 Arduino Development Environment ............................................................. 8
2.2 Trafo Step Down ......................................................................................... 9
2.2.1 Prinsip KerjaTransformator ....................................................................... 10
2.3 Sensor DHT 11 ......................................................................................... 12
2.4 LCD (Liquid Cristal Display) .................................................................... 12
2.5 Motor Servo .............................................................................................. 14
2.6 Lampu AC ................................................................................................ 17
xi
2.7 Kipas DC .................................................................................................. 18
BAB III PERANCANGAN
3.1 Tempat dan Waktu ....................................................................................... 19
3.2 Peralatan dan Bahan yang digunakan ........................................................... 19
3.3 Proses Penelitian .......................................................................................... 20
3.4 Blok Diagram Sistem ................................................................................... 21
3.5 Perancangan Unjuk Kerja Alat ..................................................................... 22
3.6 Rancangan Penetas Telur Burung Secara Otomatis ....................................... 23
3.6.1 Rancangan Mekanik .................................................................................. 23
3.6.2 Rancangan Elektronik ............................................................................... 24
3.7 Program Sensor DHT 11 .............................................................................. 25
BAB IV HASIL DAN PEMBAHASAN
4.1 Pengujian Motor Servo ................................................................................ 27
4.1.1 Pemrograman Motor Servo ....................................................................... 28
4.2 Pengujian RTC ( real time clock ) ................................................................ 29
4.3 Pengujian LCD ............................................................................................ 30
4.4 Pengujian Lampu, Kipas DC dan Sensor DHT 11 ........................................ 30
BAB V PENUTUP
5.1 Kesimpulan .................................................................................................. 32
5.2 Saran ............................................................................................................ 32
DAFTAR PUSTAKA ...........................................................................................
LAMPIRAN .........................................................................................................
xii
DAFTAR GAMBAR
Gambar 2.1 Blok Diagram Arduino Board ............................................................. 7
Gambar 2.2 Bentuk Fisik Arduino Uno.................................................................... 8
Gambar 2.3 Arduino Development Environment ...................................................... 9
Gambar 2.4 Trafo Step Down .................................................................................. 10
Gambar 2.5 Skema Transformator ........................................................................... 10
Gambar 2.6 Persamaan dan Rumus Transformator .................................................. 11
Gambar 2.7 Sensor DHT 11 .................................................................................... 12
Gambar 2.8 Bentuk liquid crystal display ................................................................ 13
Gambar 2.9 Motor Servo ......................................................................................... 15
Gambar 2.10 Motor Servo 180o ............................................................................... 16
Gambar 2.11 Komponen Motor Servo ..................................................................... 16
Gambar 3.1 Flowchart Perancangan dan Pengujian ................................................. 21
Gambar 3.2 Blok diagram alat penetas telur burung kenari ...................................... 21
Gambar 3.3 Flowchart unjuk kerja alat ................................................................... 22
Gambar 3.4 Flowchart alur program ....................................................................... 23
Gambar 3.5 Rancangan alat..................................................................................... 23
Gambar 3.6 Peletakan sensor dht 11 pada alat ......................................................... 24
Gambar 3.7 Flowchart sensor dht 11 ....................................................................... 25
Gambar 3.8 Program sensor dht 11 ......................................................................... 26
Gambar 4.1 Pengujian Servo ................................................................................... 26
Gambar 4.2 Kondisi Servo saat pengujian ............................................................... 28
Gambar 4.3 Program motor servo pada arduino....................................................... 28
Gambar 4.4 Pengujian RTC ( real time clock ) ........................................................ 29
Gambar 4.5 Pengujian LCD (liquid crystal display) ................................................ 30
Gambar 4.6 Program LCD (liquid crystal display) .................................................. 30
Gambar 4.7 Suhu meningkat saat lampu menyala.................................................... 30
xiii
Gambar 4.8 Suhu menurun saat lampu mati ............................................................ 31
xiv
DAFTAR TABEL
Tabel 3.1 Daftar Alat .............................................................................................. 19
Tabel 3.2 Daftar Bahan ........................................................................................... 19
Tabel 3.3 Daftar Komponen .................................................................................... 20
Tabel 4.1 Pembacaan motor servo ........................................................................... 20
1
BAB I
PENDAHULUAN
1.1. Latar Belakang
Burung kenari (Serinus Canaria) merupakan salah satu jenis hewan
peliharaan yang sangat populer di kalangan pecinta burung. Jenis hewan
peliharaan ini berasala dari Kepulauan Canary di Samudra Atlantik, sebelah barat
laut pesisir Afrika (Maroko dan Sahara Barat). Kepulauan ini berada dalam
wilayah negara Spanyol. Burung kenari pertama kali ditemukan oleh penjelajah
Perancis bernama De Bethencourt di kepulauan Canary pada tahun 1402. Karena
burung kenari memiliki bulu yang sangat indah dan kemerduan suara yang
memukau, akhirnya Jean de Bethencourt dan Henry membawa burung kenari liar
ke Portugal dan Inggris. Di tahun 1495, burung kenari jatuh ke tangan Spanyol
dan sejak saat itu Negara Spanyol menguasai perdagangan burung kenari. Namun
selanjutnya bangsa Italia yang mengembangkan kenari dan mengekspornya ke
berbagai negara Eropa seperti Jerman, Inggris dan Rusia.
Persilangan ini bisa terjadi secara alami ataupun buatan. Adapun tujuan
persilangan buatan yang dilakukan oleh peminat burung kenari adalah untuk
menghasilkan keturunan yang baik yang mampu memaksimalkan warna, postur
ataupun suara burung kenari. Adanya persilangan baik yang terjadi secara alami
ataupun buatan, serta adanya pengaruh kondisi alam yang terjadi kurang lebih
selama 20 abad yang lalu menyebabkan burung kenari ini dklasifikasikan menjadi
beberapa varietas. Menurut para ahli varietas burung kenari adalah sebagai
berikut:
1. Varietas lagu (Song Variety)
Merupakan jenis burung kenari yang dibudidaya untuk menghasilkan lagu
atau kicauan burung yang bagus. Kenari jenis ini tidak terlalu memperhatikan
masalah keindahan bulu.
2. Varietas warna (Colour bred variety)
Adalah jenis burung kenari yang dibudidaya dengan tujuan untuk
menghasilkan burung kenari yang memiliki keindahan warna buru dan sedikit
banyak mengabaikan keindahan kicauan burung kenari. Adapun varietas yang
terkenal untuk kenari jenis ini adalah rumah kenari dan reza kenari.
1
2
3. Varietas postur (Posture variety)
Burung kenari jenis ini dibudidaya untuk menghasilkan keturunan yang
memiiki postur tubuh sesuai dengan keiginan pengembang. Pengembangbiakan
kenari jenis ini sedikit memperhatikan masalah keindahan warna bulu dan sama
sekali tidak memperhatikan masalah suara burung kenari.
4. Varietas hibrid (The mule and hybrid canaries)
Merupakan kenari dari hasil persilangan burung kenari dan burung Finch
lainnya. Tujuannya adalah agar kenari yang dihasilkan memiliki sifat tertentu
yang menonjol sesuai dengan keinginan pengembangbiaknya. Keindahan warna,
lagu, postur atau kombinasi diantara tiga varietas kenari yang dijelaskan
sebelumnya bisa dijadikan sifat-sifat yang bisa ditonjolkan oleh si
pengembangbiaknya. Adapun contoh kenari dengan varietas ini adalah
kenari Yorkshire dan Blacktrouth.
5. Varietas Blasteran
Merupakan kenari hasil persilangan dari semua ragam varietas yang telah
dijelaskan sebelumnya, yang direkayasa bukan untuk tujuan khusus, malainkan
hanya untuk tujuan memenuhi hasrat si pengembang.
Penyebab kegagalan ternak kenari dalam dunia usaha, kegagalan adalah
sesuatu yang lumrah dialami oleh para pengusaha. Hal yang sama juga bisa terjadi
di dunia ternak, termasuk dunia ternak kenari. Ada banyak penyebab seseorang
mengalami kegagalan dalam berternak kenari. Kegagalan tersebut bisa terjadi di
semua kalangan, mulai dari peternak pemula hingga peternak berpengalaman.
Kegagalan ternak kenari tersebut bisa disebabkan oleh pelaku (peternak)
ataupun berasal dari sarana prasarana yang kurang mendukung. Nah, dalam artikel
ini, akan dibahas beberapa faktor penyebab kegagalan ternak kenari yang biasa
terjadi di kalangan peternak. Berikut faktor-faktor penyebabnya:
a. Kegagalan yang disebabkan oleh peternak
Kegagalan ternak kenari bisa disebabkan oleh peternak. Kurangnya
pemahaman peternak tentang tata cara pemangkaran bisa membuat proses
berternak kenari menjadi gagal. Beberapa permasalahan seperti salah dalam
pemberian pakan, kurang bisa menjaga kebersihan kandang, atau tidak segera
3
bertindak saat penyakit menyerang kenari bisa menjadi salah satu faktor
kenapa proses ternak kenari yang dilakukan peternak menjadi gagal.
Seharusnya permasalahan tersebut bisa dicegah dengan menambah
wawasan sebelum atau saat berternak kenari. Bisa bertanya pada peternak
yang sudah sukses, ikut dalam berbagai grup media sosial yang khusus
membahas kenari, atau membaca berbagai literatur tentang tata cara berternak
kenari yang benar.
b. Kegagalan ternak kenari yang disebabkan oleh lingkungan yang tidak
mendukung
Kegagalan ternak kenari juga bisa disebabkan oleh faktor lingkungan,
misalnya kondisi ruangan yang terlalu panas, atau terlalu banyak hewan
pengganggu. Beberapa faktor pemicu kegagalan tersebut diantaranya adalah:
Pertama faktor cuaca. Faktor cuaca yang terlalu dingin atau terlalu panas
bisa membuat usaha ternak kenari mengalami kegagalan. Jika suhu ruangan
terlalu panas, indukan akan sering meninggalkan sarang untuk mendinginkan
tubuhnya. Hal ini membuat telur kenari tidak dierami, sehingga akibatnya
telur tersebut tidak mau menetas. Sedangkan jika suhu terlalu dingin, indukan
kenari akan malas turun dari sarang untuk makan atau minum. Hal ini bisa
membahayakan kondisi tubuh sang indukan. Oleh karena itu, agar ternak
kenari berjalan sukses, sangat disarankan anda menyediakan lingkungan
dengan suhu ideal, sekitar 34° - 37° C (Irfan Muhamad (2011)
“PERANCANGAN SISTEM PENGERAM TELUR AYAM OTOMATIS”,
Jurnal Computer Engineering Department, Faculty of Engineering, Binus
University Jakarta Barat).
Kedua, faktor hembusan angin. Hembusan angin yang terlalu kencang bisa
menurunkan kondisi kesehatan indukan kenari karena mengundang datangnya
penyakit, seperti masuk angin, atau membuat kandang menjadi lembab jika
disertai air.
Ketiga, gangguan hewan predator. Hewan-hewan predator seperti semut,
tikus, dan kucing bisa mengganggu proses ternak kenari. Gangguan-gangguan
4
tersebut bisa membuat kenari stres atau bahkan menyebabkan kematian. Hal
ini bisa menyebabkan kegagalan ternak kenari.
Keempat, lingkungan yang terlalu ramai. Sebisa mungkin letakkan
kandang kenari di tempat yang aman dan tenang dari keramaian. Peletakan
kandang di lokasi yang terlalu bising atau terlalu sering dilewati orang bisa
membuat kenari menjadi stres dan akhirnya, proses ternak kenari menjadi
terganggu.
c. Kegagalan yang disebabkan karena sarana dan prasarana yang kurang
mendukung
Kondisi sarana prasarana yang memadai diperlukan agar proses ternak
kenari berjalan sukses. Sarana yang perlu diperhatikan adalah kandang,
lingkungan sekitar kandang, serta perlengkapan kandang.
1.2. Rumusan Masalah
Rumusan masalah pada penelitian tugas akhir ini adalah:
1. Bagaimana rancangan pengaplikasian DHT 11 pada penetas telur
burung kenari secara otomatis?
2. Bagaimana unjuk kerja pengaplikasia DHT 11 pada penetas telur
burung kenari secara otomatis?
1.3. Batasan Masalah
Batasan masalah yang telah ditentukan agar tidak menyimpang dari
spesifikasi adalah :
1. Penggunaan mikrokontroller Arduino Uno R3 sebagai pengendali,
DHT 11, motor servo dan kipas.
2. Menggunakan motor servo, DHT 11.
1.4. Tujuan Penelitian
Tujuan dilaksanakannya penelitian tugas akhir ini adalah:
1. Membantu peternak dalam budidaya burung kenari.
2. Meningkatkan hasil tetas telur burung kenari.
3. Membuat prototype pengaplikasian DHT 11 pada penetas telur burung
kenari secara otomatis.
5
4. Mengetahui unjuk kerja pengaplikasian DHT 11 pada penetas telur
burung kenari secara otomatis.
1.5. Manfaat Penelitian
Manfaat dilaksanakannya penelitian tugas akhir ini adalah:
1. Memudahkan manusia dalam budidaya burung kenari.
2. Meminimalisir kegagalan pada penetasan telur burung kenari.
6
BAB II
LANDASAN TEORI
2.1 Arduino
Arduino adalah platform pembuatan prototipe elektronik yang bersifat
open-source hardware yang berdasarkan pada perangkat keras dan perangkat
lunak yang fleksibel dan mudah digunakan. Arduino ditujukan bagi para
seniman, desainer, dan siapapun yang tertarik dalam menciptakan objek atau
lingkungan yang interaktif.
Arduino pada awalnya dikembangkan di Ivrea, Italia. Nama Arduino
adalah sebuah nama maskulin yang berarti teman yang kuat. Platform Arduino
terdiri dari Arduino board, Shield, bahasa pemrograman Arduino, dan Arduino
Development Environment. Arduino board biasanya memiliki sebuah chip
dasar mikrokontroler Atmel AVR ATmega8 (berikut turunannya).
Chip mikrokontroler itu sendiri adalah IC (integrated circuit) yang bisa
diprogram menggunakan komputer. Tujuan menanamkan program pada
mikrokontroler tersebut adalah agar rangkaian elektronik dapat membaca input,
memproses input tersebut dan kemudian menghasilkan output sesuai yang
diinginkan. Jadi, mikrokontroler disana bertugas sebagai “otak” yang
mengendalikan input, proses dan, output sebuah rangkaian elektronik.
Blok diagram Arduino board yang sudah disederhanakan dapat dilihat
pada Gambar 2.10. Shield adalah sebuah board yang dapat dipasang diatas
Arduino board untuk menambah kemampuan dari Arduino board itu sendiri.
Bahasa pemrograman Arduino adalah bahasa pemrograman yang umum
digunakan untuk membuat perangkat lunak yang ditanamkan pada Arduino
board. Bahasa pemrograman Arduino mirip dengan bahasa pemrograman C++.
6
7
Gambar 2.1 Blok Diagram Arduino Board
Sumber : USU Institutional Repository SP-Electrical Engineering
2.1.1. Arduino uno
Arduino uno adalah Arduino board yang menggunakan mikrokontroler
ATmega328. Arduino uno memiliki 14 pin digital (6 pin dapat digunakan
sebagai output PWM), 6 input analog, sebuah 16 MHz osilator kristal, sebuah
koneksi USB, sebuah konektor sumber tegangan, sebuah header ICSP, dan
sebuah tombol reset. Arduino uno memuat segala hal yang dibutuhkan untuk
mendukung sebuah mikrokontroler. Hanya dengan menghubungkannya ke
sebuah komputer melalui USB atau memberikan tegangan DC dari baterai atau
adaptor AC ke DC sudah dapat membuatnya bekerja. Arduino uno
menggunakan ATmega16U2 yang diprogram sebagai USB-to-serial converter
untuk komunikasi serial ke komputer melalui port USB. Bentuk fisik dari
Arduino uno dapat dilihat pada Gambar
Adapun data teknis board Arduino uno R3 adalah sebagai berikut:
Mikrokontroler : ATmega328
Tegangan Operasi : 5V
Tegangan Input (recommended) : 7 - 12 V
Tegangan Input (limit) : 6-20 V
Pin Digital I/O : 14 (6 diantaranya pin PWM)
Pin Analog input : 6
8
Arus DC per pin I/O : 40 mA
Arus DC untuk pin 3.3 V : 150 Ma
Gambar 2.2. Bentuk Fisik Arduino Uno
Sumber : https://www.Arduino.cc/en/main/ArduinoBoardUno
2.1.2. Arduino Development Environment
Arduino Development Environment adalah perangkat lunak yang
digunakan untuk menulis dan meng-compile program untuk Arduino. Arduino
Development Environment juga digunakan untuk meng-upload program yang
sudah di-compile ke memori program Arduino board.
Arduino Development Environment terdiri dari editor teks untuk
menulis kode, sebuah area pesan, sebuah konsol, sebuah toolbar dengan
tombol-tombol untuk fungsi yang umum dan beberapa menu. Arduino
Development Environment terhubung ke Arduino board untuk meng-upload
program dan juga untuk berkomunikasi dengan Arduino board.
9
Gambar 2.3. Arduino Development Environment
Perangkat lunak yang ditulis menggunakan Arduino Development
Environment disebut sketch. Sketch ditulis pada editor teks. Sketch disimpan
dengan file berekstensi .ino. Area pesan memberikan informasi dan pesan error
ketika kita menyimpan atau membuka sketch. Konsol menampilkan output teks
dari Arduino Development Environment dan juga menampilkan pesan error
ketika kita meng-compile sketch. Pada sudut kanan bawah dari jendela Arduino
Development Environment menunjukkan jenis board dan serial port yang
sedang digunakan. Pada Gambar 2.12 adalah tampilan dari Arduino
Development Environment.
2.2. Trafo Step Down
Sebuah alat yang mentransfer energi antara 2 sirkuit yang melalui induksi
elektromagnetik. Transformer di mungkinkan untuk di gunakan sebagai
perubahan tegangan dengan mengubah tegangan sebuah arus bolak balik dari satu
tingkat tegangan ke tingkat tegangan lainnya dari input ke input alat tertentu,
untuk menyediakan kebutuhan yang berbeda dari sebuah tingkatan arus sebagai
sumber arus cadangan, atau bisa juga di gunakan untuk mencocokkan impedansi
antara sirkuit elektrik yang tidak sinkron untuk memaksimalkan pertukaran antara
2 sirkuit. Hal ini memungkinkan terjadinya pertambahan daya arus listrik yang
terjadi dari sebuah benda yang memiliki arus tegangan listrik yang tidak stabil.
10
Gambar 2.4. Trafo Step Down
Sumber : https://industri3601.wordpress.com/transformator-dan-sistem-distribusi-
daya
2.2.1. Prinsip Kerja Transformator
Prinsip kerja dari sebuah transformator adalah ketika kumparan primer
dihubungkan dengan sumber tegangan bolak-balik, perubahan arus listrik pada
kumparan primer menimbulkan medan magnet yang berubah. Medan magnet
yang berubah diperkuat oleh adanya inti besi dan dihantarkan inti besi ke
kumparan sekunder, sehingga pada ujung-ujung kumparan sekunder akan timbul
ggl induksi. Efek ini dinamakan induktansi timbal-balik (mutual inductance).
Pada skema transformator di bawah, ketika arus listrik dari sumber tegangan yang
mengalir pada kumparan primer berbalik arah (berubah polaritasnya) medan
magnet yang dihasilkan akan berubah arah sehingga arus listrik yang dihasilkan
pada kumparan sekunder akan berubah polaritasnya.
Gambar 2.5. Skema Transformator
11
Sumber : https://industri3601.wordpress.com/transformator-dan-sistem-
distribusi-daya
Hubungan antara tegangan primer, jumlah lilitan primer, tegangan
sekunder, dan jumlah lilitan sekunder, dapat dinyatakan dalam persamaan :
Gambar 2.6. Persamaan dan Rumus Transformator
Sumber : https://industri3601.wordpress.com/transformator-dan-sistem-distribusi-
daya
Berdasarkan perbandingan antara jumlah lilitan primer dan jumlah lilitan
skunder transformator ada dua jenis yaitu:
Vp= tegangan primer (volt)
Vs = tegangan sekunder (volt)
Np = jumlah lilitan primer
Ns = jumlah lilitan sekunde
Simbol Transformator :
1. Transformator step up yaitu transformator yang mengubah tegangan
bolak-balik rendah menjadi tinggi, transformator ini mempunyai jumlah
lilitan kumparan sekunder lebih banyak daripada jumlah lilitan primer (Ns
> Np).
2. Transformator step down yaitu transformator yang mengubah tegangan
bolak-balik tinggi menjadi rendah, transformator ini mempunyai jumlah
lilitan kumparan primer lebih banyak daripada jumlah lilitan sekunder (Np
> Ns).
12
2.3. Sensor DHT 11
DHT11 adalah sensor digital yang dapat mengukur suhu dan kelembaban
udara di sekitarnya. Sensor ini sangat mudah digunakan bersama dengan Arduino.
Memiliki tingkat stabilitas yang sangat baik serta fitur kalibrasi yang sangat
akurat. Koefisien kalibrasi disimpan dalam OTP program memory, sehingga
ketika internal sensor mendeteksi sesuatu, maka module ini menyertakan
koefisien tersebut dalam kalkulasinya. DHT11 termasuk sensor yang memiliki
kualitas terbaik, dinilai dari respon, pembacaan data yang cepat, dan kemampuan
anti-interference. Ukurannya yang kecil, dan dengan transmisi sinyal hingga 20
meter, membuat produk ini cocok digunakan untuk banyak aplikasi-aplikasi
pengukuran suhu dan kelembaban.
Spesifikasinya
Supply Voltage: +5 V
Temperature range : 0-50 °C error of ± 2 °C
Humidity : 20-90% RH ± 5% RH error
Interface : Digital
Gambar 2.7. Sensor DHT 11
Sumber : http://www.geraicerdas.com/sensor/temperature/dht11-sensor-suhu-dan-
kelembaban
2.4. LCD
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. LCD (Liquid Cristal
Display) berfungsi sebagai penampil data baik dalam bentuk karakter, huruf,
13
angka ataupun grafik. 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. Ketika elektro da
diaktifkan dengan medan listrik (tegangan), molekul organik yang panjang dan
silindris menyesuaikan diri dengan elektroda dari segmen. Lapisan sandwich
memiliki polarizer cahaya vertikal depan dan polarizer cahaya horisontal belakang
yang diikuti dengan lapisan reflektor. Cahaya yang dipantulkan tidak dapat
melewati molekul-molekul yang telah menyesuaikan diri dan segmen yang
diaktifkan terlihat menjadi gelap dan membentuk karakter data yang ingin
ditampilkan.
Gambar 2.8. Bentuk liquid crystal display
Sumber : http://elektronika-dasar.web.id/lcd-liquid-cristal-display
Dalam modul LCD (Liquid Cristal Display) terdapat microcontroller yang
berfungsi sebagai pengendali tampilan karakter LCD (Liquid Cristal Display).
Microntroller pada suatu LCD (Liquid Cristal Display) dilengkapi dengan memori
dan register. Memori yang digunakan microcontroler internal LCD adalah :
DDRAM (Display Data Random Access Memory) merupakan memori tempat
karakter yang akan ditampilkan berada.
CGRAM (Character Generator Random Access Memory) merupakan memori
untuk menggambarkan pola sebuah karakter dimana bentuk dari karakter dapat
diubah-ubah sesuai dengan keinginan.
CGROM (Character Generator Read Only Memory) merupakan memori untuk
menggambarkan pola sebuah karakter dimana pola tersebut merupakan karakter
dasar yang sudah ditentukan secara permanen oleh pabrikan pembuat LCD
(Liquid Cristal Display) tersebut sehingga pengguna tinggal mangambilnya sesuai
14
alamat memorinya dan tidak dapat merubah karakter dasar yang ada dalam
CGROM.
Pin, kaki atau jalur input dan kontrol dalam suatu LCD (Liquid Cristal Display)
diantaranya adalah :
Pin data adalah jalur untuk memberikan data karakter yang ingin
ditampilkan menggunakan LCD (Liquid Cristal Display) dapat
dihubungkan dengan bus data dari rangkaian lain seperti mikrokontroler
dengan lebar data 8 bit.
Pin RS (Register Select) berfungsi sebagai indikator atau yang
menentukan jenis data yang masuk, apakah data atau perintah. Logika low
menunjukan yang masuk adalah perintah, sedangkan logika high
menunjukan data.
Pin R/W (Read Write) berfungsi sebagai instruksi pada modul jika low
tulis data, sedangkan high baca data.
Pin E (Enable) digunakan untuk memegang data baik masuk atau keluar.
Pin VLCD berfungsi mengatur kecerahan tampilan (kontras) dimana pin
ini dihubungkan dengan trimpot 5 Kohm, jika tidak digunakan
dihubungkan ke ground, sedangkan tegangan catu daya ke LCD sebesar 5
Volt.
2.5. Motor Servo
Motor servo adalah sebuah motor DC dengan sistem umpan balik tertutup
di mana posisi rotornya akan diinformasikan kembali ke rangkaian kontrol yang
ada di dalam motor servo. Motor ini terdiri dari sebuah motor DC, serangkaian
gear, potensiometer, dan rangkaian kontrol. Potensiometer berfungsi untuk
menentukan batas sudut dari putaran servo. Sedangkan sudut dari sumbu motor
servo diatur berdasarkan lebar pulsa yang dikirim melalui kaki sinyal dari
kabel motor servo.
15
Gambar 2.9. Motor Servo
Sumber : http://zonaelektro.net/motor-servo
Keunggulan Motor Servo
Keunggulan dari penggunaan motor servo adalah :
Tidak bergetar dan tidak ber-resonansi saat beroperasi.
Daya yang dihasilkan sebanding dengan ukuran dan berat motor.
Penggunaan arus listik sebanding dengan beban yang diberikan.
Resolusi dan akurasi dapat diubah dengan hanya mengganti encoder yang
dipakai.
Tidak berisik saat beroperasi dengan kecepatan tinggi.
Kelemahan Motor Servo
Keunggulan dari penggunaan motor servo adalah :
Tidak bergetar dan tidak ber-resonansi saat beroperasi.
Daya yang dihasilkan sebanding dengan ukuran dan berat motor.
Penggunaan arus listik sebanding dengan beban yang diberikan.
Resolusi dan akurasi dapat diubah dengan hanya mengganti encoder yang
dipakai.
Tidak berisik saat beroperasi dengan kecepatan tinggi.
Aplikasi Motor Servo
Motor servo dapat dimanfaatkan pada pembuatan robot, salah satunya
sebagai penggerak kaki robot. Motor servo dipilih sebagai penggerak pada kaki
robot karena motor servo memiliki tenaga atau torsi yang besar, sehingga dapat
16
menggerakan kaki robot dengan beban yang cukup berat. Pada umumnya motor
servo yang digunakan sebagai pengerak pada robot adalah motor servo 180o.
Gambar 2.10. Motor Servo 180o
Sumber : http://zonaelektro.net/motor-servo
Komponen Penyusun Motor Servo
Motor servo pada dasarnya dibuat menggunakan motor DC yang
dilengkapi dengan controler dan sensor posisi sehingga dapat memiliki gerakan
0o, 90o, 180o atau 360o. Berikut adalah komponen internal sebuah motor servo
180o.
Gambar 2.11. Komponen Motor Servo
Sumberr : http://zonaelektro.net/motor-servo
Tiap komponen pada motor servo diatas masing-masing memiliki fungsi sebagai
controler, driver, sensor, girbox dan aktuator. Pada gambar diatas terlihat
beberapa bagian komponen motor servo. Motor pada sebuah motor servo
adalah motor DC yang dikendalikan oleh bagian controler, kemudian komponen
17
yang berfungsi sebagai sensor adalah potensiometer yang terhubung pada sistem
girbox pada motor servo.
Cara Mengendalikan Motor Servo
Untuk menjalankan atau mengendalikan motor servo berbeda dengan
motor DC. Karena untuk mengedalikan motor servo perlu diberikan sumber
tegangan dan sinyal kontrol. Besarnya sumber tegangan tergantyung dari
spesifikasi motor servo yang digunakan. Sedangkan untuk mengendalikan putaran
motor servo dilakukan dengan mengirimkan pulsa kontrol dengan frekuensi 5o Hz
dengan periode 20ms dan duty cycle yang berbeda. Dimana untuk menggerakan
motor servo sebesar 90o diperlukan pulsa dengan ton duty cycle pulsa posistif
1,5ms dan unjtuk bergerak sebesar 180o diperlukan lebar pulsa 2ms. Berikut
bentuk pulsa kontrol motor servo dimaksud.
2.6. Lampu AC
Lampu AC adalah sumber cahaya buatan yang dihasilkan melalui
penyaluran arus listrik melalui filamen yang kemudian memanas dan
menghasilkan cahaya. Kaca yang menyelubungi filamen panas tersebut
menghalangi udara untuk berhubungan dengannya sehingga filamen tidak akan
langsung rusak akibat teroksidasi.
Lampu pijar dipasarkan dalam berbagai macam bentuk dan tersedia untuk
tegangan (voltase) kerja yang bervariasi dari mulai 1,25 volt hingga 300 volt.
Energi listrik yang diperlukan lampu AC untuk menghasilkan cahaya yang terang
lebih besar dibandingkan dengan sumber cahaya buatan lainnya seperti lampu
pendar dan diode cahaya, maka secara bertahap pada beberapa negara peredaran
lampu pijar mulai dibatasi.
Di samping memanfaatkan cahaya yang dihasilkan, beberapa penggunaan
lampu pijar lebih memanfaatkan panas yang dihasilkan, contohnya adalah
pemanas kandang ayam, dan pemanas inframerah dalam proses pemanasan di
bidang industri.
18
2.7. Kipas DC
Kipas adalah suatu alat yang mampu menjaga suatu komponen agar tidak
memiliki panas berlebih yang diakibatkan pemakaian yang terlalu lama. Biasa
digunakan pada CPU atau Laptop.
19
BAB III
PERANCANGAN
3.1. Tempat dan Waktu
Tempat Tugas Akhir dilaksanakan dilab sistem kendali gedung elektronika
Politeknik Negeri Balikpapan, Jalan Soekarno Hatta Km 8 Balikpapan dan di
tempat tinggal penulis, Jalan Giri Rejoo Km 15 Rt 30 Karang Joang Balikpapan
Utara. Waktu Penelitian dimulai tanggal 1 mei 2017 sampai dengan 11 juni 2017.
3.2. Peralatan dan Bahan yang digunakan
Tugas Akhir ini tentang implementasi penetas telur burung kenari secara
Otomatis, dalam pengerjaan alat membutuhkan peralatan dan bahan sebagai
berikut :
Tabel 3.1 Daftar Alat
No Nama Alat Spesifikasi Jumlah
1 Obeng Plus (+) 1 Buah
2 Bor Listrik PCB 1 Buah
3 Tang Kombinasi 1 Buah
4 Tang Potong 1 Buah
5 Gergaji Besi 1 Buah
6 Multimeter Digital 1 Buah
7 Meteran - 1 Buah
8 Solder Listrik - 1 Buah
Tabel 3.2 Daftar Bahan
No Nama Bahan Spesifikasi Jumlah
1 Mika 10 mm 4 Buah
2 Baut 3mm x 1.5 cm 16 Buah
3 Nut Baut 3 mm 16 Buah
4 Ring 3 mm 16 Buah
19
20
5 Mata Bor 3.5 mm 1 Buah
6 Jumper - 1 pcs
7 Amplas No. 800 2 Buah
8 Kabel Male 1 pcs
9 Kabel Female 1 pcs
10 Cable ties - 1 pcs
11 Timah solder - 1 roll
12 Lampu Pijar 5 Watt 2 Buah
13 Kipas 4 cm x 4 cm 1 Buah
Tabel 3.3 Daftar komponen
No Nama Komponen Spesifikasi Jumlah
1 Arduino Uno R3 Atmega 328 1 Buah
2 Sensor Suhu dan Kelembaban DHT 11 1 Buah
3 LCD - 1 Buah
4 Motor Servo - 1 Buah
5 Trafo Step Down 220 V to 5 V 1 Buah
3.3. Proses Penelitian
Gambar 3.1. Flowchart Perancangan dan Pengujian
21
Diagram alir rancangan adalah tahapan atau perencanaan dari
perancangan. Tahapan awal adalah perancangan penelitian alat-alat yang
digunakan. Langkah selanjutnya adalah perancangan sistem kerja alat yang
digunakan terhadap hardware dan software yang telah di rancang. Kemudian
dilanjutkan dengan pembuatan rangkaian alat. Untuk pembuatan listing program
dilakukan hingga berhasil, ketika berhasil di lanjutkan dengan melakukan
pengujian rangkaian alat satu per satu. Ketika pengujian berhasil dilakukan
dengan pengoprasian alat sehingga alat dapat beroprasi dan digunakan dengan
sempurna. Dapat dilihat pada Gambar 3.1.
3.4. Blok Diagram System
Pada alat penetas telur burung kenari secara otomatis akan dibuat mempunyai
inputan berupa sensor DHT 11 untuk menditeksi suhu panas dan kelembaban,
serta menggunakan output berupa LCD, kipas, lampu dan motor servo yang akan
dikendalikan oleh Arduino Uno R3. Berikut Blok Diagram dapat di lihat pada
gambar 3.2
Gambar 3.2. Blok diagram alat penetas telur burung kenari
Dari diagram perancangan system alat penetas telur burung kenari secara otomatis
cara kerja dari alat tersebut yaitu :
1. Sensor DHT 11 menjadi inputan untuk menditeksi suhu panas dan
kelembaban pada alat.
2. Penggunaan Arduino Uno R3 untuk mengendalikan Relay, RTC dan
Motor Servo
22
3. Relay berfungsi sebagai saklar untuk dua outputan yaitu Lampu dan Kipas
4. RTC berfungsi untuk waktu dan sebagai pemanggil kerja motor servo.
5. LCD berfungsi untuk menampilkan besaran suhu dan kelembaban didalam
alat.
6. Motor servo berfungsi untuk menggerakan rak telur sesuai waktu dan
kecepatan yang telah ditentukan.
7. Lampu berfungsi sebagai Pemanas pada alat.
8. Kipas berfungsi sebagai penurun suhu panas pada alat
3.5 Perancangan Unjuk Kerja Alat
Dibawah ini merupakan gambar flowchart unjuk kerja alat penetas telur
burung kenari secara otomatis sesuai program yang telah dibuat.
Gambar 3.3. Flowchart unjuk kerja alat
Pembuatan diagram alir memiliki fungsi sebagai berikut :
23
1. Start dan inisialisasi inpitan yang akan dipakai.
2. Setelah melakukan inisialisasi telur akan dimasukan kedalam rak didalam
alat, sensor akan menditeksi suhu panas didalam alat penetas telur burung
kenari secara otomatis.
3. RTC memanggil program motor servo /3jam sekali.
4. Servo ON dan menggerakan rak telur
5. Masuk kedalam percabangan jika suhu <= 34oC , jika Ya Relay NC
kondisi (High) output Lampu akan menyala dan Kipas akan mati.
6. Masuk kedalam percabangan jika suhu >= 37oC , jika Ya Relay NC
kondisi (Low) output Lampu akan mati dan Kipas akan menyala, dan terus
mengulang
Gambar 3.4 Flowchart alur program
24
3.6 Rancangan Penetas Telur Burung Secara Otomatis
Dalam pembuatan alat penetas telur otomatis, disini akan di bagi dua
perancangan yaitu rancangan mekanik dan rancangan elektronik.
3.6.1 Rancangan Mekanik
Gambar 3.5 rancangan alat
Ukuran tempat yang digunakan untuk penetasan telur adalah panjang 60
cm x 25 cm yang berbentuk balok sesuai gambar diatas.
Ket :
Warna hijau : 3 buah lampu dc yang digunakan sebagai penghangat pada
telur.
Warna merah : kipas yang digunakan sebagai pendingin atau menjaga
suhu tetap stabil.
Warna Biru Tua : Servo berfungsi sebagai penggerak rak telur sesuai
waktu yang telah ditentukan.
Warna Biru Muda : Sensor DHT 11 yang berfungsi untuk indikator suhu
dan kelembaban yang ada didalam alat penetas telur.
3.6.2 Rancangan Elektronik
Sumber tegangan untuk sensor berasal dari arduino dengan besar tegangan
input 5 volt dihubungkan dengan pin Vcc pada sensor. Hubungannya dengan
arduino, pin output sensor dihubungkan dengan pinA.6,dan ground sensor dengan
pin ground arduino.
25
Gambar 3.6 Peletakan sensor DHT 11 pada alat
Dibawah ini adalah flowchart pemrograman pada arduino untuk sistem kerja
sensor DHT 11 sebagai pengukur suhu dan kelembaban.
Gambar 3.7 flowchart Sensor DHT 11
Proses pemrograman awal yaitu penginisialisasian sensor DHT 11 dengan
outputan suhu dan kelembababan pada alat penetas telur. PINA.6 arduino
menerima inputan dari sensor besaran suhu dan kelembaban disekitar, nilai suhu
dan kelembaban akan ditampilkan pada LCD.
26
3.7 Program Sensor DHT 11
Agar sensor DHT 11 dapat menentukan nilai suhu dan kelembaban
didalam alat penetas telur otomatis maka ada beberapa program yang harus
dibuat.
Gambar 3.8 Program Sensor DHT 11
Pin yang digunakan untuk sensor yaitu PINA.6 dan pin yang digunakan untuk
tampilan LCD yaitu PINA.12, PINA.11, PINA.10, PINA.9, PINA.8, PINA.7, dan
fungsi float pada program yaitu menyimpan nilai suhu dan kelembaban.
27
BAB IV
HASIL DAN PEMBAHASAN
Dalam menganalisa rancangan implementasi aplikasi Android sebagai
pengontrol dan monitoring pada Smart Home berbasis jaringan internet dengan
Arduino Uno dilakukan dengan menguji dari tiap-tiap bagian rangkaian untuk
mendapatkan hasil apakah alat yang telah dirancang sesuai dengan yang
diharapkan. Pengujian alat dilakukan untuk memastikan bahwa alat yang telah
dibuat dapat berfungsi dengan baik dan dapat digunakan.
4.1 Pengujian Motor Servo
Pengujian terhadap motor servo MG-996R dilakukan dengan
memberikan program swipe pada arduino dan motor servo.
Gambar 4.1 Pengujian Motor Servo
Tabel 4.1 Pembacaan Motor Servo
Pengujian Pengaturan sudut
pada program
(derajat)
Kondisi Keterangan
1 90 – 110 Pergerakan servo ke
kanan
Sesuai
2 110 – 60 Pergerakan servo ke
kiri
Sesuai
3 60 – 90 Kembali ke awal Sesuai
27
28
Gambar 4.2 Kondisi servo saat pengujian
4.1.1 Pemrograman Motor Servo
Agar motor servo dapat bergerak sesuai derajat yang diinginkan didalam
alat penetas telur otomatis maka ada beberapa program yang harus dibuat.
Gambar 4.3 Program motor servo pada arduino
Fungsi if sebagai fungsi pemanggil void untuk menggerakan servo sesuai
waktu yang telah ditentukan dengan sudut yang telah di programkan dengan delay
yang telah ditentukan.
29
4.2 Pengujian RTC (real time clock)
Pengujian terhadap RTC DS1307 dilakukan dengan cara melakukan
penyesuaian waktu terlebih dahulu, hal ini dimaksudkan agar waktu yang akan
ditanakan pada rtc benar-benar sesuai dengan waktu sebenarnya.
Gambar 4.4 Pengujian RTC
Rtc yang kita gunakan memiliki 5 pin yang terdiri dari VCC, GND,
SCA, SCL, dan DS. Akan tetapi kita hanya mengunakan 4 pin saja, yaitu :
VCC dan GND sebagai sumber tegangan, serta SCA dan SCL sebagai
pengirim dan penerima data. Setelah pengaturan waktu dilakukan kita dapat
melihat hasil dengan menggunakan program readtest pada arduino dan serial
monitor pada RTC.
4.3 Pengujian LCD ( liquid crystal display )
Dalam pengujian LCD, dalam pemrograman dapat menggunakan
program exemple pada arduino yaitu Hello Word.
30
Gambar 4.5 Program pengujian LCD
Gambar 4.6 Pengujian LCD
4.4 Pengujian Lampu, Kipas DC, dan Sensor DHT 11
Dalam pengujian disini memakai 3 komponen yang memiliki fungsi masing –
masing. Lampu sebagai penghangat alat penetas telur, kipas dc sebagai penurun suhu
panas, dan sensor sebagai indikator besaran suhu dan kelembaban.
Gambar 4.7 Suhu meningkat saat lampu menyala
31
Saat lampu menyala dan kipas mati, sensor akan menditeksi suhu akan meningkat
secara perlahan dan berfungsi sebagai penghangat pada telur, lihat gambar 4.7.
Gambar 4.8 Suhu menurun saat lampu mati dan kipas menyala
Saat lampu mati dan kipas menyala, sensor akan menditeksi suhu akan menurun secara
perlahan dan menjaga kestabilan suhu yang ada pada telur agar tidak terjadi panas
berlebih, lihat gambar 4.8.
32
BAB IV
PENUTUP
5.1 Kesimpulan
Berdasarkan dari pembahasan dan pengujian alat dari bab sebelumnya,
dapat diambil kesimpulan sebagai berikut:
1. Penggunaan Arduino Uno R3 pada pengerjaan alat ini sudah cukup
tepat, dikarenakan fungsinya sebagai pengontrol kerja alat sangat
baik, dan masih bias dikembangkan lagi.
2. Sensor DHT 11 dapat membaca suhu dan kelembaban sekitar
dengan baik, serta tampilan pada LCD telah sesuai.
3. Penyesuaian derajat pada servo telah sesuai dengan fungsinya
4. Kipas DC dan Lampu DC berjalan dengan baik
5. Penyesuaian waktu menggunakan RTC (Real Time Clock) dapat
berjalan dengan baik dan sesuai dengan fungsinya.
5.2 Saran
Dalam penyelesaian tugas akhir ini, masih terdapat banyak kekurangan
dalam beberapa aspek. Oleh sebab itu, berikut merupakan beberapa saran yang
diharapkan dalam pengembangan untuk kedepanya terhadap alat ini.
1. Menyediakan power cadangan sebagai alternatif jika terjadi power down
sewaktu-waktu, dengan begitu alat ini akan tetap dapat dioperasikan.
2. Penggunaan masing – masing sensor pada suhu dan kelembaban agar tingkat
keakurasiannya lebih akurat.
3. Disain alat lebih dimaksimalkan lagi.
4. Penggunaan pemanas yang bisa disesuaikan dari luar tanpa masuk kedalam
program.
32
33
DAFTAR PUSTAKA
Arduino . – “ Arduino Board Uno” https://www.Arduino.cc/en/main/ArduinoBoardUno Akses : 10 April 2017
Elektronika Dasar. (2012) “LCD (Liquid Cristal Display)”. http://www.elektronika-dasar.web.id/lcd-liquid-cristal-display/.
Akses: 10 April 2017
Gerai Cerdas, (2017) “DHT11 sensor suhu dan kelembabab”. http://www.geraicerdas.com/sensor/temperature/dht11-sensor-suhu-dan-
kelembaban-detail. Akses: 10 April 2017
Industri3601. - “ Transformator dan sistem distribusi daya”.
https://industri3601.wordpress.com/transformator-dan-sistem-distribusi-daya
Akses: 14 April 2017
Ternak Ayam Pelung, - “suhu pada penetas telur ayam”. https://ternakayampelung.com/bisnis-ternak/menetaskan-telur-ayam-dengan-
mesin-penetas. Akses: 20 Juli 2017
Irfan Muhamad (2011) “PERANCANGAN SISTEM PENGERAM TELUR
AYAM OTOMATIS”, Jurnal Computer Engineering Department, Faculty of
Engineering, Binus University Jakarta Barat. Akses 20 Juli 2017
Farnell, - “data sheet arduino uno r3” https://www.farnell.com/datasheets/1682209.pdf Akses: 20 Juli 2017
Electronic Oscaldas, - “data sheet MG 996R”.
http://www.electronicoscaldas.com/datasheet/MG996R_Tower-Pro.pdf
Akses: 20 Juli 2017
Micropik, - “data sheet sensor DHT 11” . http://www.micropik.com/PDF/dht11.pdf Akses: 20 Juli 2017
Listing Program
#include <DHT.h> //menyertakan library DHT
kedalam program
#include <LiquidCrystal.h> //menyertakan
library LCD
#include <Servo.h>
#include <Wire.h>
#include <TimeAlarms.h>
#include <Time.h>
#include <TimeLib.h>
#include "RTClib.h"
int relay = 2;
#define DHTPIN 6 //pasang sensor pada pin 6
digital
#define DHTTYPE DHT11 //kita menggunakan
jenis sensor DHT11, ubah jika kamu gunakan
sensor lain seperti DHT22 (AM2302) atau
DHT21 (AM2301)
//#define DHTTYPE DHT22 // DHT 22,
AM2302, AM2321
//#define DHTTYPE DHT21 // DHT 21,
AM2301
DHT dht(DHTPIN, DHTTYPE); //deklarasi pin
sensor dengan jenis sensor yang dipilih
LiquidCrystal lcd(12, 11, 10, 9, 8, 7); //pin yang
dipakai LCD
Servo myservo;
int pos = 90;
AlarmId id;
RTC_DS1307 RTC;
uint32_t syncProvider()
return RTC.now().unixtime();
void setup()
lcd.begin(16, 2); //mengatur ukuran lcd yang
dipakai
dht.begin(); //program komunikasi atau setup
untuk sensor DHT
Serial.begin(9600); //program komunikasi atau
setup untuk serial monitor dan kecepatan
komunikasi (baudrate)
while (!Serial);
myservo.attach (3);
pinMode(relay, OUTPUT);
setTime(8,29,0,1,1,11);
Wire.begin();
RTC.begin();
RTC.adjust(DateTime(__DATE__,
__TIME__));
setSyncProvider(syncProvider);
void loop()
float kelembapan = dht.readHumidity();
//menyimpan nilai kelembapan pada variabel
kelembapan
float suhu = dht.readTemperature();
//menyimpan nilai suhu pada variabel suhu
delay(100); //mengatur jeda waktu pembacaan
sensor selama 500 milidetik
Serial.print(kelembapan); //menampilkan nilai
kelembapan pada Serial Monitor
Serial.print("%"); //Simbol persen satuan
kelembapan
Serial.print(" "); //menambahkan spasi
Serial.print(suhu); //menampilkan nilai suhu
pada Serial Monitor
Serial.println("*C"); //Satuan Derajat Suhu
//menampilkan nilai kelembapan pada LCD
lcd.setCursor(0, 0); //
lcd.print("kelembapan.: ");
lcd.print((int) kelembapan);
lcd.print("%");
//menampilkan nilai suhu pada LCD
lcd.setCursor(0, 1);
lcd.print("Suhu.: ");
lcd.print((int) suhu);
lcd.print((char)223); //Simbol Derajat di LCD
lcd.print("C ");
delay (1000);
Serial.print(hour());
Serial.print(":");
Serial.print(minute());
Serial.print(":");
Serial.print(second());
Serial.println();
Serial.print(day());
Serial.print("/");
Serial.print(month());
Serial.print("/");
Serial.print(year());
Serial.println();
if (suhu <= 34)
digitalWrite(relay,HIGH);
if (suhu >= 37)
digitalWrite(relay,LOW);
if (hour()==3 && minute()==0&&
second()==0)
Putarsatu();
if (hour()==6 && minute()==0&&
second()==0)
Putardua();
if (hour()==9 && minute()==0&&
second()==0)
Putartiga();
if (hour()==12 && minute()==0&&
second()==0)
Putarempat();
if (hour()==15 && minute()==0&&
second()==0)
Putarlima();
if (hour()==18 && minute()==0&&
second()==0)
Putarenam();
if (hour()==21 && minute()==0&&
second()==0)
Putartujuh();
if (hour()==24 && minute()==1&&
second()==0)
Putardelapan();
void Putarsatu()
Serial.println("Alarm: - servo on");
for(pos = 90; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos<=90; pos+=1)
myservo.write(pos);
delay(500);
void Putardua()
Serial.println("Alarm: - servo on");
for(pos = 90; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 60; pos<=70; pos+=1)
myservo.write(pos);
delay(500);
void Putartiga()
Serial.println("Alarm: - servo on");
for(pos = 90; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos<=90; pos+=1)
myservo.write(pos);
delay(500);
void Putarempat()
Serial.println("Alarm: - servo on");
for(pos = 90; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos<=90; pos+=1)
myservo.write(pos);
delay(500);
void Putarlima()
Serial.println("Alarm: - servo on");
for(pos = 90; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos<=90; pos+=1)
myservo.write(pos);
delay(500);
void Putarenam()
Serial.println("Alarm: - servo on");
for(pos = 90; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos<=90; pos+=1)
myservo.write(pos);
delay(500);
void Putartujuh()
Serial.println("Alarm: - servo on");
for(pos = 90; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos<=90; pos+=1)
myservo.write(pos);
delay(500);
void Putardelapan()
Serial.println("Alarm: - servo on");
for(pos = 90; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos <= 110; pos+=1)
myservo.write(pos);
delay (500);
delay (1000);
for(pos = 110; pos>=70; pos-=1)
myservo.write(pos);
delay(500);
for(pos = 70; pos<=90; pos+=1)
myservo.write(pos);
delay(500);
Data Sheet
Arduino Uno
Arduino Uno R3 Front Arduino Uno R3 Back
Arduino Uno R2 Front Arduino Uno SMD Arduino Uno Front Arduino Uno Back
Overview
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16
MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a
computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter.
Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to ground, making it easier to put into DFU mode.
Revision 3 of the board has the following new features:
1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the
voltage provided from the board. In future, shields will be compatible both with the board that use the AVR, which operate with 5V and with the Arduino Due that operate
with 3.3V. The second one is a not connected pin, that is reserved for future
purposes.
Stronger RESET circuit.
Atmega 16U2 replace the 8U2.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The
Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest in a series of USB Arduino boards, and the reference model for the Arduino platform; for a comparison with previous versions, see the index of Arduino boards.
Summary
Microcontroller
ATmega328
Operating Voltage
5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328) of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz
Schematic & Reference Design
EAGLE files: arduino-uno-Rev3-reference-design.zip (NOTE: works with Eagle 6.0 and newer)
Schematic: arduino-uno-Rev3-schematic.pdf
Note: The Arduino reference design can use an Atmega8, 168, or 328, Current models use an ATmega328, but an Atmega8 is shown in the schematic for reference. The pin
configuration is identical on all three processors.
Power
The Arduino Uno can be powered via the USB connection or with an external power supply. The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's
power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The
recommended range is 7 to 12 volts. The power pins are as follows:
VIN. The input voltage to the Arduino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the
power jack, access it through this pin.
5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector
(5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
GND. Ground pins.
Memory
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of SRAM
and 1 KB of EEPROM (which can be read and written with the EEPROM library).
Input and Output
Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL
Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the
attachInterrupt() function for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using the SPI library.
LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts,
though is it possible to change the upper end of their range using the AREF pin and the analogReference() function. Additionally, some pins have specialized functionality:
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the
Wire library. There are a couple of other pins on the board:
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.
See also the mapping between Arduino pins and ATmega328 ports. The mapping for the Atmega8, 168, and 328 is identical.
Communication
The Arduino Uno has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the
board channels this serial communication over USB and appears as a virtual com port to software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, a .inf file is required. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino
board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-to-serial chip and USB connection to the computer (but not for serial communication on
pins 0 and 1).
A SoftwareSerial library allows for serial communication on any of the Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C bus; see the documentation for details. For
SPI communication, use the SPI library.
Programming
The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino
Uno from the Tools > Board menu (according to the microcontroller on your board). For details, see the reference and tutorials.
The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you to upload new code to it without the use of an external hardware programmer. It communicates
using the original STK500 protocol (reference, C header files).
You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header; see these instructions for details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available . The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:
On Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy) and then resetting the 8U2.
On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground, making it easier to put into DFU mode.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and Linux) to load a new firmware. Or you can use the ISP header with an external
programmer (overwriting the DFU bootloader). See this user-contributed tutorial for more information.
Automatic (Software) Reset
Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is designed in a way that allows it to be reset by software running on a connected computer.
One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken
low), the reset line drops long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino
environment. This means that the bootloader can have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload. This setup has other implications.
When the Uno is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the Uno. While it is programmed to ignore malformed data (i.e.
anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time
configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data.
The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of
the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see
this forum thread for details.
USB Overcurrent Protection
The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the
fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed.
Physical Characteristics
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the USB connector and power jack extending beyond the former dimension. Four screw holes
allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.
MG996R High Torque
Metal Gear Dual Ball Bearing Servo
This High-Torque MG996R Digital Servo features metal gearing resulting in extra high 10kg stalling torque in a tiny package. The MG996R is essentially an upgraded version of the famous MG995 servo, and features upgraded shock-proofing and a redesigned PCB and IC control system that make it much more accurate than its predecessor. The gearing and motor have also been upgraded to improve dead bandwith and centering. The unit comes complete with 30cm wire and 3 pin 'S' type female header connector that fits most receivers, including Futaba, JR, GWS, Cirrus, Blue Bird, Blue Arrow, Corona, Berg, Spektrum and Hitec.
This high-torque standard servo can rotate approximately 120 degrees (60 in each direction). You can use any servo code, hardware or library to control these servos, so it's great for beginners who want to make stuff move without building a motor controller with feedback & gear box, especially since it will fit in small places. The MG996R Metal Gear Servo also comes with a selection of arms and hardware to get you set up nice and fast!
Specifications
Weight: 55 g
Dimension: 40.7 x 19.7 x 42.9 mm approx. Stall torque: 9.4 kgf·cm (4.8 V ), 11 kgf·cm (6 V) Operating speed: 0.17 s/60º (4.8 V), 0.14 s/60º (6 V)
Operating voltage: 4.8 V a 7.2 V Running Current 500 mA – 900 mA (6V) Stall Current 2.5 A (6V) Dead band width: 5 µs Stable and shock proof double ball bearing design Temperature range: 0 ºC – 55 ºC
DS1307
64 x 8, Serial, I2C Real-Time Clock
GENERAL DESCRIPTION
The DS1307 serial real-time clock (RTC) is a low-power, full binary-coded decimal (BCD)
clock/calendar plus 56 bytes of NV SRAM. Address and data are transferred serially through
an I2C, bidirectional bus. The clock/calendar
provides seconds, minutes, hours, day, date, month, and year information. The end of the
month date is automatically adjusted for months with fewer than 31 days, including corrections for
leap year. The clock operates in either the 24-
hour or 12-hour format with AM/PM indicator. The DS1307 has a built-in power-sense circuit
that detects power failures and automatically switches to the backup supply. Timekeeping
operation continues while the part operates from the backup supply.
ORDERING INFORMATION
FEATURES
Real-Time Clock (RTC) Counts Seconds,
Minutes, Hours, Date of the Month, Month,
Day of the week, and Year with Leap-Year
Compensation Valid Up to 2100 56-Byte,
Battery-Backed, Nonvolatile (NV)
RAM for Data Storage
I2C Serial Interface
Programmable Square -Wave Output
Signal Automatic Power-Fail Detect and
Switch Circuitry
Consumes Less than 500nA in Battery-
Backup Mode with Oscillator Running
Optional Industrial Temperature Range:
-40°C to +85°C
Available in 8-Pin Plastic DIP or SO
Underwriters Laboratory (UL) Recognized
Typical Operating Circuit and Pin Configurations appear
at end of data sheet.
PART TEMP RANGE
VOLTAGE
PIN-PACKAGE TOP MARK*
(V)
DS1307 0°C to +70°C 5.0 8 PDIP (300 mils) DS1307
DS1307+ 0°C to +70°C 5.0 8 PDIP (300 mils) DS1307
DS1307N -40°C to +85°C 5.0 8 PDIP (300 mils) DS1307N
DS1307N+ -40°C to +85°C 5.0 8 PDIP (300 mils) DS1307N
DS1307Z 0°C to +70°C 5.0 8 SO (150 mils) DS1307
DS1307Z+ 0°C to +70°C 5.0 8 SO (150 mils) DS1307
DS1307ZN -40°C to +85°C 5.0 8 SO (150 mils) DS1307N
DS1307ZN+ -40°C to +85°C 5.0 8 SO (150 mils) DS1307N
DS1307Z/T&R 0°C to +70°C 5.0 8 SO (150 mils) Tape and Reel DS1307
DS1307Z+T&R 0°C to +70°C 5.0 8 SO (150 mils) Tape and Reel DS1307
DS1307ZN/T&R -40°C to +85°C 5.0 8 SO (150 mils) Tape and Reel DS1307N
DS1307ZN+T&R -40°C to +85°C 5.0 8 SO (150 mils) Tape and Reel DS1307N
Denotes a lead-free/RoHS-compliant device.
A “+” anywhere on the top mark indicates a lead-free device.
Note: Some revisions of this device may incorporate deviations from published specifications known as errata. Multiple revisions of any device
may be simultaneously available through various sales channels. For information about dev ice errata, click here: www.maxim-ic.com/errata.
DS1307 64 x 8, Serial, I2C Real-Time Clock
ABSOLUTE MAXIMUM RATINGS
Voltage Range on Any Pin Relative to Ground……….……………………….…………....-0.5V to +7.0V
Operating Temperature Range (Noncondensing)
Commercial…………………….……………………………….………………………..0°C to +70°C
Industrial………………………………………………………………………………-40°C to +85°C
Storage Temperature Range………………………………………...…………..…………-55°C to +125°C
Soldering Temperature (DIP, leads)..…………………………………………….....+260°C for 10 seconds
Soldering Temperature (surface mount)…..…………………………See JPC/JEDEC Standard J-STD-020
Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. These are stress rat ings only,
and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the specifications is
not implied. Exposure to the absolute maximum rating conditions for extended periods may affect device reliability.
RECOMMENDED DC OPERATING CONDITIONS
(TA = 0°C to +70°C, TA = -40°C to +85°C.) (Notes 1, 2)
PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS
Supply Voltage VCC 4.5 5.0 5.5 V
Logic 1 Input VIH 2.2 VCC + 0.3 V
Logic 0 Input VIL -0.3 +0.8 V
VBAT Battery Voltage VBAT 2.0 3 3.5 V
DC ELECTRICAL CHARACTERISTICS
(VCC = 4.5V to 5.5V; TA = 0°C to +70°C, TA = -40°C to +85°C.) (Notes 1, 2)
PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS
Input Leakage (SCL) ILI -1 1 µA
I/O Leakage (SDA, SQW/OUT) ILO -1 1 µA
Logic 0 Output (IOL = 5mA) VOL 0.4 V
Active Supply Current
ICCA
1.5 mA
(fSCL = 100kHz)
Standby Current ICCS (Note 3) 200 µA
VBAT Leakage Current IBATLKG 5 50 nA
Power-Fail Voltage (VBAT = 3.0V) VPF
1.216 x 1.25 x 1.284 x
V
VBAT VBAT VBAT
DC ELECTRICAL CHARACTERISTICS
(VCC = 0V, VBAT = 3.0V; TA = 0°C to +70°C, TA = -40°C to +85°C.) (Notes 1, 2)
PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS
VBAT Current (OSC ON);
IBAT1
300 500 nA
SQW/OUT OFF
VBAT Current (OSC ON);
IBAT2
480 800 nA
SQW/OUT ON (32kHz)
VBAT Data-Retention Current
IBATDR
10 100 nA
(Oscillator Off)
WARNING: Negative undershoots below -0.3V while the part is in battery-backed mode may cause loss of data.
DS1307 64 x 8, Serial, I2C Real-Time Clock
AC ELECTRICAL CHARACTERISTICS
(VCC = 4.5V to 5.5V; TA = 0°C to +70°C, TA = -40°C to +85°C.)
PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS
SCL Clock Frequency fSCL 0 100 kHz
Bus Free Time Between a STOP and
tBUF
4.7
µs
START Condition
Hold Time (Repeated) START
tHD:STA (Note 4) 4.0
µs
Condition
LOW Period of SCL Clock tLOW 4.7 µs
HIGH Period of SCL Clock tHIGH 4.0 µs
Setup Time for a Repeated START
tSU:STA
4.7
µs
Condition
Data Hold Time tHD:DAT 0 µs
Data Setup Time tSU:DAT (Notes 5, 6) 250 ns
Rise Time of Both SDA and SCL
tR
1000 ns
Signals
Fall Time of Both SDA and SCL
tF
300 ns
Signals
Setup Time for STOP Condition tSU:STO 4.7 µs
CAPACITANCE
(TA = +25°C)
PARAMETER SYMBOL CONDITIONS MINTYP MAX UNITS
Pin Capacitance (SDA, SCL) CI/O 10 pF
Capacitance Load for Each Bus
CB (Note 7) 400 pF
Line
Note 1: All voltages are referenced to ground.
Note 2: Limits at -40°C are guaranteed by design and are not production tested.
Note 3: ICCS specified with VCC = 5.0V and SDA, SCL = 5.0V.
Note 4: After this period, the first clock pulse is generated.
Note 5: A device must internally provide a hold time of at least 300ns for the SDA signal (referred to the
VIH(MIN) of the SCL signal) to bridge the undefined region of the falling edge of SCL.
Note 6: The maximum tHD:DAT only has to be met if the device does not stretch the LOW period (tLOW) of the SCL signal.
Note 7: CB—total capacitance of one bus line in pF.
DS1307 64 x 8, Serial, I2C Real-Time Clock
TIMING DIAGRAM
SDA
tBUF
tHD:STA
tLOW
tR tF
SCL
Figure 1. Block Diagram
X1
C L
1Hz/4.096kHz/8.192kHz/32.768kHz MUX/ SQW/OUT
BUFFER
X2 C
L
1Hz
Oscillator
and divider RAM
(56 X 8)
V CC
CONTROL
LOGIC
GND
POWER
CLOCK,
CONTROL
VBAT
CALENDAR,
Dallas
AND CONTROL
REGISTERS
Semiconductor
DS1307
SCL SERIAL BUS
INTERFACE
USER BUFFER
SDA
AND ADDRESS
REGISTER
(7 BYTES)
S1307 64 x 8, Serial, I2C Real-Time Clock
TYPICAL OPERATING CHARACTERISTICS
(VCC = 5.0V, TA = +25°C, unless otherwise noted.)
ICCS vs. VCC
VBAT=3.0V
120
110
100
90
(uA) 80
CURRENT 70
60
SUPPLY 50
40
30
20
10
0
1.0 2.0 3.0 4.0 5.0
VCC (V)
IBAT vs. VBAT VCC = 0V
400
SQW=32kHz
350
( n A )
300
U R R E N T
250
SUPPLY200
SQW off
150
100
2.0 2.5
VBACKUP (V)
3.0 3.5
IBAT vs. Temperature
VCC=0V, VBAT=3.0
325.0
SQW=32kHz
275.0
225.0
SQW off
175.0
-40 -20 0 20 40 60 80
TEMPERATURE (°C)
SQW/OUT vs. Supply Voltage
32769
32768.9
32768.8
32768.7
32768.6
32768.5
32768.4
32768.3
32768.2
32768.1
32768
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5
Supply (V)
DS1307 64 x 8, Serial, I2C Real-Time Clock
PIN DESCRIPTION
PIN NAME FUNCTION
Connections for Standard 32.768kHz Quartz Crystal. The internal oscillator circuitry is
1 X1 designed for operation with a crystal having a specified load capacitance (CL) of 12.5pF.
X1 is the input to the oscillator and can optionally be connected to an external 32.768kHz
oscillator. The output of the internal oscillator, X2, is floated if an external oscillator is
connected to X1.
2 X2 Note: For more information on crystal selection and crystal layout considerations, refer to
Application Note 58: Crystal Considerations with Dallas Real-Time Clocks.
Backup Supply Input for Any Standard 3V Lithium Cell or Other Energy Source. Battery
voltage must be held between the minimum and maximum limits for proper operation.
Diodes in series between the battery and the VBAT pin may prevent proper operation. If a
backup supply is not required, VBAT must be grounded. The nominal power-fail trip point
3 VBAT (VPF) voltage at which access to the RTC and user RAM is denied is set by the internal
circuitry as 1.25 x VBAT nominal. A lithium battery with 48mAhr or greater will back up
the DS1307 for more than 10 years in the absence of power at +25°C.
UL recognized to ensure against reverse charging current when used with a lithium
battery. Go to: www.maxim-ic.com/qa/info/ul/.
4 GND Ground
5 SDA
Serial Data Input/Output. SDA is the data input/output for the I2C serial interface. The
SDA pin is open drain and requires an external pullup resistor.
6 SCL
Serial Clock Input. SCL is the clock input for the I2C interface and is used to synchronize
data movement on the serial interface.
Square Wave/Output Driver. When enabled, the SQWE bit set to 1, the SQW/OUT pin
7 SWQ/OUT
outputs one of four square-wave frequencies (1Hz, 4kHz, 8kHz, 32kHz). The SQW/OUT
pin is open drain and requires an external pullup resistor. SQW/OUT operates with either
VCC or VBAT applied.
Primary Power Supply. When voltage is applied within normal limits, the device is fully
8 VCC
accessible and data can be written and read. When a backup supply is connected to the
device and VCC is below VTP, read and writes are inhibited. However, the timekeeping
function continues unaffected by the lower input voltage.
DETAILED DESCRIPTION
The DS1307 is a low-power clock/calendar with 56 bytes of battery-backed SRAM. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year.
The DS1307 operates as a slave device on the I2C bus. Access is obtained by implementing a START
condition and providing a device identification code followed by a register address. Subsequent registers
can be accessed sequentially until a STOP condition is executed. When VCC falls below 1.25 x V BAT, the device terminates an access in progress and resets the device address counter. Inputs to the device will not be recognized at this time to prevent erroneous data from being written to the device from an out-of-
tolerance system. When VCC falls below VBAT, the device switches into a low-current battery-backup
mode. Upon power-up, the device switches from battery to VCC when VCC is greater than VBAT +0.2V
and recognizes inputs when VCC is greater than 1.25 x VBAT. The block diagram in Figure 1 shows the main elements of the serial RTC.
DS1307 64 x 8, Serial, I2C Real-Time Clock
OSCILLATOR CIRCUIT
The DS1307 uses an external 32.768kHz crystal. The oscillator circuit does not require any external resistors
or capacitors to operate. Table 1 specifies several crystal parameters for the external crystal. Figure 1. shows
a functional schematic of the oscillator circuit. If using a crystal with the specified characteristics, the startup
time is usually less than one second.
CLOCK ACCURACY
The accuracy of the clock is dependent upon the accuracy of the crystal and the accuracy of the match
between the capacitive load of the oscillator circuit and the capacitive load for which the crystal was
trimmed. Additional error will be added by crystal frequency drift caused by temperature shifts. External
circuit noise coupled into the oscillator circuit may result in the clock running fast. Refer to Application
Note 58: Crystal Considerations with Dallas Real-Time Clocks for detailed information.
Table 1. Crystal Specifications*
PARAMETER SYMBOL MIN TYP MAX UNITS
Nominal Frequency fO 32.768 kHz
Series Resistance ESR 45 kΩ
Load Capacitance CL 12.5 pF
*The crystal, traces, and crystal input pins should be isolated from RF generating signals. Refer to
Application Note 58: Crystal Considerations for Dallas Real-Time Clocks for additional specifications.
Figure 2. Recommended Layout for Crystal
LOCAL GROUND PLANE (LAYER 2)
X1
CRYSTAL
NOTE: AVOID ROUTING SIGNAL LINES IN THE CROSSHATCHED
AREA (UPPER LEFT QUADRANT) OF THE PACKAGE UNLESS
THERE IS A GROUND PLANE BETWEEN THE SIGNAL LINE AND THE
DEVICE PACKAGE.
RTC AND RAM ADDRESS MAP
Table 2 shows the address map for the DS1307 RTC and RAM registers. The RTC registers are located in
address locations 00h to 07h. The RAM registers are located in address locations 08h to 3Fh. During a
multibyte access, when the address pointer reaches 3Fh, the end of RAM space, it wraps around to location
00h, the beginning of the clock space
DS1307 64 x 8, Serial, I2C Real-Time Clock
CLOCK AND CALENDAR
The time and calendar information is obtained by reading the appropriate register bytes. Table 2 shows
the RTC registers. The time and calendar are set or initialized by writing the appropriate register bytes.
The contents of the time and calendar registers are in the BCD format. The day-of-week register
increments at midnight. Values that correspond to the day of week are user-defined but must be
sequential (i.e., if 1 equals Sunday, then 2 equals Monday, and so on.) Illogical time and date entries
result in undefined operation. Bit 7 of Register 0 is the clock halt (CH) bit. When this bit is set to 1, the
oscillator is disabled. When cleared to 0, the oscillator is enabled.
Note that the initial power- on state of all registers is not defined. Therefore, it is important to
enable the oscillator (CH bit = 0) during initial configuration.
The DS1307 can be run in either 12-hour or 24-hour mode. Bit 6 of the hours register is defined as the 12-
hour or 24-hour mode-select bit. When high, the 12-hour mode is selected. In the 12-hour mode, bit 5 is
the AM/PM bit with logic high being PM. In the 24-hour mode, bit 5 is the second 10-hour bit (20 to 23
hours). The hours value must be re-entered whenever the 12/24-hour mode bit is changed.
When reading or writing the time and date registers, secondary (user) buffers are used to prevent errors when the internal registers update. When reading the time and date registers, the user buffers are
synchronized to the internal registers on any I2C START. The time information is read from these
secondary registers while the clock continues to run. This eliminates the need to re-read the registers in case the internal registers update during a read. The divider chain is reset whenever the seconds register is
written. Write transfers occur on the I 2C acknowledge from the DS1307. Once the divider chain is reset,
to avoid rollover issues, the remaining time and date registers must be written within one second.
Table 2. Timekeeper Registers
ADDRESS BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 FUNCTION RANGE
00H CH 10 Seconds Seconds Seconds 00–59
01H 0 10 Minutes Minutes Minutes 00–59
12
10
10
1–12
Hour
02H 0
Hours
Hours +AM/PM
PM/
Hour
24
00–23
AM
03H 0 0 0 0 0 DAY Day 01–07
04H 0 0 10 Date Date Date 01–31
05H 0 0
0
10
Month
Month 01–12
Month
06H 10 Year Year Year 00–99
07H OUT 0 0 SQWE 0 0 RS1 RS0 Control —
08H-3FH
RAM
00H–FFH
56 x 8
0 = Always reads back as 0.
DS1307 64 x 8, Serial, I2C Real-Time Clock
CONTROL REGISTER
The DS1307 control register is used to control the operation of the SQW/OUT pin.
BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0
OUT 0 0 SQWE 0 0 RS1 RS0
Bit 7: Output Control (OUT). This bit controls the output level of the SQW/OUT pin when the square-
wave output is disabled. If SQWE = 0, the logic level on the SQW/OUT pin is 1 if OUT = 1 and is 0 if
OUT = 0.
Bit 4: Square-Wave Enable (SQWE). This bit, when set to logic 1, enables the oscillator output. The
frequency of the square-wave output depends upon the value of the RS0 and RS1 bits. With the square-
wave output set to 1Hz, the clock registers update on the falling edge of the square wave.
Bits 1, 0: Rate Select (RS1, RS0). These bits control the frequency of the square-wave output when the
square-wave output has been enabled. The following table lists the square-wave frequencies that can be
selected with the RS bits.
RS1 RS0 SQW/OUT OUTPUT SQWE OUT
0 0 1Hz 1 X
0 1 4.096kHz 1 X
1 0 8.192kHz 1 X
1 1 32.768kHz 1 X
X X 0 0 0
X X 1 0 1
DS1307 64 x 8, Serial, I2C Real-Time Clock
I2C DATA BUS
The DS1307 supports the I2 C protocol. A device that sends data onto the bus is defined as a transmitter
and a device receiving data as a receiver. The device that controls the message is called a master. The devices that are controlled by the master are referred to as slaves. The bus must be controlled by a master device that generates the serial clock (SCL), controls the bus access, and generates the START and STOP
conditions. The DS1307 operates as a slave on the I2C bus.
Figures 3, 4, and 5 detail how data is transferred on the I2C bus.
Data transfer may be initiated only when the bus is not busy.
During data transfer, the data line must remain stable whenever the clock line is HIGH. Changes in
the data line while the clock line is high will be interpreted as control signals.
Accordingly, the following bus conditions have been defined:
Bus not busy: Both data and clock lines remain HIGH.
Start data transfer: A change in the state of the data line, from HIGH to LOW, while the clock is
HIGH, defines a START condition.
Stop data transfer: A change in the state of the data line, from LOW to HIGH, while the clock line
is HIGH, defines the STOP condition.
Data valid: The state of the data line represents valid data when, after a START condition, the data
line is stable for the duration of the HIGH period of the clock signal. The data on the line must be
changed during the LOW period of the clock signal. There is one clock pulse per bit of data.
Each data transfer is initiated with a START condition and terminated with a STOP condition. The number of data bytes transferred between START and STOP conditions is not limited, and is determined by the master device. The information is transferred byte-wise and each receiver
acknowledges with a ninth bit. Within the I2C bus specifications a standard mode (100kHz clock
rate) and a fast mode (400kHz clock rate) are defined. The DS1307 operates in the standard mode (100kHz) only.
Acknowledge: Each receiving device, when addressed, is obliged to generate an acknowledge after
the reception of each byte. The master device must generate an extra clock pulse which is associated
with this acknowledge bit.
A device that acknowledges must pull down the SDA line during the acknowledge clock pulse in
such a way that the SDA line is stable LOW during the HIGH period of the acknowledge related
clock pulse. Of course, setup and hold times must be taken into account. A master must signal an end
of data to the slave by not generating an acknowledge bit on the last byte that has been clocked out
of the slave. In this case, the slave must leave the data line HIGH to enable the master to generate the
STOP condition.
DS1307 64 x 8, Serial, I2C Real-Time Clock
Figure 3. Data Transfer on I2C Serial Bus
SDA
MSB
R/W
ACKNOWLEDGEMENT
DIRECTION
BIT SIGNAL FROM RECEIVER
ACKNOWLEDGEMENT
SIGNAL FROM RECEIVER
SCL
1 2 6 7 8 9 1 2 3-7 8 9
START
ACK
ACK
STOP
CONDITION
REPEATED IF MORE BYTES
CONDITION
OR
ARE TRANSFERED REPEATED
START
CONDITION
Depending upon the state of the R/W bit, two types of data transfer are possible:
Data transfer from a master transmitter to a slave receiver. The first byte transmitted by the
master is the slave address. Next follows a number of data bytes. The slave returns an acknowledge
bit after each received byte. Data is transferred with the most significant bit (MSB) first.
Data transfer from a slave transmitter to a master receiver. The first byte (the slave address) is
transmitted by the master. The slave then returns an acknowledge bit. This is followed by the slave
transmitting a number of data bytes. The master returns an acknowledge bit after all received bytes
other than the last byte. At the end of the last received byte, a “not acknowledge” is returned.
The master device generates all the serial clock pulses and the START and STOP conditions. A
transfer is ended with a STOP condition or with a repeated START condition. Since a repeated
START condition is also the beginning of the next serial transfer, the bus will not be released. Data is
transferred with the most significant bit (MSB) first.
DS1307 64 x 8, Serial, I2C Real-Time Clock
The DS1307 may operate in the following two modes:
Slave Receiver Mode (Write Mode): Serial data and clock are received through SDA and
SCL. After each byte is received an acknowledge bit is transmitted. START and STOP
conditions are recognized as the beginning and end of a serial transfer. Hardware performs
address recognition after reception of the slave address and direction bit (see Figure 4). The
slave address byte is the first byte received after the master generates the START condition.
The slave address byte contains the 7-bit DS1307 address, which is 1101000, followed by the
direction bit (R/W), which for a write is 0. After receiving and decoding the slave address
byte, the DS1307 outputs an acknowledge on SDA. After the DS1307 acknowledges the slave
address + write bit, the master transmits a word address to the DS1307. This sets the register
pointer on the DS1307, with the DS1307 acknowledging the transfer. The master can then
transmit zero or more bytes of data with the DS1307 acknowledging each byte received. The
register pointer automatically increments after each data byte are written. The master will
generate a STOP condition to terminate the data write.
Slave Transmitter Mode (Read Mode): The first byte is received and handled as in the slave
receiver mode. However, in this mode, the direction bit will indicate that the transfer direction
is reversed. The DS1307 transmits serial data on SDA while the serial clock is input on SCL.
START and STOP conditions are recognized as the beginning and end of a serial transfer (see
Figure 5). The slave address byte is the first byte received after the START condition is
generated by the master. The slave address byte contains the 7-bit DS1307 address, which is
1101000, followed by the direction bit (R/W), which is 1 for a read. After receiving and
decoding the slave address the DS1307 outputs an acknowledge on SDA. The DS1307 then
begins to transmit data starting with the register address pointed to by the register pointer. If
the register pointer is not written to before the initiation of a read mode the first address that is
read is the last one stored in the register pointer. The register pointer automatically increments
after each byte are read. The DS1307 must receive a Not Acknowledge to end a read.
Figure 4. Data Write—Slave Receiver Mode
W<
R>
<Word Address (n)>
<Data(n)>
<Data(n+1)>
<Data(n+X)>
<Slave Address>
S 1101000 0 A XXXXXXXX A XXXXXXXX A XXXXXXXX A ... XXXXXXXX A P
S - Start
Master to slave
A - Acknowledge (ACK)
Slave to master
DATA TRANSFERRED
P - Stop
(X+1 BYTES + ACKNOWLEDGE)
Figure 5. Data Read—Slave Transmitter Mode
W<
R>
<Data(n)>
<Data(n+1)>
<Data(n+2)>
<Data(n+X)>
<Slave Address>
S 1101000 1 A XXXXXXXX A XXXXXXXX A XXXXXXXX A ... XXXXXXXX A P
S - Start
Master to slave
DATA TRANSFERRED
A - Acknowledge (ACK)
P - Stop (X+1 BYTES + ACKNOWLEDGE); NOTE: LAST DATA BYTE IS
A - Not Acknowledge (NACK) Slave to master FOLLOWED BY A NOT ACKNOWLEDGE (A) SIGNAL)
DS1307 64 x 8, Serial, I2C Real-Time Clock
Figure 6. Data Read (Write Pointer, Then Read)—Slave Receive and Transmit
<Slave Address> <R
<Word Address (n)>
<Slave Address>
S 1101000
0
A XXXXXXXX
A Sr 1101000
1 A
<Data(n)> <Data(n+1)> <Data(n+2)> <Data(n+X)>
XXXXXXXX
A XXXXXXXX A XXXXXXXX A ... XXXXXXXX A P
S - Start
Sr - Repeated Start Master to slave
DATA TRANSFERRED
A - Acknowledge (ACK)
(X+1 BYTES + ACKNOWLEDGE); NOTE: LAST DATA BYTE IS
P - Stop
Slave to master
FOLLOWED BY A NOT ACKNOWLEDGE (A) SIGNAL)
A - Not Acknowledge (NACK)
TYPICAL OPERATING CIRCUIT
V
CC
VCC
V CC
RPU
CRYSTAL
R PU
X1 X2 V
CC
SCL SQW/OUT
CPU DS1307
SDA V BAT
GND
RPU = tr/C b
PIN CONFIGURATIONS
TOP VIEW
VCC
X1
1
DS1
307
8
X1
1
8
VCC
2 7
DS
130
7
X2
SQW/OUT
X2
2 7
SQW/OUT
VBAT
3
6
SCL
VBAT
3
6
SCL
GND
4
5
SDA
GND
4
5
SDA
PDIP (300 mils)
SO (150 mils)
1307 64 x 8, Serial, I2C Real-Time Clock
PACKAGE INFORMATION
(The package drawing(s) in this data sheet may not reflect the most current specifications. For the
latest package outline information, go to www.maxim-ic.com/DallasPackInfo.)
DS1307 64 x 8, Serial, I2C Real-Time Clock
PACKAGE INFORMATION (continued)
(The package drawing(s) in this data sheet may not reflect the most current specifications. For
the latest package outline information, go to www.maxim-ic.com/DallasPackInfo.)
DHT11 Humidity &
Temperature Sensor
D-Robotics UK (www.droboticsonline.com)
DHT11 Temperature & Humidity Sensor features a
temperature & humidity sensor complex with a
calibrated digital signal output.
D-Robotics
7/30/2010
DHT 11 Humidity & Temperature Sensor
1. Introduction
This DFRobot DHT11 Temperature & Humidity Sensor features a temperature & humidity sensor
complex with a calibrated digital signal output. By using the exclusive digital-signal-acquisition
technique and temperature & humidity sensing technology, it ensures high reliability and
excellent long-term stability. This sensor includes a resistive-type humidity measurement
component and an NTC temperature measurement component, and connects to a high-
performance 8-bit microcontroller, offering excellent quality, fast response, anti-interference
ability and cost-effectiveness.
Each DHT11 element is strictly calibrated in the laboratory that is extremely accurate on
humidity calibration. The calibration coefficients are stored as programmes in the OTP memory,
hi h a e used the se so ’s i te al sig al dete ti g p o ess. The si gle-wire serial interface
makes system integration quick and easy. Its small size, low power consumption and up-to-20
meter signal transmission making it the best choice for various applications, including those
most demanding ones. The component is 4-pin single row pin package. It is convenient to
o e t a d spe ial pa kages a e p o ided a o di g to use s’ e uest.
2. Technical Specifications:
Overview:
Item Measurement Humidity Temperature Resolution Package
Range Accuracy Accuracy
DHT11 20-90%RH ±5%RH ±2 1 4 Pin Single
0-50 Row
Detailed Specifications:
Parameters Conditions Minimum Typical Maximum
Humidity
Resolution 1%RH 1%RH 1%RH
8 Bit
Repeatability ±1%RH
Accuracy 25 ±4%RH
0-50 ±5%RH
Interchangeability Fully Interchangeable
Measurement 0 30%RH 90%RH
Range
25 20%RH 90%RH
50 20%RH 80%RH
Response Time 1/e(63%)25, 6 S 10 S 15 S
(Seconds) 1m/s Air
Hysteresis ±1%RH
Long-Term Typical ±1%RH/year
Stability
Temperature
Resolution 1 1 1
8 Bit 8 Bit 8 Bit
Repeatability ±1
Accuracy ±1 ±2
Measurement 0 50
Range
Response Time 1/e(63%) 6 S 30 S
(Seconds)
3. Typical Application (Figure 1)
Figure 1 Typical Application
Note: 3Pin – Null; MCU = Micro-computer Unite or single chip Computer
When the connecting cable is shorter than 20 metres, a 5K pull-up resistor is recommended;
when the connecting cable is longer than 20 metres, choose a appropriate pull-up resistor as
needed.
4. Power and Pin
DHT ’s po e suppl is -5.5V DC. When power is supplied to the sensor, do not send
any instruction to the sensor in within one second in order to pass the unstable status.
One capacitor valued 100nF can be added between VDD and GND for power filtering.
5. Communication Process: Serial Interface (Single-Wire Two-Way)
Single-bus data format is used for communication and synchronization between MCU and
DHT11 sensor. One communication process is about 4ms.
Data consists of decimal and integral parts. A complete data transmission is 40bit, and the sensor sends higher data bit first.
Data format: 8bit integral RH data + 8bit decimal RH data + 8bit integral T data + 8bit decimal T
data + 8bit check sum. If the data transmission is right, the check-sum should be the last 8bit of
"8bit integral RH data + 8bit decimal RH data + 8bit integral T data + 8bit decimal T data".
5.1 Overall Communication Process (Figure 2, below)
When MCU sends a start signal, DHT11 changes from the low-power-consumption mode to the
running-mode, waiting for MCU completing the start signal. Once it is completed, DHT11 sends a
response signal of 40-bit data that include the relative humidity and temperature information to
MCU. Users can choose to collect (read) some data. Without the start signal from MCU, DHT11
will not give the response signal to MCU. Once data is collected, DHT11 will change to the low-
power-consumption mode until it receives a start signal from MCU again.
Figure 2 Overall Communication Process
5.2 MCU Sends out Start Signal to DHT (Figure 3, below)
Data Single-bus free status is at high voltage level. When the communication between MCU and
DHT11 begins, the programme of MCU will set Data Single-bus voltage level from high to low
a d this p o ess ust take at least 8 s to e su e DHT’s dete tio of MCU's sig al, the MCU will pull up voltage and wait 20- us fo DHT’s espo se.
Figure 3 MCU Sends out Start Signal & DHT Responses
5.3 DHT Responses to MCU (Figure 3, above)
Once DHT detects the start signal, it will send out a low-voltage-level response signal, which
lasts 80us. Then the programme of DHT sets Data Single-bus voltage level from low to high
and keeps it fo 8 us fo DHT’s p epa atio fo se di g data.
When DATA Single-Bus is at the low voltage level, this means that DHT is sending the
response signal. Once DHT sent out the response signal, it pulls up voltage and keeps it for
80us and prepares for data transmission.
When DHT is sending data to MCU, every bit of data begins with the 50us low-voltage-level and
the length of the following high-voltage-level signal determines whether data bit is "0" or "1"
(see Figures 4 and 5 below).
Figure 4 Data "0" Indication
Figure 5 Data "1" Indication
If the response signal from DHT is always at high-voltage-level, it suggests that DHT is not
responding properly and please check the connection. When the last bit data is transmitted,
DHT11 pulls down the voltage level and keeps it for 50us. Then the Single-Bus voltage will be
pulled up by the resistor to set it back to the free status.
6. Electrical Characteristics
VDD=5V, T = 25 (unless otherwise stated)
Conditions Minimum Typical Maximum
Power Supply DC 3V 5V 5.5V
Current Measuring 0.5mA 2.5mA
Supply
Average 0.2mA 1mA
Standby 100uA 150uA
Sampling Second 1
period
Note: Sampling period at intervals should be no less than 1 second.
7. Attentions of application
(1) Operating conditions
Applying the DHT11 sensor beyond its working range stated in this datasheet can result in 3%RH
signal shift/discrepancy. The DHT11 sensor can recover to the calibrated status gradually when
it gets back to the normal operating condition and works within its range. Please refer to (3) of
this section to accelerate its recovery. Please be aware that operating the DHT11 sensor in the non- o al o ki g o ditio s ill a ele ate se so ’s agi g p o ess.
(2) Attention to chemical materials
Vapo f o he i al ate ials a i te fe e ith DHT’s se siti e-elements and debase its
sensitivity. A high degree of chemical contamination can permanently damage the sensor.
(3) Restoration process when (1) & (2) happen
Step one: Keep the DHT sensor at the condition of Temperature 50~60Celsius, humidity <10%RH for 2 hours;
Step two:K keep the DHT sensor at the condition of Temperature 20~30Celsius, humidity >70%RH for 5 hours.
(4) Temperature Affect
Relative humidity largely depends on temperature. Although temperature compensation
technology is used to ensure accurate measurement of RH, it is still strongly advised to keep the
humidity and temperature sensors working under the same temperature. DHT11 should be
mounted at the place as far as possible from parts that may generate heat.
(5) Light Affect
Lo g ti e e posu e to st o g su light a d ult a iolet a de ase DHT’s pe fo a e.
(6) Connection wires
The quality of connection wires will affect the quality and distance of communication and high quality shielding-wire is recommended.
(7) Other attentions
Welding temperature should be bellow 260Celsius and contact should take less than 10 seconds.
Avoid using the sensor under dew condition.
Do not use this product in safety or emergency stop devices or any other occasion that failure of DHT11 may cause personal injury.
Storage: Keep the sensor at temperature 10-40, humidity <60%RH.
Declaim:
This datasheet is a t a slated e sio of the a ufa tu e ’s datasheet. Although the due
care has been taken during the translation, D-Robotics is not responsible for the accuracy of
the information contained in this document. Copyright © D-Robotics.
D-Robotics: www.droboticsonline.com
Email contact: d_robotics@hotmail.co.uk
Arduino Uno
Arduino Uno R3 Front Arduino Uno R3 Back
Arduino Uno R2 Front Arduino Uno SMD Arduino Uno Front Arduino Uno Back
Overview
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic
resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything
needed to support the microcontroller; simply connect it to a computer with a USB cable or power it
with a AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip.
Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial
converter.
Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to ground, making it easier to put
into DFU mode.
Revision 3 of the board has the following new features:
1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new pins
placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided
from the board. In future, shields will be compatible both with the board that use the AVR,
which operate with 5V and with the Arduino Due that operate with 3.3V. The second one is a
not connected pin, that is reserved for future purposes.
Stronger RESET circuit.
Atmega 16U2 replace the 8U2.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and
version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest in a series
of USB Arduino boards, and the reference model for the Arduino platform; for a comparison with
previous versions, see the index of Arduino boards.
Summary
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328) of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz
Schematic & Reference Design
EAGLE files: arduino-uno-Rev3-reference-design.zip (NOTE: works with Eagle 6.0 and newer)
Schematic: arduino-uno-Rev3-schematic.pdf
Note: The Arduino reference design can use an Atmega8, 168, or 328, Current models use an
ATmega328, but an Atmega8 is shown in the schematic for reference. The pin configuration is identical
on all three processors.
Power
The Arduino Uno can be powered via the USB connection or with an external power supply. The power
source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The
adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads
from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however,
the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the
voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
The power pins are as follows:
VIN. The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can supply
voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.
5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied
with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of
the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can
damage your board. We don't advise it.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA. GND. Ground pins.
Memory
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of SRAM and 1 KB
of EEPROM (which can be read and written with the EEPROM library).
Input and Output
Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or receive a
maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In
addition, some pins have specialized functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins
are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attachInterrupt() function for
details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication
using the SPI library.
LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e.
1024 different values). By default they measure from ground to 5 volts, though is it possible to change
the upper end of their range using the AREF pin and the analogReference() function. Additionally, some
pins have specialized functionality:
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.
There are a couple of other pins on the board:
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.
See also the mapping between Arduino pins and ATmega328 ports. The mapping for the Atmega8,
168, and 328 is identical.
Communication
The Arduino Uno has a number of facilities for communicating with a computer, another Arduino, or
other microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is
available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels this serial
communication over USB and appears as a virtual com port to software on the computer. The '16U2
firmware uses the standard USB COM drivers, and no external driver is needed. However, on Windows,
a .inf file is required. The Arduino software includes a serial monitor which allows simple textual data to
be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being
transmitted via the USB-to-serial chip and USB connection to the computer (but not for serial
communication on pins 0 and 1).
A SoftwareSerial library allows for serial communication on any of the Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software includes a
Wire library to simplify use of the I2C bus; see the documentation for details. For SPI communication,
use the SPI library.
Programming
The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino Uno from
the Tools > Board menu (according to the microcontroller on your board). For details, see the
reference and tutorials.
The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you to upload new
code to it without the use of an external hardware programmer. It communicates using the original
STK500 protocol (reference, C header files).
You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit
Serial Programming) header; see these instructions for details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available . The
ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:
On Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy)
and then resetting the 8U2.
On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground, making it easier to put into DFU mode.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and Linux) to
load a new firmware. Or you can use the ISP header with an external programmer (overwriting the
DFU bootloader). See this user-contributed tutorial for more information.
Automatic (Software) Reset
Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is
designed in a way that allows it to be reset by software running on a connected computer. One of the
hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the
ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops
long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by
simply pressing the upload button in the Arduino environment. This means that the bootloader can
have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer running Mac OS X
or Linux, it resets each time a connection is made to it from software (via USB). For the following half-
second or so, the bootloader is running on the Uno. While it is programmed to ignore malformed data
(i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the
board after a connection is opened. If a sketch running on the board receives one-time configuration or
other data when it first starts, make sure that the software with which it communicates waits a second
after opening the connection and before sending this data.
The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace
can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the
auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see this forum thread for
details.
USB Overcurrent Protection
The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from shorts and
overcurrent. Although most computers provide their own internal protection, the fuse provides an extra
layer of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break
the connection until the short or overload is removed.
Physical Characteristics
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the USB
connector and power jack extending beyond the former dimension. Four screw holes allow the board to
be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil
(0.16"), not an even multiple of the 100 mil spacing of the other pins.
MG996R High Torque
Metal Gear Dual Ball Bearing Servo
This High-Torque MG996R Digital Servo features metal gearing resulting in extra high 10kg
stalling torque in a tiny package. The MG996R is essentially an upgraded version of the
famous MG995 servo, and features upgraded shock-proofing and a redesigned PCB and IC
control system that make it much more accurate than its predecessor. The gearing and motor
have also been upgraded to improve dead bandwith and centering. The unit comes complete
with 30cm wire and 3 pin 'S' type female header connector that fits most receivers, including
Futaba, JR, GWS, Cirrus, Blue Bird, Blue Arrow, Corona, Berg, Spektrum and Hitec.
This high-torque standard servo can rotate approximately 120 degrees (60 in each direction).
You can use any servo code, hardware or library to control these servos, so it's great for
beginners who want to make stuff move without building a motor controller with feedback &
gear box, especially since it will fit in small places. The MG996R Metal Gear Servo also
comes with a selection of arms and hardware to get you set up nice and fast!
Specifications
• Weight: 55 g
• Dimension: 40.7 x 19.7 x 42.9 mm approx.
• Stall torque: 9.4 kgfcm (4.8 V ), 11 kgfcm (6 V)
• Operating speed: 0.17 s/60º (4.8 V), 0.14 s/60º (6 V)
• Operating voltage: 4.8 V a
• Running Current 500 mA –
• Stall Current 2.5 A (6V)
• Dead band width: 5 s
• Stable and shock proof dou
• Temperature range: 0 ºC –
a 7.2 V
– 900 mA (6V)
ouble ball bearing design
55 ºC
1 of 15 REV: 121906
Note: Some revisions of this device may incorporate deviations from published specifications known as errata. Multiple revisions of any device may be simultaneously available through various sales channels. For information about device errata, click here: www.maxim-ic.com/errata.
GENERAL DESCRIPTION The DS1307 serial real-time clock (RTC) is a
low-power, full binary-coded decimal (BCD)
clock/calendar plus 56 bytes of NV SRAM.
Address and data are transferred serially through
an I2C, bidirectional bus. The clock/calendar
provides seconds, minutes, hours, day, date,
month, and year information. The end of the
month date is automatically adjusted for months
with fewer than 31 days, including corrections for
leap year. The clock operates in either the 24-
hour or 12-hour format with AM/PM indicator.
The DS1307 has a built-in power-sense circuit
that detects power failures and automatically
switches to the backup supply. Timekeeping
operation continues while the part operates from
the backup supply.
FEATURES Real-Time Clock (RTC) Counts Seconds,
Minutes, Hours, Date of the Month, Month,
Day of the week, and Year with Leap-Year
Compensation Valid Up to 2100
56-Byte, Battery-Backed, Nonvolatile (NV)
RAM for Data Storage
I2C Serial Interface
Programmable Square-Wave Output Signal
Automatic Power-Fail Detect and Switch
Circuitry
Consumes Less than 500nA in Battery-
Backup Mode with Oscillator Running
Optional Industrial Temperature Range:
-40°C to +85°C
Available in 8-Pin Plastic DIP or SO
Underwriters Laboratory (UL) Recognized
Typical Operating Circuit and Pin Configurations appear at end of data sheet.
ORDERING INFORMATION
PART TEMP RANGE VOLTAGE
(V) PIN-PACKAGE TOP MARK*
DS1307 0°C to +70°C 5.0 8 PDIP (300 mils) DS1307
DS1307+ 0°C to +70°C 5.0 8 PDIP (300 mils) DS1307
DS1307N -40°C to +85°C 5.0 8 PDIP (300 mils) DS1307N
DS1307N+ -40°C to +85°C 5.0 8 PDIP (300 mils) DS1307N
DS1307Z 0°C to +70°C 5.0 8 SO (150 mils) DS1307
DS1307Z+ 0°C to +70°C 5.0 8 SO (150 mils) DS1307
DS1307ZN -40°C to +85°C 5.0 8 SO (150 mils) DS1307N
DS1307ZN+ -40°C to +85°C 5.0 8 SO (150 mils) DS1307N
DS1307Z/T&R 0°C to +70°C 5.0 8 SO (150 mils) Tape and Reel DS1307
DS1307Z+T&R 0°C to +70°C 5.0 8 SO (150 mils) Tape and Reel DS1307
DS1307ZN/T&R -40°C to +85°C 5.0 8 SO (150 mils) Tape and Reel DS1307N
DS1307ZN+T&R -40°C to +85°C 5.0 8 SO (150 mils) Tape and Reel DS1307N
+ Denotes a lead-free/RoHS-compliant device.
* A “+” anywhere on the top mark indicates a lead-free device.
DS130764 x 8, Serial, I
2C Real-Time Clock
DS1307 64 x 8, Serial, I2C Real-Time Clock
2 of 15
ABSOLUTE MAXIMUM RATINGS Voltage Range on Any Pin Relative to Ground……….……………………….…………....-0.5V to +7.0V
Operating Temperature Range (Noncondensing)
Commercial…………………….……………………………….………………………..0°C to +70°C
Industrial………………………………………………………………………………-40°C to +85°C
Storage Temperature Range………………………………………...…………..…………-55°C to +125°C
Soldering Temperature (DIP, leads)..…………………………………………….....+260°C for 10 seconds
Soldering Temperature (surface mount)…..…………………………See JPC/JEDEC Standard J-STD-020
Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. These are stress ratings only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the specifications is not implied. Exposure to the absolute maximum rating conditions for extended periods may affect device reliability.
RECOMMENDED DC OPERATING CONDITIONS (TA = 0°C to +70°C, TA = -40°C to +85°C.) (Notes 1, 2)
PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS
Supply Voltage VCC 4.5 5.0 5.5 V
Logic 1 Input VIH 2.2 VCC + 0.3 V
Logic 0 Input VIL -0.3 +0.8 V
VBAT Battery Voltage VBAT 2.0 3 3.5 V
DC ELECTRICAL CHARACTERISTICS (VCC = 4.5V to 5.5V; TA = 0°C to +70°C, TA = -40°C to +85°C.) (Notes 1, 2)
PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS
Input Leakage (SCL) ILI -1 1 µA
I/O Leakage (SDA, SQW/OUT) ILO -1 1 µA
Logic 0 Output (IOL = 5mA) VOL 0.4 V
Active Supply Current
(fSCL = 100kHz) ICCA 1.5 mA
Standby Current ICCS (Note 3) 200 µA
VBAT Leakage Current IBATLKG 5 50 nA
Power-Fail Voltage (VBAT = 3.0V) VPF 1.216 x
VBAT
1.25 x
VBAT
1.284 x
VBAT V
DC ELECTRICAL CHARACTERISTICS (VCC = 0V, VBAT = 3.0V; TA = 0°C to +70°C, TA = -40°C to +85°C.) (Notes 1, 2)
PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS
VBAT Current (OSC ON);
SQW/OUT OFF IBAT1 300 500 nA
VBAT Current (OSC ON);
SQW/OUT ON (32kHz) IBAT2 480 800 nA
VBAT Data-Retention Current
(Oscillator Off) IBATDR 10 100 nA
WARNING: Negative undershoots below -0.3V while the part is in battery-backed mode may cause loss of data.
DS1307 64 x 8, Serial, I2C Real-Time Clock
3 of 15
AC ELECTRICAL CHARACTERISTICS (VCC = 4.5V to 5.5V; TA = 0°C to +70°C, TA = -40°C to +85°C.)
PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS
SCL Clock Frequency fSCL 0 100 kHz
Bus Free Time Between a STOP and
START Condition tBUF 4.7 µs
Hold Time (Repeated) START
Condition tHD:STA (Note 4) 4.0 µs
LOW Period of SCL Clock tLOW 4.7 µs
HIGH Period of SCL Clock tHIGH 4.0 µs
Setup Time for a Repeated START
Condition tSU:STA 4.7 µs
Data Hold Time tHD:DAT 0 µs
Data Setup Time tSU:DAT (Notes 5, 6) 250 ns
Rise Time of Both SDA and SCL
Signals tR 1000 ns
Fall Time of Both SDA and SCL
Signals tF 300 ns
Setup Time for STOP Condition tSU:STO 4.7 µs
CAPACITANCE (TA = +25°C)
PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS
Pin Capacitance (SDA, SCL) CI/O 10 pF
Capacitance Load for Each Bus
Line CB (Note 7) 400 pF
Note 1: All voltages are referenced to ground.
Note 2: Limits at -40°C are guaranteed by design and are not production tested.
Note 3: ICCS specified with VCC = 5.0V and SDA, SCL = 5.0V.
Note 4: After this period, the first clock pulse is generated.
Note 5: A device must internally provide a hold time of at least 300ns for the SDA signal (referred to the VIH(MIN) of the
SCL signal) to bridge the undefined region of the falling edge of SCL.
Note 6: The maximum tHD:DAT only has to be met if the device does not stretch the LOW period (tLOW) of the SCL signal.
Note 7: CB—total capacitance of one bus line in pF.
DS1307 64 x 8, Serial, I2C Real-Time Clock
4 of 15
TIMING DIAGRAM
Figure 1. Block Diagram
START
SDA
STOP
SCL
tSU:STO
tHD:STA
tSU:STA
REPEATED
START
t HD:DAT
tHIGH
tFt LOW
t R
tHD:STA
t BUF
SU:DAT
RAM
(56 X 8)
SERIAL BUS INTERFACE
AND ADDRESS REGISTER
CONTROL
LOGIC
1Hz
1Hz/4.096kHz/8.192kHz/32.768kHz MUX/
BUFFER
USER BUFFER (7 BYTES)
CLOCK,
CALENDAR, AND CONTROL
REGISTERS
POWER CONTROL
Dallas
Semiconductor
DS1307
X1 C
L
C L
X2
SDA
SCL
SQW/OUT
V CC
GND
V BAT
Oscillator
and divider
DS1307 64 x 8, Serial, I2C Real-Time Clock
5 of 15
TYPICAL OPERATING CHARACTERISTICS (VCC = 5.0V, TA = +25°C, unless otherwise noted.)
ICCS vs. VCC
0
10
20
30
40
50
60
70
80
90
100
110
120
1.0 2.0 3.0 4.0 5.0VCC (V)
SU
PP
LY C
UR
RE
NT
(uA
)
VBAT
=3.0V
IBAT vs. Temperature
175.0
225.0
275.0
325.0
-40 -20 0 20 40 60 80
TEMPERATURE (°C)
SU
PP
LY C
UR
RE
NT
(nA
)
VCC
=0V, VBAT
=3.0
SQW=32kHz
SQW off
IBAT vs. VBAT
100
150
200
250
300
350
400
2.0 2.5 3.0 3.5VBACKUP (V)
SU
PP
LY C
UR
RE
NT
(nA
)
SQW=32kHz
SQW off
VCC
= 0V
SQW/OUT vs. Supply Voltage
32768
32768.1
32768.2
32768.3
32768.4
32768.5
32768.6
32768.7
32768.8
32768.9
32769
2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5Supply (V)
FR
EQ
UE
NC
Y (
Hz)
DS1307 64 x 8, Serial, I2C Real-Time Clock
6 of 15
PIN DESCRIPTION PIN NAME FUNCTION
1 X1
2 X2
Connections for Standard 32.768kHz Quartz Crystal. The internal oscillator circuitry is
designed for operation with a crystal having a specified load capacitance (CL) of 12.5pF.
X1 is the input to the oscillator and can optionally be connected to an external 32.768kHz
oscillator. The output of the internal oscillator, X2, is floated if an external oscillator is
connected to X1.
Note: For more information on crystal selection and crystal layout considerations, refer to
Application Note 58: Crystal Considerations with Dallas Real-Time Clocks.
3 VBAT
Backup Supply Input for Any Standard 3V Lithium Cell or Other Energy Source. Battery
voltage must be held between the minimum and maximum limits for proper operation.
Diodes in series between the battery and the VBAT pin may prevent proper operation. If a
backup supply is not required, VBAT must be grounded. The nominal power-fail trip point
(VPF) voltage at which access to the RTC and user RAM is denied is set by the internal
circuitry as 1.25 x VBAT nominal. A lithium battery with 48mAhr or greater will back up
the DS1307 for more than 10 years in the absence of power at +25°C.
UL recognized to ensure against reverse charging current when used with a lithium
battery. Go to: www.maxim-ic.com/qa/info/ul/.
4 GND Ground
5 SDA Serial Data Input/Output. SDA is the data input/output for the I2C serial interface. The
SDA pin is open drain and requires an external pullup resistor.
6 SCL Serial Clock Input. SCL is the clock input for the I2C interface and is used to synchronize
data movement on the serial interface.
7 SWQ/OUT
Square Wave/Output Driver. When enabled, the SQWE bit set to 1, the SQW/OUT pin
outputs one of four square-wave frequencies (1Hz, 4kHz, 8kHz, 32kHz). The SQW/OUT
pin is open drain and requires an external pullup resistor. SQW/OUT operates with either
VCC or VBAT applied.
8 VCC
Primary Power Supply. When voltage is applied within normal limits, the device is fully
accessible and data can be written and read. When a backup supply is connected to the
device and VCC is below VTP, read and writes are inhibited. However, the timekeeping
function continues unaffected by the lower input voltage.
DETAILED DESCRIPTION The DS1307 is a low-power clock/calendar with 56 bytes of battery-backed SRAM. The clock/calendar
provides seconds, minutes, hours, day, date, month, and year information. The date at the end of the
month is automatically adjusted for months with fewer than 31 days, including corrections for leap year.
The DS1307 operates as a slave device on the I2C bus. Access is obtained by implementing a START
condition and providing a device identification code followed by a register address. Subsequent registers
can be accessed sequentially until a STOP condition is executed. When VCC falls below 1.25 x VBAT, the
device terminates an access in progress and resets the device address counter. Inputs to the device will not
be recognized at this time to prevent erroneous data from being written to the device from an out-of-
tolerance system. When VCC falls below VBAT, the device switches into a low-current battery-backup
mode. Upon power-up, the device switches from battery to VCC when VCC is greater than VBAT +0.2V and
recognizes inputs when VCC is greater than 1.25 x VBAT. The block diagram in Figure 1 shows the main
elements of the serial RTC.
DS1307 64 x 8, Serial, I2C Real-Time Clock
7 of 15
OSCILLATOR CIRCUIT The DS1307 uses an external 32.768kHz crystal. The oscillator circuit does not require any external
resistors or capacitors to operate. Table 1 specifies several crystal parameters for the external crystal.
Figure 1. shows a functional schematic of the oscillator circuit. If using a crystal with the specified
characteristics, the startup time is usually less than one second.
CLOCK ACCURACY The accuracy of the clock is dependent upon the accuracy of the crystal and the accuracy of the match
between the capacitive load of the oscillator circuit and the capacitive load for which the crystal was
trimmed. Additional error will be added by crystal frequency drift caused by temperature shifts. External
circuit noise coupled into the oscillator circuit may result in the clock running fast. Refer to Application
Note 58: Crystal Considerations with Dallas Real-Time Clocks for detailed information.
Table 1. Crystal Specifications*
PARAMETER SYMBOL MIN TYP MAX UNITS
Nominal Frequency fO 32.768 kHz
Series Resistance ESR 45 kΩ
Load Capacitance CL 12.5 pF
*The crystal, traces, and crystal input pins should be isolated from RF generating signals. Refer to Application Note 58: Crystal Considerations for Dallas Real-Time Clocks for additional specifications.
Figure 2. Recommended Layout for Crystal
RTC AND RAM ADDRESS MAP Table 2 shows the address map for the DS1307 RTC and RAM registers. The RTC registers are located in
address locations 00h to 07h. The RAM registers are located in address locations 08h to 3Fh. During a
multibyte access, when the address pointer reaches 3Fh, the end of RAM space, it wraps around to
location 00h, the beginning of the clock space.
NOTE: AVOID ROUTING SIGNAL LINES IN THE CROSSHATCHEDAREA (UPPER LEFT QUADRANT) OF THE PACKAGE UNLESSTHERE IS A GROUND PLANE BETWEEN THE SIGNAL LINE AND THEDEVICE PACKAGE.
LOCAL GROUND PLANE (LAYER 2)
CRYSTAL
X1
X2
GND
DS1307 64 x 8, Serial, I2C Real-Time Clock
8 of 15
CLOCK AND CALENDAR The time and calendar information is obtained by reading the appropriate register bytes. Table 2 shows
the RTC registers. The time and calendar are set or initialized by writing the appropriate register bytes.
The contents of the time and calendar registers are in the BCD format. The day-of-week register
increments at midnight. Values that correspond to the day of week are user-defined but must be
sequential (i.e., if 1 equals Sunday, then 2 equals Monday, and so on.) Illogical time and date entries
result in undefined operation. Bit 7 of Register 0 is the clock halt (CH) bit. When this bit is set to 1, the
oscillator is disabled. When cleared to 0, the oscillator is enabled.
Note that the initial power-on state of all registers is not defined. Therefore, it is important to
enable the oscillator (CH bit = 0) during initial configuration.
The DS1307 can be run in either 12-hour or 24-hour mode. Bit 6 of the hours register is defined as the
12-hour or 24-hour mode-select bit. When high, the 12-hour mode is selected. In the 12-hour mode, bit 5
is the AM/PM bit with logic high being PM. In the 24-hour mode, bit 5 is the second 10-hour bit (20 to
23 hours). The hours value must be re-entered whenever the 12/24-hour mode bit is changed.
When reading or writing the time and date registers, secondary (user) buffers are used to prevent errors
when the internal registers update. When reading the time and date registers, the user buffers are
synchronized to the internal registers on any I2C START. The time information is read from these
secondary registers while the clock continues to run. This eliminates the need to re-read the registers in
case the internal registers update during a read. The divider chain is reset whenever the seconds register is
written. Write transfers occur on the I2C acknowledge from the DS1307. Once the divider chain is reset,
to avoid rollover issues, the remaining time and date registers must be written within one second.
Table 2. Timekeeper Registers
ADDRESS BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 FUNCTION RANGE
00H CH 10 Seconds Seconds Seconds 00–59
01H 0 10 Minutes Minutes Minutes 00–59
12 10
Hour 02H 0
24 PM/
AM
10
Hour Hours Hours
1–12
+AM/PM
00–23
03H 0 0 0 0 0 DAY Day 01–07
04H 0 0 10 Date Date Date 01–31
05H 0 0 0 10
Month Month Month 01–12
06H 10 Year Year Year 00–99
07H OUT 0 0 SQWE 0 0 RS1 RS0 Control —
08H-3FH RAM
56 x 8 00H–FFH
0 = Always reads back as 0.
DS1307 64 x 8, Serial, I2C Real-Time Clock
9 of 15
CONTROL REGISTER The DS1307 control register is used to control the operation of the SQW/OUT pin.
BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0
OUT 0 0 SQWE 0 0 RS1 RS0
Bit 7: Output Control (OUT). This bit controls the output level of the SQW/OUT pin when the square-
wave output is disabled. If SQWE = 0, the logic level on the SQW/OUT pin is 1 if OUT = 1 and is 0 if
OUT = 0.
Bit 4: Square-Wave Enable (SQWE). This bit, when set to logic 1, enables the oscillator output. The
frequency of the square-wave output depends upon the value of the RS0 and RS1 bits. With the square-
wave output set to 1Hz, the clock registers update on the falling edge of the square wave.
Bits 1, 0: Rate Select (RS1, RS0). These bits control the frequency of the square-wave output when the
square-wave output has been enabled. The following table lists the square-wave frequencies that can be
selected with the RS bits.
RS1 RS0 SQW/OUT OUTPUT SQWE OUT
0 0 1Hz 1 X
0 1 4.096kHz 1 X
1 0 8.192kHz 1 X
1 1 32.768kHz 1 X
X X 0 0 0
X X 1 0 1
DS1307 64 x 8, Serial, I2C Real-Time Clock
10 of 15
I2C DATA BUS The DS1307 supports the I
2C protocol. A device that sends data onto the bus is defined as a transmitter
and a device receiving data as a receiver. The device that controls the message is called a master. The
devices that are controlled by the master are referred to as slaves. The bus must be controlled by a master
device that generates the serial clock (SCL), controls the bus access, and generates the START and STOP
conditions. The DS1307 operates as a slave on the I2C bus.
Figures 3, 4, and 5 detail how data is transferred on the I2C bus.
Data transfer may be initiated only when the bus is not busy.
During data transfer, the data line must remain stable whenever the clock line is HIGH. Changes in
the data line while the clock line is high will be interpreted as control signals.
Accordingly, the following bus conditions have been defined:
Bus not busy: Both data and clock lines remain HIGH.
Start data transfer: A change in the state of the data line, from HIGH to LOW, while the clock is
HIGH, defines a START condition.
Stop data transfer: A change in the state of the data line, from LOW to HIGH, while the clock line
is HIGH, defines the STOP condition.
Data valid: The state of the data line represents valid data when, after a START condition, the data
line is stable for the duration of the HIGH period of the clock signal. The data on the line must be
changed during the LOW period of the clock signal. There is one clock pulse per bit of data.
Each data transfer is initiated with a START condition and terminated with a STOP condition. The
number of data bytes transferred between START and STOP conditions is not limited, and is
determined by the master device. The information is transferred byte-wise and each receiver
acknowledges with a ninth bit. Within the I2C bus specifications a standard mode (100kHz clock
rate) and a fast mode (400kHz clock rate) are defined. The DS1307 operates in the standard mode
(100kHz) only.
Acknowledge: Each receiving device, when addressed, is obliged to generate an acknowledge after
the reception of each byte. The master device must generate an extra clock pulse which is associated
with this acknowledge bit.
A device that acknowledges must pull down the SDA line during the acknowledge clock pulse in
such a way that the SDA line is stable LOW during the HIGH period of the acknowledge related
clock pulse. Of course, setup and hold times must be taken into account. A master must signal an
end of data to the slave by not generating an acknowledge bit on the last byte that has been clocked
out of the slave. In this case, the slave must leave the data line HIGH to enable the master to generate
the STOP condition.
DS1307 64 x 8, Serial, I2C Real-Time Clock
11 of 15
Figure 3. Data Transfer on I2C Serial Bus
Depending upon the state of the R/W bit, two types of data transfer are possible:
1. Data transfer from a master transmitter to a slave receiver. The first byte transmitted by the
master is the slave address. Next follows a number of data bytes. The slave returns an acknowledge
bit after each received byte. Data is transferred with the most significant bit (MSB) first.
2. Data transfer from a slave transmitter to a master receiver. The first byte (the slave address) is
transmitted by the master. The slave then returns an acknowledge bit. This is followed by the slave
transmitting a number of data bytes. The master returns an acknowledge bit after all received bytes
other than the last byte. At the end of the last received byte, a “not acknowledge” is returned.
The master device generates all the serial clock pulses and the START and STOP conditions. A
transfer is ended with a STOP condition or with a repeated START condition. Since a repeated
START condition is also the beginning of the next serial transfer, the bus will not be released. Data is
transferred with the most significant bit (MSB) first.
ACKNOWLEDGEMENT SIGNAL FROM RECEIVER
ACKNOWLEDGEMENT
SIGNAL FROM RECEIVER
R/WDIRECTION
BIT
REPEATED IF MORE BYTES
ARE TRANSFERED
START CONDITION
STOP
CONDITION
OR REPEATED
START
CONDITION
MSB
1 2 6 7 8 9 1 2 3-7 8 9
ACK ACK
SDA
SCL
DS1307 64 x 8, Serial, I2C Real-Time Clock
12 of 15
...AXXXXXXXXA1101000S 0 XXXXXXXX A XXXXXXXX A XXXXXXXX A P
<Slave Address> <Word Address (n)> <Data(n)> <Data(n+1)> <Data(n+X)>
S - Start
A - Acknowledge (ACK)
P - Stop
<RW
>
DATA TRANSFERRED
(X+1 BYTES + ACKNOWLEDGE)
Master to slave
Slave to master
AXXXXXXXXA1101000S 1 XXXXXXXX A XXXXXXXX XXXXXXXX A P
<Slave Address> <Data(n)> <Data(n+1)> <Data(n+2)> <Data(n+X)>
S - Start
A - Acknowledge (ACK)
P - Stop
A - Not Acknowledge (NACK)
<RW
>
DATA TRANSFERRED
(X+1 BYTES + ACKNOWLEDGE); NOTE: LAST DATA BYTE IS
FOLLOWED BY A NOT ACKNOWLEDGE (A) SIGNAL)
Master to slave
Slave to master
...A
The DS1307 may operate in the following two modes:
1. Slave Receiver Mode (Write Mode): Serial data and clock are received through SDA and
SCL. After each byte is received an acknowledge bit is transmitted. START and STOP
conditions are recognized as the beginning and end of a serial transfer. Hardware performs
address recognition after reception of the slave address and direction bit (see Figure 4). The
slave address byte is the first byte received after the master generates the START condition.
The slave address byte contains the 7-bit DS1307 address, which is 1101000, followed by the
direction bit (R/W), which for a write is 0. After receiving and decoding the slave address
byte, the DS1307 outputs an acknowledge on SDA. After the DS1307 acknowledges the slave
address + write bit, the master transmits a word address to the DS1307. This sets the register
pointer on the DS1307, with the DS1307 acknowledging the transfer. The master can then
transmit zero or more bytes of data with the DS1307 acknowledging each byte received. The
register pointer automatically increments after each data byte are written. The master will
generate a STOP condition to terminate the data write.
2. Slave Transmitter Mode (Read Mode): The first byte is received and handled as in the slave
receiver mode. However, in this mode, the direction bit will indicate that the transfer direction
is reversed. The DS1307 transmits serial data on SDA while the serial clock is input on SCL.
START and STOP conditions are recognized as the beginning and end of a serial transfer (see
Figure 5). The slave address byte is the first byte received after the START condition is
generated by the master. The slave address byte contains the 7-bit DS1307 address, which is
1101000, followed by the direction bit (R/W), which is 1 for a read. After receiving and
decoding the slave address the DS1307 outputs an acknowledge on SDA. The DS1307 then
begins to transmit data starting with the register address pointed to by the register pointer. If
the register pointer is not written to before the initiation of a read mode the first address that is
read is the last one stored in the register pointer. The register pointer automatically increments
after each byte are read. The DS1307 must receive a Not Acknowledge to end a read.
Figure 4. Data Write—Slave Receiver Mode
Figure 5. Data Read—Slave Transmitter Mode
DS1307 64 x 8, Serial, I2C Real-Time Clock
13 of 15
AXXXXXXXX
1101000S
XXXXXXXX A XXXXXXXX XXXXXXXX A P
<Slave Address> <Word Address (n)> <Slave Address>
S - Start
Sr - Repeated Start
A - Acknowledge (ACK)
P - Stop
A - Not Acknowledge (NACK)
<RW
>
DATA TRANSFERRED
(X+1 BYTES + ACKNOWLEDGE); NOTE: LAST DATA BYTE IS
FOLLOWED BY A NOT ACKNOWLEDGE (A) SIGNAL)
Master to slave
Slave to master
...
AXXXXXXXXA0 1101000Sr A1
<Data(n)> <Data(n+1)> <Data(n+2)> <Data(n+X)>
<RW
>
A
Figure 6. Data Read (Write Pointer, Then Read)—Slave Receive and Transmit
TYPICAL OPERATING CIRCUIT
PIN CONFIGURATIONS
TOP VIEW
PDIP (300 mils)
X1
X2
VBAT
GND
VCC
SQW/OUT
SCL
1
2
3
4
8
7
6
5 SDA
SO (150 mils)
1
2
3
4
8
7
6
5
X1
X2
VBAT
GND
VCC
SQW/OUT
SCL
SDA
DS
13
07
DS
13
07
DS1307 CPU
V CC
V CC
V CC
SDA
SCL
GND
X2 X1
V CC
R PU R
PU
CRYSTAL
SQW/OUT
V BAT
R PU = t
r /C b
DS1307 64 x 8, Serial, I2C Real-Time Clock
14 of 15
PACKAGE INFORMATION (The package drawing(s) in this data sheet may not reflect the most current specifications. For the latest package outline information, go to www.maxim-ic.com/DallasPackInfo.)
DS1307 64 x 8, Serial, I2C Real-Time Clock
15 of 15 Maxim/Dallas Semiconductor cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim/Dallas Semiconductor product. No circuit patent licenses are implied. Maxim/Dallas Semiconductor reserves the right to change the circuitry and specifications without notice at any time.
Maxim Integrated Products , 120 San Gabrie l Dr ive , Sunnyvale , CA 94086 408-737-7600 © 2006 Maxim Integrated Products
The Maxim logo is a registered trademark of Maxim Integrated Products, Inc. The Dallas logo is a registered trademark of Dallas Semiconductor Corporation.
PACKAGE INFORMATION (continued) (The package drawing(s) in this data sheet may not reflect the most current specifications. For the latest package outline information, go to www.maxim-ic.com/DallasPackInfo.)
DHT11 Humidity &
Temperature Sensor D-Robotics UK (www.droboticsonline.com)
DHT11 Temperature & Humidity Sensor features a
temperature & humidity sensor complex with a
calibrated digital signal output.
D-Robotics
7/30/2010
Page | 2
DHT 11 Humidity & Temperature
Sensor
1. Introduction
This DFRobot DHT11 Temperature & Humidity Sensor features a temperature & humidity sensor
complex with a calibrated digital signal output. By using the exclusive digital-signal-acquisition
technique and temperature & humidity sensing technology, it ensures high reliability and
excellent long-term stability. This sensor includes a resistive-type humidity measurement
component and an NTC temperature measurement component, and connects to a high-
performance 8-bit microcontroller, offering excellent quality, fast response, anti-interference
ability and cost-effectiveness.
Page | 3
Each DHT11 element is strictly calibrated in the laboratory that is extremely accurate on
humidity calibration. The calibration coefficients are stored as programmes in the OTP memory,
whi h are used y the sensor’s internal signal dete ting pro ess. The single-wire serial interface
makes system integration quick and easy. Its small size, low power consumption and up-to-20
meter signal transmission making it the best choice for various applications, including those
most demanding ones. The component is 4-pin single row pin package. It is convenient to
connect and special packages can be provided according to users’ request.
2. Technical Specifications:
Overview:
Item Measurement
Range
Humidity
Accuracy
Temperature
Accuracy
Resolution Package
DHT11 20-90%RH
0-50
±5%RH ±2 1 4 Pin Single
Row
Page | 4
Detailed Specifications:
Parameters Conditions Minimum Typical Maximum
Humidity
Resolution 1%RH 1%RH 1%RH
8 Bit
Repeatability ±1%RH
Accuracy 25 ±4%RH
0-50 ±5%RH
Interchangeability Fully Interchangeable
Measurement
Range
0 30%RH 90%RH
25 20%RH 90%RH
50 20%RH 80%RH
Response Time
(Seconds)
1/e(63%)25,
1m/s Air
6 S 10 S 15 S
Hysteresis ±1%RH
Long-Term
Stability
Typical ±1%RH/year
Temperature
Resolution 1 1 1
8 Bit 8 Bit 8 Bit
Repeatability ±1
Accuracy ±1 ±2
Measurement
Range
0 50
Response Time
(Seconds)
1/e(63%) 6 S 30 S
Page | 5
3. Typical Application (Figure 1)
Figure 1 Typical Application
Note: 3Pin – Null; MCU = Micro-computer Unite or single chip Computer
When the connecting cable is shorter than 20 metres, a 5K pull-up resistor is recommended;
when the connecting cable is longer than 20 metres, choose a appropriate pull-up resistor as
needed.
4. Power and Pin
DHT11’s power supply is 3-5.5V DC. When power is supplied to the sensor, do not send any
instruction to the sensor in within one second in order to pass the unstable status. One
capacitor valued 100nF can be added between VDD and GND for power filtering.
5. Communication Process: Serial Interface (Single-Wire Two-Way)
Single-bus data format is used for communication and synchronization between MCU and
DHT11 sensor. One communication process is about 4ms.
Data consists of decimal and integral parts. A complete data transmission is 40bit, and the
sensor sends higher data bit first.
Data format: 8bit integral RH data + 8bit decimal RH data + 8bit integral T data + 8bit decimal T
data + 8bit check sum. If the data transmission is right, the check-sum should be the last 8bit of
"8bit integral RH data + 8bit decimal RH data + 8bit integral T data + 8bit decimal T data".
Page | 6
5.1 Overall Communication Process (Figure 2, below)
When MCU sends a start signal, DHT11 changes from the low-power-consumption mode to the
running-mode, waiting for MCU completing the start signal. Once it is completed, DHT11 sends a
response signal of 40-bit data that include the relative humidity and temperature information to
MCU. Users can choose to collect (read) some data. Without the start signal from MCU, DHT11
will not give the response signal to MCU. Once data is collected, DHT11 will change to the low-
power-consumption mode until it receives a start signal from MCU again.
Figure 2 Overall Communication Process
5.2 MCU Sends out Start Signal to DHT (Figure 3, below)
Data Single-bus free status is at high voltage level. When the communication between MCU and
DHT11 begins, the programme of MCU will set Data Single-bus voltage level from high to low
and this process must take at least 18ms to ensure DHT’s detection of MCU's signal, then MCU
will pull up voltage and wait 20-40us for DHT’s response.
Figure 3 MCU Sends out Start Signal & DHT Responses
Page | 7
5.3 DHT Responses to MCU (Figure 3, above)
Once DHT detects the start signal, it will send out a low-voltage-level response signal, which
lasts 80us. Then the programme of DHT sets Data Single-bus voltage level from low to high and
keeps it for 80us for DHT’s preparation for sending data.
When DATA Single-Bus is at the low voltage level, this means that DHT is sending the response
signal. Once DHT sent out the response signal, it pulls up voltage and keeps it for 80us and
prepares for data transmission.
When DHT is sending data to MCU, every bit of data begins with the 50us low-voltage-level and
the length of the following high-voltage-level signal determines whether data bit is "0" or "1"
(see Figures 4 and 5 below).
Figure 4 Data "0" Indication
Page | 8
Figure 5 Data "1" Indication
If the response signal from DHT is always at high-voltage-level, it suggests that DHT is not
responding properly and please check the connection. When the last bit data is transmitted,
DHT11 pulls down the voltage level and keeps it for 50us. Then the Single-Bus voltage will be
pulled up by the resistor to set it back to the free status.
6. Electrical Characteristics
VDD=5V, T = 25 (unless otherwise stated)
Note: Sampling period at intervals should be no less than 1 second.
7. Attentions of application
(1) Operating conditions
Applying the DHT11 sensor beyond its working range stated in this datasheet can result in 3%RH
signal shift/discrepancy. The DHT11 sensor can recover to the calibrated status gradually when
it gets back to the normal operating condition and works within its range. Please refer to (3) of
Conditions Minimum Typical Maximum
Power Supply DC 3V 5V 5.5V
Current
Supply
Measuring 0.5mA 2.5mA
Average 0.2mA 1mA
Standby 100uA 150uA
Sampling
period
Second 1
Page | 9
this section to accelerate its recovery. Please be aware that operating the DHT11 sensor in the
non-normal working conditions will accelerate sensor’s aging process.
(2) Attention to chemical materials
Vapor from chemical materials may interfere with DHT’s sensitive-elements and debase its
sensitivity. A high degree of chemical contamination can permanently damage the sensor.
(3) Restoration process when (1) & (2) happen
Step one: Keep the DHT sensor at the condition of Temperature 50~60Celsius, humidity <10%RH
for 2 hours;
Step two:K keep the DHT sensor at the condition of Temperature 20~30Celsius, humidity
>70%RH for 5 hours.
(4) Temperature Affect
Relative humidity largely depends on temperature. Although temperature compensation
technology is used to ensure accurate measurement of RH, it is still strongly advised to keep the
humidity and temperature sensors working under the same temperature. DHT11 should be
mounted at the place as far as possible from parts that may generate heat.
(5) Light Affect
Long time exposure to strong sunlight and ultraviolet may debase DHT’s performance.
(6) Connection wires
The quality of connection wires will affect the quality and distance of communication and high
quality shielding-wire is recommended.
(7) Other attentions
* Welding temperature should be bellow 260Celsius and contact should take less than 10
seconds.
* Avoid using the sensor under dew condition.
* Do not use this product in safety or emergency stop devices or any other occasion that failure
of DHT11 may cause personal injury.
* Storage: Keep the sensor at temperature 10-40, humidity <60%RH.
Declaim:
This datasheet is a translated version of the manufacturer’s datasheet. Although the due care
has been taken during the translation, D-Robotics is not responsible for the accuracy of the
information contained in this document. Copyright © D-Robotics.
D-Robotics: www.droboticsonline.com
Email contact: d_robotics@hotmail.co.uk