Introduction: IR Thermometer

This Instructable details building an IR thermometer capable of taking non-contact temperature readings. This device has been specifically designed to take human body temperatures via the ear, but can easily be adapted to measure temperatures of a wide variety of objects.

This device is based around the MLX90614-BAA sensor produced by Melexis. The version I'm using for this instructable uses the 5v, single zone, standard packaged variant of the sensor. This sensor is capable of a temperature range of -20 to 120 degrees C output at a resolution of 0.14C. Communication is done via SMBus or one-pin PWM. For the sake of this instructable, the better documented SMBus connectivity was used.

The Digispark microcontroller was tapped to do our signal processing. It is based on the ATtiny85, and requires some minor set up. It is programmable via the Arduino IDE.

Powering the device is a 9V battery. Due to the relatively paltry 500mAh capacity, a sleep mode capability was built into this device to drop power consumption while not in use. Further optimizations are indeed still possible, and will be discussed later on.

Step 1: Gather All the Parts.

This device requires the following:
Tools:
-Soldering Iron
-Hot glue gun/Super glue
-3D Printer
-Dremel

Off the shelf:

1 Digispark Microcontroller
1 MLX90614 (BAA)
1 Neopixel
2 4.7k resistors
1 10k resistor
1 Momentary Switch
2 Development PCBs (radioshack)
Assorted wires.

3D printed:
1 Casing Left
1 Casing Right
1 Casing MLX Mount
1 Casing Center Insert
1 Casing Ear Piece
2 Casing Pin

For this project, both the ear piece and the center insert were cast with Smooth Sil 950, with favorable results. STL files for both the casting molds and the parts themselves are included in the download.

Step 2: Assemble the PCBs

There are two main PCBs that require assembling:

-The main board which interfaces with the MLX and acts as a power and ground rail

and

-The button board which houses the momentary switch

The overall diagram is shown in the first diagram. Note where the pin outs from the MLX90614 come out from the SDA/SCL pins and interface with the digispark, as well as the interfaces on the button and Neopixel.

Using the radioshack PCB's, two boards were soldered together.

Step 3: 3D Print the Casing:

Attached are the STL files for the casing.

Printer: Stratasys uPrint
Scale: mm
Layer thickness: 0.0010 inches
Infill setting: Low
Support Generator:SMART
Material: ABS Plastic + fluid soluble support

Tolerances: 0.15~0.2mm

Step 4: Casting (Optional)

Equipment Used:
Smooth Sil 950
3D printed molds
Clamp
Digital scale
Vacuum chamber
Misc mixing cups and sticks

Prepare your mold by smoothing out any part lines and ribs from the 3D print.

Because silicone does not stick well to other materials, mold release is not needed.

Smooth Sil 950 was used for these parts, which has a A:B ratio 10:1.

Using a scale, weigh out the correct ratio. Stir until the compound is completely uniform in color.

For best results, the use of a vacuum chamber (or alternatively a pressure chamber) to de-gas the parts is helpful.

Once compound is ready, pour into the bottom mold until it is full. Press the top half of the mold into the bottom half. The action of overfilling the bottom allows the top mold to press the silicone into potential air pockets. The excess silicone will squeeze out of the seams and relief channels.

Clamp the mold together and set up right overnight until fully cured.

Step 5: Assemble the Device

Solder together the PCB's by following the circuit diagram in Step 2. Mounting in this prototype was accomplished via hot glue, but more robust methods can be pursued.

Step 6: Program the Device

Set up the Arduino IDE to program to the Digispark by following the guide here:

https://digistump.com/wiki/digispark/tutorials/con...

Double check to make sure the IDE actually goes through and installs the drivers. It is very common to get the "untrusted" error (unsigned application). If this happens, go manually download the digispark drivers.

You will also need the necessary libraries:
Adafruit_MiniMLX90614
https://github.com/adafruit/Adafruit_MiniMLX90614
Adafruit_Neopixel
https://github.com/adafruit/Adafruit_NeoPixel

When programming the Digispark, begin with nothing plugged into pins 3 and 4 on the digispark and while the digispark itself is unplugged from the computer. In the IDE, begin the upload, then plug in the digispark when prompted by the IDE.