IR Thermometer With Medical Application (Contactless)
by UCexperiments in Living > Health
418 Views, 7 Favorites, 0 Comments
IR Thermometer With Medical Application (Contactless)
In this tutorial, you'll learn how to make an infrared thermometer capable of accurately measuring both forehead and object temperatures.
It's based on the MLX90614, an OLED SSD 1306 display and an Arduino (Nano or pro mini).
Supplies
MLX90614: https://s.click.aliexpress.com/e/_DlvTZkR
OLED (SSD1306, 0.96"): https://s.click.aliexpress.com/e/_DlEk1mL
Arduino Nano: https://s.click.aliexpress.com/e/_DB4iH3d
VL53L0X (take the purple version): https://s.click.aliexpress.com/e/_DdqQncR
Buzzer: https://s.click.aliexpress.com/e/_DFPAq6P
Buttons: https://s.click.aliexpress.com/e/_DFHkvNv
Switch (Take C-10pcs): https://s.click.aliexpress.com/e/_DFEJRiT
9v cell/battery: https://s.click.aliexpress.com/e/_DmQPj2j
Battery connector (maybe you have already one in your arduino kit): https://s.click.aliexpress.com/e/_DEHplTl
Wiring and Testing the Circuit on a Breadboard
Connect components as shown in the table (click on image) or on the fritzing diagram. The black circle with a gray center is the buzzer, the assembly of white rectangles with black borders at the bottom is the switch.
Program in Arduino IDE
Install the Adafruit GFX, Adafruit SSD1306, Adafruit MLX90614 and VL53L0X libraries (by pololu). You can install them all from the library manager in the Arduino IDE.
Download the attached code and upload it to the arduino.
If the assembly works correctly, you can move on to the next step.
Downloads
3D Printing of Parts
Print 3D parts. They fit together nicely for me, but you may need to file off some of the plastic to make it work (with a file or knife). If this doesn't work, check the calibration of your 3D printer.
I've put some STEP files if you want to make changes.
Gluing the First Components in the Housing
Button placement:
- Place the removable long and short parts of the buttons in the holes provided.
- Place the buttons in the gap
- Add a little hot glue so that the button sticks to the fixed “bridge” (look at the picture)
The switch clips into the hole provided - no need for glue.
Solder the Components
This is the same wiring as the diagrams in step 1.
- Start by soldering the buttons, switch, battery and buzzer wires, which are located in the lower part of the case.
- Join the GNDs together. The wires should be long enough to pass through the hole in the upper part (better a little too long than too short).
- Solder wires for MLX90614, VL53L0X and OLED (note that the wires must be soldered directly into the component holes, without the pins)
- Cut a pcb the size of the Arduino Nano (or Pro Mini, depending on which one you're using)
- Solder the component wires to the pcb at the points that will correspond to the pin on the Arduino Nano (on the 2nd line from the edge)
- Once all the wires are soldered, place the Arduino on top of the wires on the pcb, and solder the used pins to the pcb
(You'll need to be a bit clever and meticulous in this step)
Gluing the Other Components
- Hot-glue the MLX90614 and VL53L0X to the nozzle, opposite the holes. It was necessary to use pliers to cut the sides with the VL53L0X holes. Make sure that the VL53L0X sensor is clearly visible through the hole, and that nothing obstructs it, which could prevent measurement.
- Glue the OLED with superglue or hot glue. Note that the screen must be placed ON ITS OWN SIDE (pins down)
Test the Thermometer
Close the case with the 3D printed parts
Press the switch.
To operate the IR thermometer, you need to continuously press the longest button (the one we soldered to pin D5 of the arduino), bring the thermometer close to an obstacle and when the thermometer is close enough, it will beep and take the temperature.
You can change the mode (medical or object) by pressing the other button for about 3s.
In object mode, you can change the emissivity to measure different materials (wood does not have the same emissivity as aluminum, for example). Short presses on the other button.
Bonus: Increase Medical Precision
When you're in medical mode, the sensor takes the actual temperature and the code adds 3.5°C to approximate the body's internal temperature.
To make this more accurate, you can follow the procedure below:
- Select object mode and set emissivity to 0.98
- Measure a number of people who are not ill, and under normal temperature conditions, always measure them in the same place (at the center of the forehead, for example).
- Take the average of these measurements, and you'll get, for example, 34°C.
- Subtract 37 from this average to obtain 3°C, for example.
- Modify the line of code to replace with your value
temperature_interne = temperature_front + 3