Table of Contents
Toggle
Currently, we are chasing an invisible monster named Corona Virus ( COVID-19 ) and we are going through the biggest health crisis in our time due to a sharp increase in infection cases. One of the main symptoms of the COVID-19 infected person is an increase in body temperature, in addition to other symptoms such as pain in the body, difficulty in breathing.
It is very essential to monitor continuously the body temperature to detect a corona patient at a very early stage so that proper medication may be taken for fast recovery.
The normal IR thermometer can measure the temperature of a covid patient and also may spread the virus. The main drawback of the handheld thermometer is its performance depends on the operator and the distance to the forehead. To address these problems, a device is made that can be mounted on the wall for fever screening in public areas without an operator. The hardware can measure human body temperature automatically when the distance between the sensor and forehead is adequate.
🔴 My Instagram link: https://www.instagram.com/opengreenenergy/
🔴 My website link: www.opengreenenergy.com
Video Tutorial:
Credit :
The main source of inspiration for this project is from the project iThermowall, I will give full credit to the authors of this project.
I thought this project is very useful in this critical time and I can use my skill to write a DIY guide by including precise instruction and good pictures for illustration so that anyone can recreate it easily.
Supplies for DIY Non Contact Thermometer
Components Required
1. Arduino Nano ( Amazon )
2. GY-906 Temperature Sensor ( Amazon )
3. OLED Display ( Amazon )
4. Infrared Proximity Sensor ( Amazon )
5. TP4056 Charger Module ( Amazon )
6. 18650 Battery ( Banggood )
7. 18650 Battery Holder ( Amazon )
8. 5 V DC-DC Step-Up Converter ( Amazon )
9. Rocker Switch -15 × 21 mm ( Amazon)
10. 5 mm Green LED ( Amazon )
11. 5 mm RED LED ( Amazon )
12. Jumper Wires ( Amazon )
Tools Used:
1. Soldering Iron ( Amazon / Banggood )
2. Wire Cutter ( Amazon / Banggood )
3. Wire Stripper ( Amazon / Banggood )
4. 3D Printer ( Amazon / Banggood )
How It Works ?
The working principle is very simple, the infrared thermometer sensor MLX90614 reads the human body temperature when the distance ( measured by IR sensor ) between the forehead and the sensor matches a set value. The sensor reading is sent to Arduino for processing and the processed value is displayed on a 0.96″ OLED Display.
Apart from OLED display, two LED and one buzzer is used to indicate the output.
1. When the body temperature is normal, Green LED ( LED1 ) will turn on and the buzzer will beep.
2. When the body temperature is higher than 104 degF, Red LED ( LED2 ) will be ON and the buzzer will beep for a longer time.
Power Supply
The power required for the entire circuit is provided by two 18650 batteries. The two batteries are connected in parallel for making a higher capacity battery pack to get a longer backup. The battery pack is charged by a TP4056 charger module.
The battery pack voltage is stepped up to 7V by using a boost converter module ( MT3608 ). Then the out from the boost converter is connected to Arduino’s Vin pin.
A rocker switch is placed in between the charger module TP4056 output and the boost converter.
Prepare the Arduino and Temperature Sensor Board
To keep costs down, the manufacturer often sends you the board and headers pin but expects you to solder them to the board. I have received the Arduino Nano and MLX 90614 sensor without soldering the header pins. To solder pin headers to a board, first put the pin headers in a breadboard. That’s optional, but it’s a great way to make sure the pin headers will be perpendicular to the board and parallel to each other, making it easy to insert the board elsewhere. Place the board on top of the headers with the pins going through the holes in the board.
Use a soldering iron with a fine tip since you’ll be working with small parts that are close together. The soldering result should be a cone-shaped bit of solder covering both the circular pad and the bottom part of the pin. There should not be any solder connecting two pins together.
MLX90614 Infrared Temperature Sensor
The MLX90614 is an infrared thermometer for non-contact temperature measurements capable of measuring temperatures between -70 to 380°C. The sensor uses IR sensitive thermopile detector chip and the signal conditioning ASIC integrated into a single chip. It works based on Stefan-Boltzmann’s law which states that all objects emit IR energy and the intensity of this energy will be directly proportional to the temperature of that object. The sensing unit in the sensor measures how much IR energy is emitted by a targeted object and the computational unit converts it into temperature value using a 17-bit in-built ADC and outputs the data through an I2C communication protocol.
The sensor measures both the object temperature and ambient temperature to calibrate the object temperature value. The MLX 90614 sensor can read the ambient temperature in the range of -40 to 125 ˚C (-40 to 257 °F) and object temperature in the range of -70 to 380 ˚C (-94 to 716 °F).
The connection of the infrared thermometer with Arduino is very simple since it uses the I2C communication interface like many other components.
The MLX90614 thermometer has 4 pins: VIN, GND, SCL, and SDA.
The connections should be as follows:
Arduino –> MLX 90614
5V —> VIN
GND –> GND
A5 —-> SCL
A4 —-> SDA
Prepare the Battery Pack
We have to connect the two 18650 batteries in parallel. The battery slot that I have used is a two-slot holder with an independent terminal for connection. To make the parallel connection, connect two terminals on each side of the holder by using a piece of wire.
First apply a small amount of flux to the terminals, then short them by using the wire.
Next solder red extension wire to the positive terminal and black wire to the negative terminal of the battery holder.
Infrared Proximity Sensor
Currently, handheld thermometers are quite popular for screening the fever. However, the handheld thermometer performance depends on the operator and the distance to the forehead. To overcome these problems, an Infrared proximity sensor is used to measure the distance between the sensor and the forehead, when the distance is adequate, the temperature reading will be sensed and displayed. In this way, the accuracy of the measurement is improved.
You can set the detection distance from proximity sensor to object by adjusting the potentiometer on the sensor module. Rotating the potentiometer clockwise will increase detection distance and counter-clockwise will reduce the detection distance. I have set this distance to approximately 50 mm.
The connections should be as follows:
Arduino –> IR Sensor
3.3V —> VCC
GND –> GND
D9 —-> OUT
OLED Display
To display the body temperature, a 0.96″ OLED display is used. It has 128×64 resolution and uses an I2C bus to communicate with the Arduino. Two pins SCL (A5), SDA (A4) in Arduino Nanno are used for communication.
I am using the Adafruit_SSD1306 library to display the parameters.
First, you have to download the Adafruit_SSD1306. Then install it.
The connections should be as follows:
Arduino –> OLED
5V —>VCC
GND –>GND
A4—-> SDA
A5—-> SCL
LED Indication
Two LEDs are used to indicate whether the body temperature is normal or abnormal. The green LED indicate when the body temperature is normal and RED LED indicates the abnormal condition ( when the temperature is above 104 degF)
The green LED ( LED1 ) is connected to Arduino digital pin D3 and Red LED ( LED2 ) is connected to D5. To limit the current of the led, two 330 Ω resistors are used. Solder the resistor to the positive terminal of LEDs. The longer leg of the LED indicates the positive terminal.
Connect 4 jumper wires to the LEDs as shown above. Here I have to use female-female jumper wires for easier connection.
Buzzer for Alert
To provide alerts during the screening of the human body, a piezo buzzer is used. The buzzer has two terminals, the longer one is positive and the shorter leg is negative. The sticker on the new buzzer has also ” + ” marked to indicate the positive terminal.
You can solder wires to the Buzzer pins or you may use female jumper wires as I have used here.
The connections should be as follows:
Arduino –> Buzzer
D7 –> Positive terminal
GND –> Negative terminal
Prepare an Extension Board
Most of the modules and components are connected to Arduino pin 5V and GND. Unfortunately, the Arduino Nano has only one 5V pin and two GND pins, but in reality, we need more such pins for connecting the components. To overcome this challenge, I have prepared an extension board by using a small piece of the prototype board.
Apart from the 5V and GND pins we need two SDA and SCL pins for connecting the MLX 90614 sensor and OLED display.
Here I have use right angle and straight male header pins. You can easily make it by following the above picture. In each row, all the pins are shorted.
Make the Circuit
Make the circuit by following the schematic diagram given in the above picture. I have already explained the connection details of each component and module. To make it simpler, I have prepared a breadboard circuit for you.
PCB Design
Thank You NextPCB:
This project is successfully completed because of the help and support from NextPCB. Guys if you have a PCB project, please visit their website and get exciting discounts and coupons.
Only 0$ for 5-10pcs PCB Prototypes:https://www.nextpcb.com/?code=greenenergy
Register and get $100 from NextPCB: https://www.nextpcb.com/register?code=greenenergy…
See more info about PCB Assembly Capabilities: https://www.nextpcb.com/register?code=greenenergy…
Software and Libraries
First, download the Arduino sketch and installed all the libraries.
Download and Install the following Libraries:
1. Adafruit-MLX90614-Library: https://github.com/adafruit/Adafruit-MLX90614-Lib…
2. Adafruit_SSD1306 Library: https://github.com/adafruit/Adafruit_SSD1306
3. millisDelay: https://github.com/ansonhe97/millisDelay
Plugin the USB cable into the Arduino Nano with your laptop or desktop PC.
Set the correct board and COM Port number and upload the code into the Arduino.
Arduino Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
//////////////////////////////////////////////// // iThermowall Thermometer Firmware // // by Tomy Abuzairi and Ridho Maulana Mohamad // //////////////////////////////////////////////// #include <Adafruit_SSD1306.h> //library oled #include <Adafruit_MLX90614.h> //library sensor temperature #include <Wire.h> //library I2C #include <millisDelay.h> //library looping #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels const int GREEN_LED = 3; // pin D3 for green LED const int RED_LED = 5; // pin D5 for red LED const int buzzer = 7; // pin D7 for buzzer const int statePin = 9; // pin D9 for IR proximity sensor bool measurement = false; //check temperature measurement running const unsigned long interval_sensor = 50; // interval refresh sensor in mS millisDelay sensorDelay; // the delay object const unsigned long interval_display = 500; // interval refresh OLED display in mS millisDelay displayDelay; // the delay object const unsigned long delay_hold_red = 5000; // delay hold red LED in mS const unsigned long delay_hold_green = 1000; // delay hold green LED in mS millisDelay holdDelay; // the delay object // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1); // Declaration for an MLX90614 sensor connected to I2C (SDA, SCL pins) Adafruit_MLX90614 mlx = Adafruit_MLX90614(); void setup() { Serial.begin(9600); if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64 Serial.println(F("OLED Display allocation failed")); for(;;); } pinMode(statePin, INPUT); pinMode(GREEN_LED, OUTPUT); pinMode(RED_LED, OUTPUT); pinMode(buzzer, OUTPUT); display.clearDisplay(); display.setTextSize(1); display.setTextColor(WHITE); display.setCursor(20, 20); display.println("Initializing"); display.display(); delay(250); display.clearDisplay(); mlx.begin(); //sensor initialization displayDelay.start(interval_display); //refresh display } void loop() { static float temperature = -1; //initial condition int state = digitalRead(statePin); //IR sensor condition // check if the IR sensor detect people in front of sensor. If it is, the state is LOW: if (state == LOW && measurement == false) { sensorDelay.start(interval_sensor); //read sensor displayDelay.finish(); //finish interval refresh for display measurement = true; //change state of measurement } if (measurement == true) { //if sensor reading temperature = GetTemp(); //get temperature in celcius }else { temperature = -1; //marker if sensor not reading temperature } ShowTemp(temperature ); //display temperature to OLED holdReading(); //call holdReading function } float GetTemp() { static int index = 0; static float temptot = 0; float hasil = 0; if (sensorDelay.justFinished()) { // read sensor and repeat sensorDelay.repeat(); // repeat // temptot += mlx.readObjectTempC(); //add the reading to the total temptot += mlx.readObjectTempF(); index++; //increment index if(index==19) { //if already 20 measurement hasil = temptot/20; //calculate average temptot = 0; //zero total index = 0; //zero index sensorDelay.stop(); //stop reading displayDelay.finish(); //complete the refresh interval so that it shows immediately return hasil; //give results } } return hasil; //As long as there are no results, give a value of result = 0 } void ShowTemp(float temperature) { if (displayDelay.justFinished()) { displayDelay.repeat(); // repeat //show temperature if(temperature == -1) { //if there are no object in front of sensor display.clearDisplay(); display.setTextSize(2); display.setCursor(35, 5); display.print("-----"); display.setCursor(105, 20); display.print(""); display.setTextSize(2); display.setCursor(35, 40); display.print("-----"); display.setCursor(105, 46); display.print(""); display.display(); }else if(temperature == 0) { //if still reading temperature display.clearDisplay(); display.setTextSize(1); display.setTextColor(WHITE); display.setCursor(20, 25); display.println("WAIT ...."); display.display(); }else { //if there is a new result temperature += 8.5; // sensor temperature calibration display.clearDisplay(); if( temperature > 100) { display.setTextSize(3); display.setCursor(5, 20); display.print(temperature,1); display.print("F"); // display.print("C"); } else { display.setTextSize(3); display.setCursor(10, 20); display.print(temperature,1); display.print(" F"); // display.print("C "); } display.display(); if (temperature > 100.4) { //if the temperature is too high digitalWrite(RED_LED, HIGH); holdDelay.start(delay_hold_red); //run delay for red LED or temp > 38 }else { //if the temperature is normal digitalWrite(GREEN_LED, HIGH); holdDelay.start(delay_hold_green); //run delay for green LED or temp < 38 } digitalWrite(buzzer, HIGH); displayDelay.stop(); //stop refresh display } } } void holdReading() { if (holdDelay.justFinished()) { // if holddelay finish digitalWrite(RED_LED, LOW); digitalWrite(GREEN_LED, LOW); digitalWrite(buzzer, LOW); measurement = false; //allow new measurements displayDelay.start(interval_display); //restart the OLED display } } |
3D Printed Enclosure
The enclosure has two parts:
1. Front Case
2. Back Case.
You need a support structure for printing the front case. I have printed it in the wrong way. The correct way to print the enclosure is the reverse way as shown above.
I have used my Creality CR-10 printer and 1.75 mm PLA filaments to print the parts.
My settings are:
1. Print Speed: 60 mm/s
2. Layer Height: 0.2mm ( 0.3 also works well)
3. Fill Density: 30%
4. Extruder Temperature: 200 deg C
5. Bed Temp: 65 deg C
As I have printed the front case in the wrong way, most of the mounting standoffs got broken. So I have used hot glue or double-sided tape to mount the parts.
Download the .STL files from the link: https://bit.ly/2R3iDYp
Assembling
Now you can install all the components to their respective slots. All the parts are installed on the front case, but the battery holder will be installed in the back case.
I have used hot glue and double-sided tape to mount all the parts.
After installing the parts, close the back case and secure the 4 screws at the corner.
Now our device is ready to use.
Mounting and Testing
Before first use, I will suggest charging the device with a micro USB cable. You can use any 5V / 1A charger, it will work for you. The red led on TP4056 indicates batteries are charging, and the blue led indicates fully charged.
Now, switch on the rocker switch, you will notice the OLED display will start with the message ” initializing “.
You can test it by placing your hand in front of the sensor, when the distance is adequate, the body temperature will be displayed on the OLED display, LED will turn on and you will also hear a beep sound.
To simulate the high temperature, I have placed the soldering iron tip in front of the sensor, you will notice that the red LED will turn on and hear a long beep sound from the buzzer.
Once it is confirmed that the device is working as per our planning, you may install it in a suitable location. The height of the sensor shall be approximately equal to the height of your forehead from the ground.
If you enjoyed this article, don’t forget to pass it along!
Follow me for more DIY projects and ideas. Thank you !!!