Project tutorial
Face-Masks Disinfection Device — needlab

Face-Masks Disinfection Device — needlab © CC BY-NC-SA

UV-C / heat, Arduino-controlled, face-mask disinfecting device for Coronavirus (SARS-CoV-2). #COVID19DetectProtect

  • 23,158 views
  • 42 comments
  • 70 respects

Components and supplies

About this project

Face-Masks Disinfection Device

UV-C / heat,  Arduino controlled, face-mask disinfecting device for Coronavirus (SARS-CoV-2)

This is an open source project shared under Creative Commons “Attribution-NonCommercial-ShareAlike” CC BY-NC-SA

Disclaimer: This document falls under the "Good Samaritan Law".

Original publication: http://www.needlab.org/face-masks-disinfection-device

Introduction

FFP1 and FFP2 masks are indispensable protective elements during epidemics. They are intended for single-use, but during a crisis the re-usage is inevitable and disinfection mechanisms are required (1)⁠. During the ongoing SARS-CoV-2 pandemics, hospitals, healthcare centers, and research facilities have implemented different mechanisms of disinfection for these masks, usually involving ultraviolet germicidal irradiation (UVGI) and/or heat of some sort. Nonetheless, these methods are not available to many vulnerable parts of the population, where nonetheless, due to shortage, the re-usage of these masks has become the only option. The need for a viable method of disinfection of face masks is further increased by evidence of SARS-CoV-2 being extremely stable on the surface of surgical masks even after 7 days (2)⁠.

This project intends to create a low budget and portable device that can effectively use UVGI and dry heat to disinfect face masks from SARS-CoV virions and that can be easily reproduced by people who need it.

Face mask disinfection device - by Needlab

DIY instruction on making disinfection device

Device set up diagram

●      Temperature must be maintained in the range 65+/-5°C

●      The lamp must provide UV-C wavelength.

●      The disinfection cycle duration is minimum of 30 minutes. (recommendation: Not more than 30 min in order to have a safer range to avoid potential face-mask degradation and loss of functionality.)

Device Dimensions

First Heat testing

Making of the heating system

  • A frying pan of 22 centimeters diameter (induction compatible) with the handle removed.
  • Cover the frying pan with aluminum foil for UV-C light reflection.
  • Make a hole of 20 centimeters at the center of the box/ bottom surface of the device.
  • In order to maintain the position of the frying pan use four metal holders as shown in the image.

Important: The frying pan should not touch the wood of the box, as it reduces the heat efficiency. Hence one has to select the right diameter of the hole and shape the metal brackets according to this diagram:

Making of the top cover

UV-C System

For the UV-C source in this device, an 11 W lamp bulb from a “Sterilizer for Aquarium” kit was used. The UV-C bulb was extracted and mounted to the top cover at the two ends of the bulb as shown in the image. The bulb is mounted by creating 4 holes in the top cover and using a zip tie/cable tie and soft padding to securely fasten the bulb. The top surface is covered in aluminium to reflect the UV radiation.

Feel free to use UV-C lamp from other sources. If you do not have access to the crystal tube (used in this project) do not use glass as a replacement as glass blocks the UV radiation.

UV-C bulb Source for this device

!! WARNING:

You must be aware that UV-C radiation is very dangerous for your eyes and skin. The UV-C light must be switched ON only when the top cover of the device is closed and switched off when the device is open.

Please check also the very relevant recommendations that Horror Coder gave us into the Comments of this post (Thanks again for his precious contribution):"...I want to press about the unseen danger of UVC, you must check that the box is light really light proof. Remember that the visibile radiation of germicide tube is just a byproduct and it's only 3/4% of total emission, so don' trust your eye, there's a big risk of emission leak and you don't perceive it. You have to check that is light tight putting a light inside the box rated like 10X the tube wattage (use a hipower led torch or something similar) and check for light leaks around the box/enclosure in a completely dark environment. You have to fill all the holes, use some foam gasket and / or some borders to avoid this risk of UV-C leaks outside of the box, and check it with the method recommended above.

Covering the surfaces with Aluminum foil

Before installing the UV-C tube and the wire rack, cover sides and top surface of the box with aluminum foil, as shown in the image.The goal is to reflect the UV-C light on the side faces, thus augmenting the efficacy.

Tips: Double sided tape can be used to maintain the aluminium foil in place for the surfaces and the edges can be duct tapped.

Making of the Wire rack - Placement for the Face-masks

The face-masks will be placed on top of a wire rack. I wire rack was made using copper thinned wire at 30 mm apart from each wire. The wire rack is 120 mm above the bottom surface. The wire rack is held together by passing the wire through small holes made on the front and back surfaces of the box.

Setting up Arduino & sensors

Arduino Overview

Bill of materials

  • Arduino UNO Rev3

https://www.seeedstudio.com/Arduino-Uno-Rev3-p-2995.html

  • Grove base shield V2, 0

https://www.seeedstudio.com/Base-Shield-V2.html

  • Grove Infrared Temperature sensor

https://www.seeedstudio.com/Grove-Infrared-Temperature-Sensor-p-1058.html

  • Grove Light Sensor(P)

https://www.seeedstudio.com/Grove-Light-Sensor-p-1253.html

  • Push Button

https://www.seeedstudio.com/12mm-Domed-Push-Button-Pack-p-1304.html

  • Piezo speaker

https://www.gotronic.fr/art-capsule-piezoelectrique-dp035f-3856.htm

  • Quad Alphanumeric Display - White 0.54" Digits w/ I2C Backpack

https://www.adafruit.com/product/2157

  • Wall Adapter Power Supply 12VDC

https://www.seeedstudio.com/Wall-Adapter-Power-Supply-12VDC-1-2A-Includes-5-adapter-plugs.html

Temperature and light sensor:

See also: Benchmarking of temperature sensors for Arduino

Arduino control

INIT: In this state, the LED display indicates the temperature, but you have to wait for it to reach the threshold (70°C) to start the counting of the cycle in state COUNT

COUNT: Minutes elapsed from 30 to 0 are displayed on the LED display, next to the temperature. In the case of temperature is too low, or if the UV light is off, the state will change to ERR.

END: This is the normal state at the end of elapsed time.The speaker will advertise. Push the button to go to INIT again.

ERR: This is the error state, it will be activated if temperature goes too low or if the UV light are off. The speaker will advertise. Push the button to go to INIT again.

Alarms

There are few alarm conditions -If alarm is ON, there is a specific tone sequence on the speaker and messages are displayed on the LED display.

Alarm conditions:1) If the system is in ERR state (UV light is off/lost or temperature too low)2) If the temperature is too high (more than 75°C)

Source code for Arduino

https://pastebin.com/zgK7zfMh

External libraries to include

Adafruit_LEDBackpack.h: https://learn.adafruit.com/adafruit-led-backpack/0-54-alphanumeric-9b21a470-83ad-459c-af02-209d8d82c462

Metro.h: https://github.com/thomasfredericks/Metro-Arduino-Wiring

User Manual

1.     Place the box on top of your induction (or resistive) hob.

2.     Switch the power ON for the Arduino.

3.     Close the box and start to heat at 70~80% of the power of your induction hob.

4.     Wait till you reach the 60°C temperature. Now reduce the change power of induction hob to 30%.

5.     Now you can open the device, place your masks inside and close the device.

7.     Push the button to start => the remaining time should be displayed (30 minutes).

8.     From now you just have to wait for the time has decreased to 00 minutes, there will be a signal on the speaker.

9.     To restart at the initial state for a new cycle, just push the button.

Remark: When the timer is counting elapsing time (COUNT state), the small dot between Timer and Temperature displays will blink at 1 second rhythm.

Temperature cycles

Heat inactivation of viruses

The capacity to get rid of microorganisms through moist heat usually under 100°C is known since the time of Pasteur. In this device, we implemented dry heat instead, which is reported to effectively eliminate SARS-CoV infectivity. Assays show considerable inactivation of the virus at 56°C during 30-90 min, almost complete inactivation at 65°C for 20-60 min, and complete inactivation at 75°C during 30-45 min (7, 8)⁠. Furthermore, a recent study showed that SARS-CoV-2 lost all detectable infectivity after being incubated at 56°C for 30 min, or 70°C for 5 min (2)⁠.

According to this evidence and additional considerations regarding the effects of these disinfection methods on the functionality of the face masks —which will be explained in the next sections—, we decided to set the heat exposure of the protocol to be used with the device at 65 °C for 30 min.

Germicidal protocols on face masks

So far, we have presented evidence regarding viral disinfection on samples dissimilar to the face masks to which we intend to apply the disinfection. Hence, here we present some reports of viral disinfection on the same type of masks we intend to use.

Disinfection of face masks has been shown to be effective against influenza virus using UVGI at ~1 J/cm2 (10)⁠, UVGI at ~18 J/cm2, or moist heat at 65±5 °C during 3 h (11)⁠. There are no studies of disinfection of masks with coronaviruses, but since influenza viruses are also ssRNA viruses, similar effects could be expected.

Learn more about :

UVGI. Germicidal effect of UVC lightDetrimental effects of physical disinfection on face masks

It is very important to establish a good procedure for the process of disinfecting used masks. The main questions are about Personalisation, counting the number of disinfection cycles, method of packaging disinfected face-masks. We recommend to take inspiration from this paper "N95 Filtering Facepiece Respirator Ultraviolet Germicidal Irradiation (UVGI) Process for Decontamination and Reuse" published by Nebraska Medicine.

Conclusions

Considering the gathered evidence and technical details of the device, we decided to set the disinfection protocol at 30 min of UVC irradiation and dry heat at 65±5 °C. This time has to be counted considering the time it takes for the device to reach the required temperature and light intensity. Either UVC or heat alone with these specifications should be enough to remove almost all SARS-CoV-2 infectivity, and the simultaneous action of both should increase the effectivity of the method to an even safer level.

Safety considerations

•      UVC radiation is harmful to the skin and eyes. The UVC light bulb should be turned on only when the box is closed.

•      Be careful with metallic parts of the box that could be hot after the heating and could burn the skin.

Disclaimer

Based on the available scientific evidence, the disinfection protocol will likely eliminate almost all SARS-CoV infectivity, and will definitely make the masks much safer to reuse than without any kind of disinfection. However, Needlab and the members working on this project assume no liability for the usage of this device. It was designed with goodwill and to the best of our knowledge and capabilities, but the following must be stated:

No proper laboratory testing has been yet done in terms of SARS-CoV-2 inactivation with this device, nor actual effects on face masks’ filtration capacities can be confidently assessed beforehand. The usage of the device and this guide is a free decision.

Next Steps

We are now working on a V2 with lot of improvements:

Infrared radiant and Ultraviolet (UV-C) to kill the virus

On the other hand, we are looking for solutions to validate the process with the support of specialized laboratories.

Udtates on June 11th:

the V2 with 12 FFP2 / N95 masks inside

We won the OPT 1st prize and we are working with the university in morocco to locally produce the device

Team

Jean Noel Lefebvre, Daniel Moreno, Dr Alejandra Duque, Dr Felipe Gutiérrez Arango, Jason Knight, Maria Isabel Velez Isaza, Sameera Chukkapalli.

#COVID19DetectProtect

Original publication: http://www.needlab.org/face-masks-disinfection-device

Bibliography

Centers for Disease Control and Prevention. Atlanta, GA: U.S. Department of Health and Human Services C for DC and P. CDC - Recommended Guidance for Extended Use and Limited Reuse of N95 Filtering Facepiece Respirators in Healthcare Settings - NIOSH Workplace Safety and Health Topic [Internet]. 2019 [cited 2020 Apr 2]. Available from: https://www.cdc.gov/niosh/topics/hcwcontrols/recommendedguidanceextuse.html

  • Chin A, Chu J, Perera M, Hui K, Yen H-L, Chan M, et al. Stability of SARS-CoV-2 in different environmental conditions. medRxiv. 2020 Mar 27;2020.03.15.20036673.
  • Tseng C-C, Li C-S. Inactivation of Viruses on Surfaces by Ultraviolet Germicidal Irradiation. J Occup Environ Hyg [Internet]. 2007 Apr 23 [cited 2020 Apr 2];4(6):400–5. Available from: http://www.tandfonline.com/doi/abs/10.1080/15459620701329012
  • Hackerfarm. HOWTO: NUKEMETER – Measuring UV-C Light Intensity. 2020; Available from: https://hackerfarm.jp/2020/03/nukemeter/
  • van Doremalen N, Bushmaker T, Morris DH, Holbrook MG, Gamble A, Williamson BN, et al. Aerosol and Surface Stability of SARS-CoV-2 as Compared with SARS-CoV-1. N Engl J Med [Internet]. 2020 Mar 17 [cited 2020 Apr 2];NEJMc2004973. Available from: http://www.ncbi.nlm.nih.gov/pubmed/32182409
  • Kariwa H, Fujii N, Takashima I. Inactivation of SARS coronavirus by means of povidone-iodine, physical conditions, and chemical reagents. Vol. 52, Jpn. J. Vet. Res. 2004.
  • Duan SM, Zhao XS, Wen RF, Huang JJ, Pi GH, Zhang SX, et al. Stability of SARS Coronavirus in Human Specimens and Environment and Its Sensitivity to Heating and UV Irradiation. Biomed Environ Sci. 2003 Sep 1;16(3):246–55.
  • Darnell MER, Subbarao K, Feinstone SM, Taylor DR. Inactivation of the coronavirus that induces severe acute respiratory syndrome, SARS-CoV. J Virol Methods. 2004 Oct 1;121(1):85–91.
  • Ansaldi F, Durando P, Sticchi L, Gasparini R. SARS-CoV, influenza A and syncitial respiratory virus resistance against common disinfectants and ultraviolet irradiation Occupational Hygiene working group (SItI) View project Big Data in Occupational Medicine View project [Internet]. Article in Journal. 2004 [cited 2020 Apr 2]. Available from: https://www.researchgate.net/publication/267219876
  • Mills D, Harnish DA, Lawrence C, Sandoval-Powers M, Heimbuch BK. Ultraviolet germicidal irradiation of influenza-contaminated N95 filtering facepiece respirators. Am J Infect Control. 2018 Jul 1;46(7):e49–55.
  • Lore MB, Heimbuch BK, Brown TL, Wander JD, Hinrichs SH. Effectiveness of Three Decontamination Treatments against Influenza Virus Applied to Filtering Facepiece Respirators. Ann Occup Hyg [Internet]. 2012 [cited 2020 Apr 2];56(1):92–101. Available from: https://academic.oup.com/annweh/article-abstract/56/1/92/166111
  • Lindsley WG, Martin SB, Thewlis RE, Sarkisian K, Nwoko JO, Mead KR, et al. Effects of Ultraviolet Germicidal Irradiation (UVGI) on N95 Respirator Filtration Performance and Structural Integrity. J Occup Environ Hyg [Internet]. 2015 Aug 3 [cited 2020 Apr 2];12(8):509–17. Available from: http://www.tandfonline.com/doi/full/10.1080/15459624.2015.1018518
  • Viscusi DJ, Bergman MS, Eimer BC, Shaffer RE. Evaluation of Five Decontamination Methods for Filtering Facepiece Respirators. Ann Occup Hyg [Internet]. 2009 [cited 2020 Apr 2];53(8):815–27. Available from: https://academic.oup.com/annweh/article-abstract/53/8/815/154763
  • Bergman MS, Viscusi DJ, Heimbuch BK, Wander JD, Sambol AR, Shaffer RE. Evaluation of Multiple (3-Cycle) Decontamination Processing for Filtering Facepiece Respirators. J Eng Fiber Fabr [Internet]. 2010 Dec 15 [cited 2020 Apr 2];5(4):155892501000500. Available from: http://journals.sagepub.com/doi/10.1177/155892501000500405
  • Kampf G, Todt D, Pfaender S, Steinmann E. Persistence of coronaviruses on inanimate surfaces and     their inactivation with biocidal agents. Vol. 104, Journal of Hospital Infection. W.B. Saunders Ltd; 2020. p. 246–51.

Code

TheBox V1C/C++
/*
 * Author: Jean Noel Lefebvre - www.ootsidebox.fr - march 31th 2020
 * 
 * */

//https://learn.adafruit.com/adafruit-led-backpack/0-54-alphanumeric-9b21a470-83ad-459c-af02-209d8d82c462
//http://wiki.seeedstudio.com/Grove-Infrared_Temperature_Sensor/
//http://wiki.seeedstudio.com/Grove-Light_Sensor/
//https://github.com/thomasfredericks/Metro-Arduino-Wiring

#include <Wire.h>
#include "Adafruit_LEDBackpack.h"
#include <math.h>
#include <Metro.h> //Include Metro library

#define LIGHT_SENSOR A2
#define SUR_TEMP_PIN A0 // Analog input pin connect to temperature sensor SUR pin
#define OBJ_TEMP_PIN A1 // Analog input pin connect to temperature sensor OBJ pin
#define BUZZER 3
#define BP 2
#define SEUIL_TEMP 59
#define HIGH_TEMP 75
#define SEUIL_LIGHT 60
#define TIMER 30

//#define TEST

float temp_calibration=0;       //this parameter was used to calibrate the temperature

//float objt_calibration=0.000; //this parameter was used to calibrate the object temperature
float temperature_range=10;    //we make a map of temperature-voltage according to sensor datasheet. 10 is the temperature step when sensor and 
                               //object distance is 9CM.
float offset_vol=0.014;        //this parameter was used to set the mid level voltage,when put the sensor in normal environment after 10 min,
                               //the sensor output 0.For example,the surrounding temperature is 29℃,but the result is 27℃ via the sensor,
                               //you should set the reerence to 0.520 or more,according to your sensor to change.
                               //the unit is V
float tempValue = 0; 
float objtValue= 0;  
float current_temp=0;
float temp=0;
float temp1=0;
float temp2=0;
unsigned int temp3=0;
const float reference_vol=0.500;
unsigned char clear_num=0;//when use lcd to display
float R=0;
float voltage=0;


long res[100]={
                 318300,302903,288329,274533,261471,249100,237381,226276,215750,205768,
                 196300,187316,178788,170691,163002,155700,148766,142183,135936,130012,
                 124400,119038,113928,109059,104420,100000,95788,91775,87950,84305,
                 80830,77517,74357,71342,68466,65720,63098,60595,58202,55916,
                 53730,51645,49652,47746,45924,44180,42511,40912,39380,37910,
                 36500,35155,33866,32631,31446,30311,29222,28177,27175,26213,
                 25290,24403,23554,22738,21955,21202,20479,19783,19115,18472,
                 17260,16688,16138,15608,15098,14608,14135,13680,13242,12819,
                 12412,12020,11642,11278,10926,10587,10260,9945,9641,9347,
                 9063,8789,8525,8270,8023,7785,7555,7333,7118,6911};
                 
float obj [13][12]={
/*0*/             { 0,-0.274,-0.58,-0.922,-1.301,-1.721,-2.183,-2.691,-3.247,-3.854,-4.516,-5.236}, //
/*1*/             { 0.271,0,-0.303,-0.642,-1.018,-1.434,-1.894,-2.398,-2.951,-3.556,-4.215,-4.931},  //→surrounding temperature,from -10,0,10,...100
/*2*/             { 0.567,0.3,0,-0.335,-0.708,-1.121,-1.577,-2.078,-2.628,-3.229,-3.884,-4.597},   //↓object temperature,from -10,0,10,...110
/*3*/             { 0.891,0.628,0.331,0,-0.369,-0.778,-1.23,-1.728,-2.274,-2.871,-3.523,-4.232},
/*4*/             { 1.244,0.985,0.692,0.365,0,-0.405,-0.853,-1.347,-1.889,-2.482,-3.13,-3.835},
/*5*/             { 1.628,1.372,1.084,0.761,0.401,0,-0.444,-0.933,-1.47,-2.059,-2.702,-3.403},
/*6*/             { 2.043,1.792,1.509,1.191,0.835,0.439,0,-0.484,-1.017,-1.601,-2.24,-2.936},
/*7*/             { 2.491,2.246,1.968,1.655,1.304,0.913,0.479,0,-0.528,-1.107,-1.74,-2.431},
/*8*/             { 2.975,2.735,2.462,2.155,1.809,1.424,0.996,0.522,0,-0.573,-1.201,-1.887},
/*9*/             { 3.495,3.261,2.994,2.692,2.353,1.974,1.552,1.084,0.568,0,-0.622,-1.301},
/*10*/            { 4.053,3.825,3.565,3.27,2.937,2.564,2.148,1.687,1.177,0.616,0,-0.673},
/*11*/            { 4.651,4.43,4.177,3.888,3.562,3.196,2.787,2.332,1.829,1.275,0.666,0},
/*12*/            { 5.29,5.076,4.83,4.549,4.231,3.872,3.47,3.023,2.527,1.98,1.379,0.72}
};

int Light;
float Heat;
int Timer=0;
int Minute=59;

Adafruit_AlphaNum4 alpha4 = Adafruit_AlphaNum4();
Metro ledMetro = Metro(1000); 
enum States{INIT, COUNT, END, ERR};
int Automate=INIT;
bool TemperatureOK=false;
bool LightOK=false;



//**********************************************************************************
void setup() 
{
  pinMode(BP, INPUT_PULLUP);
  Serial.begin(9600);
  analogReference(INTERNAL);//set the refenrence voltage 1.1V,the distinguishability can up to 1mV.
  alpha4.begin(0x70);  // pass in the address
  alpha4.clear();
  alpha4.writeDisplay();
  PrintLed(alpha4,"TboX");
  tone(3, 3000, 500);
  delay(1000);
  Automate=INIT;
}

void loop() 
{
  static int Point=1;
  float T1=measureSurTemp();//measure the Surrounding temperature around the sensor
  float T2=measureObjectTemp();
  Heat=T1+0; 
  
  if ((ledMetro.check() == 1) )
  {
#ifndef TEST
     if (Automate==COUNT)
#endif
     {
      if(Point) Point=0;
      else Point=1;
      Minute--;
      if(Minute==0) 
      {
        Minute=59;
        if(Timer) Timer--;
        PrintSensors();
      }
     }
    
    if(Automate==END) tone(3, 3000, 100);
    if(Automate==ERR) tone(3, 300, 200);
  }
  
#ifdef TEST
  TemperatureOK=true;
#else
  if (Heat >= SEUIL_TEMP) TemperatureOK=true;
  else TemperatureOK=false; 
#endif
  Light=analogRead(LIGHT_SENSOR)/10;
  if(Light >= SEUIL_LIGHT) LightOK=true;
  else LightOK=false;

  if(Heat>=HIGH_TEMP)  
      {
        tone(3, 300, 200);
        delay(500);
      }
  
  switch(Automate)
  {
    case INIT:
      Timer=0;
      if((!digitalRead(BP)) && TemperatureOK)
      {
        Automate=COUNT;
        Timer=TIMER;
        tone(3, 3000, 500);
      }
      if((!digitalRead(BP)) && !TemperatureOK)
      {
        PrintLed(alpha4,"lowT");
        tone(3, 300, 200);
      }
      else PrintLedVal(alpha4,Timer,(int)Heat,Point);
      //Serial.println("INIT");
    break;
    
    case COUNT:
      if(Timer==0) Automate=END;
      if(!LightOK || !TemperatureOK) Automate=ERR;
      PrintLedVal(alpha4,Timer,(int)Heat,Point);
      //Serial.println("COUNT");
    break;
    
    case END:
      if(!digitalRead(BP)) Automate=INIT;
      PrintLed(alpha4,"END.");
      //Serial.println("END");
    break;

    case ERR:
       if(!digitalRead(BP)) Automate=INIT;
         PrintLed(alpha4,"Err.");
         //Serial.println("ERR");
    break;
    
  }
}

void PrintSensors()
{
  Serial.print(Timer);
  Serial.print(", ");
  Serial.print((int)Heat);
  Serial.print(", ");
  Serial.print(100);
  Serial.println();
}
//*************************************************************
float binSearch(long x)// this function used for measure the surrounding temperature
{
  int low,mid,high;
  low=0;
  //mid=0;
  high=100;
  while (low<=high)
  {
    mid=(low+high)/2;
    if(x<res[mid])
      low= mid+1;
    else//(x>res[mid])
      high=mid-1;
  }
  return mid;
}
//************************************************************
float arraysearch(float x,float y)//x is the surrounding temperature,y is the object temperature
{
  int i=0;
  float tem_coefficient=100;//Magnification of 100 times  
  i=(x/10)+1;//Ambient temperature      
  voltage=(float)y/tem_coefficient;//the original voltage   
  //Serial.print("sensor voltage:\t");    
  //Serial.print(voltage,5);  
  //Serial.print("V");      
  for(temp3=0;temp3<13;temp3++)   
  {     
    if((voltage>obj[temp3][i])&&(voltage<obj[temp3+1][i]))        
    {     
      return temp3;         
    }     
  }
}
float measureSurTemp()
{  
  unsigned char i=0;
  float current_temp1=0;    
  int signal=0;   
  tempValue=0;

  for(i=0;i<10;i++)       //    
  {     
    tempValue+= analogRead(SUR_TEMP_PIN);       
    delay(10);    
  }   
  tempValue=tempValue/10;   
  temp = tempValue*1.1/1023;    
  R=2000000*temp/(2.50-temp);   
  signal=binSearch(R);    
  current_temp=signal-1+temp_calibration+(res[signal-1]-R)/(res[signal-1]-res[signal]);
  return current_temp;
}
//***********************************************************
float measureObjectTemp()
{
  unsigned char i=0;  
  unsigned char j=0;  
  float sur_temp=0;  
  unsigned int array_temp=0;  
  float temp1,temp2; 
  float final_temp=0;
  objtValue=0;  
  for(i=0;i<10;i++)
  {
    objtValue+= analogRead(OBJ_TEMP_PIN); 
    delay(10); 
    }       
  objtValue=objtValue/10;//Averaging processing     
  temp1=objtValue*1.1/1023;//+objt_calibration; 
  sur_temp=temp1-(reference_vol+offset_vol);             
  array_temp=arraysearch(current_temp,sur_temp*1000);        
  temp2=current_temp;        
  temp1=(temperature_range*voltage)/(obj[array_temp+1][(int)(temp2/10)+1]-obj[array_temp][(int)(temp2/10)+1]);        
  final_temp=temp2+temp1;        
  return(final_temp);
}
//******************************************************************************
void PrintLed(Adafruit_AlphaNum4 &alpha4, char _buffer[])
{
  alpha4.writeDigitAscii(0, _buffer[0]);
  alpha4.writeDigitAscii(1, _buffer[1]);
  alpha4.writeDigitAscii(2, _buffer[2]);
  alpha4.writeDigitAscii(3, _buffer[3]);
  alpha4.writeDisplay();
  Wire.endTransmission();
}

//******************************************************************************
void PrintLedVal(Adafruit_AlphaNum4 &alpha4, int ValueG, int ValueD, boolean Point)
{
  char _buffer[]="AB";
  int P;
  if(Point) P=1;
  else P=0;

    itoa (ValueG,_buffer,10);
    if(ValueG<=9)
      {
        alpha4.writeDigitAscii(0, '0');
        alpha4.writeDigitAscii(1, _buffer[0],P);
      }
    else
    {
        alpha4.writeDigitAscii(1, _buffer[1],P);
        alpha4.writeDigitAscii(0, _buffer[0]);
    }
  itoa (ValueD,_buffer,10);
  if(ValueD<=9)
  {
    alpha4.writeDigitAscii(2, '0');
    alpha4.writeDigitAscii(3, _buffer[0],0);
  }
  else
  {
    alpha4.writeDigitAscii(3, _buffer[1],0);
    alpha4.writeDigitAscii(2, _buffer[0]);
  }
  alpha4.writeDisplay();
  Wire.endTransmission();
}
Github
https://github.com/thomasfredericks/Metro-Arduino-Wiring

Schematics

Wiring
Face maskdisinfectiondevice arduinosetup ooy7htd0lu

Comments

Similar projects you might like

Safe City: A Device to Keep You Safe

Project tutorial by Patel Darshil

  • 9,871 views
  • 1 comment
  • 26 respects

Pressure Airflow Measure Device with Analog Sensor

Project tutorial by Team ItMightBeWorse

  • 9,142 views
  • 3 comments
  • 14 respects

Safe Home Smart Home: Safety Device For Every Family Member

Project tutorial by Patel Darshil

  • 5,450 views
  • 0 comments
  • 13 respects

Arduino Bluetooth Robot for Android Device

Project showcase by aip06

  • 4,926 views
  • 2 comments
  • 19 respects

Blind Runner Alarm: Speed Measuring Device

Project showcase by 5 developers

  • 3,045 views
  • 2 comments
  • 5 respects

Arduino 4WD Rover Bluetooth Controlled by an Android device

Project tutorial by AppsByDavideV

  • 2,734 views
  • 0 comments
  • 12 respects
Add projectSign up / Login