chapter 5 implementation and testingrepository.unika.ac.id/16180/6/14.k1.0036 edwin listyo (0... ·...

20
CHAPTER 5 IMPLEMENTATION AND TESTING 5.1 Implementation In this Medical Devices project using IoT System programming is used on Arduino IDE microcontroller. The results of this project contains four designs, namely: 1. MAX30100 2. MLX90614 3. ESP8266 4. SIM900A 5.1.1. MAX30100 Results of the design of heartbeat series MAX30100 series on Arduino Uno can be seen in the following figure: 21 Illustration 5.1: MAX30100

Upload: others

Post on 06-Feb-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

  • CHAPTER 5

    IMPLEMENTATION AND TESTING

    5.1 ImplementationIn this Medical Devices project using IoT System programming is used on

    Arduino IDE microcontroller. The results of this project contains four

    designs, namely:

    1. MAX30100

    2. MLX90614

    3. ESP8266

    4. SIM900A

    5.1.1. MAX30100Results of the design of heartbeat series MAX30100 series on Arduino

    Uno can be seen in the following figure:

    21

    Illustration 5.1: MAX30100

  • 22

    The heart rate sensor of the MAX30100 series uses a positive

    voltage of 3.3 volts and a negative voltage coming from Arduino Uno in

    the GND port. Then both cables are connected to port A4 which means

    SDA and port A5 which means SCL in Arduino Uno. SDA is serial data,

    while SCL is synchronous clock path. After that, because the MAX30100

    requires a voltage to communicate I2C then the pull up is connected to 5V

    arduino uno directly and given the resistance(resistor) equal to 10K on

    SDA and SCL in the sensor.

    5.1.2. MLX90614The design results of infrared body temperature sensor series

    MLX90614 on Arduino can be seen in the following figure:

    Illustration 5.2: MLX90614

  • 23

    The MLX90614 series body temperature sensor uses a 5 volt

    positive voltage and a negative voltage coming from Arduino Uno in GND

    port. Then means SDA and port A5 which means SCL in Arduino Uno.

    SDA is serial data, while SCL is synchronous ctwo cables taken from the

    SDA and SCL sensors are connected to port A4 which lock path.

    5.1.3. ESP8266

    Results of ESP8266 serial wifi design module on Arduino can be

    seen in the following figure:

    On ESP8266 it takes 3.3 volt voltage. In addition, ESP8266 also

    requires RX and TX. Here RX and TX on ESP8266 are connected on pins

    10 and 11 as communication between ESP8266 and Arduino Uno.

    Illustration 5.3: ESP8266

  • 24

    5.1.4. SIM900AResults of GSM Shield SIM900 series design on Arduino can be

    seen in the following figure:

    In series GSM Shield 900A connected with 5 volt voltage and

    negative voltage coming from Arduino Uno in GND port. Here ESP8266

    is also connected simultaneously with SIM900 which usually receive data.

    ESP8266 and SIM900 both require TX and RX, but the serial hardware

    contained in the Arduino has only one pair. The devices in Arduino Uno

    are actually only recommended for use on one module only. If in one

    Illustration 5.4: SIM900A

  • 25

    module using two serial software at once classified as ineffective in the

    process.

    5.2 Testing

    In this testing, experiments were carried out on the heartbeat of the

    MAX30100 series, the MLX90614 body temperature sensor, the ESP8266

    wifi module, and the GSM Shield SIM900A.

    In this project there are three testing, namely:

    5.2.1 Functional testing

    The results of the heart rate test rate of MAX30100 compared with

    manual experiment with pulse in hand, infrared temperature sensor series

    MLX90614 compared with thermometer experiment up to 10 respondents.

    The ESP8266 data transmission experiments connect on wifi and send data

    to the thingspeak server' and hosting server . Send an SMS experiment to a

    different provider using Modul GSM SIM900A series. Trial server system.

    1. Results of body temperature measurement MLX90614Table 5.1: Measurement Results of MLX90614

    Responden 1

    Sensor Termometer

    0,5 cm= 36 C35,90 C1 cm= 33 C

    1,5 cm= 32 C

    Responden 20,5 cm= 36 C

    35,60 C1 cm= 33 C

    1,5 cm= 32 C

    Responden 30,5 cm= 35 C

    35C1 cm= 33 C

    1,5 cm= 32 C

    Responden 40,5 cm= 36 C

    36,10C1 cm= 33 C

  • 26

    1,5 cm= 32 C

    Responden 50,5 cm= 35 C

    35,20 C1 cm= 34 C

    1,5 cm= 33 C

    Responden 60,5 cm= 36 C

    35,40 C1 cm= 35 C

    1,5 cm= 34 C

    Responden 70,5 cm= 36 C

    36,20 C1 cm= 33 C

    1,5 cm= 31 C

    Responden 80,5 cm= 35 C

    35,30 C1 cm= 34 C

    1,5 cm= 33 C

    Responden 90,5 cm= 35 C

    35,20 C1 cm= 33 C

    1,5 cm= 32 C

    Responden 100,5 cm= 36 C

    35,80 C1 cm= 33 C

    1,5 cm= 32 C

    Conclusion: There is a difference of 0.81% to the experimental results of the sensor

    and thermometer at an optimal distance of 0.5 cm.

    2. Results of heart rate measurement MAX30100

    Table 5.2: Measurement Results of MAX30100Responden Manual Sensor

    Responden 1 72 BPM 78 BPM

    Responden 2 81 BPM 83 BPM

    Responden 3 103 BPM 111 BPM

    Responden 4 70 BPM 75 BPM

    Responden 5 71 BPM 75 BPM

    Responden 6 82 BPM 88 BPM

    Responden 7 110 BPM 116 BPM

  • 27

    Responden 8 96 BPM 96 BPM

    Responden 9 75 BPM 75 BPM

    Responden 10 69 BPM 75 BPM

    Conclusion: There is a difference of 0.50% against the results of manual

    experiments and sensors.

    3. Result of ESP8266 send data to thingspeak server and hosting

    server using wireless connection.Table 5.3: Result of Send Data to Thingspeak Server

    No Wifi Send to thingspeak

    (second)

    1 MNC Play 20

    2 MNC Play 21

    3 MNC Play 21

    4 MNC Play 20

    5 MNC Play 21

    Table 5.4: Result of Send Data to Hosting ServerNo Wifi Send to thingspeak

    (second)

    1 MNC Play 20

    2 MNC Play 20

    3 MNC Play 20

    4 MNC Play 21

    5 MNC Play 20

    Source code for connection to wireless:

    1.void ESPSet() {2. mySerial.print("AT+CWMODE=1\r\n"); /*Mode 1 jadi

    station(menggunakan wifi sekitar)*/3. delay(300);4. mySerial.print("AT+CWJAP=\""); /*Prints the SSID and pass of

    Access Point ESP8266 is connected to*/5. mySerial.print("Locked");6. mySerial.print("\",\"");7. mySerial.print("yammie456");

  • 28

    8. mySerial.print("\"\r\nc");9. mySerial.print("AT+CIFSR\r"); /*mengecek IP LOCAL ADDRESS*/10. delay(3000);11. }

    Source code delivery to the thingspeak server:

    1. String kirimTS ="AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",80\r\n";

    2.void kirimThingSpeak() {3. url = "GET /update?api_key=DPD85BSXIQW1N2FZ";4. url = url + "&field1=" + suhu;5. url = url + "&field2=" + jantungRata;6. url = url + " HTTP/1.1\r\nHost:

    api.thingspeak.com\r\nConnection: close\r\n\r\n";7. pengirimanData(url, kirimTS);8. }9.void pengirimanData(String url, String kirim) {10. Serial.println("1. Ukur Panjang dan Connect ke TCP");11. panjang = url.length();12. mySerial.print(kirim);13. delay(5000);14. Serial.println("2. Kirim panjang ke ESP");15. mySerial.print("AT+CIPSEND=");16. mySerial.print(panjang);17. mySerial.print("\r\n");18. delay(200);19. Serial.println("3. Eksekusi URL");20. mySerial.print(url);21. Serial.println(url);22. delay(200);23. }

    Source code for connection to wifi.

    1.void ESPSet() {2. mySerial.print("AT+CWMODE=1\r\n"); /*Mode 1 jadi

    station(menggunakan wifi sekitar)*/3. delay(300);4. mySerial.print("AT+CWJAP=\""); /*Prints the SSID and pass of

    Access Point ESP8266 is connected to*/5. mySerial.print("Locked");6. mySerial.print("\",\"");7. mySerial.print("yammie456");8. mySerial.print("\"\r\nc");9. mySerial.print("AT+CIFSR\r"); /*mengecek IP LOCAL ADDRESS*/10. delay(3000);11. }

  • 29

    Source code delivery to server hosting:

    1. String kirimHT = "AT+CIPSTART=\"TCP\",\"medical-iot.xyz\",80\r\n";

    2.void kirimHosting() {3. url = "GET /ambildata.php?data=";4. url = url + suhu + "-" + jantungRata + "-" + pasien;5. url = url + " HTTP/1.1\r\nHost: medical-

    iot.xyz\r\nConnection: close\r\n\r\n";6. pengirimanData(url, kirimHT);7. }8.void pengirimanData(String url, String kirim) {9. Serial.println("1. Ukur Panjang dan Connect ke TCP");10. panjang = url.length();11. mySerial.print(kirim);12. delay(5000);13. Serial.println("2. Kirim panjang ke ESP");14. mySerial.print("AT+CIPSEND=");15. mySerial.print(panjang);16. mySerial.print("\r\n");17. delay(200);18. Serial.println("3. Eksekusi URL");19. mySerial.print(url);20. Serial.println(url);21. delay(200);22. }

    4. The test results of sending SMS to different destination provider

    with GSM Shield SIM900A series to different destination numbers.

    Table 5.5: Result of Send SMS to Different NumberNo Send SMS

    (seconds)

    Provider

    (Recieve)

    1 2 Simpati

    2 4 Mentari

    3 4 Indosat IM3

    Conclusion: The best provider used to be sent is Simpati.

    Source code checks the patient's situation:

    1.if (suhu >= batasSuhu || suhu =batasAtasJantung || jantung

  • 30

    5. pengiriman = 1;6. }7. } else {8. pengiriman = 0;9. Serial.println("Status: Normal");10. }

    Source code sends SMS to destination number if patient condition is not normal:

    11. void SendMessage()12. {13. Serial.println ("Sending Message...");14. Serial3.println("AT+CMGF=1"); //Sets the GSM Module

    in Text Mode15. delay(1000);16. //Serial.println ("Set SMS Number");17. Serial3.println("AT+CMGS=\"" + nomor + "\"\r");

    //Mobile phone number to send message18. delay(1000);19. //Serial.println ("Set SMS Content");20. String dataSuhu;21. dataSuhu = String(suhu);22. String SMS = "Pasien 1: Tercy, Status: Berbahaya, Suhu:

    " + dataSuhu + " Celcius, " + " Jantung: " + jantung + " BPM";23. Serial.println(var[3]);24. Serial3.println(SMS);25. delay(100);26. Serial3.println((char)26);// ASCII code of CTRL+Z27. delay(1000);28. //Serial.println ("Message has been sent ->SMS Selesai

    dikirim");}

    5. Result of system trial on the hosting server:Table 5.6: Result of Server System.

    No System Response

    1 Login Doctor Success

    2 Show Patient’s Data Success

    3 Show State Patient’s Data Success

    4 Alarm on when patient’s

    condition abnormal

    Success

  • 31

    5 Login Admin Success

    6 Input Patient’s Data Success

    7 Input Doctor’s Data Success

    8 Input Doctor’s in Charge Data Success

    9 Input Patient’s Handler Success

    10 Show Patient’s Data Success

    11 Show Doctor’s Data Success

    12 Show Doctor’s in Charge

    Data

    Success

    13 Show Patient’s Handler Data Success

    14 Open system without login Failed

    Conclusion: This system already good to use.

    5.2.2. Performance TestingThe testing of the time of delivery of 10 data, 100 data, 1000 data

    at once, then do the testing time of acceptance and acceptance of data and

    how the amount of incoming data on the hosting server and thingspeak

    server. The results of the experiment are:

  • 32

    Illustration 5.5: Send 10 Data to Hosting Server

    Illustration 5.6: Result of send 10 data to hosting server

  • 33

    Illustration 5.7: Send 100 Data to Hosting Server

    Illustration 5.8: Result of send 100 data to hosting server

  • 34

    Illustration 5.9: Send 1000 Data to Hosting Server

    Illustration 5.10: Result of send 1000 data to hosting server(1)

  • 35

    Illustration 5.11: Result of send 1000 data to hosting server(2)

    Illustration 5.12: Send 10 Data to Thingspeak Server

  • 36

    Illustration 5.13: Result of send 10 Data to Thingspeak Server

    Illustration 5.14: Send 100 Data to Thingspeak Server

  • 37

    Illustration 5.15: Result of send 100 Data to Thingspeak Server

    Illustration 5.16: Send 1000 Data to Thingspeak Server

  • 38

    Table 5.7: Send Directly Data Simultaneously to Thingspeak Server.No Send Data Data Send

    (second)

    Data Received

    (second)

    Result (Data

    Received)

    1 10 data 48.049 72 3 data

    2 100 data 103.204 92 7 data

    3 1000 data 1065.4 898 70 data

    Conclusion: The thingspeak server only can accept 1 data per 15 seconds.

    Table 5.8: Send Directly Data Simultaneously to Hosting Server.No Send Data Data Send

    (second)

    Data Received

    (second)

    Result (Data

    Received)

    1 10 data 2.558 2 2 data

    2 100 data 22.549 20 11 data

    3 1000 data 229.223 289 115 data

    Conclusion: The hosting server only can accept 1 data within a period of

    Illustration 5.17: Result of send 1000 Data to Thingspeak Server

  • 39

    1.2 to 2 seconds.

    5.2.3. Perceptional testingHas done the division of questionnaire and answer 10 respondents

    to testing the body temperature sensor series MLX90614 and heartbeat

    sensor series MAX30100 that has been done. The result is the following:Table 5.9: Respondents answer about questionnaire

    NO DESKRIPSI TANGGAPANYA TIDAK

    1 Jari tangan yang ditempelkan padasensor detak jantung nyaman? 100% 0%

    2 Apakah alat pendeteksi detakjantung mempunyai bentuk yangcocok pada jari?

    60% 40%

    3 Apakah alat pendeteksi detakjantung memliki kelemahan? 50% 50%

    4 Apakah alat pendeteksi detakjantung tidak menghantarkan aliranlistrik dijari?

    70% 30%

    5 Apakah alat pendeteksi detakjantung ini memancarkan sinaryang membuat mata silau?

    60% 40%

    6 Apakah alat pendeteksi suhu tubuhcocok digunakan untuk masadepan?

    80% 20%

    7 Apakah alat pendeteksi suhu tubuhini tergolong praktis tanpa sentuhanlangsung?

    60% 40%

    8 Apakah alat pendeteksi suhu tubuhini memiliki kelemahan? 40% 60%

    9 Apakah ukuran alat pendeteksi suhutubuh kecil? 80% 20%

    10 Apakah alat pendeteksi suhu tubuhmemancarkan inframerah yangtidak terlihat oleh mata?

    80% 20%

    Conclusion: Based on the respondent answer sensors MAX30100 suitable for use as

    a heart rate sensor and sensor MLX90614 is also suitable for use as a body

  • 40

    temperature sensor.

    Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 34Slide 35Slide 36Slide 37Slide 38Slide 39Slide 40Slide 41Slide 42Slide 43Slide 44Slide 45Slide 46Slide 47Slide 48Slide 49Slide 50Slide 51Slide 52Slide 53