No-contact IR Thermometer

19,721

203

19

Introduction: No-contact IR Thermometer

About: Video producer, maker, hard-G giffer, shitty wizard. Uses tools, tells stories. Tweets may contain cats. Terms & Conditions Apply.

My local Department of Health got in touch with me because they needed a way to track the body temperature of their employee's health on a daily basis during the 2020 Covid-19 crisis. Normal, off the shelf IR thermometers were starting to be scarce in supply, so I was asked if I could produce a design for a DIY version.

This design relies heavily on the work done by Aswinth Raj in this post: https://circuitdigest.com/microcontroller-projects...

I wanted to make some design changes in a few significant ways: I wanted to make the enclosure as fast to manufacture as possible, opting for a laser cut flat pack design over 3d printing. Given that supply lines are presently strained, I wanted to bring the rest of the BOM down to as sustainable and cheap as possible. I've swapped the genuine Arduino Micro for the generic Arduino Nano. Normally I'd advocate for genuine Arduino hardware, but here, going cheap an ubiquitous makes more sense.

Let's talk about the MLX90614 sensor - especially the specific designation of it. The extremely common BAA version has a 90 degree field of view that is completely inadequate for this project. This documentation uses the BCH designation, which uses a 12 degree FOV and reports more reliable temperature readings. As of this writing, stock has been short on this version, but keep checking on Digikey and Mouser for supplies.

Supplies

1x MLX 90614-BCH IR thermal sensor https://www.digikey.com/product-detail/en/melexis-...

1x Arduino Nano CH340 version: https://www.amazon.com/ELEGOO-Arduino-ATmega328P-W...

1x 128x64 OLED i2c display https://www.amazon.com/gp/product/B076PNP2VD/ref=p...

1x Laser Diode https://www.amazon.com/gp/product/B01ITK4PEO/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

1x .1uF capacitor

1x 9v battery connector

1x temporary pushbutton https://www.sparkfun.com/products/11992

Hookup wire

9v battery

3mm baltic birch plywood

Step 1: Step 1: Laser Cut the Enclosure

Okay, you can really do this part at any time before the final steps, but if you don't want to be waiting around for glue to dry, do this first while you assemble the electronics. Everything should fit on a single piece of 6x8 inch Baltic Birch with a thickness of 3mm. You can find a link to the SVG file on this page.

Please contact me if you are directly helping medical professionals and you don't have access to a laser. We can work something out.

Step 2: Step 2: Assemble the Enclosure

I assembled the enclosure using wood glue, but you can also use CA, depending on your preference.

First you want to glue the two aperture pieces together. Make sure they're perfectly aligned with eachother, and clear out any glue seepage in the holes before they fully dry. You might also need to file down the slots in the two side panels to make sure these fit in correctly. (Pictures 1 & 2)

It will make your life a lot easier if you squeeze out a puddle of wood glue on some scrap plastic or a plastic bag and then apply it with a toothpick or a brush. You're not going to need much, so you don't want it getting all over the place.

Next fit the front aperture into one of the side panels, glueing up the mating surfaces. Then fit in the bottom panel, making sure the hatch is facing towards the back, finally fitting in the back panel, making sure the notched side is facing upwards. (Pictures 3, 4 and 5)

There's only two more panels to fit in - the handle backplane and then the handle base. First do the handle backplane, with the hole facing towards the top of the unit, and finally the handle base. Finally, apply glue to all of the top surfaces and then fit the other side plate over all the tabs. Clamp it together and let the glue set for at least an hour. (Pictures 6, 7, and 8)

Step 3: Step 3: Assemble Your Materials

This circuit has a lot going on, and the soldering is fairly tight, so its worth taking a moment to breadboard everything to make sure it works before you start making changes you can't go back on. The first image is the overall circuit diagram. We're making heavy use of the Arduino Nano's A4 and A5 pins for i2c functionality, the 5v and 3.3v pins, and a few others. (Picture 1)

First, solder up the IR sensor. If your sensor isn't attached to a PCB, you'll need to solder your own connections to the conductors. The datasheet isn't good at identifying whether you're looking a the front or back of the sensor, so use the annotated photo as a guide, using the tab for reference. For the sake of consistency, I'll be using yellow wires for SCL connections and Blue for SDA for the i2c connections. Solder all for conductors to some flexible wires, and then use heat shrink to isolate the connectors. Trim the wires to roughly 3 inches. (Pictures 2 & 3)

Next we want to connect wires to the OLED display. If yours came with header pins preinstalled, desolder those and detach them - we'll want permanent soldered connections. Again, use yellow wires for SCL and blue for SDA. (Pictures 4 and 5)

If your Arduino Nano didn't come with headers attached, now's a good time to attach some. Use a breadboard to help them stay aligned while you solder them in place. (Pictures 6, 7, and 8)

Step 4: Step 4: Load and Test Your Code

If your MLX90614 sensor didn't come with a breakout board attached, you need a .1uF capacitor to bridge the 3.3v and ground connections. Make sure it's in place on your breadboard before powering your circuit.

If your Arduino Nano has the CH340 chipset, (Picture 1) you may need to install specific drivers before you'll be able to program the board. Look for the chip on the bottom of the board. You can find the driver and instructions on installing it here:

https://learn.sparkfun.com/tutorials/how-to-instal...

Depending on the version of the board, you might need to toggle between the current ATmega328P and ATmega328P (old bootloader) versions. (Picture 2) If your code loaded successfully, you should see the temperature reported on the OLED screen. (Picture 3)

You can find the code at the bottom of this page. There are two different versions, one for Fahrenheit and another for Centigrade.

Step 5: Step 5: Permanant Soldering

Ok, let's start building a durable circuit. Start by measuring out your perfboard. I'm using a board without pre-connected traces. it's more work to make all your connections, but it gives you a little more flexibility in your layout. Start by placing your Nano into the perfboard and making a few measurements before you trim it down.

You'll want at least three rows of pins on the Analog side of your board. I thought I should keep one row open on the other side, but it turns out I didn't so I eventually trimmed it off to save space. Solder all the pins to the perfboard. Then make the permanent solder connections for the IR sensor, including the capacitor and ground connection. The sensor should power from the 3.3v pin. (Pictures 1-5)

Then wire up the OLED sensor. It can power from the 5v pin. Then add the laser diode, directly wired from 5v to ground. Finally, wire in the 9v battery connector. Red is connected to the Vin pin, and ground to ground. You can connect your battery to verify everything is working properly. (Pictures 6, 7, and 8)

Step 6: Step 6a: Final Assembly(ish)

Now that you have your completed circuit soldered and working, and your enclosure built, it's time to assemble this thing. First things first: insert the laser diode into the bottom, smaller hole in the front aperture piece. This should already be a tight fit, but it doesn't hurt to secure it with a dab of hot glue. Before you get too much further, drop the 9v battery connector, with a decent bit of wire slack, down the hole and into the handle bit. (Pictures 1-4)

Next, fit the IR sensor into the larger hole, securing it with a bit of hot glue as well. Spread some hot glue onto the back plate of the enclosure and use it to tack down the display. You can use some extra glue around the mounting holes if it doesn't feel secure enough. Finally, use a few more gobs of hot glue to help secure the arduino and perfboard into the man body of the enclosure. (Pictures 6-8)

Step 7: Step 6b: Final_final Assembly

Now that everything is together in the upper part of the enclosure, its time to focus on the lower part.

Cut the ground wire of the 9v battery connector and strip the leads. Solder them to the connectors of the push button. Feed it through the hole in the handle so the button is facing forwards, and then secure it using the lockwasher and nut. (Pictures 1-4)

Finally, attach the battery and slot it into the gap in the handle. You can secure it with a bit of tape if you want to keep it from falling out. (Picture 5)

Step 8: Usage and Best Practices

Probably obvious but still totally necessary disclaimer:

THIS IS NOT MEDICAL EQUIPMENT AND I AM NOT A MANUFACTURER OF MEDICAL EQUIPMENT.

I'm pretty happy with the accuracy and consistency of this device, but if you are using this to check temperatures of people, especially now during the the 2020 Covid-19 pandemic, take the time to familiarize yourself with the temperatures reported by the device and establish your own baselines. At best, this device should not be used to replace a medical thermomoeter. It should be used to determine if a person should be put under deeper and more reliable medical scrutiny.

Additionally, you should get the device as close to your subject as practicable - ideally within 2-4 inches. I have included a laser for accuracy, but the IR beam is still 12 degrees wide, and you want your subject filling that beam as much as possible.

I hope this helps you. Please send me feedback if you are using it in practice so I can update the project. Stay safe, protect your family, support your community, and keep making.

Be the First to Share

    Recommendations

    • DIY Summer Camp Contest

      DIY Summer Camp Contest
    • Stone, Concrete, Cement Challenge

      Stone, Concrete, Cement Challenge
    • Fandom Contest

      Fandom Contest

    19 Comments

    0
    pingsinoca
    pingsinoca

    1 day ago

    '' If you want to know if you have a fever, it can play 2 long beeps to indicate fever, and if you are okay, it will emit 1 short beep. '' Add int buzzer pin/initialization pin and void loop to the code. {You can use for i++1 sound and i++2 sound or you can use two-color LED (red light is: fever/green light is: No fever. It's best to have sound and light effects

    0
    hackerb9
    hackerb9

    1 year ago

    The BCH part is still out of stock. What can be done to make the project feasible with the BAA part?

    There were two problems mentioned with the BAA: field of view and precision/accuracy. I'm not concerned at all about precision (number of decimal points), but of course accuracy (is it in the right ballpark) is critical. Have people considered using the old radar technique of convolving the signal from two sensors to increase accuracy?

    As for angle, if Jean-Phillippe's comment about the BCH part is correct, that it loses accuracy dramatically for every cm away, then it seems a 90° view is not actually a big deal. The IR sensor would have to be so close to the forehead that it won't matter.

    If Jean-Phillippe was mistaken, then can the view be restricted on the BAA part? Would aluminum foil work as an IR reflective material? Or, perhaps aiming down a mirrored tube? How does IR interact with glass lenses?

    4
    Jean-philippeM8
    Jean-philippeM8

    1 year ago

    Just nice for education purpose and non medical use. I already did a similar IR thermometer (with the same IR sensor) and my conclusion is: Absolutely useless for medical attending. Even with a calibration process. The real accuracy is absolutely not accurate for medical use. Moreover you need to be very near of your item / body to obtain a correct value (emissivity coorectly calibrated - refer to datasheet) and if you move away about one centimeter, the temperature move about 1 ° C!
    Melexis produce an other IR sensor specialy for medical usage "A special version for medical applications exists offering an accuracy of ±0.2˚C in a limited temperature range around the human body temperature"
    Please refer to datasheet - option code D (but the price is costly).

    Be careful with laser! I recommend to had a correct resistor because this type of laser is probably dangerous! The real power of these laser is really high. At work, I already measure more than 5mW (with a specific laser powermeter) for these cheap lasers! Don't play with your health.

    20200424_143942.jpg20200424_143928.jpg
    0
    pjnovas
    pjnovas

    1 year ago

    I'm thinking .. maybe using a sound signal for output (to tell temperature) instead of a display would cheap it and simplify it even more

    0
    FPC2012
    FPC2012

    Reply 1 year ago

    Seems very possible. Most police Doppler radars use sound in addition to a digital readout that correlates with the target vehicle's speed, so maybe there's a way to do it with this project.

    0
    pjnovas
    pjnovas

    Reply 1 year ago

    oh sorry I was thinking about the output to the user of the device, so display won't be necessary

    0
    twinegarner
    twinegarner

    Reply 1 year ago

    How would that work?

    0
    pjnovas
    pjnovas

    Reply 1 year ago

    in the same way a motherboard plays beeps when you start the computer for debugging; if the idea is to know if you have fever it could play 2 long beeps for fever and one short if you are ok.

    0
    snorlaxprime
    snorlaxprime

    1 year ago

    Great project to supplement the short supply of contactless thermometer in the time of crisis.

    0
    twinegarner
    twinegarner

    Reply 1 year ago

    Thank you!

    0
    athomas40
    athomas40

    1 year ago

    This has an error possibility of ±0.5°C (±4°C)--This seems a bit large if this is going to be used to screen folks with a fever.

    0
    twinegarner
    twinegarner

    Reply 1 year ago

    The basis of this project is an alternative to devices that aren't presently available. In the usage guidelines I strongly advise that people using this establish their own baselines and only use it as a non-intrusive first response measurement before deeper and more invasive scrutiny.

    I agree, it's not a replacement for medical equipment.

    0
    FPC2012
    FPC2012

    Reply 1 year ago

    It may be possible to calibrate the sensor more accurately with an additional line of code or against a medical device/appliance that maintains an accurate temp. on a constant basis.

    1
    soldeerridder
    soldeerridder

    1 year ago

    Great instructable.
    I think you forgot to put the laser on the supplies list.

    0
    twinegarner
    twinegarner

    Reply 1 year ago

    Thanks for the catch! I've updated

    0
    RichM1
    RichM1

    Reply 1 year ago

    I was just about to ask about that exact same thing :)

    0
    yomero
    yomero

    Question 1 year ago on Step 8

    I wonder if the laser can be used as a distance meter

    1
    twinegarner
    twinegarner

    Reply 1 year ago

    The laser is just a laser. If you wanted to use it as a distance meter, Adafruit makes some really nice Lidar distance measuring modules. You could use the laser as an indicator of where you are aiming, and use the lidar to report the distance.

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

    Looking at the datasheet, this sensor is only good from a range of 30mm to 1.2m. For larger distances you might need to use an ultrasonic rangefinder.

    0
    yomero
    yomero

    Reply 1 year ago

    Thank you!