Due to the outbreak of Covid-19 pandemic, it has become important to check the body temperature of people without any contact with them to prevent spreading of the disease. There are many contactless thermometers available in the market, but here is a simple solution that will add a thermal screening feature to your smartphone. That is, it will turn your phone into a contactless thermometer using an MLX90614 infrared (IR) sensor module.
You can make a smart Bluetooth based contactless thermometer by connecting the sensor with Bluetooth and getting the body temperature readings on an app. You can get the sensor data over the phone using a USB cable if you don’t wish to use Bluetooth.
This project basically has only two units: transmitter (IR thermometer sensor circuit) and receiver (mobile phone).
For making the Bluetooth based contactless IR thermometer, we need the components listed in the table above.
To write the Arduino code, install MLX90614 library in the Arduino IDE by selecting Adafruit MLX90614 Library from Sketch->Include Library->Manage Libraries option, and then add it in the code, as shown in Fig. 1. Next, create a setup function and set the baud rate for the Bluetooth module. Here, the default baud rate of Bluetooth is 9600. Create a loop function that runs again and again. Check the sensor readings and pass them to the serial.println() function (refer Fig. 2) so that when you connect the Bluetooth to the serial pin of Arduino, it transfers those readings to the Bluetooth module. You can also add an OLED display, but it is optional.
Next, make the connections as shown in Fig. 3. Make sure you connect power supply using a 9V PP3 battery. Positive wire of battery should connect to RAW pin and negative wire should connect to GND pin of Arduino Pro Mini. After this, make an app for Bluetooth communications through which you will get live readings on your phone.
Android app development
To make an app, you can use app creators such as MIT App Inventor, Kodular, Android studio, Eclipse, and others. For this project, Kodular has been used to create the app.
First, open Kudular on https://www.kodular.io/ website using a valid email ID. Then, create a new app by clicking the ‘Create project’ option. Name the project as per your choice. Here, the project name is ‘Contactless IR thermometer.’ Next, make the app layout and add the following components to the layout:
- Bluetooth client
There are three sections in the Kodular platform: Assets, Designer, and Blocks. The app layout in the Designer section is shown in Fig. 4. Open the Blocks section and start the coding by joining various blocks, as shown in Fig. 5. Next, export the project as IRThermo.apk file and install it on your Android phone.
After making the connections and installation of the app on your phone, enclose the hardware along with a 9V battery in a suitable plastic box with MLX90614 sensor fitted on the front panel. But first, you need to upload the Arduino code (IRThermo.ino) to the Arduino board.
Turn on the Bluetooth on your phone, open the app, and click on the ‘Tap to Connect’ button. Select HC-05 to connect it. After a successful connection, you can see the temperature readings on the app, as shown in Fig. 6.
Keep the IR temperature sensor near your forehead (about 5cm) and check the readings, which should be between 35°C and 37°C. The app can also save the temperature readings in a text file. You can check them in the file manager.
USB based contactless IR thermometer
You can also make the project by omitting the Bluetooth HC-05 module. With the same code in the Arduino board, connect the circuit with the phone using a USB cable and an OTG (on-the-go) connector, as shown in Fig. 7.
You need to install a serial monitor app such as Serial USB Terminal (by Kai Morich) on your phone. After connecting the circuit with the mobile phone, you can see the object and surrounding temperatures on the phone.
Download Source Code
Ashwini Kumar Sinha is an electronics hobbyist and tech journalist at EFYi
Smart phone is just used for data display thru bluetooth or usb. It’s not what project title suggest.
If you can replace arduino with some app working on smartphone then it’s turning your phone into a thermometer.