Disusun Oleh :
DAFTAR ISI...................................................................................................................... i
DAFTAR GAMBAR ........................................................................................................ ii
BAB I ................................................................................................................................ 1
PENDAHULUAN ............................................................................................................ 1
1.1 Latar Belakang ............................................................................................... 1
1.2 Tujuan ............................................................................................................ 2
1.3 Manfaat .......................................................................................................... 2
BAB II............................................................................................................................... 3
PEMBAHASAN ............................................................................................................... 3
2.1 Peralatan Yang Digunakan ............................................................................ 3
2.2 Teori Penunjang ............................................................................................. 3
BAB III ............................................................................................................................. 7
PELAKSANAAN PERCOBAAN .................................................................................... 7
3.1 Perakitan Hardware ........................................................................................ 7
3.2 Pemrograman Arduino ................................................................................... 7
Untuk memrogram arduino diperlukan software arduino yang diinstall pada
computer dan kabel USB yang sudah terpasang pada port USB computer dan
modul arduino. ...................................................................................................... 7
BAB IV ........................................................................................................................... 18
PENUTUP ...................................................................................................................... 18
BAB V ............................................................................................................................ 19
DAFTAR PUSTAKA ..................................................................................................... 19
i
DAFTAR GAMBAR
ii
BAB I
PENDAHULUAN
1
mengetahui kondisi kesehatan dengan parameter diatas setidaknya untuk
tahap awal pendeteksian
1.2 Tujuan
1. Mengetahui cara kerja Pulse Sensor
2. Mampu memonitoring detak jantung menggunakan mikrokontroller
(modul Arduino) dan Software Processing
1.3 Manfaat
Dapat membantu mengetahui kondisi kesehatan dengan cara
memonitoring detak jantung untuk tahap awal pendeteksian.
2
BAB II
PEMBAHASAN
3
2.2.2. Instruksi Arduino IDE
2.2.3. Processing
4
2.2.4. Pulse Sensor
5
G
a
G
ambar 1-2. Pulse Sensor Board
6
BAB III
PELAKSANAAN PERCOBAAN
Buat rangkaian seperti pada gambar 1-3 sambungkan kabel dari arduino ke
modul Pulse Sensor seperti pada gambar dibawah ini:
7
Langkah-langkah berikut :
8
Langkah Percobaan sebagai berikut:
1. Buat program arduino seperti dibawah ini:
void setup(){
pinMode(blinkPin,OUTPUT); // pin that will blink to your
heartbeat!
pinMode(fadePin,OUTPUT); // pin that will fade to your
heartbeat!
Serial.begin(115200); // we agree to talk fast!
interruptSetup(); // sets up to read Pulse
Sensor signal every 2mS
// IF YOU ARE POWERING The Pulse Sensor AT
VOLTAGE LESS THAN THE BOARD VOLTAGE,
// UN-COMMENT THE NEXT LINE AND APPLY THAT
VOLTAGE TO THE A-REF PIN
// analogReference(EXTERNAL);
}
9
serialOutput() ;
void ledFadeToBeat(){
fadeRate -= 15; // set LED fade value
fadeRate = constrain(fadeRate,0,255); // keep LED fade
value from going into negative numbers!
analogWrite(fadePin,fadeRate); // fade LED
}
10
Gambar 1-5. Setelah program arduino di upload
import processing.serial.*;
PFont font;
Scrollbar scaleBar;
Serial port;
int Sensor; // HOLDS PULSE SENSOR DATA FROM
ARDUINO
int IBI; // HOLDS TIME BETWEN HEARTBEATS
FROM ARDUINO
int BPM; // HOLDS HEART RATE VALUE FROM
ARDUINO
11
int[] RawY; // HOLDS HEARTBEAT WAVEFORM DATA
BEFORE SCALING
int[] ScaledY; // USED TO POSITION SCALED
HEARTBEAT WAVEFORM
int[] rate; // USED TO POSITION BPM DATA
WAVEFORM
float zoom; // USED WHEN SCALING PULSE
WAVEFORM TO PULSE WINDOW
float offset; // USED WHEN SCALING PULSE
WAVEFORM TO PULSE WINDOW
color eggshell = color(255, 253, 248);
int heart = 0; // This variable times the heart image 'pulse' on
screen
// THESE VARIABLES DETERMINE THE SIZE OF THE
DATA WINDOWS
int PulseWindowWidth = 490;
int PulseWindowHeight = 512;
int BPMWindowWidth = 180;
int BPMWindowHeight = 340;
boolean beat = false; // set when a heart beat is detected, then
cleared when the BPM graph is advanced
void setup() {
size(700, 600); // Stage size
frameRate(100);
font = loadFont("Arial-BoldMT-24.vlw");
textFont(font);
textAlign(CENTER);
rectMode(CENTER);
ellipseMode(CENTER);
// Scrollbar constructor inputs: x,y,width,height,minVal,maxVal
scaleBar = new Scrollbar (400, 575, 180, 12, 0.5, 1.0); // set
parameters for the scale bar
RawY = new int[PulseWindowWidth]; // initialize raw
pulse waveform array
ScaledY = new int[PulseWindowWidth]; // initialize scaled
pulse waveform array
rate = new int [BPMWindowWidth]; // initialize BPM
waveform array
zoom = 0.75; // initialize scale of heartbeat
window
12
}
for (int i=0; i<RawY.length; i++){
RawY[i] = height/2; // initialize the pulse window data line to
V/2
}
void draw() {
background(0);
noStroke();
// DRAW OUT THE PULSE WINDOW AND BPM WINDOW
RECTANGLES
fill(eggshell); // color for the window background
rect(255,height/2,PulseWindowWidth,PulseWindowHeight);
rect(600,385,BPMWindowWidth,BPMWindowHeight);
13
beginShape(); // using beginShape()
renders fast
for (int x = 1; x < ScaledY.length-1; x++) {
vertex(x+10, ScaledY[x]); //draw a line connecting
the data points
}
endShape();
14
heart = max(heart,0); // don't let the heart variable go into
negative numbers
if (heart > 0){ // if a beat happened recently,
strokeWeight(8); // make the heart big
}
smooth(); // draw the heart with two bezier curves
bezier(width-100,50, width-20,-20, width,140, width-100,150);
bezier(width-100,50, width-190,-20, width-200,140, width-
100,150);
strokeWeight(1); // reset the strokeWeight for next time
//
} //end of draw loop
15
Gambar 1-6. Setelah program Processing di upload sebelum kulit
menyentuh Pulse sensor
16
`
17
BAB IV
PENUTUP
4.1 Kesimpulan
18
BAB V
DAFTAR PUSTAKA
http://download.portalgaruda.org/article.php?article=339456&val=1265&title=ALAT%20PENG
UKUR%20DETAK%20JANTUNG%20MENGGUNAKAN%20PULSESENSOR%20BERBASIS%2
0ARDUINO%20UNO%20R3%20YANG%20DIINTEGRASIKAN%20DENGAN%20BLUETOOT
H
http://www.elecrow.com/wiki/index.php?title=Pulse_Sensor
http://www.cutedigi.com/blog/2014/06/
https://docs.google.com/document/d/1FVFffuKD9OnkTOwxs3dVaxp5LYb4S1aj65MS6lvIZbA/e
dit
https://github.com/WorldFamousElectronics/PulseSensor_Amped_Arduino
https://github.com/WorldFamousElectronics/PulseSensor_Amped_Processing_Visualizer
19