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 !
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:
- SparkFun Electonics
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
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.
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).