Arduino Laser Infrared Thermometer

76,357

232

32

Introduction: Arduino Laser Infrared Thermometer

About: Just a guy who likes to build stuff. Please consider subscribing to my YouTube Channel for more awesome projects. https://www.youtube.com/channel/UCDkYnToaY_G0-O_aQo3GrYA

In this project I will show you how to build a digital laser infrared thermometer with a custom 3D printed enclosure!

Step 1: Intro

Infrared thermometers are widely used in many work environments to determine an objects surface temperature. Often times in a machine or electronic circuit, rising temperatures are one of the first signs that something is wrong. A quick non-contact check with an infrared thermometer can let you know what is happening with the temperature of a machine so you can shut if off before it causes permanent damage.

Infrared radiation is just another type of radiation that exists on the electromagnetic spectrum. We cannot see it but if you were to place your hand near a something hot like a stove top, then you would be feeling the effects of infrared radiation. All objects emit energy in the form of infrared radiation. Most handheld thermometers use a lens to focus light from one object onto a thermopile which absorbs the IR radiation. As more IR energy is absorbed, the hotter it gets and the heat level is converted into an electrical signal which is eventually converted to a temperature reading.

I was working on a circuit the other day and I had a component that was getting extremely hot. I wanted to know the temperature of the component but since I do not own a infrared thermometer I decided to build my own. It has a custom 3D printed enclosure so anyone can print it and assemble right at home.

It is a simple project and could be used as a great introduction into sensors, 3D design/printing, electronics, and programming.

Disclaimer: Obviously not suitable for medical use. This project is just for fun and if you need an infrared thermometer for medical use, order one that meets medical standards/testing.


Please consider subscribing to my YouTube channel to support me and to see more fun projects.

Step 2: Components Needed

The components needed for this project are below:

1. Momentary Button Switch Amazon

2. Resistors (5K Ohm, 200 Ohm) Amazon

3. 5V Laser Amazon

4. Arduino Nano Amazon

5. On/Off Switch Amazon

6. OLED 0.96" Screen Amazon

7. GY-906 Temperature Sensor (or MLX90614 Sensor with proper capacitors/resistors) Amazon

8. 9V Battery Amazon

9. 3D Printer/Filament (I use Hatchbox PLA from Amazon)

Disclosure: The amazon links above are affiliate links, meaning, at no additional cost to you, I will earn a commission if you click through and make a purchase.

Step 3: GY-906 Infrared Temperature Sensor

I used a GY-906 infrared thermometer sensor which is a breakout board for the MLX90614 non-contact infrared thermometer by Melexis.

The breakout board is very inexpensive, easy to integrate, and the breakout board version comes with 10K pull up resistors for the I2C interface. It comes factory calibrated with a range of -40 to +125 degrees Celsius for sensor temperature and -70 to 380 degrees celcius for object temperature. The accuracy of this sensor is roughly .5 degree celcius.

Step 4: Electronics

Now that you have gathered all of the required components, it is time to start assembling everything together. I would recommend wiring up everything on a breadboard first and then once everything is functioning properly go ahead and solder everything up on a perf board.

On the left we have our laser with a 200 ohm current limiting resistor being driven from Digital Output 5. There is also a standard momentary push button that is connected between 5V and Digital Input 2. There is a 5K pull down resistor so that when the switch is open, the input is not floating and instead will be set at 0V.

On the right we have our main On/Off switch which connects our 9V battery to the VIN and GND pins of the arduino nano. The OLED display and GY-906 infrared temperature sensor are both connected to 3.3V and the SDA lines are connected to A4, and SCL to A5. The oled display and GY-906 already have pull-up resistors on the I2C lines.

Step 5: Programming

I will assume that you know how to program your arduino nano but if not, there are many great tutorials available online.

You will need to install the following libraries in order for the code to compile.

1. Adafruits SSD1306

2. Adafruits MLX90614

The program is constantly reading temperature data from the MLX90614 but is only displayed on the OLED when the button trigger is pressed. If the trigger is pressed, the laser also turns on to help identify which object is being measured.

Step 6: 3D Design/Print/Assemble

I designed the scale in Fusion 360.

In the base of the thermometer, there is room for a 9V battery, On/Off switch, and our trigger mechanism which is just a simple momentary push button. The base cover will snap into place. There is a hole to route the wiring for the base components into the top section of the thermometer.

There is an opening for the .96 inch OLED display and a front section on the tip of the thermometer for your laser and your MLX90614 sensor. Both the laser and sensor can be press fit into the hole. The top section is for the arduino nano and I will be honest, I really underestimated the amount of wiring I needed to connect up in the small amount of space. Alot of wires were pulling lose when I pushed the arduino nano into the small space so I ended up using a glue gun to hold the wires in place while pushing the nano inside the enclosure. I always put my arduino nano on standoffs just in case I want to reuse it for a project later down the line, so the standoffs took up alot of extra room that wouldn't be needed if you permanently soldered it on a perf board. Nevertheless, eventually I got everything wired up and in the enclosure, so then I press fit the top cover on.

Printing this is kind of tricky to get it to look great, as the main base I printed with the oled screen side faced down. The angle for the OLED screen is fairly high so I printed with supports on the build plate but that makes the surface look less than perfect. It might just be an issue of my printer and I am sure it is possible to get it looking great if you dial in your printer settings but I didn't really care to much as this is a tool.

Thingiverse Link

Step 7: Test It Out!

Now that you have the laser infrared thermometer all assembled and programmed, it is time to test it out!

Push the power button, wait for the oled display to load up, and enjoy your new thermometer. Please consider subscribing to my youtube channel to support me and see more projects/videos. Thank you for reading!

3 People Made This Project!

Recommendations

  • 3D Printed Student Design Challenge

    3D Printed Student Design Challenge
  • Paint Challenge

    Paint Challenge
  • Made with Math Contest

    Made with Math Contest

32 Comments

0
shubechadhakulkar
shubechadhakulkar

Question 4 months ago on Step 4

hey, which virtual simulator you have used? I want to design the circuit but I found it difficult for finding mlx90614 can you suggest me the software.

0
bksahin
bksahin

Question 11 months ago on Step 3

Can you take a photo of the connections on the breadboard and all the connections going to the arduino in this photo?

F1CN21DK1B4CSR3.png
0
drkoray
drkoray

1 year ago

Nice job. I made one too.
Three points:
First: Momentary button switch is 12x12. At your Amazon link the button is 6x6. But 12x12 fits the switch space perfect.
Second: Archive sketch procedure at arduino nano with Arduino IDE 1.8.10 was almost impossible; i lost more than one hour (of course i am not an arduino guru). After i changed Tools > Processor> to "AT Mega 328P (Old Bootloader)" it was possible to archive the sketch.
Third: It seems Adafruit_GFX_Library needed to.

PS: Temparature at the image is from freezer.

IMG_20200202_130750.jpgIMG_20200202_130548.jpgIMG_20200202_130806.jpgIMG_20200202_125002.jpg
0
seulgg
seulgg

Reply 1 year ago

hi is it possible to make an enclosure to the infrared sensor so that it can be water proof?? like a thin transparent glass on the end ?..will it affect the measurement? or it will just pass through to measure the temperature? thanks alot

0
drkoray
drkoray

Reply 11 months ago

If you plan to immerse it in a fluid the front part should ve waterproff. You can put the whole item in a clear bag and than immerse to the water and try to measure the heat the fluid. And than you can measure the fluid from outside and compare the numbers. Just a suggestion.

0
bksahin
bksahin

Reply 11 months ago

Any chance you send me photos of your wiring?

0
drkoray
drkoray

Reply 11 months ago

Sorry. I have no additional photos and i can't disassemble the item.
If you have questions about the wiring i can try to answer.

0
MichaellQuinn
MichaellQuinn

Reply 1 year ago

I want to have same project, but i get this reply when I try to compile
"no matching function for call to 'Adafruit_SSD1306::Adafruit_SSD1306(int, int, TwoWire*, int)'" is there any idea?

0
nawelaissaoui
nawelaissaoui

Question 1 year ago on Step 4

Plese help me 🙏🙏
how come mine is showing Ambient = 1899.59*F Object = 1899.59*F ? What is wrong with this code ?

20201123_124639.jpg
0
pradeepkumaraslaf

Can u send me the cord to program the arduino
Im pradeep
Im from srilanka
Plz helpme

0
wwasantha
wwasantha

Reply 1 year ago

//MN Maker
//Laser Temp Gun
//10.6.19
#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
const int Laser_Pin=5; //Laser Pin
int buttonState = 0;
const int buttonPin = 2; // the number of the pushbutton pin
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
void setup() {
Serial.begin(9600);
Serial.println("Adafruit MLX90614 test");
pinMode(Laser_Pin,OUTPUT);
pinMode(buttonPin, INPUT);
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
display.clearDisplay();
display.setRotation(2);
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0, 35);
display.println("Initializing Temp");
display.display();
delay(250);
display.clearDisplay();
mlx.begin();
}
void loop() {
buttonState = digitalRead(buttonPin);
Serial.println(buttonState);
Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempC());
Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C");
Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF());
Serial.print("*F\tObject = "); Serial.print(mlx.readObjectTempF()); Serial.println("*F");
// check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
digitalWrite(Laser_Pin, HIGH);
display.clearDisplay();
display.setTextSize(2); //Size 2 means each pixel is 12 width and 16 high
display.setCursor(25, 10);
display.print(mlx.readObjectTempC());
display.setCursor(95, 10);
display.print("C");
display.setTextSize(2);
display.setCursor(25, 36);
display.print(mlx.readObjectTempF());
display.setCursor(95, 36);
display.print("F");
display.display();
} else {
// turn LED off:
digitalWrite(Laser_Pin, LOW);
display.clearDisplay();
display.setTextSize(2); //Size 2 means each pixel is 12 width and 16 high
display.setCursor(35, 10);
display.print("-----");
display.setCursor(105, 10);
display.print("");
display.setTextSize(2);
display.setCursor(35, 36);
display.print("-----");
display.setCursor(105, 36);
display.print("");
display.display();
}
Serial.println();
delay(500);
}

0
seulgg
seulgg

1 year ago

is it possible to make an enclosure to the infrared sensor so that it can be water proof?? like a thin transparent glass on the end ?..will it affect the measurement? or it will just pass through to measure the temperature? thanks alot

0
umeshyadhikari
umeshyadhikari

1 year ago

getting an error while compile i.e. "Error compiling for board Arduino Nano."
tried with selecting board as nano & uno

0
Parth Khant
Parth Khant

Question 1 year ago

Can u send me the code to program the Arduino?
Please Help me?

0
SonaliL1
SonaliL1

1 year ago

I have mlx 90614 senser instead of senser module, Can i use directly mlx 90614 senser in circuit or its requires any resistor combination

0
FerryG1
FerryG1

1 year ago

I can't find a suitable library, please help so I can find and download a compatible library

0
photoworkshops
photoworkshops

Question 1 year ago on Introduction

Hello, is it possible to have the temp reading go to bigger display i.e. tablet, tv etc?
thank you!

0
Medo13
Medo13

1 year ago

Thanks , very nice job
could you please provide the dimensions of 3d designs ? or the files ?

0
nlevine
nlevine

Question 1 year ago

Great project! This design has got me interested for a I am trying to make for a school project. Can you please explain how you arrived at your code?

0
siddiquinoor
siddiquinoor

2 years ago

Hello,
Thank you for a nice and useful project.
When I push the Momentary Button Switch, everything's fine but it displays 1037.56 and 1899.59. I move around and close to other object but it's remain the same. Moreover I don't understand how to get the actual Fahrenheit and Celsius value instead of 1037.56 and 1899.59. (I am testing using USB connector)