Aim of project:

identification of sick visitor of the room

How it works:

If visitor enters the room and turns on the light, the temperature sensor will start working. 

In case the visitor’s body temperature is higher than 37, (he could be sick and infect others) the Red LED will turn on and warn about presence of sickness visitor in the room.

 Schematic

BOM (bill of materials)

Arduino code

#include <SimpleDHT.h>

int ledPinRed = 9;
int pinDHT11 = 5;
SimpleDHT11 dht11(pinDHT11);
int lightPin = A0;
int lightValue;
void setup() {
Serial.begin(9600);
pinMode(ledPinRed, OUTPUT);
}
void loop() {
lightValue = analogRead(lightPin);
Serial.print(“Light: “);
Serial.println(lightValue);
if (lightValue > 70){

Serial.println(“======================================”);
Serial.println(“Sensor:”);

byte temperature = 0;
byte humidity = 0;

int err = SimpleDHTErrSuccess;
if ((err = dht11.read(pinDHT11, &temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
Serial.print(“Read DHT11 failed, err=”); Serial.print(SimpleDHTErrCode(err));
Serial.print(“,”); Serial.println(SimpleDHTErrDuration(err)); delay(1000);
return;
}

Serial.print(“Temperature: “);
Serial.print((int)temperature); Serial.println(” *C, “);

if ((int)temperature >=35) {
digitalWrite(ledPinRed,HIGH);

}else {
digitalWrite(ledPinRed,LOW);
}
delay(1500);
}

if (lightValue < 70){
Serial.println(“======================================”);
Serial.println(“Sensor:”);

byte temperature = 0;
byte humidity = 0;

int err = SimpleDHTErrSuccess;
if ((err = dht11.read(pinDHT11, &temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
Serial.print(“Read DHT11 failed, err=”); Serial.print(SimpleDHTErrCode(err));
Serial.print(“,”); Serial.println(SimpleDHTErrDuration(err)); delay(1000);
return;
}

Serial.print(“Temperature: “);
Serial.print((int)temperature); Serial.println(” *C, “);

if ((int)temperature >=24) {
digitalWrite(ledPinRed,LOW);

}else {
digitalWrite(ledPinRed,LOW);

}

delay(1500);
}
}

 

Covid Sensor is a project of IAAC, Institute for Advanced Architecture of Catalonia developed at Master in Advanced Architecture in 2021 /2022 by Student: Angelina Ovsyannikova and faculty: Bernat Morato, faculty assistant: Daniil Koshelyuk.