IR thermometer, MLX90614
The MLX90614 on its GY-906 breakout reads the temperature of whatever it points at, without touching it. Aliases: GY-906, non-contact thermometer.
Behind the window a thermopile sees the infrared an object gives off, and a thermistor beside it measures the can (the ambient). The chip keeps both temperatures in RAM for an SMBus read.
Pins
| Pin | What it does |
|---|---|
VIN |
Supply, 3 V to 5 V on the GY-906. |
GND |
Ground. |
SCL |
SMBus (I2C) clock. |
SDA |
SMBus data. |
Properties
object is the temperature of what it points at, 36.6 C by default, and ambient
its own, 22 C.
While it runs
The first slider is the object's temperature and the second the ambient.
What the model gets right
From the MLX90614 datasheet:
The read. An SMBus "read word": the command, a repeated start, then the low byte, the high byte and a packet error code (a CRC-8 over the whole exchange). The model computes the code the datasheet's way, so a library that checks it is satisfied.
The registers. RAM 0x06 is the ambient and 0x07 the object, in fiftieths of a
kelvin: T = word x 0.02 - 273.15 C. 0x08, the second zone, answers with its error
flag set on this single-zone part.
The EEPROM. The emissivity at 0x24 (0xFFFF for 1.0) and the address at 0x2E read back, and a write with a correct code is stored; a wrong code is refused.
The ranges. The ambient -40 to 125 C and the object -70 to 380 C.
What it does not model
The emissivity's effect on the reading, the field of view (it sees only the object on the slider), the chip's filter and its settling time, sleep mode and the PWM output.
Libraries
Adafruit MLX90614 Library (Adafruit_MLX90614.h): mlx.begin(), then
mlx.readObjectTempC() and mlx.readAmbientTempC().
Common mistakes
Measuring something far away: a real sensor's 90 degree field of view takes in the whole room. Hold it a few centimeters off.
Another chip at 0x5A on the same bus, such as an MPR121.
See it in action
Fever thermometer reads a forehead and calls a fever over 38 C on an I2C LCD, with a beep. Open it at /templates.