MLX90614 SMBus Implementation in PIC MCU

This document presents the MLX90614 infrared thermometers SMBus communication in PIC microcontrollers. This document also describes the applications of the infrared thermometers, as well as typical circuit examples and an assembler and C example of the development tool used.

Scope

This application note describes how to implement SMBus communication with MLX90614 Infrared thermometers. Code is for Microchip’s PIC18. The example is MLX90614’s RAM reading. Software implementation of SMBus communication is used so the source code can be migrated for other families 8 bits PIC MCU with small changes. The development tools used are MPLAB IDE and MPSAM (Microchip Assembler) which are free to use and MCC18 (MPLAB C18 Compiler) for which an evaluation version is available from Microchip official website.

Applications

  • High precision non-contact temperature measurements;
  • Thermal Comfort sensor for Mobile Air Conditioning control system;
  • Temperature sensing element for residential, commercial and industrial building airconditioning;
  • Windshield defogging;
  • Automotive blind angle detection;
  • Industrial temperature control of moving parts;
  • Temperature control in printers and copiers;
  • Home appliances with temperature control;
  • Healthcare;
  • Livestock monitoring;
  • Movement detection;
  • Multiple zone temperature control – up to 100 sensors can be read via common 2 wires
  • Thermal relay/alert
  • Body temperature measurement

Explanation

The connection of MLX90614 to MCU is very simple. Two general-purpose pins RC3 and RC4 of the PIC18 are used. Two pull-up resistors R1 and R2 are connected to Vdd and to SCL and SDA lines respectively. C1 is the local power supply bypass decoupling capacitor. The MLX90614 needs that for bypassing of the on-chip digital circuitry switching noise.

C2 has the same function for the microcontroller. The well-known value 100 nF (SMD ceramic type) is typically adequate for these components. Note that the power supply typically needs more capacitors (like 100 µF on voltage regulator input and output), not shown in the schematic.

The components R1, C3, C4 and Y1 are used for the MCU oscillator. On-chip RC oscillators can also be used. For example, with a PIC18F4320 internal RC oscillator set to 8 MHz can be used without problem. SMBus is synchronous communication and therefore is not critical to timings. Refer to MLX90614 datasheets, AppNote, “SMBus communication with MLX90614” and SMBus standard for details. MLX90614 comes in 5V and 3V versions. PIC18LF4320 could be used with the 3V version (MLX90614Bxx) and both PIC18F4320 and PIC18LF4320 – with the 5V version (MLX90614Axx).