Friday, November 23, 2018

WEEK 17 (FYP 2)

Activity: Submission of the final report and progress report

So this is the last week before the submission date for the hardcover thesis. This week, i have to print the hard cover thesis to make sure the submission is on the due date. The submission deadline for all FYP 2 report is on 23/11/2018 before 5 pm.

ACKNOWLEDGEMENT
  
Alhamdullilah, all praises to Allah for the strengths and His blessing in completing this report and make this work easier through all the challenges. Special appreciation goes to my respective supervisor, Mr. Mohd Syazwan B. Md Yid for all his advice and constant support and all Medical Electronics lecturers that helped.

I would like to express my special thanks of gratitude to my friends who have given their endless support and encouragements. Here to the bright future Insha’Allah.

Last but not least, more importantly, we like to give a thousand thanks to our parents and also to my siblings for their endless love, prayers and encouragement. Also, not forgetting, those who indirectly contributed to completing this final report, your kindness means a lot to me.

Thank you very much.

Friday, November 9, 2018

WEEK 16 (FYP 2)

Activity: Final check of the report

So, this week i have to make a final check of my report before submitted and print the hard cover. The final report need to check the plagiarism in order to make sure that the report is write originally and not copy from other writing. The plagiarism percentages should below than 20%. Below are my plagiarism checking;

My plagiarism percentages is pass because it below than 20%.

This thesis has to have 2 copy because it need to be submitted to the library and for the supervisor. For the library the thesis must be submit  in a hardcover with a dark blue colour code.

LIST-TO-DO for thesis submission;

1. Do correction on the thesis based on your SV comments.
2. Get plagiarism report from your SV. Make sure you meet the allowable percentage of plagiarism (no greater than 20%)
3. Make sure your thesis follow the correct format. FYP coordinator will ask you to reprint your thesis again if it is not in the proper format.
4. Download all related forms for thesis submission from the FYP website (click Student --> Submission)
5. Get your SV signature on three (3) important documents (i.e. approval page in the thesis, project submission form and front page of plagiarism report)
6. Burn all required documents inside a CD to be submitted to the library.
7. Upload all documents in step 6 to your profile in FYP website. Username: your ID & Password: last 4 digit of your IC.
8. Once all six (6) items are ready, meet FYP Coordinator to get her signature on project submission form.
9. Thereafter, submit all six (6) items to the library before the library closed this Friday.


And the documents/form that need to be download to be submitted too;

Stated in a FYP website



Wednesday, October 31, 2018

WEEK 15 (FYP 2)

Activity: Draft for the Report

This week i meet my Supervisor to ask and know what need to be included and correction in the report. What he want and don't. What need to be change. So he want to make change what changes that i make from FYP 1 to FYP 2. 

The changes that was made are;

Chapter 1:
-Update the Abstract 

Chapter 2:
-Read and rewrite back what different that have been made

Chapter 3:
-Change the hardware part. Write the updated hardware that have been use for example form ESP8266 to NodeMCU. 
-Read and check back the block diagram, flowchart.

Chapter 4:
-Discuss the final product
-Discuss the overall result of the project

Chapter 5:
-Write conclusion and future recommendation needed for improvement

Sunday, October 28, 2018

WEEK 14 (FYP 2) INDUSTRIAL DAY

Activity: FYP 2 Presentation Day

This week is a presentation day for FYP 2. The presentation for FYP 2 had been held according to the details as below:


Date: 24/10/2018
Day: Wednesday
Time: 8:00AM - 12:00PM
Venue: Gemilang Hall

Students need to be at Gemilang Hall as early as 8:00 AM in order for us to set up the booth and register with the FYP committee. The process of assessing begin at 9:00 am where students are being assessed as the listed on the assessor's list provided by the committee. The list of assessor has been listed and posted by the FYP committee. So, my assessor for my FYP 2 are Naszariah Bt Mohd Noor and En Kamil from Radibems. 

The list name of the assessors

During the Presentation Day

The presentation can be considered went well. So the next step is to finish the progress report and the thesis. The last day for the submission date is on 23/11/2018 before 5PM. So the thesis must be complete before the due date.








Saturday, October 20, 2018

WEEK 13 (FYP 2)

Activity: Designing Poster for Presentation Day

This week we need to design the poster for the presentation and have all the result for the presentation day. The design for the poster must follow the template that have been briefing and explain. 

The result for this project has been made. The respiration rate can be measured and the IoT has function as well. The buzzer ringing when the abnormal result displayed. 


The poster;

The final design for the poster









Thursday, October 11, 2018

WEEK 12 (FYP 2) FINAL FYP2 BRIEFING

Activity: Briefing Week

This is the last briefing week for FYP 2. The last FYP 2 briefing is held as on the above details. The briefing is being given by the head of the FYP committee, Mdm Marwangi

Date: 10/10/2018
Venue: TTL 2
Time: 3:00PM - 5:00PM


One of the slide on the last FYP 2 briefing


The highlight of this briefing is as below:

1. Industry day
- Industry Day for degree student is on 24/10/201 starting from 8 am to 12 pm
- 2 assessor will assess the project
- The assessor comes from both/or Unikl lecturers and industry panel

2. Poster presentation
- Carry 40% from the whole weightage
- Need to follow the template given in the website

3. Project demonstration
- Be prepared with project demonstration
- Record a video of the project before the demonstration to avoid the reduction in marks

4. Submission of Progress Report
- Carry 20% mark
- Submission is whether blog or logbook depending on the Supervisor
- Date of submission is 23/11/2018

5. Submission of Final Report
- Carry 40% mark
- Need to submit both to Supervisor and the library
- In the form of the hardcover
- Template of the report is available in the fyp website
- Example of hardcover (Colour code - Dark Blue)

6. FYP 2 Claim
- Maximum RM500 per person
- Submit claim before the end of the semester
- Glued each of the receipts in different A4 paper
- Fill in the FYP claim form available in the FYP website

There are 2 weeks left before the project and poster presentation. We need to finalize the poster and the project so that we can everything is fine.

Saturday, October 6, 2018

WEEK 11 (FYP 2)

Activity: Internet of Thing (IoT)

After done with the measurement of respiration rate we proceed with IoT. This is important to transfer the data to the doctor. The module for this IoT was NodeMCU. NodeMCU act as IoT module was used to transfer the data that have recorded. Arduino Uno module did not use in this part because all the program from the Arduino has been transferred to the NodeMCU. To start using the NodeMCU, a program and a new project in a Blynk app been created. Each new project has the specific token number that must be set in the program. When the new project is creating, the Blynk app will send the specific token number to the email that makes the project can be connected to the selected specific WiFi. The token number was inserted in the program. NodeMCU has to know the WiFi credential by set the network name and password to make it function to transfer the data.


Token gets through E-mail when creating a new project.

ID number and password for the WiFi credential.

Result from the Blynk when the normal respiration rate per minutes was recorded.


Result from the Blynk when the abnormal respiration rate per minutes was recorded. 


The coding used for the IoT was;

#define BLYNK_PRINT Serial



#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "c484633147bc43a5b8189359ddeee344";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "PykaaHishan";
char pass[] = "pykaahishan96";

unsigned long prevRespTime = 0;
unsigned long currRespTime = 0;
respState currentRespState;
int movingAvgRespRate = 0;

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}

void loop()
{
  Blynk.run();
int sensorValue = analogRead(A0);

    if (sensorValue > 510 && currentRespState == Exhaling)
    {
        currentRespState = Inhaling;
        prevRespTime = currRespTime;  // save time from last cycle
        currRespTime = millis();

        float period_respiration = currRespTime - prevRespTime;
        float breathrate = 60000 / period_respiration;
        Serial.print("Inhaling \tRespirations per minute: ");
        Serial.println(breathrate);

         if (breathrate>1 && breathrate<9)
        {
          digitalWrite(9,HIGH);
          delay(2000);
          digitalWrite(9,LOW);
          delay(200);
        }
        if (breathrate>60 && breathrate<100)
        {
          digitalWrite(9,HIGH);
          delay(1000);
          digitalWrite(9,LOW);
          delay(200);
        }
        else if (breathrate>101 && breathrate<500 )
        {
           digitalWrite(9,HIGH);
          delay(500);
          digitalWrite(9,LOW);
          delay(200);
        }
        else
        {
          digitalWrite(9,LOW);
        }
      
    }
    else if (currentRespState == Inhaling && sensorValue < 490)
    {
        currentRespState = Exhaling;
        Serial.println("Exhaling"); 
    }
  Serial.println(sensorValue);
  Blynk.virtualWrite(V5,breathrate);
}



Friday, September 28, 2018

WEEK 10 (FYP 2) WORKSHOP ON ABSTRACT WRITING, POSTER PREPARATION AND PRESENTATION

Activity: Briefing Week

As mention last week, the brefing for the 
Abstract Writing, Poster Preparation And Presentation was extand to this week. This is another briefing week after come back from Mid Semester Break. This week briefing about the Abstract Writing, Poster Preparation And Presentation. The speaker for this week is Dr Helmy Hakimie Mohd Rozlan. The details are below;

Date: 28/9/2018
Venue: TTL 2
Time: 3:00PM - 5:00PM

1. Writing an abstract. 
The abstract need to write only 1 paragraph containing words around the range of 200-300 words in only a page. Write on the summary of;
- Problem statement
- Objectives and Motivation
- Methodology and Approach used
- Results or Findings of the project
- Conclusion

2. Poster Presentation
We also had been brief on the poster presentation where Dr. Helmy give us the format of the poster. We can get this format from http://fyp.bmi.unikl.edu.my/guidelines.php



Title, Name, Programme
- Write on the title of our project as well as our name and programme that we're currently take

Objective
- Write only 2 to 3 objectives in a point form.
- Based on the FYP 1 objectives last semester.
- Must start the word with "To ...... "

Project Description
- Briefly explained on the intro and concept of our project.
- Must be written in sentences.
- Write also on the expected outcome of the project.
- It is advisable to keep it short, simple and precise instead of long and lengthy without much input.

Methodology
- Picture of block diagram without any explanation.
- The explanation needs to be presented during presentation day.

Flowchart
- Flowchart of the whole process of the FYP project.
- No sentence need to be included as this is to be explained during the presentation day.

Results
- In table or graph where there are only figures without sentences.
- Must be explained during the presentation day.
- Reflect on the discussion and analysis of the project.

Conclusion
- Reflect on the objectives.
- State whether the objectives are achieved or not and elaborate on it.
- Write on the application of our project what future enhancement that can be done for the project.

References
- Write it based on the APA format and in point form.
- State most references for project based on both FYP 1 and FYP 2.


3. Presentation skills
Dr. Helmy had also give us some info on how to be a better presenter. Few things that we need to take into consideration is:

Practice in front of the mirror
Arrive early during presentation day
Emphasize on the body language while presenting
Show the confidence during presenting
Make eye contact with the presenter



The briefing with Dr Helmy

Wednesday, September 19, 2018

WEEK 9 (FYP 2)

Activity: Proceed Testing the Respiration Rate

After trying to use others type of temperature sensor (LM35 and DHT22) we proceed to testing the thermistor again. So, the respiration rate was measured based on the coding that have been set. 


#include <LiquidCrystal.h>
enum respState 
{
    Inhaling,
    Exhaling
};
unsigned long prevRespTime = 0;
unsigned long currRespTime = 0;
respState currentRespState;
int movingAvgRespRate = 0;
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() 
{
  lcd.begin(16, 2);
    Serial.begin(9600);
    pinMode(9,OUTPUT); //buzzer
}


void loop()
{
    //delay(500);  
    // don't need to delay because we'll only fire once per inhalation and once per exhalation
    int sensorValue = analogRead(A0);

    if (sensorValue > 510 && currentRespState == Exhaling)
    {
        currentRespState = Inhaling;
        prevRespTime = currRespTime;  // save time from last cycle
        currRespTime = millis();

        float period_respiration = currRespTime - prevRespTime;
        float breathrate = 60000 / period_respiration;
        Serial.print("Inhaling \tRespirations per minute: ");
        Serial.println(breathrate);
        lcd.setCursor(0, 1);
        lcd.print("RPM");
        lcd.print(breathrate);

         if (breathrate>1 && breathrate<9)
        {
          digitalWrite(9,HIGH);
          delay(2000);
          digitalWrite(9,LOW);
          delay(200);
        }
        if (breathrate>60 && breathrate<100)
        {
          digitalWrite(9,HIGH);
          delay(1000);
          digitalWrite(9,LOW);
          delay(200);
        }
        else if (breathrate>101 && breathrate<500 )
        {
           digitalWrite(9,HIGH);
          delay(500);
          digitalWrite(9,LOW);
          delay(200);
        }
        else
        {
          digitalWrite(9,LOW);
        }
        
      
    }
    else if (currentRespState == Inhaling && sensorValue < 490)
    {
        currentRespState = Exhaling;
        Serial.println("Exhaling");
        lcd.setCursor(0, 0);
        lcd.print("Exhaling       ");
        
    }

}


Measure the Respiration Rate 

The measurement of the respiration rate was based on what value of the temperature sensor recorded. After knowing how the temperature was recorded, Arduino can process the data to measure respiration rate. When exhalation the temperature increase while inhalation the temperature decrease. From the value of the temperature measurement, the Arduino convert temperature value to the digital value so that the controller can calculate the respiration rate. The calculation for the respiration rate depends on the coding. 


The sensor value (temperature sensor) in digital was set up for exhalation

The sensor value (temperature sensor) in digital was set up for inhalation

The calculation to measure respiration rate.

The result for the respiration rate cannot be measured accurately. This is because of the temperature sensor that has been used is not suitable and not to be used to measure accurate breathing. But, there is some result from the testing might be the right value for the respiration rate because the normal respiration rate for an adult is 12-20breath per minute.

The result measured that get normal respiration rate.

The normal respiration rate (RPM 13) result display in the LCD

The result measured that get abnormal respiration rate

The abnormal respiration rate (RPM 38) result display in the LCD

The RPM:13.42 respirations per minute can be the normal result for the respiration rate while RPM:38.10 respirations per minute can be the abnormal respiration rate. Other than that must be the wrong result because of the wrong calculation that has been processed with wrong temperature changes by the microcontroller. When there is an abnormal result, the coding was set up for the buzzer to ringing. 







Thursday, September 13, 2018

WEEK 8 (FYP 2)

Activity: Testing other type of Temperature Sensor

After testing the thermistor temperature sensor, the measurement is not very accurate and what we want. After discuss with my supervisor and asking other lecturer for help, they suggest to try another type of temperature sensor to see if there is another temperature sensor that more accurate. The temperature suggested are LM35 and DHT 22. So, after that, i search about the LM35 and DHT 22. So, here the features for those temperature sensor. 

LM35



The LM35 series are precision integrated-circuit temperature devices with an output voltage linearly-proportional to the Centigrade temperature. The LM35 device has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from the output to obtain convenient Centigrade scaling. The LM35 device does not require any external calibration or trimming to provide typical accuracies of ±¼°C at room temperature and ±¾°C over a full −55°C to 150°C temperature range. Lower cost is assured by trimming and calibration at the wafer level

DHT 22


The DHT sensors are made of two parts, a capacitive humidity sensor and a thermistor There is also a very basic chip inside that does some analog to digital conversion and spits out a digital signal with the temperature and humidity. The digital signal is fairly easy to read using any microcontroller.
  • Low cost
  • 3 to 5V power and I/O
  • 2.5mA max current use during conversion (while requesting data)
  • Good for 0-100% humidity readings with 2-5% accuracy
  • Good for -40 to 80°C temperature readings ±0.5°C accuracy
  • No more than 0.5 Hz sampling rate (once every 2 seconds)
  • Body size 15.1mm x 25mm x 7.7mm
  • 4 pins with 0.1" spacing


Activity: Test the another type of temperature sensor

This week is actually a briefing week, but the briefing was extend as the FYP committee has a unavoidable problems. So this week i test the another temperature sensor which is LM35 and DHT22.

After bought the LM35 and DHT22 i do a research about the circuit and the coding. Different type of temperature sensor has a different circuit diagram and coding. 

So, when i test, the temperature changes are slow than thermistor. The LM35 has a very low accuracy for for detection of the temperature changes. While for the DHT22, the detection not so fast than the NTC thermistor. So, after try testing with my supervisor, it approve that the DHT are slower than NTC. The final choose is the use back the NTC thermistor for the temperature sensor. 


Circuit for LM35

Burn in a Arduino Software


#include<LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

const int sensor=A1; // Assigning analog pin A1 to variable 'sensor'

float tempc; //variable to store temperature in degree Celsius

float tempf; //variable to store temperature in Fahreinheit

float vout; //temporary variable to hold sensor reading

void setup()

{

pinMode(sensor,INPUT); // Configuring pin A1 as input

Serial.begin(9600);

lcd.begin(16,2);

delay(500);

}

void loop()

{

vout=analogRead(sensor);

vout=(vout*500)/1023;

tempc=vout; // Storing value in Degree Celsius

tempf=(vout*1.8)+32; // Converting to Fahrenheit

lcd.setCursor(0,0);

lcd.print("in DegreeC= ");

lcd.print(tempc);

lcd.setCursor(0,1);

lcd.print("in Fahrenheit=");

lcd.print(tempf);

delay(1000); //Delay of 1 second for ease of viewing in serial monitor

}


The connection for DHT22 with Arduino


Burn in a Arduino Software


#define DHT11_PIN 4 // ADC0 Define the ANALOG Pin connected to DHT11 Sensor

int temp1[3]; //Temp1, temp2, hum1 & hum2 are the final integer values that you are going to use in your program.

int temp2[3]; // They update every 2 seconds.

int hum1[3];

int hum2[3];

byte read_dht11_dat()

{

byte i = 0;

byte result=0;

for(i=0; i< 8; i++){

while(!(PINC & _BV(DHT11_PIN))); // wait for 50us

delayMicroseconds(30);


if(PINC & _BV(DHT11_PIN))

result |=(1<<(7-i));

while((PINC & _BV(DHT11_PIN))); // wait '1' finish

}

return result;

}

long dht11delay_previousMillis = 0; // will store last time LED was updated

long dht11delay_interval = 1000; // dht11delay_interval at which to blink (milliseconds)
void setup()

{

DDRC |= _BV(DHT11_PIN);

PORTC |= _BV(DHT11_PIN);

Serial.begin(9600);

Serial.println("DHT11 without delay");

Serial.println("Example code by: Nick Athanasoulas");

Serial.println("Ready");

delay(1000);

}

void loop()

{
unsigned long dht11delay_currentMillis = millis();

if(dht11delay_currentMillis - dht11delay_previousMillis > dht11delay_interval) {

// save the last time you blinked the LED

dht11delay_previousMillis = dht11delay_currentMillis;

byte dht11_dat[5];

byte dht11_in;

byte i;

// start condition

// 1. pull-down i/o pin from 18ms

PORTC &= ~_BV(DHT11_PIN);

delay(18);

PORTC |= _BV(DHT11_PIN);

delayMicroseconds(40);

DDRC &= ~_BV(DHT11_PIN);

delayMicroseconds(40);

dht11_in = PINC & _BV(DHT11_PIN);

if(dht11_in){

Serial.println("dht11 start condition 1 not met");

return;

}

delayMicroseconds(80);

dht11_in = PINC & _BV(DHT11_PIN);

if(!dht11_in){

Serial.println("dht11 start condition 2 not met");

return;

}

delayMicroseconds(80);

// now ready for data reception

for (i=0; i<5; i++)

dht11_dat[i] = read_dht11_dat();

DDRC |= _BV(DHT11_PIN);

PORTC |= _BV(DHT11_PIN);

byte dht11_check_sum = dht11_dat[0]+dht11_dat[1]+dht11_dat[2]+dht11_dat[3];

// check check_sum

if(dht11_dat[4]!= dht11_check_sum)

{

Serial.println("DHT11 checksum error");

}

temp1[0]=dht11_dat[2];

temp2[0]=dht11_dat[3];

Serial.print("Temperature: ");

Serial.print(temp1[0]);

Serial.print(".");

Serial.print(temp2[0]);

Serial.print(" C");

Serial.print(" ");

hum1[0]=dht11_dat[0];

hum2[0]=dht11_dat[1];

Serial.print("Humidity: ");

Serial.print(hum1[0]);

Serial.print(".");

Serial.print(hum2[0]);

Serial.println("%");

}

}

Thursday, August 30, 2018

WEEK 7 (FYP 2)

Activity: Measure Respiration Rate

In this part, there is not much coding for the measurement respiration rate. i found some coding but there are certain part that need to be change. in order to measure respiration rate, the temperature change must be faster to the calculation in the micro controller to be correct. The coding for the respiration rate measure the temperature sensor in a ADC value. So, the voltage has be read as a ADC value. here the coding for the respiration rate measurement. 

#include <LiquidCrystal.h>
enum respState 
{
    Inhaling,
    Exhaling
};
unsigned long prevRespTime = 0;
unsigned long currRespTime = 0;
respState currentRespState;
int movingAvgRespRate = 0;
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() 
{
  lcd.begin(16, 2);
    Serial.begin(9600);
    pinMode(9,OUTPUT); //buzzer
}


void loop()
{
    //delay(500);  
    // don't need to delay because we'll only fire once per inhalation and once per exhalation
    int sensorValue = analogRead(A0);

    if (sensorValue > 510 && currentRespState == Exhaling)
    {
        currentRespState = Inhaling;
        prevRespTime = currRespTime;  // save time from last cycle
        currRespTime = millis();

        float period_respiration = currRespTime - prevRespTime;
        float breathrate = 60000 / period_respiration;
        Serial.print("Inhaling \tRespirations per minute: ");
        Serial.println(breathrate);
        lcd.setCursor(0, 1);
        lcd.print("RPM");
        lcd.print(breathrate);

         if (breathrate>1 && breathrate<9)
        {
          digitalWrite(9,HIGH);
          delay(2000);
          digitalWrite(9,LOW);
          delay(200);
        }
        if (breathrate>60 && breathrate<100)
        {
          digitalWrite(9,HIGH);
          delay(1000);
          digitalWrite(9,LOW);
          delay(200);
        }
        else if (breathrate>101 && breathrate<500 )
        {
           digitalWrite(9,HIGH);
          delay(500);
          digitalWrite(9,LOW);
          delay(200);
        }
        else
        {
          digitalWrite(9,LOW);
        }
        
      
    }
    else if (currentRespState == Inhaling && sensorValue < 490)
    {
        currentRespState = Exhaling;
        Serial.println("Exhaling");
        lcd.setCursor(0, 0);
        lcd.print("Exhaling       ");
        
    }


The sensor value was set from the voltage of the temperature changes. When exhale, the sensor value is more than 510 and when inhale the voltage less than 490.

But the value for the sensor value not a fix value.