Tuesday, March 19, 2024

Corona COVID-19 Detection Device

Ashwini Kumar Sinha

ashwiniThis is a concept DIY of COVID-19 Corona Detection Device that helps to detect the symptoms of COVID-19, so as to help individuals quarantine themselves and practice social distancing. The DIY works by detecting the basic symptoms of the virus, which are: increased body temperature and shortness of breath. Although it is not necessary that shortness of breath will cause low levels of oxygen in your blood in general cases, coronavirus causes infection in your lungs which leads to low oxygen level or hypoxia. 

So, today in our device we will try to look for these symptoms of the virus to detect potential suspects, so that they can get a further check-up for confirmation.

Fig 1.Prototype

In this project, we will be checking for two symptoms: raised body temperature, and blood oxygen percentage.

How does Our COVID-19 Suspect Detection Device work?

  • First, it checks the temperature of the body using a sensor.
  • Next, if it detects that temperature is higher than usual then it passes the first symptom to positive, indicating the symptom on OLED display as s1 +
  • Then, using the Max30100 sensor it monitors the heartbeat and oxygen percentage 
  • If the device calculates that the oxygen percentage in the blood is below the normal oxygen level then the device passes the second symptom as well, indicating the symptom on OLED display as s2 +

If both the symptoms are positive, the person might have contracted the virus and can be taken to a hospital for confirmation and treatment.

For this, we need two types of sensors. The first one is for temperature measurement. Here I am using a Mpu6050 sensor. You might laugh at me or call me crazy because it’s a sensor for acceleration measurement not fit for temperature measurement but through personal testing, I’ve found that it gives a roughly accurate result, although I do recommend you use any good dedicated temperature sensor, such as Lm 35.

- Advertisement -

For blood oxygen percentage calculation I am using the Max30100 sensor.

So we start our project by collecting the following components. 

Bill of Materials

- Advertisement -

Note: You will also need a 5V-9V  small battery 

Prerequisites 

Assuming you have already installed the Arduino IDE in your pc, you can open the Arduino IDE and then go to sketch->Library manager–>search MPU6050, u8g2, Max30100 one by one and install them.

Now after completing the installation, we can get started with the coding.

Software

First, we have to initialize the library (MPU6050, u8g2, Max30100) in code, after which we will create the setup function where we set the communication of sensors over I2c. Now we create a loop function where we update the sensor data. Now, we will update the sensor data on the OLED display. Next, we will create the “if()” condition that checks the first symptom of the virus (Fever and high body temperature) and if the function returns TRUE then it will set the first symptom, S1, to + and display that on the OLED display as S1+. Once S1 is checked and found to be positive, it checks the oxygen percentage in the blood. If the oxygen percentage is detected to be below the normal percentage, it passes the second symptom, S2, as + and displays it on OLED display. (Refer Fig 2,3,4).

Fig 2.
Fig 3
Fig 4

Connection

Now connect all the components and set all those things in a small enclosure with a battery, as you can see in the pictures below.

Fig 5.Circuit Diagram Created In Fritzing
Fig 6.Showing raw value after uploading code
Fig 7.Enclosure box

What Next?

We can also add a Sim800l Module to COVID-19 Corona Detection Device that gives alerts about the potential patient to the Government and to health care facilities. We are going to add this in the next part of the project very soon.

Testing 

Now, to test the circuit and device, power the device and bring any hot object near the mpu6050 sensor. The device detects the high temperature and displays the first symptom as S+. Next, bring the max sensor to your arm and then, by putting pressure on that arm and stopping a little bit of blood circulation in that part, the blood oxygen % goes down and the device detects low oxygen percentage and sets the S2 as +. This device is a concept project and works well for fever detection and can be improved further.

Fig 8.
Fig 9. Prototype

Download Source Code: click here


 

104 COMMENTS

  1. HELP !!!
    DIY_53:20: error: ‘class MPU6050’ has no member named ‘begin’

    DIY_53:20: error: ‘MPU6050_SCALE_2000DPS’ was not declared in this scope

    DIY_53:20: error: ‘MPU6050_RANGE_2G’ was not declared in this scope

    DIY_53:30: error: ‘class MPU6050’ has no member named ‘begin’

    DIY_53:30: error: ‘MPU6050_SCALE_2000DPS’ was not declared in this scope

    DIY_53:30: error: ‘MPU6050_RANGE_2G’ was not declared in this scope

    C:\Users\avc_a\OneDrive\Masaüstü\DIY_53\DIY_53.ino: In function ‘void loop()’:

    DIY_53:51: error: ‘class MPU6050’ has no member named ‘readTemperature’

    DIY_53:74: error: ‘class MPU6050’ has no member named ‘readTemperature’

    • It’s Not the problem of code. Probably you have bought the cheap duplicate MAX30100 sensor. Do one thing Check this sensor with the example code that you get in MAX30100 library.if it didn’t work then you need to some change in your duplicate sensor. The sensor can be fixed by correcting the voltage source through the voltage regulator. First, check your sensor with example code then inform me is it correct or duplicate defected one. Then I will tell you how to fix the duplicate sensor .

  2. yardımmm!!!
    Arduino:1.8.12 (Windows Store 1.8.33.0) (Windows 10), Kart:”Arduino Micro”

    kod:6:10: fatal error: MAX30100_PulseOximeter.h: No such file or directory

    #include “MAX30100_PulseOximeter.h”

    ^~~~~~~~~~~~~~~~~~~~~~~~~~

    compilation terminated.

    exit status 1
    MAX30100_PulseOximeter.h: No such file or directory

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

    • Yes, you can use it. Actually some kind of code with a few changes will work on UNO, Micro, Nano, Pro.
      We have used the Pro-micro because we are making a wearable device that needs to compact, and so small in size that we can wear on hand.

  3. Hello brother Ashwini Sinha

    Congratulations and respect for your work and thank you for sharing. I have all the necessary modules, i wanted to use an Attiny85 module in order to have a compact finish, what should be changed in the Arduino code ?

    Sorry for my amateurism and thank you for your understanding, health, peace and happiness for you.

  4. Hi, i dropped the idea of ​​using the Attiny85 module and i carried out the project with a mega to test, the body temperature works well but unfortunately the Max30100 module constantly displays 162.xx Bps.

    When i perform a test only with the 30100 module and the mega the result is correct (70 Bps).

    What am i doing wrong to get the wrong result ?

    Thank you.

    • This article consists of all the detailed steps of making, working, and testing of DIY. you can use this as per your choice and modify it as per your choice. You can create the abstract and intro from the overview of project

  5. Arduino: 1.8.9 (Windows 10), Board: “Arduino/Genuino Uno”

    C:\Users\User\Downloads\Code-2\DIY_53\DIY_53.ino: In function ‘void setup()’:

    DIY_53:20:14: error: ‘class MPU6050’ has no member named ‘begin’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^

    DIY_53:20:20: error: ‘MPU6050_SCALE_2000DPS’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^

    DIY_53:20:43: error: ‘MPU6050_RANGE_2G’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^

    DIY_53:30:14: error: ‘class MPU6050’ has no member named ‘begin’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^

    DIY_53:30:20: error: ‘MPU6050_SCALE_2000DPS’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^

    DIY_53:30:43: error: ‘MPU6050_RANGE_2G’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^

    C:\Users\User\Downloads\Code-2\DIY_53\DIY_53.ino: In function ‘void loop()’:

    DIY_53:51:20: error: ‘class MPU6050’ has no member named ‘readTemperature’

    float temp = mpu.readTemperature();

    ^

    DIY_53:74:20: error: ‘class MPU6050’ has no member named ‘readTemperature’

    u8g2.print(mpu.readTemperature());

    ^

    exit status 1
    ‘class MPU6050’ has no member named ‘begin’

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

  6. Hello brother Ashwini Sinha

    Thank you again for your reactivity, i managed to realize your great project but with the Mpu module that i have the result is not conclusive and precise.

    I would like to try with the LM35 sensor do you have a code for the LM35 ?

    Thank you again for supporting the peoples of the world, we are all the same alone our cultures and traditions are different but we all feel the same pain when things go wrong.

    Thank you for what you do for the peoples of the world, i pray that the Almighty will protect you and your loved ones and all of humanity wanting to live in peace and respect.

    Thank you.

  7. Arduino: 1.8.13 (Windows 10), Board: “Arduino Uno”

    sketch_nov21a:6:10: fatal error: MAX30100_PulseOximeter.h: No such file or directory
    #include “MAX30100_PulseOximeter.h”
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    exit status 1
    MAX30100_PulseOximeter.h: No such file or directory

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

    The error is occurring even after installing MAX30100.
    Please help sir!

  8. C:\Users\User\Downloads\Code-2\DIY_53\DIY_53.ino: In function ‘void setup()’:

    DIY_53:20:14: error: ‘class MPU6050’ has no member named ‘begin’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^

    DIY_53:20:20: error: ‘MPU6050_SCALE_2000DPS’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^

    DIY_53:20:43: error: ‘MPU6050_RANGE_2G’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^

    DIY_53:30:14: error: ‘class MPU6050’ has no member named ‘begin’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^

    DIY_53:30:20: error: ‘MPU6050_SCALE_2000DPS’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^

    DIY_53:30:43: error: ‘MPU6050_RANGE_2G’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^

    C:\Users\User\Downloads\Code-2\DIY_53\DIY_53.ino: In function ‘void loop()’:

    DIY_53:51:20: error: ‘class MPU6050’ has no member named ‘readTemperature’

    float temp = mpu.readTemperature();

    ^

    DIY_53:74:20: error: ‘class MPU6050’ has no member named ‘readTemperature’

    u8g2.print(mpu.readTemperature());

    ^

    exit status 1
    ‘class MPU6050’ has no member named ‘begin’

    I’m doing a project. On Arduino. I am using MPU6050. But I keep getting this error. I guess I uploaded the library incorrectly. Can anyone show me in detail?

  9. I can’t compile the program, it is showing an error

    Sketch uses 18648 bytes (60%) of program storage space. Maximum is 30720 bytes. Global variables use 2069 bytes (101%) of dynamic memory, leaving -21 bytes for local variables. Maximum is 2048 bytes.
    data section exceeds available space in board
    Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.
    Error compiling for board Arduino Nano.

    What to do??

  10. Haiii..!Am getting error. Could you please help me,.
    Arduino: 1.8.13 (Windows 10), Board: “Arduino Leonardo”

    C:\Users\91709\AppData\Local\Temp\Temp2_Code-2 (1).zip\DIY_53\DIY_53.ino: In function ‘void setup()’:

    DIY_53:20:14: error: ‘class MPU6050’ has no member named ‘begin’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~

    DIY_53:20:20: error: ‘MPU6050_SCALE_2000DPS’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~~~~~~

    C:\Users\91709\AppData\Local\Temp\Temp2_Code-2 (1).zip\DIY_53\DIY_53.ino:20:20: note: suggested alternative: ‘MPU6050_RA_FF_DUR’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~~~~~~

    MPU6050_RA_FF_DUR

    DIY_53:20:43: error: ‘MPU6050_RANGE_2G’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~

    C:\Users\91709\AppData\Local\Temp\Temp2_Code-2 (1).zip\DIY_53\DIY_53.ino:20:43: note: suggested alternative: ‘MPU6050_RA_FF_DUR’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~

    MPU6050_RA_FF_DUR

    DIY_53:30:14: error: ‘class MPU6050’ has no member named ‘begin’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~

    DIY_53:30:20: error: ‘MPU6050_SCALE_2000DPS’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~~~~~~

    C:\Users\91709\AppData\Local\Temp\Temp2_Code-2 (1).zip\DIY_53\DIY_53.ino:30:20: note: suggested alternative: ‘MPU6050_RA_FF_DUR’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~~~~~~

    MPU6050_RA_FF_DUR

    DIY_53:30:43: error: ‘MPU6050_RANGE_2G’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~

    C:\Users\91709\AppData\Local\Temp\Temp2_Code-2 (1).zip\DIY_53\DIY_53.ino:30:43: note: suggested alternative: ‘MPU6050_RA_FF_DUR’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~

    MPU6050_RA_FF_DUR

    C:\Users\91709\AppData\Local\Temp\Temp2_Code-2 (1).zip\DIY_53\DIY_53.ino: In function ‘void loop()’:

    DIY_53:51:20: error: ‘class MPU6050’ has no member named ‘readTemperature’; did you mean ‘getTemperature’?

    float temp = mpu.readTemperature();

    ^~~~~~~~~~~~~~~

    getTemperature

    DIY_53:74:20: error: ‘class MPU6050’ has no member named ‘readTemperature’; did you mean ‘getTemperature’?

    u8g2.print(mpu.readTemperature());

    ^~~~~~~~~~~~~~~

    getTemperature

    exit status 1

    ‘class MPU6050’ has no member named ‘begin’

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

  11. hlw sir i need help regarding this project
    it is diffucult to display the temperature and oxygen in oled screen
    firstly i have power on the display using adfruit library and while uploding the program in ardiuno the diplay is going to off
    so plz help me

  12. Arduino: 1.8.15 (Windows 10), Board: “Arduino Uno”

    In file included from C:\Users\premi\OneDrive\Documents\Arduino\libraries\MAX30100lib\src/MAX30100_PulseOximeter.h:30:0,

    from C:\Users\premi\AppData\Local\Temp\Temp1_Code-2.zip\DIY_53\DIY_53.ino:7:

    C:\Users\premi\OneDrive\Documents\Arduino\libraries\MAX30100lib\src/MAX30100.h:43:7: error: redefinition of ‘class MAX30100’

    class MAX30100 {

    ^~~~~~~~

    In file included from C:\Users\premi\AppData\Local\Temp\Temp1_Code-2.zip\DIY_53\DIY_53.ino:3:0:

    C:\Users\premi\OneDrive\Documents\Arduino\libraries\MAX30100\src/MAX30100.h:60:7: note: previous definition of ‘class MAX30100’

    class MAX30100 {

    ^~~~~~~~

    C:\Users\premi\AppData\Local\Temp\Temp1_Code-2.zip\DIY_53\DIY_53.ino: In function ‘void setup()’:

    DIY_53:21:14: error: ‘class MPU6050’ has no member named ‘begin’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~

    DIY_53:21:20: error: ‘MPU6050_SCALE_2000DPS’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~~~~~~

    C:\Users\premi\AppData\Local\Temp\Temp1_Code-2.zip\DIY_53\DIY_53.ino:21:20: note: suggested alternative: ‘MPU6050_RA_FF_DUR’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~~~~~~

    MPU6050_RA_FF_DUR

    DIY_53:21:43: error: ‘MPU6050_RANGE_2G’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~

    C:\Users\premi\AppData\Local\Temp\Temp1_Code-2.zip\DIY_53\DIY_53.ino:21:43: note: suggested alternative: ‘MPU6050_RA_FF_DUR’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~

    MPU6050_RA_FF_DUR

    DIY_53:31:14: error: ‘class MPU6050’ has no member named ‘begin’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~

    DIY_53:31:20: error: ‘MPU6050_SCALE_2000DPS’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~~~~~~

    C:\Users\premi\AppData\Local\Temp\Temp1_Code-2.zip\DIY_53\DIY_53.ino:31:20: note: suggested alternative: ‘MPU6050_RA_FF_DUR’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~~~~~~

    MPU6050_RA_FF_DUR

    DIY_53:31:43: error: ‘MPU6050_RANGE_2G’ was not declared in this scope

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~

    C:\Users\premi\AppData\Local\Temp\Temp1_Code-2.zip\DIY_53\DIY_53.ino:31:43: note: suggested alternative: ‘MPU6050_RA_FF_DUR’

    while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))

    ^~~~~~~~~~~~~~~~

    MPU6050_RA_FF_DUR

    C:\Users\premi\AppData\Local\Temp\Temp1_Code-2.zip\DIY_53\DIY_53.ino: In function ‘void loop()’:

    DIY_53:52:20: error: ‘class MPU6050’ has no member named ‘readTemperature’; did you mean ‘getTemperature’?

    float temp = mpu.readTemperature();

    ^~~~~~~~~~~~~~~

    getTemperature

    DIY_53:75:20: error: ‘class MPU6050’ has no member named ‘readTemperature’; did you mean ‘getTemperature’?

    u8g2.print(mpu.readTemperature());

    ^~~~~~~~~~~~~~~

    getTemperature

    Multiple libraries were found for “MAX30100.h”

    Used: C:\Users\premi\OneDrive\Documents\Arduino\libraries\MAX30100

    Not used: C:\Users\premi\OneDrive\Documents\Arduino\libraries\MAX30100lib

    exit status 1

    ‘class MPU6050’ has no member named ‘begin’

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

    what should i do???

SHARE YOUR THOUGHTS & COMMENTS

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators