Introduction: Infrared Temperature Sensor - MLX90614
Infrared thermometers work based on a phenomenon called black body
radiation. Anything at a temperature above absolute zero has molecules inside of it moving around. The higher the temperature, the faster the molecules move. As they move, the molecules emit infrared radiation--a type of electromagnetic radiation below the visible spectrum of light. As they get hotter, they emit more infrared, and even start to emit visible light. That is why heated metal can glow red or even white. Infrared thermometers detect and measure this radiation.
From: https://sciencing.com/infrared-thermometers-work-...
For many reasons, sometimes I can't contact my temperature sensor (like DS18b20) with object, which temperature I want measure. I decided to buy this nice contactless temperature sensor - MLX90614, which measure 2 temperatures - ambient temperature and temperature of object on distance.
hh
Step 1: BOM
BOM:
1. Arduino Nano (or any Arduino or microcontoller)
http://s.click.aliexpress.com/e/bRXiRyXe
http://s.click.aliexpress.com/e/bmSC1jkc
2. USB cabel for Arduino Nano
http://s.click.aliexpress.com/e/boxIzdnS
3. MLX90614 sensor
http://s.click.aliexpress.com/e/ruxC0Yo
http://s.click.aliexpress.com/e/txgrvs4
4. Dupont cables & breadboard
http://s.click.aliexpress.com/e/cdjCfOkY cables
http://s.click.aliexpress.com/e/b1irnQOy breadboard
Step 2: MLX90614
Specification:
- -40°C...+125 °C for ambient temperature
-70°C...+380 ° C for object temperature. - High accuracy of 0.5°C in a wide temperature range (0°C...+50°C for both)
- Measurement resolution of 0.02°C
- I2C communication.
- High (medical) accuracy calibration
When measuring the temperature, please maintain a measuring distance of 1 cm!
I think, this is good sensor for sense temperature for hot things, like cooking food or chips on motherboards. Also, it is good for cold, like ice cream. No contact with food make healthily sensing. And still you can use sensor for measure ambient temperature for weather station.
Step 3: Circuit
Circuit is simple, as sensor use I2C communication.
Connect Vin to 3.3 Volts or 5 Volts.
Connect GND to GND of Arduino.
Connect SDA to A4 on Arduino.
Connect SCL to A5 on Arduino.
Step 4: Code
Code is simple.
First, you need Adafruit library (mls90614_knihovna.zip). Open library folder, and unzip it.
In setup function, with mlx.begin() you initialized sensor.
In loop function, I use Serial monitor, for read ambient temperature, you use mls.readAmbientTempC()
for Contactless mlx.readObjectTempC().
If you want temperatures in Fahrenheit, just replace "C" with "F":
mls.readAmbientTempF() and mls.readAmbientTempF()
#include <Wire.h>
#include <Adafruit_MLX90614.h>
mlx = Adafruit_MLX90614(); void setup() { Serial.begin(9600); mlx.begin(); } void loop() { Serial.println("Temperature from MLX90614:"); Serial.print("Ambient: "); Serial.print(mlx.readAmbientTempC()); Serial.println(" °C"); Serial.print("Contactless: "); Serial.print(mlx.readObjectTempC()); Serial.println(" °C"); Serial.println(); delay(1000); }
Step 5: Measure
I try to measure temperature of ice cream. You can see negative values of temperature. Important thing is, measure not too close and not far. Also check, if sensor point to object.