DIY: a 5 Minutes Contactless OLED Thermometer With Arduino and MLX90614

by Konstantin Dimitrov in Circuits > Arduino

25361 Views, 115 Favorites, 0 Comments

DIY: a 5 Minutes Contactless OLED Thermometer With Arduino and MLX90614

5772255850e1b69139000989.jpeg
PC280440.JPG

Hello, everyone ! Today I'm going to show you how to make a contactless OLED thermometer with Arduino UNO and Infrared temp sensor MLX90614 in 5 minutes. This project is very simple, it requires basic programming and electronic skills to make it.

Lets beging !

Materials for the Project

PC270380.JPG
P2160006.JPG
PC270381.JPG
PC270383.JPG

To make your IR thermometer, you will need:

  1. MLX90614 IR contactless thermometer
  2. Arduino UNO board
  3. 2 x Resistors by 4.7 k
  4. 1 x Capacitor by 0.1 uF(100 nF)
  5. A breadboard and 9 jumpers

Info About the Sensor

PC270378.JPG

Description:

Melexis' MLX90614ESF-BAA is an infrared thermometer designed for non-contact temperature sensing. An internal 17-bit ADC and a powerful DSP contribute to the MLX90614’s high accuracy and resolution. It has a huge number of applications including body temperature measurment and movement detection.

The MLX90614 provides two methods of output: PWM and SMBus (i.e. TWI, I2C). The 10-bit PWM output provides a resolution of 0.14°C, while the TWI interface has a resolution of 0.02°C. The MLX90614 is factory calibrated in wide temperature ranges: -40 to 85°C for the ambient temperature and -70 to 382.2°C for the object temperature. The measured value is the average temperature of all objects in the Field Of View of the sensor. The MLX90614 offers a standard accuracy of 0.5°C around room temperatures. This devices comes in an industry standard TO-39 package. We’re carrying the 3V version of this sensor.

Features:

  • Small size, low cost
  • Easy to integrate
  • Factory calibrated in wide temperature range:-40 to +85°C for sensor temperature -70 to +380°C for object temperature
  • SMBus compatible digital interface
  • Customizable PWM output for continuous reading
  • High accuracy of 0.5°C over wide temperature range (0 to +50°C for both Ta and To)
  • Measurement resolution of 0.02°C
  • Single and dual zone versions
  • Simple adaptation for 8 to 16V applications
  • Power saving mode
  • Different package options for applications and measurements versatility
  • Automotive grade

- SparkFun Electonics

Info About the OLED Display

PA130170.JPG

The one I use is produced by Waveshare. Its 1.3″ inch in size, features 128×64 pixels and uses the 4-wire Serial Peripheral Interface Bus. It is monochrome blue in color also it consumes 0.04 W of energy which is one tenth that is required to run traditional 16x2 LCD display.

The OLED could be modified (soldering required) to communicate with different Bus, like a I2C or a 3-wire SPI, by moving one of the two resistors which can be found on the back of the display board. They are marked with 0s, check the pic above.

Changing the Bus from a 4-wire SPI to a I2C or a 3-wire SPI:

I2C - move BS1 resistor on 1 but keep BS0 on 0 as it is.

3-wire SPI - BS1 must be 0 and BS0 on 1

Building the Thermometer

Schematic 1.bmp
PC280436.JPG

If your sensor is not on breakout board gonna need to pull-up the SDA and SCL pins of it, the put a capacitor between the GND and +3.3v pins. If its on breakout board then just connect the pins to the Arduino board, SDA with A5 and SCL with A4, GND to GND and +3.3 to 3.3v.

Then plug the OLED on the breadboard and connect the following pins together. DIN to pin 13; CLK to pin 11; CS to pin 10; D/C to pin 9 and RES to pin 8 with the rest of the jumpers. 13, 11, 10, 9 and 8 are the SPI Bus of Arduino UNO they are also the ICSP connector under the microcontroller.

Programming the Arduino

PC280439.JPG
PC280443.JPG

This step is easy, just download one of the two .INO files, named IR_OLED_Fahrenhait(measures in F) and IR_OLED_Celsius (measures in C), and open it with the Arduino IDE then upload the code to the Arduino board.

If you don't like the current font you can change it simply by editing the code. You can find all supported fonts here.

If you don't have Arduino IDE click here to download it. Then install it.

Libraries you will need: MLX90614 and u8glib, download the libraries and then unzip them at /Program Files(x86)/Arduino/Libraries (default).

You Are All Done, and Now You Have Your Own Contacless Thermometer

PC280436.JPG
PC280444.JPG
PC280440.JPG

Bitcoin tips: 1Bfgrq4dQSuRHuTdk5jzZPtnMZLymDQ5dv