DIY an Infrared Thermometer for COVID-19

DIY an Infrared Thermometer for COVID-19

April 08, 2020

DIY an Infrared Thermometer for COVID-19 with MakePython ESP32

A quick update of Coronavirus: In the past few weeks, the COVID-19 has a global spread, with more than 143,0000 confirmed cases worldwide(till 2020.04.08). This is a serious public health incident, I think everyone's life has been affected to varying degrees. But what we should do is to try our best to prevent the virus from spreading, everyone's effort would make sense. We will eventually defeat the virus.
 
Due to the outbreak of Coronavirus Disease(COVID-19), the HR of Makerfabs need to measure and register the temperature of each employee by hand. This is a tedious and time-consuming task for HR. So I did this project to DIY an infrared thermometer for COVID-19 with MakePython ESP32: the employees just need to press the button, this instrument will measure the temperature automatically, then uploaded the data onto the Internet, and HR could go online and check everyone's temperature at any time.

1. First, let's prepare the supplies, what we used in this project?

DIY-an-Infrared-Thermometer-for-COVID-19-Supplies.png

1.1 Hardware:

  • MakePython ESP32
  • MLX90614
  • Button
  • Battery
  • Breadboard
MakePython ESP32 is an ESP32 board with an integrated SSD1306 OLED display, you can get it from this link: https://www.makerfabs.com/makepython-esp32.html.

1.2 Software:

  • uPyCraft V1.1
Click this link to download uPyCraft IDE for Windows: https://randomnerdtutorials.com/uPyCraftWindows.

2. Connect the hardware

DIY-an-Infrared-Thermometer-for-COVID-19-Wiring
 
  • The VIN pin of the MLX90614 is connected to 3V3 of MakePython ESP32, GND is connected to GND, SCL pin is connected to IO22, and SDA pin is connected to IO22 of the board.
  • The VCC pin and GND pin of the button are connected to the 3V3 and GND of MakePython ESP32, and the OUT pin is connected to IO14.
  • Connect MakePython ESP8266 to PC using the USB cable.

3. UPyCraft IDE

4. Use ThingSpeak IoT

Use-ThingSpeak-IoT-1
------------------------------------------------------------------------------------------------------------------------------------------------------------
Use-ThingSpeak-IoT-2

Remotely monitor temperature on ThingSpeak, steps:
  1. Sign up for an account at https://thingspeak.com/. If you already have one, sign indirectly.
  2. Click New Channel to create a new ThingSpeak channel.
  3. Input name, Description, Select Field 1. Then save the channel on the bottom.
  4. Click the API Keys option, copy the API Key, we will use it in the program.

5. Codes

Download the codes and run the ssd1306.py, MLX90614.py driver file.
Make the following changes to the main.py file, then save and run.
  • Modify SSID and PSW to connect WiFi
SSID='Makerfabs'
PSW='20160704'
  • Modify the API KEY that you got in the previous step
API_KEY='RATU1SWM0MT46HHR'
This is the code to get the temperature and upload the data:
while True:<br>    if(button.value() == 1):
      Temp = sensor.getObjCelsius()	#Get temperature information
      oled.fill(0)
      oled.text('Temperature:',10,20)
      oled.text(str(Temp),20,40)
      print(Temp)
      oled.show() 
      #Use API keys to write temperature data to a channel
      URL="https://api.thingspeak.com/update?api_key="+API_KEY+"&field1="+str(Temp)
      res=urequests.get(URL)           
      print(res.text)

6. Install to the door

Fix the board to the door with double-sided tape, open the switch on the battery, the screen will prompt WiFi connection success.
DIY-an-Infrared-Thermometer-for-COVID-19-Install

7. Measure Temp

The screen says "Measure temp Please press the button", you get as close as possible to MLX90614, then press the button, it will show your temperature and upload the data to the website.
DIY-an-Infrared-Thermometer-for-COVID-19-Measure-1DIY-an-Infrared-Thermometer-for-COVID-19-Measure-2DIY-an-Infrared-Thermometer-for-COVID-19-Measure

8. Complete and see the temperature data on the Internet

DIY-an-Infrared-Thermometer-for-COVID-19-Data
Go to https://thingspeak.com and you can see the measurements in Private View.
 
This project records your temperature and measurement time, which can also be used as an attendance record. Now HR can see your data by logging into the ThingSpeak web, which is very convenient. Based on those MakePython IoTY solutions, we can offer custom services with your special requirement, pls contact service@makerfabs.com for help.wink
 

Contact us