Makalah Elektonika
Makalah Elektonika
Abstract. Smart wheelchairs is a kind of assistive technology implementation from mobile robot
field. The main purpose of the system is enhance disable people mobility and guaranteeing safety
aspect while wheelchair navigate around domestic environment. As a kind of semi autonomous
smart navigation system, the smart wheelchair must be accommodate share control between
automatic controller and the user (via joystic). The ultimate goal of this research is to know
exactly the position and orientation of smart wheelchair using dead reckoning principle. To fulfill
the goal, the smart wheelchair is equipt by quadrature rotary encoder for each wheels.From the
experiments that we drawn, we have get some result: Position and orientation error will be larger
for long duration of operation of wheelchairs. Fundamentally, these kinds of error result from
systematic and non systematic error source.
Keywords: encoder, dead reckoning, state chart, komunikasi serial, smart wheelchair
S L (t ) = v L (t ).t
77
(1)
78 TRANSMISI, Jurnal Teknik Elektro, Volume 11, Nomor 2, Juni 2009, hlm. 77-83
S R (t ) = v R (t ).t
v (t ) + v R (t )
S (t ) = L
.t
2
S (t ) S L (t )
(t ) = R
+ 0
L
x(t ) = x0 + S (t ). cos (t )
y (t ) = y0 + S (t ).sin (t )
(2)
Perancangan Perangkat
Mikrokontroller
(3)
(4)
(5)
(6)
[A]
C
VL
Vx
VR
Vy
L
r
Lunak
pada
XA
PERANCANGAN SISTEM
Perancangan Perangkat Keras
Perangkat keras dari Penelitian ini meliputi
sistem minimum mikrokontroler Atmega128,
enkoder AutonicsTM E30S4, Schmitt Trigger, dan
laptop. Secara umum perancangan sistem yang
akan dibuat dapat dilihat pada Gambar 3.1.
Penjadwalan Tugas
Timer 3 pada ATmega128 digunakan untuk
menangani penjadwalan tugas ini. Fungsi
interupsi timer 3 diaktifkan untuk menseleksi
indeks timer mana yang aktif tiap periode tik.
Nilai periode tik pada penelitian ini mengikuti
perancangan sistem kursi roda cerdas yang sudah
dibuat sebelumnya yaitu 100 us.
Inisialisasi Softtimer
Pengaturan setting awal waktu pemanggilan
fungsi-fungsi di atas menggunakan fungsi
init_sch_timer() dengan listing kode
sebagai berikut.
init_sch_timer(5,50,500);
// timer untuk fungsi update_kecepatan()
init_sch_timer(6,60,500);
// timer untuk fungsi odometri()
init_sch_timer(7,100,100);
// timer untuk fungsi serial_task()
Setiawan, Pemetaan Posisi dan Orientasi Kursi Roda Cerdas Berbasis Prinsip Dead Reckoning 79
Pembacaan Enkoder
Pencacahan pulsa enkoder untuk menghitung
putaran yang ditempuh roda digunakan External
Interrupt 0 untuk roda kanan dan External
Interrupt 1 untuk roda kiri. Misalkan pada
perancangan perangkat keras untuk roda kanan,
output A enkoder dipasang pada pin External
Interrupt 0, sedangkan output B dipasang pada
pin D.2. Ketika terdeteksi falling edge pada
output A, maka fungsi interupsi External
Interrupt 0 akan dipanggil. Pada fungsi interupsi
External Interrupt 0 terdapat rutin untuk
mendeteksi arah putaran roda dengan diagram
alir yang ditunjukkan pada Gambar 3.
M ulai
Ya
O utput B == high
?
pulsa = pulsa + 1
( arah roda m aju )
Tidak
pulsa = pulsa - 1
(arah roda m undur)
Selesai
SR =
n
K
NR
(7)
80 TRANSMISI, Jurnal Teknik Elektro, Volume 11, Nomor 2, Juni 2009, hlm. 77-83
Event 1/Action1
Event 2/
Action2
Event 4/
Action 4
State 1
Event 3/
Action3
-/Action 5
State 0
-/Action 6
State 2
FS
State 1
State 0
Setiawan, Pemetaan Posisi dan Orientasi Kursi Roda Cerdas Berbasis Prinsip Dead Reckoning 81
(x 0 x1 )2 + ( y 0 y1 )2
x0
(cm)
0
77
172
232
19
108
-70
-144
-239
-94
39
y0
(cm)
0
104
231
375
316
100
114
267
383
332
206
Perhitungan
x1
(cm)
0
81
185
201
32
101
-72
-138
-227
-91
-4
y1
(cm)
0
109
238
383
333
105
114
281
402
317
148
Error
Euklidean
(ek)
(cm)
0
6.40
14.76
32.02
21.40
8.60
2.00
15.23
22.47
15.30
72.20
82 TRANSMISI, Jurnal Teknik Elektro, Volume 11, Nomor 2, Juni 2009, hlm. 77-83
komputer
LCD
komputer
LCD
komputer
LCD
Posisi
Awal
Menuju
Tujuan
1
Menuju
Tujuan
2
Menuju
Tujuan
3
0
0
0
0
90
90
81
81
109
109
44
44
185
185
238
238
60
60
227
227
383
383
112
112
Setiawan, Pemetaan Posisi dan Orientasi Kursi Roda Cerdas Berbasis Prinsip Dead Reckoning 83