ABSTRAK
Saat ini masih banyak lampu sorot yang dioperasikan secara manual. Satu lampu sorot umumnya di operasikan oleh satu operator maka jika ada 10 lampu sorot di perlukan 10 operator. Lampu sorot yang diletakan di tempat yang berbahaya
maka
akan
mengancam
keselamatan
operator
yang
mengoperasikannya. Terkadang jika menggunakan banyak lampu sorot ada beberapa yang gerakannya tidak sama dengan yang lain atau tidak sinkron. Hal ini terjadi karena operator terlambat menerima informasi atau terlambat mengirim informasi hal ini di sebut miss komunikasi. Mikrokontroler yang digunakan pada sistem ini yaitu Atmega16A. Masukan dari sistem ini berupa sinyal analog. Sinyal analog di dapat dari komponen amplifier yang memperkuat sinyal suara. Sinyal analog yang di terima diproses oleh mikrokontroler. Output dari mikrokontroler dihubungkan ke motor servo dan lampu led untuk mengendalikan arah lampu.
Kata kunci : Sinyal analog, Motor servo, Mikrokontroler, LED RGB
i
ABSTRACT
Today, there are so many spot light that operated manually. Every spot light usually operated by one operator staff, so if there are ten spot light we need ten operator staff. The spot light that are located in dangerous place can harm the safety of the operator staff that operated them. Sometimes, if we use a lot of spot lights, there will be some of their movement that are not moving correctly. This is caused because the operator staff are missing the information how to move the spot light correctly. The microcontroller that are used in this project is ATMEGA 16A. The input source for this system is an analog signal. The source of analog signal is the audio signal that are amplified by amplifier component. The analog signal are received and processed by microcontroller. The output of this microcontroller are connected to servo motor and some led to control the direction of light.
Key words: Analog signal, servo motor, microcontroller, RGB LED
ii
DAFTAR ISI ABSTRAK ....................................................................................................... i ABSTRACT ....................................................................................................... ii KATA PENGANTAR ..................................................................................... iii DAFTAR ISI .................................................................................................... v DAFTAR TABEL ............................................................................................ viii DAFTAR GAMBAR ....................................................................................... ix DAFTAR LAMPIRAN .................................................................................... xi BAB I PENDAHULUAN ............................................................................... 1 1.1 Latar Belakang .................................................................................. 1 1.2 Identifikasi Masalah.......................................................................... 2 1.3 Tujuan ............................................................................................... 2 1.4 Pembatasan Masalah ......................................................................... 2 1.5 Sistematika Penulisan ....................................................................... 2 BAB II LANDASAN TEORI ........................................................................ 4 2.1 Sistem Minimum .............................................................................. 4 2.1.1 Mikrokontroler ATMega16 ...................................................... 5 2.1.1.1 Konfigurasi AVR ATMEGA 16 ....................................... 7 2.1.1.2 VCC ................................................................................... 7 2.1.1.3 GND .................................................................................. 7 2.1.1.4 Port A (PA7..PA0) ............................................................ 8 2.1.1.5 Port B (PB7..PB0)............................................................. 8 2.1.1.6 Port C (PC7..PC0) ............................................................. 9 2.1.1.7 Port D (PD7..PD0) ............................................................ 9 2.1.1.8 Reset ................................................................................. 10 2.1.1.9 XTAL 1 dan XTAL 2 .......................................................... 10 2.1.1.10 AVCC.............................................................................. 11 2.1.1.11 AREF .............................................................................. 11 2.1.2 Power Supply ............................................................................ 11 2.1.3 Osilator (Pembangkit Frekuensi) .............................................. 12 2.1.4 ISP (In-System Programmable) ................................................ 12 2.2 Kapasitor .......................................................................................... 13
v
2.3 Resistor ............................................................................................. 16 2.4 Saklar (Switch) .................................................................................. 18 2.4.1 Saklar Push Button .................................................................... 18 2.4.2 Saklar Toggle ............................................................................ 19 2.4.3 Selector Switch, disingkat (SS) ................................................. 19 2.4.4 Saklar Mekanik ......................................................................... 19 2.5 Sensor Suara (MIC) .......................................................................... 19 2.6 Preamplifier (Pre-amp)..................................................................... 22 2.7 Amplifier .......................................................................................... 23 2.7.1 TDA2005 ....................................................................................... 25 2.8 USBasp ............................................................................................ 26 2.9 LED (Light Emitting Dioda) ............................................................. 26 2.10 Dioda............................................................................................... 29 2.11 Transformator (Trafo) ..................................................................... 29 2.12 Analog to Digital Converter (ADC) .............................................. 32 2.12.1 Kecepatan sampling ................................................................ 33 2.12.2 Resolusi ................................................................................... 33 2.13 LCD ................................................................................................ 33 2.14 Motor Servo .................................................................................... 35 2.15 Transistor ........................................................................................ 37 2.16 Modul MP3 ..................................................................................... 39 2.17 CodeVisionAVR ............................................................................. 41 BAB III PERANCANGAN............................................................................ 42 3.1 Perancangan Perangkat Keras.......................................................... 43 3.1.1 Block Diagram dan Cara Kerja ................................................. 43 3.1.1.1 Cara kerja alat secara otomatis .......................................... 43 3.1.1.2 Cara kerja alat secara manual ............................................ 44 3.1.2 Pembuatan Market .................................................................... 44 3.1.3 Perancangan PCB...................................................................... 46 3.1.4 Mikrokontroler ATMega 16 ..................................................... 48 3.1.5 Power Supply ............................................................................ 50 3.1.6 LCD Display 16x2 .................................................................... 50
vi
3.1.7 TDA2005 (amplifier) ................................................................ 52 3.1.8 Preamp MIC ............................................................................. 53 3.1.9 Pengendali manual .................................................................... 54 3.2 Perancangan Perangkat Lunak ......................................................... 55 3.2.1 Diagram keseluruhan ................................................................ 55 3.2.2 Diagram bagian program otomatis............................................ 56 3.2.3 Diagram bagian program manual .................................................. 59 BAB IV DATA PENGAMATAN .................................................................. 61 4.1 Perancangan Batas Nilai ADC Untuk Jenis Pergerakan .................. 61 4.2 Pengamatan Nilai ADC dari Modul MP3 ........................................ 62 4.3 Pengamatan Nilai ADC dari MIC .................................................... 63 4.4 Pengamatan Kerja Sistem secara Manual ........................................ 64 4.5 Pengamatan Perubahan Warna LED secara Otomatis ..................... 65 4.6 Pengamatan Perubahan Warna LED secara Manual ....................... 66 BAB V KESIMPULAN DAN SARAN ......................................................... 67 5.1 Kesimpulan ...................................................................................... 67 5.2 Saran ................................................................................................ 67 DAFTAR PUSTAKA ...................................................................................... 68
vii
DAFTAR TABEL Tabel 2.1 Pin Port A ........................................................................................ 8 Tabel 2.2 Pin Port B ........................................................................................ 8 Tabel 2.3 Pin Port C ........................................................................................ 9 Tabel 2.4 Pin Port D ........................................................................................ 9 Tabel 2.5 Nilai maksimum ............................................................................... 25 Tabel 2.6 Tegangan Maju (Forward Bias) ...................................................... 28 Tabel 2.7 datasheet LCD 16x2......................................................................... 34 Tabel 3.1 Konfigurasi komponen input dan output dengan port pada sistem minimum ATMega 16 .......................................................... 49 Tabel 3.2 Konfigurasi port LCD display 16x2................................................. 51 Tabel 3.3 Penentuan threshold ......................................................................... 52 Tabel 3.3 Percobaan sistem terhadap Batas Nilai ADC (threshold) ................ 61 Tabel 4.2 Percobaan nilai ADC dari modul MP3 terhadap pergerakan lampu .............................................................. 62 Tabel 4.3 Percobaan nilai ADC dari MIC terhadap pergerakan lampu ............................................................................ 63 Tabel 4.4 Percobaan tombol arah manual terhadap sistem .............................. 64 Tabel 4.5 Percobaan pergantian warna LED berdasarkan nilai ADC ..................................................................... 65 Tabel 4.6 Percobaan pergantian warna LED berdasarkan tombol manual ............................................................. 66
viii
DAFTAR GAMBAR Gambar 2.1 Blok diagram ATMega16............................................................. 5 Gambar 2.2 Pinout ATMega16 ........................................................................ 7 Gambar 2.3 Rangkaian reset ............................................................................ 10 Gambar 2.4 Bentuk fisik IC regulator 7805 ..................................................... 11 Gambar 2.5 Bentuk fisik osilator eksternal (kristal) 16Mhz ........................... 12 Gambar 2.6 ISP (In-System Programmable) ................................................... 13 Gambar 2.7 Bentuk dan jenis kapasitor ........................................................... 14 Gambar 2.8 Bentuk dan jenis resistor .............................................................. 17 Gambar 2.9 Warna dan nilai pita resistor......................................................... 17 Gambar 2.10 Bentuk dan jenis saklar .............................................................. 18 Gambar 2.11 Microphone dinamis................................................................... 20 Gambar 2.12 Microphone karbon .................................................................... 21 Gambar 2.13 Microphone kondensator ............................................................ 21 Gambar 2.14 Preamplifier (Preamp) ............................................................... 22 Gambar 2.15 IC TDA2005............................................................................... 25 Gambar 2.16 Datasheet IC TDA2005 ............................................................. 25 Gambar 2.17 USBasp ....................................................................................... 26 Gambar 2.18 LED ............................................................................................ 27 Gambar 2.19 Proses doping ............................................................................. 27 Gambar 2.20 LED ............................................................................................ 28 Gambar 2.21 Dioda .......................................................................................... 29 Gambar 2.22 Transformator (Trafo) ................................................................ 30 Gambar 2.23 Komponen transformator ........................................................... 30 Gambar 2.24 Lambang transformator step up.................................................. 31 Gambar 2.25 Lambang transformator step down ............................................. 31 Gambar 2.26 10-bit channel ............................................................................. 32 Gambar 2.27 Kecepatan sampling ................................................................... 33 Gambar 2.28 LCD dot matrik 16x2.................................................................. 34 Gambar 2.29 Komponen motor servo .............................................................. 35 Gambar 2.30 Jenis-jenis konektor motor servo................................................ 36
ix
Gambar 2.31 Delay dan sudut motor servo...................................................... 36 Gambar 2.32 Transistor ................................................................................... 37 Gambar 2.33 Transistor NPN .......................................................................... 38 Gambar 2.34 Transistor PNP........................................................................... 38 Gambar 2.35 Modul MP3 ................................................................................ 39 Gambar 2.36 Soket atau Sambungan Modul MP3 ........................................... 40 Gambar 2.37 CodeVisionAVR ........................................................................ 41 Gambar 3.1 Sketsa Awal Purwarupa panggung ............................................... 42 Gambar 3.2 Block Diagram ............................................................................. 43 Gambar 3.3 Layout dan ukuran maket panggung ............................................ 44 Gambar 3.4 Foto maket panggung ................................................................... 45 Gambar 3.5 Layout maket lampu ..................................................................... 45 Gambar 3.6 Foto maket lampu ......................................................................... 46 Gambar 3.7 Skematik sistem minimum ATMega 16....................................... 47 Gambar 3.8 Skematik Power Supply ............................................................... 50 Gambar 3.9 Preamp MIC................................................................................. 53 Gambar 3.10 Rangkaian preamp MIC ............................................................. 53 Gambar 3.11 Pengendali manual ..................................................................... 54 Gambar 3.12 Rangkaian pengendali manual ................................................... 54 Gambar 3.13 Diagram keseluruhan purwarupa ............................................... 55 Gambar 3.14 Diagram otomatis LED RGB ...................................................... 56 Gambar 3.15 Diagram otomatis motor servo 1 ................................................ 57 Gambar 3.16 Diagram otomatis motor servo 2 ................................................ 58 Gambar 3.17 Diagram manual LED RGB........................................................ 59 Gambar 3.18 Diagram manual motor servo ..................................................... 60
x
DAFTAR LAMPIRAN LAMPIRAN A SKEMATIK ........................................................................... A-1 LAMPIRAN B SOURCE CODE ..................................................................... B-1 LAMPIRAN C FOTO ALAT .......................................................................... C-1
xi