Diajukan Sebagai Salah Satu Syarat Untuk Memperoleh Gelar Sarjana S-1
Jurusan Teknik Elektro
Fakultas Teknik Universitas Mataram
Oleh :
YUSUF PRATAMA
F1B 008 010
Dengan ini saya menyatakan bahwa dalam Tugas Akhir ini tidak terdapat karya yang
pernah diajukan untuk memperoleh gelar kesarjanaan disuatu perguruan tinggi dan sepanjang
pengetahuan saya juga tidak terdapat karya atau pendapat yang pernah ditulis dan diterbitkan
oleh orang lain kecuali yang secara tertulis diacu dalam naskah ini dan disebutkan daftar
pustaka.
Demikian surat pernyataan ini saya buat tanpa tekanan dari pihak manapun dan
dengan kesdaran penuh terhadap tanggung jawab dan konsekuensi serta menyatakan bersedia
menerima sanksi terhadap pelanggaran dari pernyataan tersebut.
Yusuf Pratama
iv
KATA PENGANTAR
Puji syukur penulis panjatkan kehadirat Tuhan Yang Maha Pengasih dan
Penyayang atas segala berkat, rahmat, dan karunia-Nya, sehingga penulis dapat
menyelesaikan penyusunan TugasA khir ini.
Tugas Akhir ini disusun untuk memenuhi salah satu syarat untuk mencapai
derajat Sarjana S-1 di Jurusan Teknik Elektro Fakultas Teknik Universitas
Mataram. Di samping itu Tugas Akhir ini juga merupakan salah satu bentuk
perwujudan atas ilmu pengetahuan yang telah diperoleh selama di bangku kuliah.
Dalam Tugas Akhir ini, penulis melakukan penelitian dengan judul
Pengontrolan Kecepatan Motor Prototype Konveyor Pengangkut Pasir
Berdasarkan Jarak Menggunakan Arduino Uno ATMega 328P. Dengan Tugas
Akhir ini diharapkan dapat memberikan kontribusi dan pengetahuan tentang
pengontrolan motor DC menggunakan PWM 8 bit pada suatu alat sehingga
mampu untuk mengatur kecepatan motor berdasarkan jarak pembacaan sensor.
Penulis menyadari bahwa sebagai manusia biasa tidak terlepas dari
keterbatasan, yang biasanya akan mewarnai kadar ilmiah dari Tugas Akhir ini.
Oleh karena itu penulis selalu terbuka terhadap masukan dan saran dari semua
pihak yang sifatnya membangun untuk mendekati kesempurnaan. Tidak lupa
penulis menyampaikan permohonan maaf yang sebesar-besarnya jika dalam
Tugas Akhir ini terdapat kesalahan dan kekeliruan. Akhir kata, semoga Tugas
Akhir ini bermanfaat bagi kita semua.
Penulis
vi
segala halangan dan rintangan baik dalam suasana yang bahagia maupun
susah.
13. Teman-temanku NAMETAYAS 2008 (Arip, Andri, Mayzar, Rachmi,
Roni,Sukma, Topan, Topik,
vii
DAFTAR ISI
HALAMAN JUDUL
............................................................................................. i
..................................................................... iv
............................................................................................. v
vi
DAFTAR ISI
viii
........................................................................................................
xi
DAFTAR TABEL
........................................................................................................
xiii
ABSTRAK
....................................................................................................................
xiv
BAB I
PENDAHULUAN
................................................................................
1.1
Latar Belakang
................................................................................
1.2
Rumusan Masalah
................................................................................
1.3
Batasan Masalah
................................................................................
1.4
Tujuan Penelitian
................................................................................
1.5
Manfaat Penelitian
................................................................................
1.6
BAB II
DASAR TEORI
................................................................................
2.1
Tinjauan Pustaka
................................................................................
2.2
Landasan Teori
................................................................................
2.2.1
Arduino Uno R3
....................................................................
............................................
Motor DC
................................
6
7
8
................................................................................
11
12
................................
15
2.2.3
Torsi ............................................................................................
16
2.2.4
16
2.2.5
17
viii
2.2.6
............................................
19
20
................................
21
................................
22
....................................................................
23
Sistem Kontrol
............................................
....................
27
27
............................................. 28
2.2.8
BAB III
3.1
25
......... 28
............................................. 29
......................................................... 29
2.2.7.1.1 Analog
......................................................... 29
2.2.7.1.2 Digital
........................................................
31
31
33
34
METODE PENELITIAN
....................................................................
36
36
3.1.1
Lokasi Penelitian
....................................................................
36
3.1.2
Waktu Penelitian
....................................................................
36
................................................................................
36
3.2
3.3
........................................................
37
3.4
38
3.4.1
38
................................
3.4.1.1
....................
38
3.4.1.2
41
3.4.1.3
Motor DC
42
3.4.1.4
................................
43
3.4.1.5
................................
43
3.4.1.6
................................
44
3.4.1.7
Rangkaian LCD
............................................
45
........................................................
ix
3.4.2
................................
45
3.4.2.1
................................
45
3.4.2.2
3.4.2.3
3.5
BAB IV
4.1
........................................................
46
..................... 48
........................................................
50
................................................................................
50
4.1.1
............................................
4.1.2
4.1.3
4.1.4
50
....................
51
................................
52
............................................
53
................................................................................
58
PENUTUP
............................................................................................
59
5.1
Kesimpulan
............................................................................................
59
5.2
Saran ........................................................................................................
60
4.2
BAB V
Listening Program
DAFTAR PUSTAKA
LAMPIRAN
DAFTAR GAMBAR
Gambar 2.1
Gambar 2.2
Gambar 2.3
Gambar 2.4
Gambar 2.5
Gambar 2.6
Gambar 2.7
Gambar 2.8
Gambar 2.9
................................................................................. 8
......................................................... 10
................. 12
......................................................... 12
................................................................................. 13
..................................................................... 7
..................................................................... 14
............................................................................................. 16
......................................................... 18
......................................................... 18
......................................................... 19
......................................................... 20
..................................................................... 25
......................................................... 27
......................................................... 27
......................................................... 28
..................................................................... 30
..................................................................... 30
..................................................................... 32
......................................................... 32
............................................................................................. 33
............................................. 31
..................................................................... 33
................................................................................. 34
............................................. 39
xi
Gambar 3.2
......................................................... 39
Gambar 3.3
Gambar 3.5
Gambar 3.6
Gambar 3.7
Motor DC
............................................................................................. 42
Gambar 3.8
IC L298
............................................................................................. 43
Gambar 3.9
Catu daya
............................................................................................. 44
................................................................................. 45
..................................................................... 46
......................................................... 47
......................................................... 48
............................................. 48
Gambar 4.1
Gambar 4.2
Gambar 4.3
Grafik hubungan antara jarak sensor dengan pembacaan LCD 16x2 ......... 53
Gambar 4.4
Rangkaian keseluruhan
Gambar 4.5
............................................. 52
..................................................................... 54
xii
DAFTAR TABEL
................................................................................
42
................................................................................
47
....................................................................
49
................................................................................
50
........................................................
52
55
56
................................
xiii
ABSTRAK
Perkembangan teknologi kontrol saat ini mulai bergeser kepada
otomatisasi sistem kontrol yang menuntut penggunaan komputer, sehingga
campur tangan manusia dalam proses pengontrolan sangat kecil. Pada proses
produksi di Industri khususnya pada pengangkutan barang atau benda
menggunakan belt konveyor, diperlukan optimasi baik dari kinerja dan hasil
produksinya, sehingga diperoleh efisiensi kerja yang maksimal.
Metodelogi yang digunakan pada tugas akhir ini adalah perancangan
prototype konveyor pengangkut pasir berdasarkan jarak. Pengujian sistem yang
digunakan adalah mengatur nilai PWM (Pulse Width Modulation) 8 bit.
Kecepatan motor DC dapat diatur melalui pemberian nilai high dari duty
cycle PWM, semakin besar nilai high dari duty cycle PWM maka semakin cepat
putaran motor dan sebaliknya semakin kecil nilai high dari duty cycle PWM maka
kecepatan motor akan semakin pelan. Sistem konveyor pengangkut pasir dapat
terealisasi sesuai dengan perencanaan yaitu ketika jarak bernilai 33 cm maka
motor akan berputar dengan kecepatan 47,5 rpm dengan tegangan dan arus 20,2V
DC dan 0,84A dan ketika jarak bernilai 32 cm maka kecepatan putar motor akan
berkurang menjadi 46,4 rpm dengan tegangan dan arus 19,4V DC dan 0,81A,
motor akan mati ketika jarak bernilai kurang dari atau samadengan 17 cm.
Kata Kunci: Kontrol Motor DC, Konveyor, PWM (Pulse Width Modulation),
Sensor PING.
xiv
ABSTRACT
The development of control technology is now beginning to shift to
automation control systems that require the use of a computer, so that human
intervention in the process of controlling very small. In the production process in
the industry, especially in the transport of goods or objects using a conveyor belt,
takes good optimization of the performance and results of production, in order to
obtain maximum working efficiency.
The methodology used in this thesis is the design of a prototype conveyor
transporting sand based on distance. The test system used is set the value of the
PWM (Pulse Width Modulation) 8 bits.
DC motor speed can be adjusted through the provision of high value the
PWM duty cycle, the greater high of PWM duty cycle the rotation of motor on
fast, reverse getting smaller value high of PWM duty cycle the rotation of motor
speed will be slow. Sand transport conveyor system can be realized according to
the plan, when the distance is worth 33 cm then the motor will rotate at a speed of
47.5 rpm with 20,2V DC voltage and current 0,84A, and when the distance is
worth 32 cm then the motor speed will be reduced to 46.4 rpm with 19,4V DC
voltage and current 0,81A, the motor off when the distance is worth of less or
equal with 17 cm.
xv
BAB I
PENDAHULUAN
1.1 Latar Belakang
Perkembangan teknologi kontrol saat ini mulai bergeser kepada
otomatisasi sistem kontrol yang menuntut penggunaan komputer, sehingga
campur tangan manusia dalam proses pengontrolan sangat kecil. Bila
dibandingkan dengan pengerjaan secara manual, sistem peralatan yang
dikendalikan oleh komputer akan memberikan keuntungan dalam hal efisiensi,
keamanan, dan ketelitian. Kemampuan komputer baik perangkat keras maupun
perangkat lunak, dapat dimanfaatkan untuk berbagai aplikasi pengendalian yang
menggunakan sensor sensor atau Transducer, seperti pengendalian suhu,
kecepatan motor, penerangan dan lain-lain.
Pada proses produksi di Industri khususnya pada pengangkutan barang
atau benda menggunakan belt konveyor, diperlukan optimasi baik dari kinerja dan
hasil produksinya, sehingga diperoleh efisiensi kerja yang maksimal. Dalam
proses pengangkutan barang atau benda, masih banyak industri yang
menggunakan
konveyor
yang
dikendalikan
secara
manual,
sehingga
2.
2.
3.
4.
5.
Tidak menggunakan metode kontrol PID pada proses kontrol feed beck
dari sensor PING.
2.
2.
3.
Bab I Pendahuluan
Bab I berisi penjelasan mengenai latar belakang, rumusan masalah,
batasan masalah, tujuan penelitian, manfaat penelitian, serta sistematika
penulisan yang digunakan untuk menyusun laporan tugas akhir.
2.
3.
4.
5.
Bab V Penutup
Bab V berisi kesimpulan dari sistem yang dirancang dan dibuat serta
saran-saran untuk perbaikan sistem dimasa mendatang.
BAB II
DASAR TEORI
2.1 Tinjauan Pustaka
Dari tugas akhir dari Shalihin R. (2014) mengenai robot berkaki empat
(quaddrupeds robot) yang bernavigasi secara otomatis berdasarkan jarak terhadap
objek menggunakan sensor PING berbasis mikrokontroller keluarga AVR
ATMega 32. Tujuannya adalah untuk membuktikan bisa atau tidak merancang
kontruksi robot berkaki empat mengguanakan motor servo standar sebagai
penggerak lengan kaki dan dapat mengontrol putaran 12 motor servo secara
serentak, sehingga dapat melakukan pergerakan secara otomatis dan dapat
menghindari halangan yang dihadapi dengan pergerakan-pergerakan yang telah
diatur pada robot berdasarkan data jarak yang didapat sensor PING yang diolah
menggunakan mikrokontroler yang digunakan sebagai unit kontrol dan driver
motor servo. Dari hasil pengujian bahwa, dengan menggunakan mikrokontroller
ATMega32 dapat menggerak 12 motor servo secara serentak dan melakukan
pergerakan-pergerakan secara otomatis berdasar data jarak yang didapat sensor
PING, sehingga robot mampu melakukan perpindahan dari satu tempat ke tempat
lainnya yaitu dari titik start sampai finish dari empat lintasan uji[10].
Dari tugas akhir yang dikerjakan oleh Bahri S. (2013) mengenai prototype
konveyor pemisah barang menggunakan metode kontrol PID dan PWM
menyatakan bahwa dalam perancangan prototype ini dibuat alat berupa konveyor
belt
yang
dilengkapi
motor
DC
sebagai
penggeraknya,
menggunakan
Mikrokontroler: ATmega328P-20PU
Jumlah Pin Masukan Analog: 6 (dapat juga digunakan sebagai pin digital
tambahan)
Maksimum arus per I/O pin: 40 mA (total arus pada semua pin
maksimum 400 mA)
EEPROM : 1 Kb
2KB RAM pada memory kerja bersifat volatile (hilang saat daya
dimatikan), digunakan oleh variabel-variabel di dalam program.
Penjelasan dari masing masing bagian papan Arduino uno ini antara lain:
1. 14 pin input/output digital (0-13).
Berfungsi sebagai input atau output, dapat diatur oleh program.
Khusus untuk 6 buah pin 3, 5, 6, 9, 10 dan 11, dapat juga berfungsi
sebagai pin analog output dimana tegangan output-nya dapat diatur.
Nilai sebuah pin output analog dapat diprogram antara 0 255, dimana
hal itu mewakili nilai tegangan 0 5V.
2. USB berfungsi untuk:
1. Memuat program dari komputer ke dalam papan
2. Komunikasi serial antara papan dan komputer
3. Memberi daya listrik kepada papan
3. Sambungan SV1.
Sambungan atau jumper untuk memilih sumber daya papan,
apakah dari sumber eksternal atau menggunakan USB. Sambungan ini
tidak diperlukan lagi pada papan Arduino versi terakhir karena
pemilihan sumber daya eksternal atau USB dilakukan secara otomatis.
4. Q1 Kristal (quartz crystal oscillator).
Jika mikrokontroler dianggap sebagai sebuah otak, maka kristal
adalah jantungnya karena komponen ini menghasilkan detak-detak
yang dikirim kepada mikrokontroler agar melakukan sebuah operasi
untuk setiap detak-nya. Kristal ini dipilih yang berdetak 16 juta kali
per detik (16MHz).
5. Tobol Reset S1.
Untuk me-reset papan sehingga program akan mulai lagi dari awal.
Perhatikan bahwa tombol reset ini bukan untuk menghapus program
atau mengosongkan mikrokontroler.
6. In-Circuit Serial Programming (ICSP).
Port
ICSP
memungkinkan
pengguna
untuk
memprogram
7. IC 1 Mikrokontroler Atmega.
Komponen utama dari papan Arduino, di dalamnya terdapat CPU,
ROM dan RAM.
8. 6 pin input analog (0-5).
Pin ini sangat berguna untuk membaca tegangan yang dihasilkan
oleh sensor analog, seperti sensor suhu. Program dapat membaca nilai
sebuah pin input antara 0 1023, dimana hal itu mewakili nilai
tegangan 0 5V.
Tanpa melakukan konfigurasi apapun, begitu sebuah papan Arduino
dikeluarkan dari kotak pembungkusnya ia dapat langsung disambungkan ke
sebuah komputer melalui kabel USB. Selain berfungsi sebagai penghubung untuk
pertukaran data, kabel USB ini juga akan mengalirkan arus DC 5 Volt kepada
papan Arduino sehingga praktis tidak diperlukan sumber daya dari luar. Saat
mendapat suplai daya, lampu LED indikator daya pada papan Arduino akan
menyala menandakan bahwa ia siap bekerja.
Pada papan Arduino Uno terdapat sebuah LED kecil yang terhubung ke
pin digital no 13. LED ini dapat digunakan sebagai output saat seorang pengguna
membuat sebuah program dan ia membutuhkan sebuah penanda dari jalannya
program tersebut. Ini adalah cara yang praktis saat pengguna melakukan uji coba.
10
Gambar 2.6 Medan magnet yang membawa arus mengelilingi konduktor [11]
Aturan genggaman tangan kanan bisa dipakai untuk menentukan arah
garis fluks di sekitar konduktor. Genggam konduktor dengan tangan kanan
dengan jempol mengarah pada arah aliran arus, maka jari-jari anda akan
menunjukkan arah garis fluks. Gambar 2.7 menunjukkan medan magnet yang
terbentuk di sekitar konduktor berubah arah karena bentuk U.
Medan magnet hanya terjadi di sekitar sebuah konduktor jika ada arus
mengalir pada konduktor tersebut.
Pada motor listrik konduktor berbentuk U disebut angker dinamo.
12
Gambar 2.8 Medan magnet mengelilingi konduktor dan diantara kutub [11]
13
untuk bergerak turun agar keluar dari medan yang kuat tersebut. Gaya-gaya
tersebut akan membuat angker dinamo berputar searah jarum jam.
Mekanisme kerja untuk seluruh jenis motor secara umum :
Motor-motor
memiliki
beberapa
loop
pada
dinamonya
untuk
14
bervariasi
dengan
kecepatan
operasinya
namun
.....................................................................................
(2.1)
Dimana:
F = Gaya Lorentz (N)
B = Medan Magnet (T)
15
= Arus (A)
2.2.3 Torsi
Torsi merupakan perkalian dari f gaya (beban) dengan d jari-jari (panjang
lengan dari poros). Sebagai contoh, jika beban yang harus diputar sebesar 10 N
dan panjang lengan adalah 10 cm maka besar torsi adalah 1 Nm. Jika ukuran
beban dan panjang lengan sesuai dengan contoh di atas dan motor yang memiliki
torsi maksimum sebesar 0,75 Nm maka dapat dipastikan bahwa motor tidak akan
berputar. Permasalahan tersebut dapat diselesaikan dengan menggunakan
kombinasi rodagigi[12].
2.
3.
4.
5.
(2.2)
Dimana:
rv
= perbandingan kecepatan
w1
w2
n1
n2
Nt1
= jumlah gigi 1
Nt2
= jumlah gigi 2
d1
d2
17
18
Gelombang ultrasonik ini melalui udara dengan kecepatan 344 meter per
detik, mengenai obyek dan memantul kembali ke sensor. PING mengeluarkan
pulsa output high pada pin SIG setelah memancarkan gelombang ultrasonik dan
setelah gelombang pantulan terdeteksi PING akan membuat output low pada pin
SIG. Lebar pulsa High (tIN) akan sesuai dengan lama waktu tempuh gelombang
ultrasonik untuk 2x jarak ukur dengan obyek. Maka jarak yang diukur adalah :
S = ( tIN x V ) / 2
.......................................................................
(2.3)
Dimana :
S
tIN
oleh receiver
ultrasonik.
Sinyal
yang
diterima
oleh
2.
3.
......................................................
(2.4)
20
Dimana:
S
340 =
2.
3.
4.
Ketika sinyal dari masukan berlogika tinggi (+5V) maka arus akan
melewati dioda D1 (D1 on), kemudian arus tersebut akan membias
transistor T1, sehingga arus yang akan mengalir pada kolektotr T1
akan besar sesuai dari penguatan dari transistor.
21
5.
Ketika sinyal dari masukan berlogika rendah (0V) maka arus akan
melewati dioda D2 (D2 on), kemudian arus tersebut akan membias
transistor T2, sehingga arus yang akan mengalir pada kolektotr T2
akan besar sesuai dari penguatan dari transistor.
6.
1)
sedangkan
jarak
yang
lebih
jauh
adalah
22
2.
3.
4.
Kemudian sinyal tersebut melalui rangkaian filter low pass filter pada
frekuensi < 40kHz melalui rangkaian filter C4 dan R4.
5.
6.
Jadi ketika ada sinyal ultrasonik yang masuk ke rangkaian, maka pada
komparator akan mengeluarkan logika rendah (0V) yang kemudian
akan diproses oleh mikrokontroler untuk menghitung jaraknya.
proses
industri,
sering
dibutuhkan
besaran-besaran
yang
memerlukan kondisi atau persyaratan yang khusus, seperti ketelitian yang tinggi,
harga yang konstan untuk selang waktu yang tertentu, nilai yang bervariasi dalam
suatu rangkuman tertentu, perbandingan yang tetap antara 2 (dua) variabel, atau
suatu besaran sebagai fungsi dari besaran lainnya. Jelas, kesemuanya itu tidak
cukup dilakukan hanya dengan pengukuran saja, tetapi juga memerlukan suatu
scara pengontrolan agar syarat-syarat tersebut dapat dipenuhi. Karena alasan
inilah diperkenalkan suatu konsep pengontrolan yang disebut Sistem kontrol[1].
Ada beberapa definisi yang harus dimengerti untuk lebih memahami
sistem kontrol secara keseluruhan, yaitu: Sistem, Proses, Kontrol dan Sistem
kontrol. Definisi dari beberapa istilah tersebut adalah sebagai berikut :
1. Sistem adalah kombinasi dari beberapa komponen yang bekerja bersamasama melakukan sesuatu untuk sasaran tertentu.
2. Proses adalah perubahan yang berurutan dan berlangsung secara kontiniu
dan tetap menuju keadaan akhir tertentu.
23
OUTPUT
INPUT
PROSES
Pengukuran (Measuring)
2. Perbandingan (Comparison)
3. Perbaikan (Correction)
Sistem tersebut dapat berjalan baik, jika dianggap sistem bekerja secara
ideal dan sederhana. Namun, masalah akan timbul jika diteliti lebih lanjut, seperti:
a.
b.
c.
24
Kelancaran Proses
Keamanan
Ekonomis
Kualitas
b.
yang
dikontrol
mempengaruhi
aksi
pengontrolan
(feedback)
c. Lebih akurat, dapat terjadi ketidakstabilan
d. Mahal
Gambar 2.20 dan 2.21 mengilustrasikan blok diagram Open Loop Control
System dan Closed Loop Control System. Selanjutnya, sebagian besar pembahasan
sistem kontrol adalah berdasarkan kepada Closed Loop Control System atau lebih
dikenal dengan sistem kontrol umpan balik (Feedback Control System).
26
OUTPUT
INPUT
PROSES
OUTPUT
INPUT
PROSES
b.
c.
d.
e.
b.
c.
d.
e.
f.
g.
mengukur
keluaran
yang
dikontrol
dan
kemudian
29
Saat nilai tegangan referensi lebih besar dari tegangan carrier (gigi
gergaji) maka output comparator akan bernilai high. Namun saat tegangan
referensi bernilai lebih kecil dari tegangan carrier, maka output comparator akan
bernilai low. Dengan memanfaatkan prinsip kerja dari komparator inilah, untuk
mengubah duty-cycle dari sinyal output cukup dengan mengubah-ubah besar
tegangan referensi. Besarnya duty-cycle rangkaian PWM ini :
..................................................
(2.5)
30
2.2.7.1.2 Digital
Pada metode digital setiap perubahan PWM dipengaruhi oleh resolusi dari
PWM itu sendiri. Misalkan PWM digital 8 bit berarti PWM tersebut memiliki
resolusi 28 = 256, maksudnya nilai keluaran PWM ini memiliki 256 variasi,
variasinya mulai dari 0 255 yang mewakili duty-cycle 0 100% dari keluaran
PWM tersebut.
2.2.7.2 Konsep Dasar PWM
Sinyal PWM pada umumnya memiliki amplitudo dan frekuensi dasar yang
tetap, namun memiliki lebar pulsa yang bervariasi. Lebar Pulsa PWM berbanding
lurus dengan amplitudo sinyal asli yang belum termodulasi. Artinya, sinyal PWM
memiliki frekuensi gelombang yang tetap namun duty-cycle bervariasi (antara 0%
hingga 100%).
31
32
Dari asumsi bahwa kurva f(x) dapat didekati dengan garis lurus l dalam
selang [xn, xn+1], maka untuk suatu harga x dalam selang [xn, xn+1] fungsi f(x)
dapat didekati dengan :
f1(x) = yn + ( (yn+1) - (yn) / (xn+1) - (xn) )*(x xn) .....................
(2.8)
35
BAB III
METODE PENELITIAN
3.1 Lokasi dan Waktu Penelitian
3.1.1 Lokasi Penelitian
Penelitian rancang bangun pengontrolan kecepatan motor DC dengan
sensor PING menggunakan PWM (Pulse Width Modulation) berbasis ARDUINO
ATmega328P akan dilaksanakan di Laboratorium Elektronika dan Digital
Fakultas Teknik Universitas Mataram. Pembuatan alat serta pengujian sistem akan
dilaksanakan di Workshop Elektro Universitas Mataram.
3.1.2 Waktu Penelitian
Penelitian akan dilakukan dalam kurun waktu 3 bulan dari bulan Mei 2014
hingga Juli 2014. Proses penelitian akan dilakukan secara bertahap mulai dari
persiapan persiapan materi referensi, alat dan bahan, perakitan serta pengujian.
3.2 Alat dan Bahan
Dalam Penelitian ini akan digunakan berbagai alat dan bahan diantaranya:
a.
Alat
Gergaji besi
Tang
Amplas besi
Bor besi
Mata bor 3 mm
Mata bor 5 mm
AVO meter
Solder
Laptop
b. Bahan Penelitian
Arduino Uno R3
36
Sensor PING
Motor DC 24V
Lem besi
Gear
Rantai
Belt
Besi
Persiapan
Dibutuhkan persiapan dalam meneliti dan menentukan
Studi Literatur
Studi literatur sangat dibutuhkan sebagai penunjang dalam
Perancangan Sistem
Pemaparan tentang sistem akan dijelaskan pada sub bab
berikutnya.
d.
dilakukan pencarian dan pemilihan bahan bahan serta alat bantu yang
dibutuhkan untuk membuat sistem konveyor keseluruhan.
37
e.
Pasir
Dalam tahap uji ini, pengontrolan motor DC menggunakan
PWM dengan sensor PING berbasis ARDUINO dalam aplikasi
konveyor pengangkut pasir menuju tandom ini akan dianalisa serta
dibahas tentang kecepatan motor DC dan pembacaan sensor terhadap
level isi tandom.
2.
38
tandom dengan 1 buah motor DC dan 1 buah sensor jarak. Untuk ukuran
konveyor dibuat dengan panjang 100 cm, lebar 20 cm, dan tinggi 40 cm.
Untuk belt pada mekanik ini digunakan belt yang terbuat dari bahan elastis
yang berukuran dengan panjang 90 cm dan lebar 18 cm.
39
40
Mikrokontroler: ATmega328P-20PU
Maksimum arus per I/O pin: 40 mA (total arus pada semua pin
maksimum 400 mA)
EEPROM : 1 Kb
3.4.1.3 Motor DC
Adapun motor DC yang akan digunakan dalam tugas akhir ini yaitu Motor
DC magnet permanent type wipper dengan spesifikasi bawaan motor DC sebagai
berikut:
P1
P2
Eff
(V)
(A)
(W)
(N.m)
(rpm)
(W)
(%)
No_Load
24.20
0.390
9.45
0.23
35.64
0.85
9.0
Max_Eff
24.12
2.060
49.70
5.83
27.98
17.08
34.3
Max_Pout
24.00
4.432
106.4
14.58
16.89
25.79
24.2
Max_Torque
23.81
8.365
199.1
24.38
0.00
0.00
0.00
Locked_Rotor
23.81
8.365
199.1
24.38
0.00
0.00
0.00
Deskripsi
42
24V DC
43
1 2 3
1
44
merupakan
komponen
elektronika
yang
berfungsi
untuk
menampilkan karakter angka maupun huruf. LCD yang digunakan adalah LCD
162 dengan 32 karakter, dimana terdapat 2 baris yang masing-masing terdiri dari
16 karakter. Tegangan 3,3 -5 Volt yang digunakan untuk mengaktifkan LCD
tersebut. Dari kemampuan LCD menampilkan karekter ini digunakan untuk
membaca data sensor PING yang didapat. Untuk rangkaian LCD 162 yang
digunakan pada pengontrolan motor konveyor ini dapat dilihat pada gambar
dibawah.
45
46
Input/Output
Pin
Input/Output
0
1
2
3
4
5
Data LCD
Data LCD
Data LCD
Data LCD
7
8
9
10
11
12
13
Untuk tegangan LCD dan sensor PING akan dihubungkan pada pin
Arduino 5V.
Pada driver motor akan dihubungkan power suplai tambahan yang akan
membantu tegangan motor karena jenis motor DC yang digunakan adalah motor
DC wiper yang bertegangan 24V.
47
Persiapan
Studi
Literatur
Perancangan
Mengumpulkan
Alat dan Bahan
Perakitan
Sistem
Analisa Data
Selesai
48
Berikut adalah Tabel perencanaan yang akan dilakukan selama proses tugas akhir
ini dilaksanakan :
Tabel 3.3 Perencanaan proses tugas akhir.
Persiapan
literatur
Persiapan alat
dan bahan
Perakitan
sistem
Pengujian
sistem
Penyusunan laporan
dan analisa data
Minggu
1
Minggu
2
Minggu
3
Minggu
4
Minggu
5
Minggu
6
Minggu
7
Minggu
8
Minggu
9
Minggu
10
Minggu
11
Minggu
12
49
BAB IV
HASIL DAN PEMBAHASAN
dalam
menganalisa
kesalahan
serta
memperbaiki
untuk
2.
3.
4.
Tegangan Output
Persentase Error
Ukur (V DC)
Teori (V DC)
(%)
LM7824
23,5
24
2,08
LM7812
11,8
12
1,67
IC Regulator
50
DC. Selisih nilai 0,5 dan 0,2 atau 2,08% dan 1,67%. Ini dapat disebabkan tingkat
presisi alat ukur yang digunakan yakni kurang idealnya nilai tegangan dirangkaian
yang dipengaruhi tahanan dalam alat ukur yang bertindak sebagai beban tambahan
yang ketika perhitungan tidak merupakan variabel yang dihitung.
51
33 32 31 30 29 28 27 26 25 24 24 23 22 21 20 19 18
(cm)
Pembacaan
LCD
33 32 31 30 29 28 27 26 25 24 24 23 22 21 20 19 18
(cm)
52
Berdasarkan data hasil percobaan pada Tabel 4.2 dapat disimpulkan bahwa
pembacaan LCD sesuai dengan jarak pembacaan sensor jarak dan bisa dikatakan
pembacaan LCD dan sensor jarak bekerja dengan baik.
Dibawah ini adalah gambar grafik hubungan antara jarak sensor dengan
pembacaan LCD 16x2 :
36
33
30
27
24
21
18
15
12
9
6
3
0
0
12
15
18
21
24
27
30
33
36
Gambar 4.3 Grafik hubungan antara jarak sensor dengan pembacaan LCD 16x2
53
L298, pin 2, 3, 4, 5, 11, 12 pada Arduino terhubung dengan LCD 16x2. Untuk
lebih jelasnya lihat Gambar 4.4 :
Berdasarkan hasil pengujian pada saat tandom belum terisi pasir atau
masih kosong pembacaan sensor jarak 33 cm dengan kecepatan motor DC
47,5rpm, tegangan pada motor 20,2V DC dan arus 0,84A. Pada saat belt konveyor
di isi beban pasir kecepatan motor masih tetap, ketika tandom sudah mulai terisi
kecepatan motor mulai berkurang sesuai dengan pembacaan sensor jarak. Ketika
pembacaan sensor 32 cm maka kecepatan motor berkurang menjadi 46,4rpm
dengan tegangan dan arus 19,4V DC dan 0,81A. Kecepatan motor akan berkurang
terus karena sudah diprogram, jika semakin banyak isi dari tandom maka
kecepatan motor akan semakin mengecil, motor akan mati jika pembacaan sensor
jarak menjadi kurang dari atau sama dengan 17 cm.
Untuk data hasil selengkapnya dapat dilihat pada Tabel 4.3 :
54
Nilai PWM
Tegangan
Arus
Kecepatan
(cm)
(%)
(V DC)
(A)
(rpm)
33
100
20,2
0,84
47,5
32
96,08
19,4
0,81
46,4
31
92,16
18,9
0,77
44,5
30
88,24
18,1
0,74
42,9
29
84,31
17,3
0,71
40,9
28
80,39
16,3
0,67
38,4
27
76,47
15,6
0,64
36,8
26
72,55
14,7
0,61
35,5
25
68,63
13,2
0,57
32,4
24
64,71
12,9
0,54
30,3
23
60,78
12
0,51
27,6
22
56,86
11,2
0,47
25,8
21
52,94
10,2
0,44
24,2
20
49,02
9,2
0,41
21,6
19
45,10
8,5
0,37
18,9
18
41,18
7,6
0,35
16,9
17
T off
= 100 % - 41,18 %
55
= 58,82 %
Duty Cycle
= 41,18 %
= 0,4118
Vout
= (0,4118) x ( 23,5)
= 9,68 V DC
Untuk data selanjutnya dihitung dengan cara yang sama dan hasilnya dapat
dilihat pada Tabel 4.4 :
Nilai
Tegangan
Tegangan
Tegangan
Persentase
Jarak
PWM
Input
Output Ukur
Output Hitung
Error
(cm)
(%)
(V DC)
(V DC)
(V DC)
(%)
33
100
23,5
20,2
23,50
22,64
32
96,08
23,5
19,4
22,58
21,72
31
92,16
23,5
18,9
21,66
20,79
30
88,24
23,5
18,1
20,74
19,87
29
84,31
23,5
17,3
19,81
18,94
28
80,39
23,5
16,3
18,89
18,03
27
76,47
23,5
15,6
17,97
17,10
26
72,55
23,5
14,7
17,05
16,19
25
68,63
23,5
13,2
16,13
15,31
24
64,71
23,5
12,9
15,21
14,36
23
60,78
23,5
12
14,28
13,44
22
56,86
23,5
11,2
13,36
12,52
21
52,94
23,5
10,2
12,44
11,62
20
49,02
23,5
9,2
11,52
10,72
19
45,10
23,5
8,5
10,60
9,80
18
41,18
23,5
7,6
9,68
8,89
56
motor bernilai 20,2V DC dengan jarak pembacaan sensor bernilai 33cm, dan
ketika duty cycle bernilai 96,08% maka tegangan motor berkurang menjadi 19,4V
DC dengan jarak turun menjadi 32cm. Hal ini bisa dikatakan semakin tinggi nilai
high duty cycle yang diberikan maka tegangan output semakin tinggi pula.
Dibawah ini adalah gambar grafik hubungan antara tegangan (V DC)
dengan kecepaatan (rpm) dari data Tabel 4.3 :
50
45
Kecepatan (rpm)
40
35
30
25
20
15
10
5
0
0
10
12
14
16
18
20
22
Tegangan (V DC)
Gambar 4.5 Grafik hubungan antara tegangan (V DC) dengan kecepatan (rpm)
57
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int pingPin = 7;
const int motorPin= 10;
int inputSpeed;
void setup() {
lcd.begin(16, 2);
Serial.begin(9600);
pinMode(motorPin, OUTPUT);
}
void loop()
{
long duration, cm;
pinMode(pingPin, OUTPUT);
digitalWrite(pingPin, LOW);
delayMicroseconds(5);
digitalWrite(pingPin, HIGH);
delayMicroseconds(5);
digitalWrite(pingPin, LOW);
pinMode(pingPin, INPUT);
duration = pulseIn(pingPin, HIGH);
cm = microsecondsToCentimeters(duration);
inputSpeed = map(cm, 18, 33, 0, 15);
speedMotor(inputSpeed);
Serial.print(cm);
Serial.print("cm");
Serial.println();
lcd.setCursor(0,0);
lcd.print("jarak= ");
lcd.setCursor(6,0);
lcd.print(cm);
lcd.setCursor(10,0);
lcd.print("cm");
lcd.setCursor(0,1);
58
lcd.print("arduino");
delay(250);
lcd.clear();
}
int speedMotor(int inSpeed)
{
int y = map(inSpeed, 1, 15, 105, 255);
if (inSpeed < 0){
y = 0;
}
analogWrite(motorPin, y);
}
long microsecondsToCentimeters(long microseconds)
{
return microseconds / 29 / 2;
}
59
BAB V
PENUTUP
5.1 Kesimpulan
Berdasarkan hasil pengujian sistem konveyor pengangkut pasir dengan
mengontrol kecepatan putar motor konveyor dengan metode PWM 8 bit
berbasis Arduino maka dapat diambil beberapa kesimpulan, diantaranya
sebagai berikut:
1. Perancangan sistem konveyor pengangkut pasir dapat terealisasi sesuai
dengan perencanaan yaitu ketika jarak bernilai 33 cm maka motor akan
berputar dengan kecepatan 47,5 rpm dengan tegangan dan arus 20,2V DC
dan 0,84A dan ketika jarak bernilai 32 cm maka kecepatan putar motor
akan berkurang menjadi 46,4 rpm dengan tegangan dan arus 19,4V DC
dan 0,81A, motor akan mati ketika jarak bernilai kurang dari atau
samadengan 17 cm.
2. Kecepatan motor DC dapat diatur melalui pemberian nilai high dari duty
cycle PWM, semakin besar nilai high dari duty cycle PWM maka semakin
cepat putaran motor dan sebaliknya semakin kecil nilai high dari duty
cycle PWM maka kecepatan motor akan semakin pelan.
59
5.2 Saran
Dalam perencanaan dan
60
DAFTAR PUSTAKA
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 crystal oscillator, 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 Atmega8U2 programmed as a USB-to-serial converter.
"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 Arduno, 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.
Microcontroller
Operating Voltage
Input Voltage (recommended)
Input Voltage (limits)
Digital I/O Pins
Analog Input Pins
DC Current per I/O Pin
DC Current for 3.3V Pin
Flash Memory
SRAM
EEPROM
Clock Speed
ATmega328
5V
7-12V
6-20V
14 (of which 6 provide PWM output)
6
40 mA
50 mA
32 KB of which 0.5 KB used by
bootloader
2 KB
1 KB
16 MHz
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. The regulated power supply used to power the microcontroller and other components on the
board. This can come either from VIN via an on-board regulator, or be supplied by USB or another
regulated 5V supply.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
GND. Ground pins.
The Atmega328 has 32 KB of flash memory for storing code (of which 0,5 KB is used for the bootloader); It
has also 2 KB of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).
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. TThese 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, which,
although provided by the underlying hardware, is not currently included in the Arduino language.
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, 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:
I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library.
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 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 ATmega8U2 on the board channels this serial communication over USB
and appears as a virtual com port to software on the computer. The '8U2 firmware uses the standard USB
COM drivers, and no external driver is needed. However, on Windows, an *.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-toserial 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 support I2C (TWI) and SPI communication. The Arduino software includes a Wire
library to simplify use of the I2C bus; see the documentation for details. To use the SPI communication,
please see the ATmega328 datasheet.
The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino Uno w/
ATmega328" 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 ATmega8U2 firmware source code is available . The ATmega8U2 is loaded with a DFU bootloader,
which can be activated by connecting the solder jumper on the back of the board (near the map of Italy) and
then resetting the 8U2. 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).
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 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.
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.
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. Three 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.
Arduino can sense the environment by receiving input from a variety of sensors and can affect its
surroundings by controlling lights, motors, and other actuators. The microcontroller on the board is
programmed using the Arduino programming language (based on Wiring) and the Arduino
development environment (based on Processing). Arduino projects can be stand-alone or they can
communicate with software on running on a computer (e.g. Flash, Processing, MaxMSP).
Arduino is a cross-platoform program. Youll have to follow different instructions for your personal
OS. Check on the Arduino site for the latest instructions. http://arduino.cc/en/Guide/HomePage
Once you have downloaded/unzipped the arduino IDE, you can Plug the Arduino to your PC via USB cable.
File>Sketchbook>
Arduino-0017>Examples>
Digital>Blink
Once you have your skecth youll
see something very close to the
screenshot on the right.
In Tools>Board select
Now you have to go to
Tools>SerialPort
and select the right serial port, the
one arduino is attached to.
1.
Warranties
1.1 The producer warrants that its products will conform to the Specifications. This warranty lasts for one (1) years from the date of the sale. The
producer shall not be liable for any defects that are caused by neglect, misuse or mistreatment by the Customer, including improper installation or testing,
or for any products that have been altered or modified in any way by a Customer. Moreover, The producer shall not be liable for any defects that result from
Customer's design, specifications or instructions for such products. Testing and other quality control techniques are used to the extent the producer deems
necessary.
1.2 If any products fail to conform to the warranty set forth above, the producer's sole liability shall be to replace such products. The producer's liability
shall be limited to products that are determined by the producer not to conform to such warranty. If the producer elects to replace such products, the
producer shall have a reasonable time to replacements. Replaced products shall be warranted for a new full warranty period.
1.3 EXCEPT AS SET FORTH ABOVE, PRODUCTS ARE PROVIDED "AS IS" AND "WITH ALL FAULTS." THE PRODUCER DISCLAIMS ALL OTHER
WARRANTIES, EXPRESS OR IMPLIED, REGARDING PRODUCTS, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
1.4 Customer agrees that prior to using any systems that include the producer products, Customer will test such systems and the functionality of the
products as used in such systems. The producer may provide technical, applications or design advice, quality characterization, reliability data or other
services. Customer acknowledges and agrees that providing these services shall not expand or otherwise alter the producer's warranties, as set forth
above, and no additional obligations or liabilities shall arise from the producer providing such services.
1.5 The Arduino products are not authorized for use in safety-critical applications where a failure of the product would reasonably be expected to cause
severe personal injury or death. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the
operation of nuclear facilities and weapons systems. Arduino products are neither designed nor intended for use in military or aerospace applications or
environments and for automotive applications or environment. Customer acknowledges and agrees that any such use of Arduino products which is solely
at the Customer's risk, and that Customer is solely responsible for compliance with all legal and regulatory requirements in connection with such use.
1.6 Customer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements concerning its
products and any use of Arduino products in Customer's applications, notwithstanding any applications-related information or support that may be
provided by the producer.
2.
Indemnification
The Customer acknowledges and agrees to defend, indemnify and hold harmless the producer from and against any and all third-party losses, damages,
liabilities and expenses it incurs to the extent directly caused by: (i) an actual breach by a Customer of the representation and warranties made under this
terms and conditions or (ii) the gross negligence or willful misconduct by the Customer.
3.
In no event the producer shall be liable to the Customer or any third parties for any special, collateral, indirect, punitive, incidental, consequential or
exemplary damages in connection with or arising out of the products provided hereunder, regardless of whether the producer has been advised of the
possibility of such damages. This section will survive the termination of the warranty period.
4.
Changes to specifications
The producer may make changes to specifications and product descriptions at any time, without notice. The Customer must not rely on the absence or
characteristics of any features or instructions marked "reserved" or "undefined." The producer reserves these for future definition and shall have no
responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The product information on the Web Site or Materials is
subject to change without notice. Do not finalize a design with this information.
L298
..
..
.
DESCRIPTION
The L298 is an integrated monolithic circuit in a 15lead Multiwatt and PowerSO20 packages. It is a
high voltage, high current dual full-bridge driver designed to accept standard TTL logic levels and drive
inductive loads such as relays, solenoids, DC and
stepping motors. Two enable inputs are provided to
enable or disable the device independently of the input signals. The emitters of the lower transistors of
each bridge are connected together and the corresponding external terminal can be used for the con-
Multiwatt15
PowerSO20
BLOCK DIAGRAM
Jenuary 2000
1/13
L298
ABSOLUTE MAXIMUM RATINGS
Symbol
VS
VSS
VI,Ven
IO
Vsens
Value
Unit
Power Supply
Parameter
50
0.3 to 7
3
2.5
2
A
A
A
1 to 2.3
25
25 to 130
40 to 150
Ptot
Top
Tstg, Tj
Multiwatt15
15
CURRENT SENSING B
14
OUTPUT 4
13
OUTPUT 3
12
INPUT 4
11
ENABLE B
10
INPUT 3
GND
INPUT 2
ENABLE A
INPUT 1
SUPPLY VOLTAGE VS
OUTPUT 2
OUTPUT 1
CURRENT SENSING A
D95IN240A
GND
20
GND
Sense A
19
Sense B
N.C.
18
N.C.
Out 1
Out 2
PowerSO20
17
Out 4
16
Out 3
VS
15
Input 4
Input 1
14
Enable B
Enable A
13
Input 3
Input 2
12
VSS
10
11
GND
GND
D95IN239
THERMAL DATA
Symbol
Parameter
PowerSO20
Multiwatt15
Unit
Rth j-case
Max.
C/W
Rth j-amb
Max.
13 (*)
35
C/W
2/13
L298
PIN FUNCTIONS (refer to the block diagram)
MW.15
PowerSO
Name
1;15
2;19
Sense A; Sense B
Function
2;3
4;5
Out 1; Out 2
VS
5;7
7;9
Input 1; Input 2
6;11
8;14
Enable A; Enable B
1,10,11,20
GND
12
VSS
10; 12
13;15
Input 3; Input 4
13; 14
16;17
Out 3; Out 4
3;18
N.C.
ELECTRICAL CHARACTERISTICS (VS = 42V; VSS = 5V, Tj = 25C; unless otherwise specified)
Symbol
Parameter
Test Conditions
Operative Condition
IS
Ven = H; IL = 0
ISS
Ven = L
Quiescent Current from VSS (pin 9) Ven = H; IL = 0
VS
VSS
ViH
IiL
IiH
Ven = L
Ven = H
Ien = L
Ien = H
VCEsat (H)
Total Drop
Vsens
Max.
Unit
46
5
13
50
7
22
70
V
mA
mA
24
7
4
36
12
mA
mA
mA
0.3
6
1.5
mA
V
2.3
VSS
10
100
4.5
Ven = L
ViL
Min.
Typ.
VIH +2.5
Vi = L
Vi = H
Vi = X
Vi = L
Vi = H
Vi = X
Vi = L
Vi = H VSS 0.6V
30
0.3
1.5
2.3
VSS
10
V
A
30
100
1.35
2
1.2
1.7
1.7
2.7
1.6
2.3
3.2
4.9
V
V
V
V
V
V
Ven = L
Ven = H VSS 0.6V
IL = 1A
IL = 2A
IL = 1A
IL = 2A
IL = 1A
IL = 2A
0.95
(5)
(5)
(5)
(5)
0.85
1.80
1 (1)
3/13
L298
ELECTRICAL CHARACTERISTICS (continued)
Symbol
Parameter
Test Conditions
Min.
Typ.
Max.
Unit
(2); (4)
1.5
0.9 IL to 0.1 IL
(2); (4)
0.2
0.5 Vi to 0.1 IL
(2); (4)
0.1 IL to 0.9 IL
(2); (4)
0.7
T5 (Vi)
0.5 Vi to 0.9 IL
(3); (4)
0.7
T6 (Vi)
0.9 IL to 0.1 IL
(3); (4)
0.25
T7 (Vi)
0.5 Vi to 0.9 IL
(3); (4)
1.6
T8 (Vi)
0.1 IL to 0.9 IL
(3); (4)
0.2
T1 (Vi)
0.5 Vi to 0.9 IL
T2 (Vi)
T3 (Vi)
T4 (Vi)
Commutation Frequency
IL = 2A
T1 (Ven)
fc (Vi)
25
T2 (Ven)
0.9 IL to 0.1 IL
T3 (Ven)
T4 (Ven)
0.1 IL to 0.9 IL
T5 (Ven)
T6 (Ven)
0.9 IL to 0.1 IL
T7 (Ven)
T8 (Ven)
0.1 IL to 0.9 IL
(2); (4)
(2); (4)
(2); (4)
(2); (4)
(3); (4)
(3); (4)
(3); (4)
(3); (4)
40
0.3
0.4
2.2
0.35
0.25
0.1
1) 1)Sensing voltage can be 1 V for t 50 sec; in steady state Vsens min 0.5 V.
2) See fig. 2.
3) See fig. 4.
4) The load must be a pure resistor.
4/13
KHz
L298
Figure 3 : Source Current Delay Times vs. Input or Enable Switching.
5/13
L298
Figure 5 : Sink Current Delay Times vs. Input 0 V Enable Switching.
Inputs
Ven = H
Ven = L
L = Low
6/13
C=H;D=L
C=L;D=H
C=D
C=X;D=X
H = High
Function
Forward
Reverse
Fast Motor Stop
Free Running
Motor Stop
X = Dont care
L298
Figure 7 : For higher currents, outputs can be paralleled. Take care to parallel channel 1 with channel 4
and channel 2 with channel 3.
L298
This solution can drive until 3 Amps In DC operation
and until 3.5 Amps of a repetitive peak current.
On Fig 8 it is shown the driving of a two phase bipolar
stepper motor ; the needed signals to drive the inputs of the L298 are generated, in this example,
from the IC L297.
Fig 9 shows an example of P.C.B. designed for the
application of Fig 8.
8/13
VF 1.2 V @ I = 2 A
trr 200 ns
L298
Figure 9 : Suggested Printed Circuit Board Layout for the Circuit of fig. 8 (1:1 scale).
Figure 10 : Two Phase Bipolar Stepper Motor Control Circuit by Using the Current Controller L6506.
9/13
L298
mm
DIM.
MIN.
TYP.
inch
MAX.
MIN.
TYP.
MAX.
0.197
2.65
0.104
1.6
0.063
0.039
0.49
0.55
0.019
0.022
0.66
0.75
0.026
0.030
1.02
1.27
1.52
0.040
0.050
0.060
G1
17.53
17.78
18.03
0.690
0.700
0.710
H1
19.6
0.772
H2
20.2
0.795
21.9
22.2
22.5
0.862
0.874
0.886
L1
21.7
22.1
22.5
0.854
0.870
0.886
L2
17.65
18.1
0.695
L3
17.25
17.5
17.75
0.679
0.689
0.699
L4
10.3
10.7
10.9
0.406
0.421
0.429
L7
2.65
2.9
0.104
0.713
0.114
4.25
4.55
4.85
0.167
0.179
0.191
M1
4.63
5.08
5.53
0.182
0.200
0.218
1.9
2.6
0.075
S1
1.9
2.6
0.075
0.102
Dia1
3.65
3.85
0.144
0.152
10/13
OUTLINE AND
MECHANICAL DATA
0.102
Multiwatt15 V
L298
mm
DIM.
MIN.
TYP.
inch
MAX.
MIN.
TYP.
MAX.
0.197
2.65
0.104
1.6
0.063
0.49
0.55
0.019
0.022
0.66
0.75
0.026
0.030
1.14
1.27
1.4
0.045
0.050
0.055
G1
17.57
17.78
17.91
0.692
0.700
0.705
H1
19.6
0.772
H2
20.2
0.795
20.57
0.810
L1
18.03
0.710
L2
2.54
L3
17.25
L4
10.3
L5
0.100
17.5
17.75
0.679
0.689
0.699
10.7
10.9
0.406
0.421
0.429
5.28
L6
OUTLINE AND
MECHANICAL DATA
0.208
2.38
0.094
L7
2.65
2.9
0.104
0.114
1.9
2.6
0.075
0.102
S1
1.9
2.6
0.075
0.102
Dia1
3.65
3.85
0.144
0.152
Multiwatt15 H
11/13
L298
DIM.
A
a1
a2
a3
b
c
D (1)
D1
E
e
e3
E1 (1)
E2
E3
G
H
h
L
N
S
T
MIN.
mm
TYP.
0.1
0
0.4
0.23
15.8
9.4
13.9
MAX.
3.6
0.3
3.3
0.1
0.53
0.32
16
9.8
14.5
MIN.
0.004
0.000
0.016
0.009
0.622
0.370
0.547
1.27
11.43
10.9
inch
TYP.
0.050
0.450
11.1 0.429
2.9
6.2
0.228
0.1
0.000
15.9 0.610
1.1
1.1
0.031
10 (max.)
8 (max.)
5.8
0
15.5
0.8
OUTLINE AND
MECHANICAL DATA
MAX.
0.142
0.012
0.130
0.004
0.021
0.013
0.630
0.386
0.570
10
0.437
0.114
0.244
0.004
0.626
0.043
0.043
JEDEC MO-166
0.394
PowerSO20
N
a2
b
DETAIL A
c
a1
DETAIL B
e3
H
DETAIL A
lead
slug
a3
DETAIL B
20
11
0.35
Gage Plane
-C-
SEATING PLANE
E2
E1
BOTTOM VIEW
T
E3
1
h x 45
12/13
10
PSO20MEC
(COPLANARITY)
D1
L298
Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No
license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specification mentioned in this
publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not authorized for use as critical components in life support devices or systems without express written
approval of STMicroelectronics.
The ST logo is a registered trademark of STMicroelectronics
2000 STMicroelectronics Printed in Italy All Rights Reserved
STMicroelectronics GROUP OF COMPANIES
Australia - Brazil - China - Finland - France - Germany - Hong Kong - India - Italy - Japan - Malaysia - Malta - Morocco Singapore - Spain - Sweden - Switzerland - United Kingdom - U.S.A.
http://www.st.com
13/13
Mechanical
WD1160
WD1160-B
Peak Torque
L1
L2
N.m
mm
mm
182
225
199
235
Speed
Current
Torque
rpm
N.m
40
28
5.6
5.2
8.5
31
24
4.8
10
40.5
28
5.8
6.5
10
27
21.5
6.3
13.2
15
Speed
WD1160
WD1160-B
http://www.china-electricmotor.com
Mechanical
WD11100
---BLK High Speed,
Peak Torque
L1
L2
N.m
mm
mm
223.5
276.5
235
288
Speed
Current
Torque
rpm
N.m
38
25
10
12.5
20
25
19
5.7
13
20
37
25
9.7
12
20
23
15
7.8
16
20
Speed
WD21100
WD21100-B
http://www.china-electricmotor.com
Mechanical
http://www.china-electricmotor.com
Mechanical
http://www.china-electricmotor.com
Mechanical
http://www.china-electricmotor.com
Mechanical
http://www.china-electricmotor.com
Mechanical
Performance
Data at
http://www.china-electricmotor.com
Rated 24V DC
Mechanical
http://www.china-electricmotor.com
General: info@parallax.com
Technical: support@parallax.com
Web Site: www.parallax.com
Educational: www.stampsinclass.com
Features
Dimensions
Page 1 of 13
Pin Definitions
GND
5V
SIG
Ground (Vss)
5 VDC (Vdd)
Signal (I/O pin)
The PING))) sensor has a male 3-pin header used to supply power
(5 VDC), ground, and signal. The header allows the sensor to be
plugged into a solderless breadboard, or to be located remotely
through the use of a standard servo extender cable (Parallax part
#805-00002). Standard connections are show in the diagram to
the right.
Quick-Start Circuit
This circuit allows you to quickly connect your PING))) sensor to a BASIC Stamp 2 via the Board of
Education breadboard area. The PING))) modules GND pin connects to Vss, the 5 V pin connects to
Vdd, and the SIG pin connects to I/O pin P15. This circuit will work with the example program
Ping_Demo.BS2 listed on page 7.
Page 2 of 13
Theory of Operation
The PING))) sensor detects objects by emitting a short ultrasonic burst and then "listening" for the echo.
Under control of a host microcontroller (trigger pulse), the sensor emits a short 40 kHz (ultrasonic) burst.
This burst travels through the air at about 1130 feet per second, hits an object and then bounces back to
the sensor. The PING))) sensor provides an output pulse to the host that will terminate when the echo
is detected, hence the width of this pulse corresponds to the distance to the target.
Test Data
The test data on the following pages is based on the PING))) sensor, tested in the Parallax lab, while
connected to a BASIC Stamp microcontroller module. The test surface was a linoleum floor, so the
sensor was elevated to minimize floor reflections in the data. All tests were conducted at room
temperature, indoors, in a protected environment. The target was always centered at the same elevation
as the PING))) sensor.
Page 3 of 13
Test 1
Sensor Elevation:
Target:
Page 4 of 13
Test 2
Sensor Elevation:
Target:
Page 5 of 13
Page 6 of 13
' =========================================================================
'
'
File....... Ping_Demo.BS2
'
Purpose.... Demo Code for Parallax PING))) Sonar Sensor
'
Author..... Parallax, Inc.
'
E-mail..... support@parallax.com
'
Started....
'
Updated.... 08 JUN 2005
'
'
{$STAMP BS2}
'
{$PBASIC 2.5}
'
' =========================================================================
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
-----[ Program Description ]--------------------------------------------This program demonstrates the use of the Parallax PING))) sensor and then
converting the raw measurement to English (inches) and Metric (cm) units.
Sonar Math:
At sea level sound travels through air at 1130 feet per second.
equates to 1 inch in 73.746 uS, or 1 cm in 29.034 uS).
This
Since the PING))) sensor measures the time required for the sound wave to
travel from the sensor and back. The result -- after conversion to
microseconds for the BASIC Stamp module in use -- is divided by two to
remove the return portion of the echo pulse. The final raw result is
the duration from the front of the sensor to the target in microseconds.
PIN
15
RawToIn
RawToCm
CON
CON
889
2257
IsHigh
IsLow
CON
CON
1
0
Page 7 of 13
VAR
VAR
VAR
Word
Word
Word
CR,
CR,
CR,
CR,
PAUSE 100
LOOP
END
Get_Sonar:
Ping = IsLow
PULSOUT Ping, Trigger
PULSIN Ping, IsHigh, rawDist
rawDist = rawDist */ Scale
rawDist = rawDist / 2
RETURN
'
'
'
'
'
Page 8 of 13
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
-----[ Program Description ]--------------------------------------------This program demonstrates the use of the Parallax PING))) sensor and then
converting the raw measurement to English (inches) and Metric (cm) units.
Sonar Math:
At sea level sound travels through air at 1130 feet per second.
equates to 1 inch in 73.746 uS, or 1 cm in 29.034 uS).
This
Since the PING))) sensor measures the time required for the sound wave to
travel from the sensor and back. The result -- after conversion to
microseconds for the BASIC Stamp module in use -- is divided by two to
remove the return portion of the echo pulse. The final raw result is
the duration from the front of the sensor to the target in microseconds.
Ping
= 7
Trigger
Scale
= 1
= 10
SYMBOL
SYMBOL
RawToIn
RawToCm
= 889
= 2257
SYMBOL
SYMBOL
IsHigh
IsLow
= 1
= 0
rawDist
inches
cm
= W1
= W2
= W3
Page 9 of 13
CLS
"Time (uS)..... ", #rawDist, CR
"Inches........ ", #inches, CR
"Centimeters... ", #cm
PAUSE 500
GOTO Main
END
Get_Sonar:
LOW Ping
PULSOUT Ping, Trigger
PULSIN Ping, IsHigh, rawDist
rawDist = rawDist * Scale
rawDist = rawDist / 2
RETURN
'
'
'
'
'
Page 10 of 13
/**
* This class provides an interface to the Parallax PING))) ultrasonic
* range finder module.
* <p>
* <i>Usage:</i><br>
* <code>
*
Ping range = new Ping(CPU.pin0);
// trigger and echo on P0
* </code>
* <p>
* Detailed documentation for the PING))) Sensor can be found at: <br>
* http://www.parallax.com/detail.asp?product_id=28015
* <p>
*
* @version 1.0 03 FEB 2005
*/
public final class Ping {
private int ioPin;
/**
* Creates PING))) range finder object
*
* @param ioPin PING))) trigger and echo return pin
*/
public Ping (int ioPin) {
this.ioPin = ioPin;
}
/**
* Returns raw distance value from the PING))) sensor.
*
* @return Raw distance value from PING)))
*/
public int getRaw() {
int echoRaw = 0;
CPU.writePin(ioPin, false);
// setup for high-going pulse
CPU.pulseOut(1, ioPin);
// send trigger pulse
echoRaw = CPU.pulseIn(2171, ioPin, true); // measure echo return
// return echo pulse if in range; zero if out-of-range
return (echoRaw < 2131) ? echoRaw : 0;
}
Page 11 of 13
/*
* The PING))) returns a pulse width of 73.746 uS per inch. Since the
* Javelin pulseIn() round-trip echo time is in 8.68 uS units, this is the
* same as a one-way trip in 4.34 uS units. Dividing 73.746 by 4.34 we
* get a time-per-inch conversion factor of 16.9922 (x 0.058851).
*
* Values to derive conversion factors are selected to prevent roll-over
* past the 15-bit positive values of Javelin Stamp integers.
*/
/**
* @return PING))) distance value in inches
*/
public int getIn() {
return (getRaw() * 3 / 51);
// raw * 0.058824
}
/**
* @return PING))) distance value in tenths of inches
*/
public int getIn10() {
return (getRaw() * 3 / 5);
// raw / 1.6667
}
/*
* The PING))) returns a pulse width of 29.033 uS per centimeter. As the
* Javelin pulseIn() round-trip echo time is in 8.68 uS units, this is the
* same as a one-way trip in 4.34 uS units. Dividing 29.033 by 4.34 we
* get a time-per-centimeter conversion factor of 6.6896.
*
* Values to derive conversion factors are selected to prevent roll-over
* past the 15-bit positive values of Javelin Stamp integers.
*/
/**
* @return PING))) distance value in centimeters
*/
public int getCm() {
return (getRaw() * 3 / 20);
// raw / 6.6667
}
/**
* @return PING))) distance value in millimeters
*/
public int getMm() {
return (getRaw() * 3 / 2);
// raw / 0.6667
}
}
This simple demo illustrates the use of the PING))) ultrasonic range finder class with the Javelin Stamp:
Page 12 of 13
import stamp.core.*;
import stamp.peripheral.sensor.Ping;
Page 13 of 13