Nervous and scary about the last presentation about this project..last touch up has been done.. before presenting...

The board and the casing has been build to fit up the circuit.

It take time to build and drill the casing ...

This is the result :


Graphical Heart Beat



The electrode pads been replace every time different person used it. It very disposal that should be limit to few person used it.


This is my poster on presentation days :

Poster 

For my advisor Sir Zul, thank you for helping in this project and my all my lecture that give some advice 

about the waveform that been produce in the lab...
 
Big thanks to all my friend especially Amirah , Bariah and Nadzirah that never give up..push me and build 

together as team ..

tQ... love u Alls







Presentation just next week..

The project almost 70% finish.

The problem on intermittent program that didn't stable and LCD got blow during pass month make me

nerves.

But still continue to the poster that should have on presentation. The data need on it is :

1) Objective - why build it
2)Application
3)Diagram
4) Description
5)Methodology
6)Result
7) References.



All this must have on poster. But the most important is the casing still in progress and data need to collect to

finish report next.


On this week, testing using processing and try an error to get the best result for waveform.

The value of heartbeat display is the right range for normal person value during relaxation.

I canot upload the video because there have few problem during uploading, so there only a result can be

show here.

Been done on Mira, electrode been place on wrist

1st result that came out
During this time, the result is to small but the value of heart beat that display 80 bpm during relaxation is the

 right range on it for women.

2nd result using variable resistor to adjust
By using variable resistor, the amplitude of waveform suddenly increase of variable resistor. This show that it

have to amplifier more. On this stage I think amplifier is d best AD 620 but during my time goes to Jalan 

Pasar it already sold out.


Time is to limit, I cant reach if ordering online, Even the best of INA 128 will have gain 1000 , it was big

 value of gain to make ECG best part.

With new library new coding almost the same, im over power of LCD, the LCD suddenly could not display

and done anything...

i check few time of it i confirm it that LCD get burn because it over heat continue try during the programming

testing.



During this time, I have to get back on using Processing display as backup to make it happen, try to be cool

on what just happen..

On circuit

Graphic LCD
During this time, searching on coding and library available for this LCD. What i get is something like this..
/*
 * GLCDexample
 *
 * Basic test code for the Arduino GLCD library.
 * This code exercises a range of graphic functions supported
 * by the library and provides examples of its use.
 * It also gives an indication of performance, showing the
 * number of frames drawn per second.  
 */

#include <glcd.h>

#include "fonts/allFonts.h"         // system and arial14 fonts are used
#include "bitmaps/allBitmaps.h"       // all images in the bitmap dir 

Image_t icon;

gText textArea;              // a text area to be defined later in the sketch
gText textAreaArray[3];      // an array of text areas  
gText countdownArea =  gText(GLCD.CenterX, GLCD.CenterY,1,1,Arial_14); // text area for countdown digits

unsigned long startMillis;
unsigned int  loops = 0;
unsigned int  iter = 0;
         int  theDelay = 20; 

void setup()
{
  GLCD.Init();   // initialise the library, non inverted writes pixels onto a clear screen
  if(GLCD.Height >= 64)   
    icon = ArduinoIcon64x64;  // the 64 pixel high icon
  else
    icon = ArduinoIcon64x32;  // the 32 pixel high icon
  introScreen();
  GLCD.ClearScreen(); 

  GLCD.SelectFont(System5x7, BLACK); // font for the default text area
}

void  loop()
{  
  iter=0; 
  startMillis = millis();
  while(iter++ < 10){   // do 10 iterations
    GLCD.DrawRect(0, 0, GLCD.CenterX, GLCD.Bottom); // rectangle in left side of screen
    GLCD.DrawRoundRect(GLCD.CenterX + 2, 0, GLCD.CenterX - 3, GLCD.Bottom, 5);  // rounded rectangle around text area   
    for(int i=0; i < GLCD.Bottom; i += 4)
      GLCD.DrawLine(1,1, GLCD.CenterX-1, i);  // draw lines from upper left down right side of rectangle  
    GLCD.DrawCircle(GLCD.CenterX/2, GLCD.CenterY-1, min(GLCD.CenterX/2, GLCD.CenterY)-2);   // draw circle centered in the left side of screen  
    GLCD.FillRect( GLCD.CenterX + GLCD.CenterX/2-8 ,GLCD.CenterY + GLCD.CenterY/2 -8,16,16, WHITE); // clear previous spinner position  
    drawSpinner(loops++, GLCD.CenterX + GLCD.CenterX/2, GLCD.CenterY + GLCD.CenterY/2);       // draw new spinner position
    GLCD.CursorToXY(GLCD.CenterX/2, GLCD.Bottom -15);          
    GLCD.print(iter);            // print current iteration at the current cursor position 
  } 
  // display iterations per second
  unsigned long duration = millis() - startMillis;
  int fps = 10000 / duration;
  int fps_fract = (10000 % duration) * 10 / (duration/10);
  GLCD.ClearScreen();               // clear the screen  
  GLCD.CursorToXY(GLCD.CenterX + 16, 9);
  GLCD.print("GLCD ");
  GLCD.print(GLCD_VERSION, DEC);
  if(GLCD.Height <= 32)
    GLCD.CursorToXY(GLCD.CenterX + 4, 1);
  else  
    GLCD.CursorToXY(GLCD.CenterX + 4, 24);
  GLCD.print("FPS=");               // print a text string
  GLCD.print(fps);                  // print an integer value
  GLCD.print(".");
  if(fps_fract < 10)
    GLCD.print((int)0);             // have to manually print the leading 0 when necessary
  GLCD.print(fps_fract);
}


void introScreen(){  
  GLCD.DrawBitmap(icon, 32,0); //draw the bitmap at the given x,y position
  countdown(3);
  GLCD.ClearScreen();
  GLCD.SelectFont(Arial_14); // you can also make your own fonts, see playground for details   
  GLCD.CursorToXY(GLCD.Width/2 - 44, 3);
  GLCD.print("GLCD version ");
  GLCD.print(GLCD_VERSION, DEC);
  GLCD.DrawRoundRect(8,0,GLCD.Width-19,17, 5);  // rounded rectangle around text area   
  countdown(3);  
  GLCD.ClearScreen(); 
  scribble(5000);  // run for 5 seconds
  moveBall(6000); // kick ball for 6 seconds
  GLCD.SelectFont(System5x7, BLACK);
  showCharacters("5x7 font:", System5x7);
  countdown(3);
  showCharacters("Arial_14:", Arial_14);
  countdown(3);
  textAreaDemo();
  scrollingDemo();
}

void showCharacters(char * title, Font_t font) {
  // this displays the desired font
  GLCD.ClearScreen();  
  GLCD.CursorTo(0,0);
  GLCD.print(title);
  GLCD.DrawRoundRect(GLCD.CenterX + 2, 0, GLCD.CenterX -3, GLCD.Bottom, 5);  // rounded rectangle around text area 
  textArea.DefineArea(GLCD.CenterX + 5, 3, GLCD.Right-2, GLCD.Bottom-4, SCROLL_UP); 
  textArea.SelectFont(font, BLACK);
  textArea.CursorTo(0,0);
  for(char c = 32; c < 127; c++){
    textArea.print(c);  
    delay(20);
  }
}

void drawSpinner(byte pos, byte x, byte y) {   
  // this draws an object that appears to spin
  switch(pos % 8) {
    case 0 : GLCD.DrawLine( x, y-8, x, y+8);        break;
    case 1 : GLCD.DrawLine( x+3, y-7, x-3, y+7);    break;
    case 2 : GLCD.DrawLine( x+6, y-6, x-6, y+6);    break;
    case 3 : GLCD.DrawLine( x+7, y-3, x-7, y+3);    break;
    case 4 : GLCD.DrawLine( x+8, y, x-8, y);        break;
    case 5 : GLCD.DrawLine( x+7, y+3, x-7, y-3);    break;
    case 6 : GLCD.DrawLine( x+6, y+6, x-6, y-6);    break; 
    case 7 : GLCD.DrawLine( x+3, y+7, x-3, y-7);    break;
  } 
}

void  textAreaDemo()
  showArea( textAreaFULL,       "Full"); 
  showArea( textAreaTOP,        "Top");
  showArea( textAreaBOTTOM,     "Bottom"); 
  showArea( textAreaRIGHT,      "Right");
  showArea( textAreaLEFT,       "Left"); 
  showArea( textAreaTOPLEFT,    "Top Left");
  showArea( textAreaTOPRIGHT,   "Top Right");
  showArea( textAreaBOTTOMLEFT, "Bot Left"); 
  showArea( textAreaBOTTOMRIGHT,"Bot Right");  
}

void showArea(predefinedArea area, char *description)
{
  GLCD.ClearScreen(); 
  GLCD.DrawBitmap(icon, 0,  0); 
  GLCD.DrawBitmap(icon, 64, 0); 
  textArea.DefineArea(area);
  textArea.SelectFont(System5x7);
  textArea.SetFontColor(WHITE); 
  textArea.ClearArea(); 
  textArea.println(description);
  textArea.print("text area");
  delay(1000);
  textArea.SetFontColor(WHITE); 
  textArea.ClearArea();
  showLines(10);
  delay(1000);   
  textArea.ClearArea();
  textArea.SetFontColor(BLACK);   
  showLines(10);
  delay(1000); 
}

void showAscii()
{
  for( char ch = 64; ch < 127; ch++)
  {
    GLCD.print(ch);
    delay(theDelay);
  }   
}

void showLines(int lines)
{
  for(int i = 1; i <= lines; i++)
  { 
    textArea << " Line  " << i << endl;  
    delay(theDelay);  // brief pause between lines
  }
}


void countdown(int count){
  while(count--){  // do countdown  
    countdownArea.ClearArea(); 
    countdownArea.print(count);
    delay(1000);  
  }  
}

void scrollingDemo()
{
  GLCD.ClearScreen();  
  textAreaArray[0].DefineArea( textAreaTOPLEFT);  
  textAreaArray[0].SelectFont(System5x7, WHITE);
  textAreaArray[0].CursorTo(0,0);
  textAreaArray[1].DefineArea( textAreaTOPRIGHT, SCROLL_DOWN);  // reverse scroll
  textAreaArray[1].SelectFont(System5x7, BLACK);
  textAreaArray[1].CursorTo(0,0);
  textAreaArray[2].DefineArea(textAreaBOTTOM); 

  textAreaArray[2].SelectFont(Arial_14, BLACK);
  textAreaArray[2].CursorTo(0,0);

  for(byte area = 0; area < 3; area++)
  {
    for( char c = 64; c < 127; c++)
      textAreaArray[area].print(c);
    delay(theDelay);    
  }
  for(char c = 32; c < 127; c++)
  {
    for(byte area = 0; area < 3; area++)
      textAreaArray[area].print(c);
    delay(theDelay);
  }  

  for(byte area = 0; area< 3; area++)
  {
    textAreaArray[area].ClearArea();
  }
  for(int x = 0; x < 15; x++)
  {
    for(byte area = 0; area < 3; area++)
    {
      textAreaArray[area].print("line ");
      textAreaArray[area].println(x);
      delay(50);
    }
  } 
  delay(1000);
}

/*
 * scribble drawing routine adapted from TellyMate scribble Video sketch
 * http://www.batsocks.co.uk/downloads/tms_scribble_001.pde
 */
void scribble( const unsigned int duration )
{
  const  float tick = 1/128.0;
  float g_head_pos = 0.0;
  
  for(unsigned long start = millis();  millis() - start < duration; )
  {
    g_head_pos += tick ;

    float head = g_head_pos ;
    float tail = head - (256 * tick) ;

    // set the pixels at the 'head' of the line...
    byte x = fn_x( head ) ;
    byte y = fn_y( head ) ;
    GLCD.SetDot( x , y , BLACK) ;

    // clear the pixel at the 'tail' of the line...
    x = fn_x( tail ) ;
    y = fn_y( tail ) ;  
     GLCD.SetDot( x , y , WHITE) ;
  }
}

byte fn_x( float tick )
{
  return (byte)(GLCD.Width/2 + (GLCD.Width/2-1) * sin( tick * 1.8 ) * cos( tick * 3.2 )) ;
}

byte fn_y( float tick )
{
  return (byte)(GLCD.Height/2 + (GLCD.Height/2 -1) * cos( tick * 1.2 ) * sin( tick * 3.1 )) ;
}


void moveBall(unsigned int duration) 
{

const byte ballR = 4;
int ballX = GLCD.CenterX + 5;   // X position of the ball 
int ballY = GLCD.CenterY;       // Y position of the ball
int ballDirectionY = 1;        // X direction of the ball
int ballDirectionX = 1;        // Y direction of the ball

  GLCD.ClearScreen();
  for(unsigned long start = millis();  millis() - start < duration; )
  {
    // if ball goes off the screen top or bottom, reverse its Y direction
    if (ballY + ballR >= GLCD.Bottom || ballY - ballR <= 0 ) 
      ballDirectionY = -ballDirectionY;

     // if the ball goes off the screen left or right, reverse X direction
    if (ballX - ballR < 0 || ballX + ballR >= GLCD.Right )
      ballDirectionX = -ballDirectionX; 
 
     // clear the ball's previous position:
    //GLCD.DrawCircle(ballX, ballY,ballR, WHITE);
    GLCD.FillRect(ballX-ballR-1, ballY-ballR-1, ballX+ballR, ballY+ballR, WHITE);
   
     // increment the ball's position in both directions:
    ballX = ballX + 2 * ballDirectionX;
    ballY = ballY + 2 * ballDirectionY;
 
    GLCD.FillCircle(ballX, ballY, ballR, BLACK);
    delay(30 );
  }
}

I try upload and still didnot have any display the connection 


i try an error doing connection and program..it still only can display light




Before it, the circuit of it been test using Arduino and test on wrist because it test on female hostel, so during

testing using coding Arduino and processing, it display peak-to-peak buat to small. When be identify , it have

small gain on amplifier that didnot get 1000, because it can go only 100.

Circuit testing :

Circuit testing pare with Arduino

Result

This show peak-to-peak very small need to be use varible to adjust


Lest inching the cirucit combination on LM 358 with bandpass amplifier to done it.

Inching process been done  by construct the at diptrace minimize the space of it so it look small then print.

Inching process
And drill then solder all the component on it  :)...almost done just on graphic LCD now..

Using LM 358


Using LM 324
This both cirucit been test, but stil to many noise on it. Not enough time on the same time inching the second

circuit of Arduino that must be done before next week in the same time need to continue on software about 

graphic Lcd.

The graphic Lcd that been done on coding KS 108, during this stage searching the right code of it about 

library on it.



After feel disappointed of first circuit, continue on bandpass filter using LM 358 also...



By using this circuit that connect to the amplifier it same work, we test alone on Farhan chest also, the 

waveform is great. We processed to continue on next week to show in front of our advisor.

During test on Naz, the waveform constant make the actual waveform,

Actual ECG waveform


but when we call Madam Zabariah to see it, she said that the waveform to constant that make weird.

Then after last test onward, it same the amplifier can't produce that actual waveform like before. The idea to 

change amplifier to new still cannot get the waveform.



This week, test thing the first circuit of simple ECG that have 


testing the circuit

During first testing with Mohammad Farhan and Naz, by test on Farhan chest, it seem does not working

well to get the right waveform.

We think because of the resistance on human body, that why it did not show the waveform correctly.


On this week, searching the component to be construct on breadboard to test on lab, as been list out, both

cirucit and additional test on next circuit will be list together to be buy at Jalan Pasar.

During this time seeking of program that need to be done of calculation on heart beat.

There have few program that been found using Arduino but still can't find the right for waveform.

But on video that few of it make me want to now how there done, this video so interesting as simple and

 cool waveform:








On this both week, searching on the real data and get to focus on few circuit and interesting video such as here :

the circuit simple :

1st cirucit 

Actual circuit should be
This is first circuit I get from DIY website,  and attachment of video:




This is the result their get.

Awesome result there just using simple circuit on it.

Construction in progress and found new in the circuit there almost right on it.

Amplifier with bandpass filter
Here it use amplifier and bandpass filter. The calculation on bandpass filter been done to search the value of

resistor and capacitor it need on the circuit. Because of the range to get ecg between 0.05 - 150 hz, so 

calculation on bandpass filter show below :

calculation on bandpass



I try to combine and compare both circuit so that when I try it will be more suitable for this project.






Coming back to hostel as returning student..

During semester break there have new information on circuit and software to detect on graphical heart beat.

Still doing some test and research onward briefing final project been remain to finish the work on time again :

Still starting on

1) Presentation week 14
2) Explain about final report submission to library ( hardcover+CD)
3) have to show draft to adviser
4)Blog need to re update
5) LAST FINAL REPORT SUBMISSION ON WEEK 17

Next will be update for circuit




both are the assessor that access each of us

Madam STAM and Sir SAM



My lucky number.. at level 2


Presenting..Graphical Heart Beat

The day came...

Nervous..to much.. but at the end this presentation was success. 

The main  problem statement been stated  below :

    • POC
    • Biggest devices
    • Record
    • Expensive
The solution is using electrode detector that will be paste at the chest.

Next is waiting for result from assessor and submit progress report that balance of to success in this subject..

  


Doing next paper work is 3chapter to be submit....before week 15





Salam,

This is final draft to be check with Sir Zul before Presentation day.

For problem statement need to be improve on

    • POC - point of care ----> it about user use at home
    • holster (record) ---->  all data within 24 hours.
    • HR/HB monitor---->  market > only can display value , dont have graph -> home > can't be record
    • cheap machine to buy
More to problem statement that can attract assessor want to know this project. :)

Update new inside the slide and proposal.

  


Attend for presentation and proposal for next week at Hall...

objective & methdology

Poster Workshop


Arduino Memo on female hostel
Plan for whole day

The key point for this workshop is :
  1.         Introduction to Arduino
  2.         Setting up your Arduino Environment
  3.         First Arduino sketch
  4.         Making LEDs glow and blink
  5.         How to read buttons/switches
  6.         Analog Signals
  7.         Serial Communication
  8.         Digital Thermometer


Arduino can be sheild
Basic about Arduino it was open source and there no shilling or no limit to use it. This picture below there have many type of board that can be easy to use or hide on your board without notice it. The simple and easy to carry with variety port of it.

Variety type of Arduino board.












Orait, I know all of this had been talk at last talk but it give more understanding on it. Lets move forward to the program that been focus on it.
This is my basic kit that been provide to us.
Actually, I buy it from Ali that manage the program :)
Least go to the Arduino, inside this kit, their give us R3. It look like this : 
New Arduino Uno R3


Back of Arduino, if it R2 back of it is blue.
This is R2.
Now, I have the board, but don't forget that it not yet install. Who came to this workshop was lucky because their provide the  cd of installer to make your life easy. 
When come to the construct the circuit basic about it was electronic. 


Arduino Logo

Salam,
On 23 march 2012. there is seminar about " Lets Talk Arduino (Introduction to Microcontroller) at CR 226 by my supervisor , Sir Zulkifli Mahmoodin.

The poster


There have few of topic that been highlight during the talk :
  1.  Type of board
  2. How Arduino's function
  3. Sheilld
  4. Current price of board by type
  5. Programming
DEMO TIME

The color change by user 
After short explanation about Arduino, Sir had been demo in front of us how Arduino and Android be a best friend ever. Manually all the program been set on Arduino then been pair with Android.

The combination was great!
Test on the screen laptop
The picture show that after the code been upload into circuit and handphone. The it test directly to the simple circuit that been done. As a result, it show same color on LED.
The result is parallel to the instruction 
Display all three color.
Simple code bring all this out. Can u imaging how simple its. Even it is simple don't over estimate on it. When come to the truth final project it can go to disaster. Well from know on, let's try and error using Arduino. With some of data on internet and few of it in the sample maybe can be easy. Well bring it on Arduino. 


=ASH=

Related Posts Plugin for WordPress, Blogger...