ga lama suster datang ganti obat yang abis, pas gw liat ko alat-alat itu terlihat sangat primitip ya, hahaha...., ya gimana soalnya 2013 gini pasien masih aja ribet sama kabel-kabel dan selang-selang dibadan, ampe betanda dikulit and ruangan ICU menggunakan AC ion, maaf menurut gw alat-alat ini tidak membantu sama sekali untuk kesembuhan pasien, ya tapi bukan urusan gw juga, hehe... padahal AC ion itu. cara kerjanya....ah jadi panjang tar...hahaha...
Langsung otak ga bisa diem merhatiin sekaligus mempelajari alat-alat tersebut, hehe... tadi malem iseng-iseng nyoba bikin replika alat sensor detak jantung/nadi, sambil nonton MotoGP Aragon, kasian Valentino Rossy sekarang kelasnya di 4th kebelakang lawannya Bautista dan Bradley, Pedrosa mentalnya tempe ke gep sama Marques, hahaha... dah ah balik lagi ke rumah sakit.
Ga kebayang itu alat-alat pasti impor and harganya selangit, padahal kalo dibikin sendiri ga akan semahal itu, blom lagi satu ampul obat mmm...gw lupa namanya yang jelas untuk antibodi harganya 3 juta, ya tapi lumayanlah buat yang mampu sah-sah aja bayar segitu, iseng bikin sensor detak jantung ah....
Bikin sensor sendiri |
Rangkaian sensor, amplifier, LPF, MCU, Processing |
Tampilan monitoring detak jantung/nadi |
Sensor ngambil sampling nadi dari ujung jari, ga nyangka minum kopi plus ga sabaran karna sensornya kurang OK, jadinya liat sendiri detak jantung/nadi cukup kenceng, hahaha...beneran plus minum kopi, kandungan gula didarah berlebih, padahal dibalik monitor ada sepeda tuh, ngajak olah raga, hahaha...ini video cara kerja alatnya, nama alat ini monitor detak jantung abal-abal, hahaha....alat kaya ginian sebutannya apa ya?
Video monitor detak jantung/nadi
Rangkaian sensor + amplifier + filter
CODING
Code processing*
void setup()
{
size(displayWidth-100, 600);
String portName = Serial.list()[4];
println(Serial.list());
myPort = new Serial(this, portName, 115200);
myPort.bufferUntil(lf);
background(208,24,24);
}
void draw()
{
//tidak penting
}
void serialEvent(Serial myPort)
{
inString = myPort.readString();
inString = trim(inString);
val = int(inString);
strokeWeight(12);
stroke(255, 255, 255);
line(old_x, old_y, screen_increment, 600-val);
old_x = screen_increment;
old_y = 600-val;
screen_increment=screen_increment+2;
if(screen_increment>(displayWidth-100)){
background(208,24,24);
screen_increment=-50;
old_x = -50;
old_y = 0;
}
}
Ardu Code*
heart_high=0;/
heart_low = 1023;
for(i=200; i>0; i--){
data[i] = data[i-1];
if(data[i]>heart_high)
heart_high=data[i];
if(data[i]<heart_low)
heart_low=data[i];
}
data[0] = analogRead(0);
mapped = map(data[0], 0, 1023, 0, 600);
Serial.println(mapped);
delay(5);
if((heart_high-heart_low)>150){
if(data[0] > (heart_high-.95*(heart_high-heart_low)))
digitalWrite(2, HIGH);
else
digitalWrite(2,LOW);
if(data[0] > (heart_high-.9*(heart_high-heart_low)))
digitalWrite(3, HIGH);
else
digitalWrite(3,LOW);
if(data[0] > (heart_high-.8*(heart_high-heart_low)))
digitalWrite(4, HIGH);
else
digitalWrite(4,LOW);
if(data[0] > (heart_high-.7*(heart_high-heart_low)))
digitalWrite(5, HIGH);
else
digitalWrite(5,LOW);
if(data[0] > (heart_high-.6*(heart_high-heart_low)))
digitalWrite(6, HIGH);
else
digitalWrite(6,LOW);
if(data[0] > (heart_high-.5*(heart_high-heart_low)))
digitalWrite(7, HIGH);
else
digitalWrite(7,LOW);
if(data[0] > (heart_high-.4*(heart_high-heart_low)))
digitalWrite(8, HIGH);
else
digitalWrite(8,LOW);
if(data[0] > (heart_high-.3*(heart_high-heart_low)))
digitalWrite(9, HIGH);
else
digitalWrite(9,LOW);
if(data[0] > (heart_high-.2*(heart_high-heart_low)))
digitalWrite(10, HIGH);
else
digitalWrite(10,LOW);
if(data[0] > (heart_high-.1*(heart_high-heart_low)))
digitalWrite(11, HIGH);
else
digitalWrite(11,LOW);
}
else
for(i=2; i<12; i++)
digitalWrite(i,LOW);
}
Sampai ketemu di tulisan-tulisan saya selanjutnya.
Rangkaian sensor |
Rangkaian amplifier |
Rangkaian filter |
Code processing*
import processing.serial.*;
Serial myPort;
int val, screen_increment, old_x=0, old_y=0;
String inString;
int lf = 10;
Serial myPort;
int val, screen_increment, old_x=0, old_y=0;
String inString;
int lf = 10;
void setup()
{
size(displayWidth-100, 600);
String portName = Serial.list()[4];
println(Serial.list());
myPort = new Serial(this, portName, 115200);
myPort.bufferUntil(lf);
background(208,24,24);
}
void draw()
{
//tidak penting
}
void serialEvent(Serial myPort)
inString = myPort.readString();
inString = trim(inString);
val = int(inString);
strokeWeight(12);
stroke(255, 255, 255);
line(old_x, old_y, screen_increment, 600-val);
old_x = screen_increment;
old_y = 600-val;
screen_increment=screen_increment+2;
if(screen_increment>(displayWidth-100)){
background(208,24,24);
screen_increment=-50;
old_x = -50;
old_y = 0;
}
}
Ardu Code*
int heart_high, heart_low;
int data[200], i, mapped;
void setup()
int data[200], i, mapped;
void setup()
{
for(i=2; i<12; i++)
pinMode(i, OUTPUT);
Serial.begin(115200);
}
void loop()
{for(i=2; i<12; i++)
pinMode(i, OUTPUT);
Serial.begin(115200);
}
void loop()
heart_high=0;/
heart_low = 1023;
for(i=200; i>0; i--){
data[i] = data[i-1];
if(data[i]>heart_high)
heart_high=data[i];
if(data[i]<heart_low)
heart_low=data[i];
}
data[0] = analogRead(0);
mapped = map(data[0], 0, 1023, 0, 600);
Serial.println(mapped);
delay(5);
if((heart_high-heart_low)>150){
if(data[0] > (heart_high-.95*(heart_high-heart_low)))
digitalWrite(2, HIGH);
else
digitalWrite(2,LOW);
if(data[0] > (heart_high-.9*(heart_high-heart_low)))
digitalWrite(3, HIGH);
else
digitalWrite(3,LOW);
if(data[0] > (heart_high-.8*(heart_high-heart_low)))
digitalWrite(4, HIGH);
else
digitalWrite(4,LOW);
if(data[0] > (heart_high-.7*(heart_high-heart_low)))
digitalWrite(5, HIGH);
else
digitalWrite(5,LOW);
if(data[0] > (heart_high-.6*(heart_high-heart_low)))
digitalWrite(6, HIGH);
else
digitalWrite(6,LOW);
if(data[0] > (heart_high-.5*(heart_high-heart_low)))
digitalWrite(7, HIGH);
else
digitalWrite(7,LOW);
if(data[0] > (heart_high-.4*(heart_high-heart_low)))
digitalWrite(8, HIGH);
else
digitalWrite(8,LOW);
if(data[0] > (heart_high-.3*(heart_high-heart_low)))
digitalWrite(9, HIGH);
else
digitalWrite(9,LOW);
if(data[0] > (heart_high-.2*(heart_high-heart_low)))
digitalWrite(10, HIGH);
else
digitalWrite(10,LOW);
if(data[0] > (heart_high-.1*(heart_high-heart_low)))
digitalWrite(11, HIGH);
else
digitalWrite(11,LOW);
}
else
for(i=2; i<12; i++)
digitalWrite(i,LOW);
}
Sampai ketemu di tulisan-tulisan saya selanjutnya.
No comments:
Post a Comment