Despite being in an odd casing, the sensor is a lot like a simple sensor in a 'classic' integrated circuit shape. There are four pins. The datasheet has a diagram from the bottom view
of the sensor which is a little annoying to refer to when wiring so use this image above.
You can easily wire this sensor to any microcontroller, we'll be using an Arduino
This sensor uses a slightly non-standard type of I2C called "repeated-start". If you are not using an Arduino, make sure your microcontroller can support "repeated start I2C requests"!
Note the tab is how we will keep track of pins, in this wiring image, the tab is on the south side of the sensor, there's a red arrow pointing to it
- Connect GND to common power/data ground
Connect PWR to the power supply, for the 3V sensor this is about 3.3V. For the 5V version, use about 5VDC
- Connect the SDA pin to the I2C data SDA pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A4, on a Mega it is also known as digital 20 and on a Leonardo/Micro, digital 2
- Connect the SCL pin to the I2C clock SCL pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A5, on a Mega it is also known as digital 21 and on a Leonardo/Micro, digital 3
The MLX90614 has a fixed I2C address, you can only connect one
sensor per microcontroller!
To begin reading sensor data, you will need to download Adafruit_MLX90614 from our github repository
. You can do that by visiting the github repo and manually downloading or, easier, just click this button to download the zip
Rename the uncompressed folder Adafruit_MLX90614
and check that the Adafruit_MLX90614
folder contains Adafruit_MLX90614.cpp
Place the Adafruit_MLX90614
library folder your arduinosketchfolder/libraries/
You may need to create the libraries
subfolder if its your first library. Restart the IDE.
We also have a great tutorial on Arduino library installation at:http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use
Open up File->Examples->Adafruit_MLX90614->mlxtest
and upload to your Arduino wired up to the sensor
Now you can open up the serial console to see the ambient and object temperature printed out. Ambient temperature is the temperature of the sensor itself. The object temp is what its measuring in the 90-degree field of view.
Last updated on 2015-11-20 at 03.01.18 PM
Published on 2014-02-28 at 06.24.10 PM