Realisasi Robot Pembersih Lantai Dengan Fasilitas Tangan Pengambil Sampah Dan Penghisap Sampah Disusun Oleh: Nama
: Reftudie Naga Sakti
NRP
: 1022023
Jurusan Teknik Elektro, Fakultas Teknik, Universitas Kristen Maranatha, Jl. Prof.Drg.Suria Sumantri, MPH no. 65, Bandung, Indonesia. Email :
[email protected]
ABSTRAK Robot pembersih lantai yang telah banyak diciptakan umumnya hanya dapat membersihkan debu dengan sapu atau vacuum cleaner. Robot pembersih yang hanya dapat membersihkan debu tidak dilengkapi dengan sensor pendeteksi sampah. Dalam tugas akhir ini telah dibuat robot pembersih lantai dengan sensor deteksi sampah dan halangan. Sampah yang diambil dalam percobaan tugas akhir memiliki ukuran relatif besar, contohnya kaleng minuman. Sampah berukuran relatif besar ini akan diambil oleh robot dengan tangan pengambil. Robot juga akan melakukan penghisapan sampah. Sampah yang dihisap relatif ringan seperti sampah kapas, tisu, dll. Robot memakai sensor magnetometer HMC 5883L dan ultrasonik untuk mengetahui posisi robot, sensor inframerah dan ultrasonik untuk mendeteksi sampah, halangan, dan dinding. Dari hasil pengujian, didapatkan robot dapat membersihkan lantai dengan tingkat keberhasilan misi 81,25 persen jika hanya terdapat satu objek objek sampah, dan pada saat terdapat empat objek sampah tingkat keberhasilan misi menjadi 60 persen. Pada saat terdapat satu objek halangan, tingkat keberhasilan misi 66,67 persen. Pada saat terdapat tiga objek halangan tingkat keberhasilan misi 37,5 persen. Makin banyak benda di lantai, tingkat keberhasilan misi semakin menurun. Kata Kunci : Sampah, Robot, HMC 5883L, ultrasonik, inframerah, sensor
i
REALIZATION OF FLOOR CLEANING ROBOT WITH GARBAGE TAKER ARM FACILITY AND VACUUM CLEANER Composed By: Nama
: Reftudie Naga Sakti
NRP
: 1022023
Electrical Engineering Department, Maranatha Christian University Jl. Prof.Drg.Suria Sumantri, MPH no.65, Bandung, Indonesia Email : tudilc @yahoo.com
Many robots have been created, only can clean dust with broom or a vacuum cleaner. Cleaning robot which only clean dust isn’t facilited with sensors to detect garbages. In this final assigment, a robot with sensors to detect garbages and obstacles have been created. Garbages which are taken by a garbage taker arm in this final assigment, relatively big in size, for the examples are softdrink can. These garbages which relatively big in size will be taken by a garbage taker arm. Robot will suck garbages too. The garbages will be sucked by robot relatively light, they are like cooton, tisue, and ect. Robot uses magnetometer sensor HMC 5883L and ultrasonic to know it’s location, Infrared sensor and ultrasonic to detect garbages, obstacles and wall. From the result of the tests, has been got that robot can clean the floor with 81,25 percent of success rate if only figured one object of garbage, and when figured four objects of garbage, the success rate become 60 percent. When there is an obstacle, the success rate is 66,67 percent. When there are three objects of garbage, the success rate is 37,5 percent. These all shows the more objects on the floor, the success rate of the missions is decrease.
. Key Word : Garbage, Robot, HMC 5883L, ultrasonic, infrared, sensor
ii
DAFTAR ISI Halaman LEMBAR PENGESAHAN PERNYATAAN ORISINALITAS LAPORAN PENELITIAN PERNYATAAN PUBLIKASI LAPORAN TUGAS AKHIR KATA PENGANTAR ABSTRAK .............................................................................................................. i ABSTRACT ........................................................................................................... ii DAFTAR ISI ......................................................................................................... iii DAFTAR GAMBAR ............................................................................................ vi DAFTAR TABEL .............................................................................................. viii BAB 1
PENDAHULUAN
1.1 Latar Belakang Masalah ....................................................................................1 1.2 Identifikasi Masalah ..........................................................................................2 1.3 Perumusan Masalah ..........................................................................................2 1.4 Tujuan ...............................................................................................................2 1.5 Pembatasan Masalah .........................................................................................2 1.6 Sistematika Penulisan .......................................................................................3 BAB 2
LANDASAN TEORI
2.1 Sensor Inframerah .............................................................................................5 2.1.1 Inframerah ..............................................................................................5 2.1.2 Fotodioda ...............................................................................................6 2.1.3 Prinsip Kerja Sensor Inframerah ............................................................7 2.2 Sensor Ultrasonik HC-SR04 .............................................................................8 2.3 Motor DC ..........................................................................................................9 2.4 Motor Servo ....................................................................................................11 2.5 Mikrokontroler Atmega 2560 .........................................................................11 2.5.1 Fitur-Fitur Atmega 2560 ......................................................................12 2.5.2 Arduino Mega 2560 .............................................................................13 2.5.3 Arduino IDE (Integrated Development Environment) ........................14 2.6 Magnetometer HMC5883L .............................................................................15
iii
2.7
Komunikasi I2C ............................................................................................17
BAB 3
PERANCANGAN DAN REALISASI
3.1 Perancangan Lapangan....................................................................................20 3.2 Perancangan Sistem ........................................................................................21 3.2.1 Algoritma Robot ....................................................................................21 3.2.1.1 Sensor Ultrasonik ......................................................................29 3.2.1.2 Magnetometer ...........................................................................31 3.2.1.3 Sensor Inframerah ....................................................................33 3.2.1.4 Gabungan Fungsi Sensor ..........................................................34 3.2.2 Perancangan Fisik ..................................................................................38 3.2.2.1 Perancangan Mekanik robot ......................................................39 3.2.2.2 Perancangan Elektronika Robot .................................................45 BAB 4
DATA PENGAMATAN DAN ANALISA
4.1 Pengujian Nilai Sensor Inframerah Terhadap Warna .....................................54
4.2 Pengujian Berat Beban pada Lengan Robot ...................................................54 4.3 Pengujian Penelusuran Jalur ...........................................................................55 4.4 Pengujian 1 Objek Silinder sampah (Berwarna Biru) .....................................56 4.5 Pengujian 1 Objek Silinder sampah (Berwarna Hijau) ...................................57 4.6 Pengujian 1 Objek Silinder sampah (Berwarna Kuning) ................................58 4.7 Pengujian 1 Objek Sampah Kapas ..................................................................59 4.8 Pengujian 3 Objek Silinder Sampah dan 1 Objek Sampah Kapas ..................59 4.9 Pengujian 1 Objek Halangan Besar (Berwarna Hijau) ...................................60 4.10 Pengujian 1 Objek Halangan Besar (Berwarna Kuning) .............................62 4.11 Pengujian 1 Objek Halangan Kecil (Berwarna Hitam) .................................62 4.12 Pengujian 3 Objek Halangan .........................................................................63 4.13 Pengujian 2 Objek Halangan dan 2 Objek Silinder sampah .........................64 4.14 Pengujian 3 Objek Halangan, 3 Objek Silinder sampah, 1 Objek Sampah Kapas ......................................................................................................................65 4.15 Pengujian Sampah Dengan Spesifikasi Berbeda dari Batasan Masalah ......67 4.16 Analisa Data ..................................................................................................69
iv
BAB 5
KESIMPULAN DAN SARAN
5.1 Kesimpulan .....................................................................................................71 5.2 Saran ................................................................................................................72
DAFTAR PUSTAKA ...........................................................................................73
LAMPIRAN A PIN MAPPING DAN SKEMATIK LAMPIRAN B REALISASI LAMPIRAN C LISTING PROGRAM LAMPIRAN D DATASHEET
v
DAFTAR GAMBAR Halaman Gambar 2.1 Contoh-contoh bentuk fotodioda........................................................6 Gambar 2.2 Rangkaian sensor inframerah falling edge .........................................7 Gambar 2.3 Rangkaian sensor inframerah rising edge ..........................................7 Gambar 2.4 Sensor ultrasonik HC-SR04 ...............................................................8 Gambar 2.5 Motor DC sederhana ..........................................................................9 Gambar 2.6 Aturan tangan kanan.........................................................................10 Gambar 2.7 Aturan tangan kiri.............................................................................10 Gambar 2.8 Skema cara kerja komutator .............................................................10 Gambar 2.9 IC ATMega2560 produk ATMEL ...................................................12 Gambar 2.10 Board Arduino Mega 2560 ...............................................................13 Gambar 2.11 Tampilan halaman pemrograman Arduino IDE ...............................14 Gambar 2.12 Magnetometer HMC5883L..................................................................16 Gambar 2.13 Konfigurasi sistem I2C ........................................................................18 Gambar 2.14 Kondisi sinyal start dan stop pada I2C ..................................................18 Gambar 2.15 Sinyal ACK dan NACK ......................................................................19 Gambar 2.16 Transfer bit pada I2C Bus ....................................................................19 Gambar 3.1 Perancangan lapangan robot.............................................................20 Gambar 3.2 Jalur jalan robot ................................................................................21 Gambar 3.3 Toleransi nilai ultrasonik tiap jalur ...................................................22 Gambar 3.4 Robot bergerak di jalur 3 ..................................................................23 Gambar 3.5 Robot mengalami kesalahan jalur ....................................................23 Gambar 3.6 Error pada robot jika keluar jalur ....................................................24 Gambar 3.7 Robot kembali ke jalur awal.............................................................25 Gambar 3.8 Cakupan deteksi sensor ultrasonik di depan robot ...........................25 Gambar 3.9 Algoritma pengambilan sampah oleh robot .....................................26 Gambar 3.10 Gerakan robot saat mendeteksi sampah kapas .................................27 Gambar 3.11 Diagram alir cara kerja robot ...........................................................28 Gambar 3.12 Peletakan sensor ultrasonik pada robot ............................................29 Gambar 3.13 Diagram alir sensor ultrasonik 1 dan ultrasonik 2............................30 Gambar 3.14 Diagram alir Sensor ultrasonik 3,4, dan 5 ........................................31
vi
Gambar 3.15 Sudut yang dihasilkan magnetometer pada posisi START ...............32 Gambar 3.16 Diagram alir koreksi arah magnetometer .........................................32 Gambar 3.17 Arah gerak robot ke kanan dalam menghindari halangan ................33 Gambar 3.18 Arah gerak robot ke kiri dalam menghindari halangan ....................33 Gambar 3.19 Sensor inframerah bagian depan ......................................................34 Gambar 3.20 Sensor ultrasonik dan inframerah bagian depan ..............................35 Gambar 3.21 Robot berjalan sesuai jalur ...............................................................37 Gambar 3.22 Robot keluar jalur lebih besar dari 15 cm ........................................38 Gambar 3.23 Algoritma robot untuk kembali ke jalurnya .....................................38 Gambar 3.24 Tampak depan robot .........................................................................39 Gambar 3.25 Tampak kanan robot .........................................................................41 Gambar 3.26 Tampak kiri robot .............................................................................41 Gambar 3.27 Tampak bawah robot ........................................................................42 Gambar 3.28 Pengaturan tinggi sensor ultrasonik .................................................43 Gambar 3.29 Perancangan jarak sensor ultrasonik depan ......................................44 Gambar 3.30 Skematik sensor inframerah .............................................................46 Gambar 3.31 Rangkaian sensor inframerah ...........................................................46 Gambar 3.32 Koneksi I/O arduino ke servo, sensor ultrasonik, dan servo gripper48 Gambar 3.33 Koneksi I/O arduino pengendali motor DC dan vacuum cleaner ....48 Gambar 3.34 Blok diagram Robot Pembersih Sampah .........................................49 Gambar 4.1 Referensi koordinat letak benda dalam lapangan .............................50 Gambar 4.2 Ilustrasi pada percobaan di lapangan saat terdapat benda ................52 Gambar 4.3 Sudut ukur inframerah penyebab kegagalan ....................................58 Gambar 4.4 Robot terkena dinding pada bagian depan .......................................61
vii
DAFTAR TABEL Halaman Tabel 4.1 Deskripsi letak benda pada data percobaan .........................................51 Tabel 4.2 Contoh Tabel data percobaan untuk Gambar 4.2 .................................53 Tabel 4.3 Nilai sensor inframerah dalam ADV 10 bit .........................................54 Tabel 4.4 Pengujian Berat Beban Pada Lengan Robot ........................................55 Tabel 4.5 Pengujian tanpa ada benda di lapangan ...............................................55 Tabel 4.6 Pengujian terdapat silinder sampah biru ..............................................56 Tabel 4.7 Pengujian terdapat silinder sampah hijau.............................................57 Tabel 4.8 Pengujian terdapat silinder sampah kuning .........................................58 Tabel 4.9 Pengujian terdapat sampah kapas ........................................................59 Tabel 4.10 Pengujian dengan tiga silinder sampah dan kapas .............................59 Tabel 4.11 Pengujian dengan satu penghalang besar hijau ..................................60 Tabel 4.12 Pengujian dengan satu penghalang besar kuning ...............................62 Tabel 4.13 Jarak Pengujian dengan satu penghalang kecil hitam ........................62 Tabel 4.14 Pengujian dengan 3 penghalang .........................................................63 Tabel 4.15 Pengujian dengan 2 penghalang dan 2 silinder sampah .....................64 Tabel 4.16 Pengujian dengan seluruh objek utama ..............................................65 Tabel 4.17 Jarak Pengujian dengan silinder sampah tinggi 10 cm ......................67 Tabel 4.18 Pengujian dengan silinder sampah tinggi 8 cm ..................................67 Tabel 4.19 Pengujian dengan sampah kertas .......................................................68 Tabel 4.20 Pengujian dengan sampah tisu ...........................................................69
viii