Dual low noise, low offset, fully programmable amplifier chain
12 bit on-chip ADC
Powerful signal conditioning and linearisation unit
Multiple output options: 12 bit digital through SPI, 8 bit resolution analog linear signal outputs or
10 bit PWM, both for ambient and object temperature.
On-chip programmable digital moving average LPF for ultimate low noise performance
ISP I/O-configuration and analog settings, accessible by SPI serial interface.
Wide supply voltage range from 4.5V-80V
Applications
Thermopile + thermistor amplification chain
Digital or analog, linear, ambient-compensated IR sensor interface
General purpose programmable sensor amplifier/ signal conditioner
Ordering Information
Part No.Temperature Suffix PackageTemperature Range
MLX90313KDF-40C to 125C Automotive
Functional DiagramDescription
The MLX90313 is a versatile in-cir c uit
programmable interface, which performs signal
IR+
IR-
Tinp
Tinn
Supply Regulator
IR path
PGA
Thermistor
path
PGA
Digital Control Logic
Configuration eeprom
A/D
12Bit
A/D
12Bit
selector
output option
Linearisation unit
pwm
lin
non
lin
pwm
lin
non
lin
SPI
interface
IRout
Tempout
SPI
interface
conditioning, linearis a ti on and ambient
temperature compensation, particularly for
infrared sensors combined with a thermistor.
Other types of sensors can also be used in
various configurations. Sensors that can be used
include pressure sensors, strain gauges,
acceleration sensors etc.
The amplifier chains in MLX90313 are
programmable in very broad ranges of gain.
Both chains consist of high performance,
chopper-stabilized amplifiers, providing excellent
noise performance and low offset. The I/O
configuration as well as analo g sett ings ar e incircuit programmable by means of the SPI-serial
interface. This serial link can also be used to
read out the output signals digitally. The circuit
can either provide linear analog or PWM (Pulse
Width Modulated) signal outputs. Additional the
circuit can perform simple control applications
using on-board comparators
MLX90313 Programmable IR sensor InterfacePage 1Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
MLX90313 Electrical Specifications
DC Operating Parameters TA = -40oC to 125oC, VDD = 4.5V to 80V (unless otherwise specified)
ParameterSymbolTest ConditionsMinTypMaxUnit
Regulator and consumption
Supply voltage rangeVin1VDD1780V
Supply voltage rangeVinVDD4.555.5V
Supply currentIdd
Regulated supply voltageVregVDD, 10uF ext. cap4.755.3V
Regulated voltage temperature
coefficient
POR threshold voltageVpor1.11.31.5V
Band-gap reference
Analog ground voltageAgnd2.32.52.7V
Analog ground thermal coefficientTCbg1550
Reference current mirror load
drive voltage
IR-chain amplifier and output driver
Common mode input rangeCMIR-0.1Vdd-3V
Common mode rejection ratioCMRR
Power supply rejection ratioPSSR
Available gain settingsAir555500V/V
Gain tolerance
Amplifier offsetVoff4
Input referred white noiseVnirrms-value25
Chopper frequencyfc8KHz
Output voltage rangeIROUT0Vdd-
Output source currentIodIROUT1mA
Output sink currentIosIROUT20
DC Output impedance, driverodIROUT10
DC Output impedance, sinkrosIROUT100
Capacitive load IROUT pinCmaxIROUT50pF
Amplifier bandwidthBW500Hz
Temp-chain amplifier and output driver
Common mode input rangeCMIR0.1Vdd-3VV
TCvr-2.35
Vcref1.822.2V
δGir
@ Ta=25°C
f ≤ 100kHz
Rsens < 60kΩ *
f ≤ 100kHz
75dB
75dB
-6.5+6.5%
55.6mA
mV/°
µV/°
µV
nV/√Hz
V
0.2
µA
Ω
Ω
Common mode rejection ratioCMRR
Power supply rejection ratioPSSR
TINP bias currentItpbbias current enabled1/7.1iCref*
Available gain settingsAtemp140V/V
MLX90313 Programmable IR sensor InterfacePage 2Rev 1.0 21-July-2001
3901090313
f ≤ 100kHz
f ≤ 100kHz
75dB
75dB
MLX90313
Programmable IR Sensor Interface
ParameterSymbolTest ConditionsMinTypMaxUnit
Gain tolerance
Amplifier offsetVoff4
Input referred white noiseVntemprms-value400
Chopper frequencyfc8kHz
Output voltage rangeORtempTEMPOUT0Vdd-
Output source currentIodTEMPOUT1mA
Output sink currentIosTEMPOUT20uA
DC Output impedance, driverodTEMPOUT10
DC Output impedance, sinkrosTEMPOUT100
Capacitive load TEMPOUT pinCmaxTEMPOUT50pF
Amplifier bandwidthBW500Hz
Rel1 open drain relay driver
High voltage protection32V
output impedanceRo10
Comp1 comparator
Potentiometer input rangeIRiroutIROUT0100% of
ADC
Input stage gain2.9533.05V/V
δGtemp
bias current enabled-6.5+6.5%
µV
nV/√Hz
V
0.2
Ω
Ω
Ω
Vrefp
External Reference voltageVrefpex13.3V
Internal Reference voltageVrefp2.42.52.6V
Vrefp input leakage currentIlvrefp
Resolution12bit
Monotonicityguaranteed by design
Differential non-linearityDNL0.4LSB
Integral non-linearityINL½LSB
Gain errorfull scale1LSB
Total input-referred noiseVref=3V0.2LSB
DAC
Resolution8bit
Monotonicityguaranteed by design
Differential non-linearityDNL½LSB
Integral non-linearityINL½LSB
*Rsens is the impedance of the sensor connected between IRINP and IRINN for the IR-chain amplifier.
**Icref is the current flowing out of pin CREF
@150°C
5uA
MLX90313 Programmable IR sensor InterfacePage 3Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
General Description
The MLX90313 is a versatile in-circuit programmable interface, which performs signal conditioning,
linearisation and ambient temperature compensation, particularly for infrared sensors combined with a
thermistor. Other types of sensors can also be used in various configurations. Sensors that can be used
include pressure sensors, strain gauges, acceleration sensors etc.
The amplifier chains in MLX90313 are programmable in very broad ranges of gain, between 50 and
12000 for the IR-chain and between 1 and 120 for the Temp-chain. Both chains consist of high
performance, chopper-stabilized amplifiers, providing excellent noise performance and low offset. The I/O
configuration as well as analog settings are in-circuit programmable by means of the SPI-serial interface.
This serial link can also be used to read out the output signals digitally. The circuit can either provide
linear analog or PWM (Pulse Width Modulated) signal outputs, relative to an analog ground, or several
combinations of analog and digital comparator driven outputs. Two comparators controlled by either one
of the two linearised signals are available on chip with different possibilities for the threshold level, polarity
and switching hysteresis. One of the comparators drives the open drain output. The user can provide the
threshold for this comparator at the IROUT I/O pin with a simple potentiometer.
A bias current for the thermistor can be obtained at the TINP input by connecting an external resistor
between the CREF pin and VSS. The standard package is SOIC-20.
Unique Features
The MLX90313 integrates dual low noise programmable gain amplifier stages. Both thermistor and IR
signal path can be configured to suit a large number of components and applications. The onboard
analog to digital converter (ADC) combined with the digital linearisation unit results in linear output
signals. These output signals are available as analog or digital output signal. Applications requiring digital
temperature information can use single wire PWM output or SPI serial communication. The complete
configuration and calibration is in-system programmable through the SPI interface. Combination of all
these integrated features combined with a thermopile sensor make the MLX90313 a true high accuracy
automotive grade single-chip infrared thermometer.
Absolute Maximum Ratings
Supply Voltage, V
Supply Voltage, Vin (overvoltage)6V
Supply Voltage, V
Supply Voltage, Vin (operating)5.5V
Reverse Voltage Protection-5V
Supply Current, I
Output Current, I
Operating Temperature Range, T
Operating Temperature Range, T
ESD Susceptibility2 kV
Rel1 output impedance10 ohms
(overvoltage)80V
in1
(operating)16V
in1
DD
OUT
A
S
5.6 mA
3 mA
-40C to +125C
-55C to +150C
MLX90313 Programmable IR sensor InterfacePage 4Rev 1.0 21-July-2001
3901090313
Pin-out
MLX90313
Programmable IR Sensor Interface
VSS
1
2
3
4
5
6
7
8
9
1011
TINP
TINN
IRINP
IRINN
REL1
IROUT
SDIN
TOUT1
TOUT2CREF
20
19
18
17
16
15
14
13
12
TEMPOUT
CSB
SDOUT
SCLK
TSTCLK
VDD
VDD1
AGND
VREFP
PinSymbolDescription
1TINPTemp-chain amplifier positive input
2TINNTemp-chain amplifier negative input
3IRINPIR-chain am plif ier positi ve in put
4IRINNIR-chain amplifier negative input
5VSSSupply pin
6REL1Open-drain relay driver output
7IROUTIR-chain am plif ier output
8SDINSPI data input
9TOUT1Test pin/ Oscillator output
10TOUT2Test pin, leave open
11CREFBias current reference
12VREFPReference voltage input/output
13AGNDAnalog ground, band-gap reference voltage
14VDD1Automotive Ignition supply pin
15VDDRegulated supply pin
16TSTCLKClock for test mode; leave open
17SCLKSPI clock input
18SDOUTSPI data output
19CSBSPI chip select active low
20TEMPOUTTemp-chain amplifier output
MLX90313 Programmable IR sensor InterfacePage 5Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Pin Descriptions
TINP
Temperature sensor positive input pin. The pin connects to the temp-chain amplifier and the on-chip
biasing current source. The source is a mirrored version of the current running into CREF with
programmable ratio. The current source can be switched off for use of external current biasing.
TINN
Temperature sensor negative input.
IRINP - IRINN
Thermopile sensor input pins .
VSS: Supply pin
REL1
Open drain relay driver output. The typical on-resistance of this driver is <10Ω with a supply voltage of
VDD=5V. Different configurations are possible as shown below.
REL1
Vrefp
IROUT
External
potentiometer
VSS
Tambient or
Tobject
COMP
VSS
Hystere sis in
EEPROM
Tambient or
Tobject
COMP
Threshold in
EEPROM
Hystere sis in
EEPROM
REL1
VSS
The comparator is a 12 bit digital comparator. The input polarity can be inverted or not. The threshold and
hysteresis registers are 16 bit registers of which the 11 MSBs are used in the comparator circuitry.
The voltage on the IROUT pin is sampled with 8 bit ADC referred between VREFP and VSS pins.
Note. In case of potentiometer use the linearised analog output is not available. In this case the DAC is
used as 8-Bit ADC for potentiometer (or other voltage source) monitoring.
IROUT
IROUT/POTin analog/digital I/O pin. This pin can be configured as analog output of the IR sensor or as
input for an external potentiometer. (see pin description of REL1). As analog output, this pin can either be
connected to the analog amplified IR sensor signal or to the linearised object temperature by means of the
DAC. The driver can source at least 1mA and sink at least 20µA to/from an external load. If the capacitive
load on this pin exceeds 50pF, this load should be de-coupled by means of a series resistor. This pin can
be configured also as digital output to transmit the IR temperature in PWM format.
The pin is protected for over-voltage and can withstand 16V.
SDIN
Serial data input pin for the SPI. Data is accepted on the rising edge of the serial data clock (SCLK)
SDOUT
MLX90313 Programmable IR sensor InterfacePage 6Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Serial data output pin for the SPI. Data is valid on the rising edge of the serial data clock (SCLK)
SCLK
Serial data clock from the external master to be supplied to this pin. Maximum frequency = 125kHz.
CSB
Active low, chip select pin for the SPI. Communication is started on the falling edge of CS and ended on
the rising edge of CS.
TOUT1 - TOUT2:
Test pins. In normal mode, the internal clock signal of 1Mhz is present on TOUT1 and the clock of the
chopper amplifier is present on TOUT2.
CREF
Current reference output. CREF is the reference voltage output for the temperature independent current
source. The requirements for the resistor to be connected between CREF and VSS depend on the
required accuracy and range of the ambient temperature measurement. The voltage level at CREF
depends directly on the internal band-gap.
VREFP
Voltage reference I/O pin. This level is by default dependent on the on-chip band-gap reference source
and can be programmed in range 2-4.5V from eeprom . This voltage is used as reference for the DAC,
external applied potentiometer and 8-bit ADC. The chip can be configured to use an external reference
voltage instead of the on-chip reference.
The pin is protected from over-voltage and can withstand 16V
AGND
Analog ground reference pin. This voltage is derived from the on-chip band-gap and has a typical level of
2.5V for maximum output range of the amplifiers. When IROUT and/or TEMPOUT are connected directly
to the amplified analog signals, then these signals are referred to AGND. The regulator can be stopped
from the eeprom configuration register. In this case the pin can be used for external reference for the 12bit ADC.
The pin is protected from over voltage and can withstand 16V
VDD1
High voltage supply pin. This supply pin can be connected directly to an automotive ignition supply
voltage. The internal regulator can operate with voltages between 7V and 80V.
VDD
5V regulated supply pin. The 5V regulated voltage from the on-chip regulator is available on this pin. The
internal regulator can supply up to 20mA to external circuitry. VDD can also be used to supply the chip
directly with an external 5V regulated supp ly.
TEMPOUT
TEMPOUT analog output/Comparator output pin. This pin can be configured as analog output of the
MLX90313 Programmable IR sensor InterfacePage 7Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
temperature sensor or as output of the internal comparator circuit. As analog output, this pin can either be
connected to the analog amplified temperature sensor signal or to the linearised ambient temperature by
means of the DAC.
When used as comparator output, different configurations are possible as shown below.
analog options
Tam bie nt o r
Tobject
COMP
Thresho ld in
EEPROM
Hysteresis in
EEPROM
The driver can source at least 1mA and sink at least 20µA to an external load. If the capacitive load on
this pin exceeds 50pF, the load should be de-coupled by means of a series resistor. The pin is also output
for linearised Tambient in PWM mode. The pin is protected from over-voltage and can withstand 16V
Tempout
MLX90313 Programmable IR sensor InterfacePage 8Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Analog Section
Supply regulator and Power-ON Reset
The on-chip supply regulator and can be powered by an automotive ignition supply line (7V-80V). The
chip can withstand SAE standard ignition transients. The resulting voltage of the regulator is available on
VDD (5V±300mV). The VDD pin can source up to 20mA to external circuitry. The chip can also be
supplied directly with a 5V regulated supply on pin VDD.
The power-on reset (POR) circuitry is completely internal. The chip is fully operational 16ms from the time
the supply crosses 1.3V. The POR circuit will issue another POR if the supply voltage goes below 1.3V.
Band-gap, DAC and ADC references
The on-chip trimmable, curvature compensated band-gap circuitry provides a stable reference level (less
than 10ppm per °C) for several derived reference potentials used for normal operation in MLX90313.
The analog ground at the AGND pin is directly derived from this band-gap voltage. The output voltages
from both amplifier chains are relative to this potential. The AGND reference can be trimmed internally to
(2.5V±20mV). The regulator at AGND pin can be switched off to minimize the current consumption. The
pin can be also used as external input for the internal 12-bit ADC.
The reference voltages for ADC and DAC are also derived from the band-gap. The DAC reference is
available at pin VREFP. The MLX90313 DAC reference voltage can be programmed on chip to one of the
following values: 2, 2.5, 3, 3.5, 4 and 4.5 V. Depending on the customer application Melexis can program
the linearised analog outputs for object and ambient temperatures providing absolute voltage/temperature
dependence. The internal regulator for the DAC reference voltage can be switched off to minimize the
consumption (if linearised analog output is not in use) or to use externally supplied reference for DAC
reference in range 2 to 5V
The ADC reference is 2.5V typically. The chip can be also programmed to use external ADC reference
connected to pin AGND. The current reference bias voltage (present at CREF pin) is also derived from
the on-chip band-gap reference.
IR-amplifier chain
MLX90313 is available with gain settings for the IR-amplifier chain ranging from 55 to 5500. The gain can
be selected by setting the appropriate bits of the ‘Irgain1’-register (EEPROM address 00h) according to
the table below. Any gain between the abovementioned limits can be obtained within an accuracy of
±6.5%. The amplifier input-referred white noise level is below 23nVrms/√Hz. In the application with IRsensors, with output resistance of 50kΩ typical, the total system noise will however depend mainly on the
noise of the sensor and will rise up to 45nVrms/√Hz. The offset for the chopper stabilized amplifier path
can be largely calibrated out and amounts to maximum 4µV.
The common mode input range of the amplifier is –100mV to VDD - 3V. The output range of the amplifier
is 0V to VDD-0.2V. The output of the amplifier is referred to the potential on AGND.
IR chain gain settings
GGGGG
×××=
lpabprIR
stage
contr.
bits
setting
G
pr
GCI0GCI3GCI2GCI1GCI4GCI7GCI6GCI5
010
120*1112515
G
b
0XX50001.067
100100011.143
101150101.231
11020
G
pa
01
G
l
0111.333
1001.455
1011.600
1101.778
1112.000
MLX90313 Programmable IR sensor InterfacePage 9Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
* This option is available only if ENLN=1
The pin ENLN controls both the noise level and distortion of the amplifier. If ENLN=1 the noise of the
amplifier is 23nVrms/√Hz, the gain of 20 in first stage is available but the input signal must be less than 4
mV for less than 0.05% full scale distortion.
If ENLN is 0 then the span of the input signal can be ± 40mV with distortion less than 0.1% full scale. In
this case the noise floor of the amplification chain increases 3 times.
Temp-amplifier chain
MLX90313 is available with gain settings for the Temp-amplifier ranging from 5 to 50. The gain can be
selected by setting the appropriate bits of the ‘Temp gain and current control’-register (EEPROM address
02h) according to the table below. Any gain between the abovementioned limits can be obtained within an
accuracy of ±6.5%. It is also possible to completely bypass the temperature amplifier and force the input
signal directly to the ADC. The amplifier input-referred white noise level is below 400nVrms/√Hz.
The common mode input range of the amplifier is –100mV to VDD-3V. The output range of the amplifier is
0V to VDD-0.2V. The output of the amplifier is referred to the potential on AGND.
Temp chain gain settings
MGGG
××=
lprT
stage
contr.
bits
settin
g
Note: When the current mirror is on (all settings except IRSEL[2:0] = 000b) the gain is defined as follows:
G
where Vout is the output of the analog amplifier chain, Rsens is the resistance of the sensor connected between
TINP and TINN and Icref is the current out of CREF.
G
pr
GCT2GCT1GCT0GCT5GCT4GCT3
0001XXX
0115
100100101.2310102/7
101150111.3330113/7
11020
11125
Vout
=
T
IcrefRsens
⋅
G
l
0001.067000off
0011.1430011/7
1001.4551004/7
1011.6001015/7
1101.7781106/7
1112.0001111
M
IRSEL2IRSEL1IRSEL0
When the current mirror is off (IRSEL[2:0]=000b), M should be replaced by 1 and the gain is defined as follows:
Vout
G
=
T
where Vin is the voltage difference between TINP and TINN
If GCT[2:0]=0 then the temp chain will be completely off, the Timp pin will be connected directly to the ADC input,
providing Gain=1
Vin
Current Reference
The thermistor (or sensor) connected to TINP must be biased with a current source. This bias current is
mirrored from the current through the external resistor between CREF and VSS. The voltage maintained
at the CREF pin is derived from internal band-gap voltage, and thus constant. The typical value of the
voltage at CREF pin is 2V.
The current mirror ratio can be set between 1/7 and 1 according to the table for the Temp-chain gain
settings. The setting with IRSEL[2:0]=000b switches the current mirror off. In this case the thermistor
must be biased by external circuitry.
MLX90313 Programmable IR sensor InterfacePage 10Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Analog-to-Digital Converter (ADC)
MLX90313 contains a 12-bit internal analog to digital converter. Real 12 bit conversion is achieved by a
fully differential signal path of the converter. The input amplifier of the ADC has a fixed gain of 3.
Automatic calibratio n is implemented in the background, which al lo ws prec is e con vers i on in a ver y wide
temperature range. The ADC sampling rate is 7k samples/second. The reference voltage for the ADC is
normally a scaled version of the internal band-gap reference and is fixed to be 2.5V. Alternatively
MLX90313 can be configured to work with an external reference potential applied to the AGND pin. In
this case the appropriate bit in the configuration register (SELADREF bit in Confreg1) must be cleared.
Internal ADC can work with references down to 1 V keeping the 12-bit resolution.
The ADC contains an interface circuit to scale and offset the analog signals in order to make the most
efficient use of the available resolution. After amplification the IR and Temp sensor signals are referred to
AGND voltage level (typical value 2.5V). The additional offset is scaled version of the AGND.
The ADC interface circuit is given below. The output of the Temp-chain is amplified relative to the voltage
reference VrefT, which can be controlled with 2 bits (bit10 and bit9, EEPROM address 02h). The possible
values for VrefT can be calculated according to the equation:
KVAgnd
)63(4.1
VrefT
The typical values are 3.15, 3.20, 3.25 and 3.3V. If the temp path amplifier is bypassed then VrefT will be
fixed to: Agnd x 0.28 = 0.7V typical.
The output of the IR-chain is amplified relative to Refir and can be calculated according to the following
equation:
=
70
+××
, where K =0 to 3, corresponding to the value of the control bits.
KVAgnd
)34(4.1
Vrefir
The typical values (for Agnd=2.5V) are listed in the table below:
ADC interface setting
, Where K=0:31 depending on the selected value of Rsel[4:0]
MLX90313 Programmable IR sensor InterfacePage 11Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Config register 1: BYPTEMP
TINP pin
Temp-chain out
TINN pin
VReft
IR-chain out
x3ADC
VRefir
Vrefp
12
ADCx3
-Vrefp
Linearisation
Vrefp
12
-Vrefp
Irgain register: [RSEL4:RSEL0]
Unit
ADC reference configuration
Digital-to-Analog Converter (DAC)
A 8 bit digital to analog converter can be used to output the data for the linearised Tobject- and Tambient
signals. The DAC can work with a internal programmable reference voltage, as well as with an external
one. In case the internal reference voltage is used, this voltage can be monitored on the VREFP pin. If
one wants to use his own reference voltage, this can be done by applying this voltage to the VREFP pin,
and setting the appropriate configuration bit.
The result from D/A conversion is stored on hold capacitors and buffered. The signals are available at
IROUT and TEMPOUT respectively, if the appropriate bits are set in the configuration register (EEPROM
address 04h).
The reference value for the D/A can be programmed with 3 bits: SELDR[2:0] (register Irgain2) according
to the table below:
SELDR2SELDR1SELDR0ENDREFDIVVREFP
00002
00102.5
01003
01113.5
10014
10114.5
For reference voltages higher than 3V the ENDREFDIV bit must be set. In this case the ASIC will divide
internally the reference by 2 to provide proper input common mode for the output buffer amplifiers at pins
IROUT and TEMPOUT. In this case the result of the D/A conversion result will be amplified times 2 by the
output amplifiers, which will ensure the requested signal swing.
Melexis can rescale the DAC reference and eeprom table for the linearisation unit to provide absolute
analog output. This way, at maximum calibrated temperature, the voltage of IROUT or TEMPOUT pin will
always correspond to the requested D/A reference voltage.
The regulator for the VREFP voltage can be stopped and an external reference voltage can be forced and
used from the D/A. The regulator for DAC reference voltage can also be stopped (bit ENDACREF=0)
when DAC is not in use. This will save some supply current.
MLX90313 Programmable IR sensor InterfacePage 12Rev 1.0 21-July-2001
3901090313
SELDR(2:0)
MLX90313
Programmable IR Sensor Interface
AGND
ENDREFDIV
DAC
IRoutTout
VREFP
DACREF
IRout, Tout
ENDREFDIV
DAC configuration
Output drivers
The IROUT and TEMPOUT outputs can be connected to various signals available: The amplified analog
signals (IRINP-IRINN and TINP-TINN), the linearised object respectively ambient temperature signals, or
to the comparator circuitry. The IROUT and TEMPOUT pin drivers can source 1mA and sink 20µA and
are reverse voltage protected down to –5V relative to VSS. The available configurations are described in
table below.
Input/Output Setting
I/O pinIROUTTEMPOUT
Control
IROUTC[1:0]ConfigurationTOUTC[1:0]Configuration
Bits
00bIR-c hain out00bTemp-chain out
Setting
01bLinear Tobject01bLinear Tambient
10bThreshold Rel1 input10bComp1 out
11bPWM out11bPWM out
REL1 is an open drain relay driver output controlled by the on-chip comparator circuitry. The available
configurations are described in the section on the comparator circuitry.
MLX90313 Programmable IR sensor InterfacePage 13Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Digital Section
The digital unit on board of MLX90313 realizes all functions for control, configuration, measurements and
linearisation. It contains several registers, ALU and control logic. All functions of the ASIC are hardware
fixed and controlled by different state machines, which execute in sequence all procedures necessary for
normal chip operation.
Internal registers overview
The table below contains all internal registers, their addresses for access via SPI serial interface and short
functional description. Depending on their function they can be divided in 3 groups:
•Control registers: they keep the configuration of the chip including all gain settings of the amplifiers,
analog ground level, band-gap and oscillator trimming data, etc. All this data is stored in eeprom and
after POR the system loads it in the corresponding peripheral registers.
•Data registers: they keep all data for offsets, results from measurements and linearisation of both
chains. This registers can be read vis spi in normal mode and are write accessible during test mode.
•Computation registers. These registers support the computation unit and keep all temporary data
necessary for digital low pas filtering, linearisation and comparator functions. They are not accessible
via SPI in normal mode.
Internal Register Table.
Register
IRGAIN1
IRGAIN2
TEMPGAIN
CONFREG1
CONFREG2
OSCILLATOR
BGCONTROL
LPF
ADCREG
IROUT
TOUT
IRDATA
TDATA
IROS
TOS
MAINSTM
TEST
REG TEMP
REG A
REG B
TESTCTRL 1
REG C
REG E
TESTCTRL 2
WP
Function
IR-chain settings000hTest modeNo
IR-chain settings101hTest modeNo
Temp-chain settings202hTest modeNo
Configuration303hTest modeAlways
Configuration404hTest modeAlways
Oscillator505hTest modeNo
Bandgap control606hTest modeNo
Low Pass Filter707hTest modeNo
ADC output data808hTest modeAlways
Tobject (lin)909hTest modeAlways
Tambient (lin)100AhTest modeAlways
IR-chain output110BhTest modeAlways
Temp-chain output120ChTest modeAlways
IR-chain offset130DhTest modeAlways
Temp-chain offset140EhT est m odeAlwa ys
Main state machine150FhTest modeNo
Test mode control1610hAlwaysNo
Temporary register for testTest modeNo
Accumulator ATest modeNo
Accumulator BTest modeNo
Test control2014hTest modeNo
Accumulator CTest modeNo
Accumulator ETestmodeNo
ADC test control2317hTest modeNo
Eeprom write protect
AddressAccess via spi
DecHexWriteRead
2431
18h1Fh
AlwaysNo
MLX90313 Programmable IR sensor InterfacePage 14Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Configuration and control registers overview and bit functions as they are read from the module
Read access: No. The data is accessible for read via SPI only from eeprom address 00h.
Write access: Directly to the register in test mode. To eeprom if WP-register is correctly set.
IRGAIN1 bit functions
NamePORvalFunction
ENDREFDIVX
1Divide the reference for the DAC and enable output amplification by 2 of
the To and Ta outputs. Must be set for Vref=3.5V,4V,4.5V.
ENDACX1Enable the DAC regulator
ENLINX1Enable low noise.
GCI[7:0]
X
0000000011111111
Control the gain of the IR amplifier chain (see ‘IR amplifier chain’)
IRGAIN2
Read access: No. The data is accessible for read via SPI only from eeprom address 01h.
Write access: Directly to internal register in test mode. To EEprom if WP-register is correctly set.
IRGAIN2 bit functions
BitPORvalFunction
AGNDC [3:0]
SELDR [2:0]
X0000-1111Reserved
XAdjustment of the DAC reference.
X
MLX90313 Programmable IR sensor InterfacePage 15Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
IRGAIN2 bit functions
BitPORvalFunction
X
X
RSEL[3:0]X
TEMPGAIN
Read access: No. The data is accessible for read via SPI only from eeprom address 02h.
Write access: Directly to internal register in test mode. To EEprom if WP-register is correctly set.
TEMPGAIN bit functions
BitPORvalFunction
TRSEL[1:0]
IRSEL[2:0]
GCT[5:0]
X
X
X
100Vref = 4V
101Vref = 4.5V
0000-1111Select the value of the analog ground for IR signal path.The bits are
5, RSEL4 is in LPF register (see ‘ADC’ part)
00-11Reference voltage for Tambient measurement at ADC interface
input.
000-111Current mirror ratio: See under M in table ‘Temp chain gain settings’
in the section on the Temp-amplifier chain (analog features)
000000111111
Temp-gain: See table ‘Temp-chain gain settings’ in the section on
the temp-amplifier chain (analog features)
CONFREG1
Read access: Directly from internal registers or EEprom.
Write access: Directly to internal register in test mode. To EEprom if WP-register is correctly set.
CONFREG1 bit functions
BitPORvalFunction
Fatal Error
X
ENVR
HVSUP11Enable the regulator for battery supply. NOTE!!! After POR this regulator will be
POTMET
COMP1V
BYPTEMP
REL1V
REL1P
EEWREN01Enables write access in EEPROM *write protect
TESTMODE01Indicates chip is in test mode *write protect
*control bits EEWREN and TESTMODE are write protected. Their values can be set only with writing the
appropriate data in ‘Test’ and ‘WP’ registers. These bits are flags which indicate the system operation
X
X
X
X
X
X
1Flags Multiple eeprom failure. Hamming coding can detect and correct only one bit
per address. Bit will be cleared when going in test mode,disabling EEPROM
protection and returning in normal mode.( for diagnostics only)
1Stops the internal reference for DAC (Pin VREF). The reference voltage can be
supplied externally. If ENDAC=0 then VREF is input.
always on. It can be stopped from EEPROM data.
0External supply of ADC reference to AGND pin.SELADREFX
1Enable the internal ADC reference (connected to AGND pin).
0Sets threshold level for Rel1 to THRel1 in EEprom (address 75h)
1Sets potentiometer input (pin IROUT) as threshold level
0Sets Tobject as target voltage for comparator Comp1
1Sets Tambient as target voltage for comparator Comp1
0Sets polarity of Comp1: InvertingCOMP1PX
1Sets polarity of Comp1: Non-inverting
0Output of Temp amplifier path is connected to ADC
1Connects TINP-TINN directly to the ADC, bypassing the Temp-chain
0Sets Tobject as target voltage for Rel1
1Sets Tambient as target voltage for Rel1
0Sets polarity of Rel1: Inverting
1Sets polarity of Rel1: Non-inverting
MLX90313 Programmable IR sensor InterfacePage 16Rev 1.0 21-July-2001
3901090313
mode.
CONFREG0
CONFREG0 bit functions
BitPORvalFunction
IROUTC[1:0]
TOUTC[1.0]
TIMEOS[3:0]
00bIROUT pin function: IR-chain out
01bIROUT pin function: Linear Tobject
10bIROUT pin function: Threshold Rel1 input
11bIROUT pin function: PWM out
00bTEMPOUT pin function: Temp-chain out
01bTEMPOUT pin function: Linear Tambient
10bTEMPOUT pin function: Comp1 out
11bTEMPOUT pin function: PWM out
02nd order derivative of thermistor function is positive (used if NTC=0)SUBINC
12nd order derivative of thermistor function is negative (used if NTC=0)
02nd order derivative of thermistor function is positive (used if NTC=1)SUBDEC
12nd order derivative of thermistor function is negative (used if NTC=1)
0Used thermistor is PTCNTC
1Used thermistor is NTC
0000Offset calibration interval: 0'00"
0001Offset calibration interval: 0'02"
0010Offset calibration interval: 0'17"
0011Offset calibration interval: 0'19"
0100Offset calibration interval: 1'07"
0101Offset calibration interval: 1'09"
0110Offset calibration interval: 1'24"
0111Offset calibration interval: 1'26"
1000Offset calibration interval: 2'14"
1001Offset calibration interval: 2'16"
1010Offset calibration interval: 2'31"
1011Offset calibration interval: 2'33"
1100Offset calibration interval: 3'21"
1101Offset calibration interval: 3'23"
1110Offset calibration interval: 3'38"
1111Offset calibration interval: 3'40"
MLX90313
Programmable IR Sensor Interface
OSCCTRL
Read access: No. The data is accessible for read via SPI only from eeprom address 05h.
Write access: Only in test mode for both writing directly to internal registers and writing to Eeprom if WP
register is correctly set.
BGO: Reserved
Read access: No. The data is accessible for read via SPI only from eeprom address 06h.
Write access: Only in test mode for both writing directly to internal registers and writing to Eeprom if the
WP register is correctly set.
LPF
Read access: No. The data is accessible for read via SPI only from eeprom address 07h.
MLX90313 Programmable IR sensor InterfacePage 17Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Write access: Only in test mode for both writing directly to internal registers and writing to Eeprom if the
WP register is correctly set.
This register keeps the calibration data for the time constants of digital low pass filters of both channels
(see section Linearisation Unit).
LPF bit functions
BitPORValFunction
RSEL40Refer to ADC interface setting
0Enable offset measurement of both IR & Temp channels.ENOSMB
1Disable offset measurement of both IR &Temp channels.
0Reserved for future development. Reset it for all applications.ENTAV
1Reserved for future development. Reset it for all applications.
IROS*
LPFIR[2:0]
LPFT[2:0]
0
1Number of averaged offset measurements for IR chain: 1024
0Number of averaged offset measurements for Temp chain: 512TOS*
1Number of averaged offset measurements for Temp chain: 1024
Number of averaged points for IR measurement
00b64
01b128
10b256
11b512
100b
Number of averaged points for Temp measurement
00b64
01b128
10b256
11b512
100b1024
Number of averaged offset measurements for IR chain: 512
1024
ADCREG
Read access: Directly via SPI in all modes.
Write access: Directly to internal register in test mode.
This register keeps the result from last analog to digital conversion..
IROUT
Read access: Directly from internal register.
Write access: Directly to internal register in test mode.
This register keeps the linearised object temperature. (Tobject)
Register format:
Bit1514131211109876543210
NameD11D10D9D8D7D6D5D4D3D2D1D0OVHOVLFERes
D11..D0 : 12 bit temperature data
OVH:Overflow flag for Tambient measurement, Ta>Tamax, D[11:0] set to FFFh
OVL:Underflow flag for Tambient measurement, Ta<Tamin, D[11:0] set to 000h
FE:Fatal Error in eeprom.
ResNot used, always zero.
MLX90313 Programmable IR sensor InterfacePage 18Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Note that the last 4 bits are the status register.
TOUT
Read access: Directly from internal register.
Write access: Directly to internal register in test mode.
This register keeps the linearised ambient temperature. (Tambient)
Register format:
Bit1514131211109876543210
NameD11D10D9D8D7D6D5D4D3D2D1D0OVHOVLFERes
D11..D0 : 12 bit temperature data
OVH:Overflow flag for Tambient measurement, Ta>Tamax, D[11:0] set to FFFh
OVL:Underflow flag for Tambient measurement, Ta<Tamin, D[11:0] set to 000h
FE:Fatal Error in eeprom.
ResNot used, always zero.
Note that the last 4 bits are the status register. These bits are identical to the last 4 bits of the IROUT
register.
IRDATA
Read access: Directly from internal register.
Write access: Directly to internal register in test mode.
This register keeps the measured IR data, compensated with the current offset of the amplifier (stored in
Iros register).
TDATA
Read access: Directly from internal register.
Write access: Directly to internal register in test mode.
This register keeps the measured Temp data, compensated with the current offset of the Temp amplifier
(stored in Tos register).
IROS
Read access: Directly from internal register.
Write access: Directly to internal register in test mode.
This register keeps the offset of the IR amplifier. Each measurement from IR amplifier will be
compensated with this offset.
TOS
Read access: Directly from internal register.
Write access: Directly to internal register in test mode.
This register keeps the offset of the Temp amplifier. Each measurement from Temp amplifier will be
compensated with this offset.
MLX90313 Programmable IR sensor InterfacePage 19Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
MAINSTM: Reserved
Read access: No
Write access: Directly to internal register in test mode
TEST
Read access: No.
Write access: Directly to internal register.
This register determines the chip mode. It is cleared after POR which corresponds to normal mode.
Writing the proper data in this register will put the chip in test mode which will be indicated with bit ‘Test’
from confreg0.
Test register
BitPORvalFunction
B[15:9]0000000b
B[8:0]000000000bX
1011001bForces chip in test mode
any otherNormal mode (default)
WP
Read access: No.
Write access: Directly to internal register via SPI.
The register controls the write access to the eeprom. After POR this register is cleared and the eeprom is
protected, no write access available. Writing the proper data in this register will remove the write
protection of the eeprom and bit EEWREN (bit 1 in Confreg1) will be set.
* The addresses 00-07h and 79-7Fh will be still protected. Write access here requires also ‘Test mode’.
1100101bEnables write access to Eeprom*
any otherSets EEprom write protect
MLX90313 Programmable IR sensor InterfacePage 20Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Eeprom Description
MLX90313 contains 128 x 16 EEPROM memory. The memory can be accessed through the serial
interface. The 11 most significant bits are data bits and the 5 less significant bits are control bits used for
the Error Check and Correction system (ECC). After POR the ASIC reads the full eeprom contents,
checks it and corrects the single errors (1 wrong bit per address). If higher order error is discovered then
the bit ‘fatal error’ will be set (see Confreg1 description in previous section).
The memory has two levels of protection. After POR the write access to the eeprom will be disabled. The
external unit can remove this level of protection writing proper data in WP register. In this case all
addresses in range 08-77h will be available for write access. The first and last 8 addresses will still be
disabled. The write access to these cells is available only if the write protection is removed and the chip is
in test mode.
*WP: Write access to EEprom is controlled by the content of the internal register WP
**Test mode: Write access controlled by the internal register WP and only available in test mode
Look up table
linearisation.
Threshold for comparator
Comp1
Hysteresis for comparator
Comp1
Threshold for comparator
of Rel1
Hysteresis for comparator
of Rel1
AddressWrite access
DecHex
8-11108h-6FhWP*
11573hWP
11674hWP
11775hWP
11876hWP
The last 8 addresses 0x78 to 0x7F are free to use for the user. They can hold some calibration data or
identification number. All data programmed into the eeprom must pass the error checking. Therefore, one
must add 5 hamming bits to the eeprom data, in the 5 least significant bits.
MLX90313 Programmable IR sensor InterfacePage 21Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Eeprom bit definitions
Following table gives the bit definitions for all addresses that can be modified by the user. All other
addresses contain specific calibration data and should be left unchanged.
Note that some bits marked “RES” are reserved and should never not be changed by the user. If other
bits in such an address must be changed, read original contents first to get the status of the reserved bits.
All addresses in the eeprom are coded using hamming code. Therefore, if one wants to program data into
any eeprom address, the hamming bits must be calculated first. This is not done by the
There are 11 bits + 4 hamming bits + 1 extra redundant bit in the eeprom. Data bits are numbered
D10..D0, Hamming H4..H1, the extra bit is called K.
The bit definitions in the eeprom words are:
Pos1514131211109876543210
nameD10D9D8D7D6D5D4D3D2D1D0KH4H3H2H1
The hamming bits are calculated as follows:
H1 = P(D0,D1,D3,D4,D6,D8,D10)
MLX90313 Programmable IR sensor InterfacePage 22Rev 1.0 21-July-2001
3901090313
The extra K bit is calculated as:
K = P(D10,D9,D8,D7,D6,D5,D4,D3,D2,D1,D0,H4,H3,H2,H1)
Note :P is parity over the noted data bits. Parity is 1 if the number of ones is odd.
When reading eeprom addresses, the numerical value can be found by simply dividing the returned data
by 32.
MLX90313 Programmable IR sensor InterfacePage 23Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
90313 Algorithm
The algorithm of the ASIC is divided in several operations: ECC, initialization, offset measurement, object
and ambient measurement and offset cancellation, linearisation, comparator functions. Each of this
operation is controlled from the main state machine. The sequence and control of all these state machines
is controlled from main state machine. The normal flow of the procedure is show on the diagram below.
POR
ECC
Initialization
Offset calibration
Measurement
Temp. linearisation
IR. linearisation
Comp & Relay
TRUE
Main state machine control flow
Recalibration
FALSE
MLX90313 Programmable IR sensor InterfacePage 24Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Error Check and Correction (ECC)
The ASIC starts this procedure only after Power On Reset. The state machine reads all data in the
eeprom and corrects all single errors (1 wrong bit per address) if necessary. The wrong information from
the eeprom will be refreshed with correct one. In case of double error (2 wrong bits per address) which
can only be detected, not corrected, the system will leave the data in the address and will set the flag
‘Fatal error’ (bit 1 in status register). This data is available through SPI or PWM.
Initialization
At this step the system reads its configuration from the eeprom. All data from eeprom addresses 00-07h
will be filled in the corresponding peripheral registers. After this step the ASIC is ready for normal
operation.
Offset measurement (offset drift compensation)
The offset measurement is run periodically from the main state machine. The customer can select one of
16 possible interval times for offset measurement (see ‘CONFREG0 bit functions’). Depending on the
selected values for bits IROS and TOS in LPF register (address 07h in EEPROM) the average of 512 or
1024 measurements is stored. The time this measurement takes is about 75ms or 150ms, depending on
the number of measurements taken. Note that during this time the outputs are kept on their last value
before calibration started, so the current temperature is not available during offset calibration. The
measured offset results will be stored in IROS (for IR amplifier chain) and TOS (for Temp amplifier chain)
registers.
Measurement and offset cancellation
The results from analog to digital conversion for both channels will be the mean of custom defined number
of measurements, controlled from the LPF register (address 07 in eeprom). This data will be compensated
with corresponding offsets, stored in IROS and TOS registers and final offset free data will be stored in
IRDATA (for IR amplifier chain) and TDATA (for Temp amplifier chain) registers. The number of
measurements of which the averaging is taken can vary between 64 and 1024 (see ‘LPF register bit
functions’) and can be selected independently for both channels.
Linearisation
Linearisation proceeds in two steps and can be described by the picture below. In the first step the
ambient temperature is calculated from the measured signal at TINP-TINN. The system outputs a digital
value for the ambient temperature based on the calibration data. The value is stored in a dedicated
register and from there available for the DAC and PWM (Tambient-register, address 0Ah). The register
can also be read digitally by means of the SPI.
The system is developed to support different temperature sensors. 3 bits in the configuration register
(EEprom address 03h), determine the type of characteristic. NTC defines the first derivative of the
temperature sensor (NTC-type is logical 1, PTC-type is logical 0). SUBDEC and INCDEC define the
2
second derivative of the temperature sensor (
The result of the linearisation is stored as the 12 MSB’s of the Tambient-register (or TOUT-register). The
code 000h will correspond to Tamin, FFFh will correspond to Tamax. These two limits are determined by
calibration. Accordingly the output resolution will be
VRthd
dT
).
2
TaTa
minmax
−
in K per LSB
4096
In the second step the value of the ambient temperature is combined with the measured signal at IRINPIRINN to obtain a calculated value for the so-called object temperature, based on the calibration data. The
value is stored in a dedicated register and from there available for the DAC and PWM (Tobject-register,
address 09h). The register can also be read digitally by means of the SPI.
The result of the linearisation is stored as the 12 MSB’s of the Tobject-register (or IROUT-register). The
MLX90313 Programmable IR sensor InterfacePage 25Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
code 000h will correspond to Tomin, FFFh will correspond to Tomax. These two limits are determined by
ToTo
minmax
calibration. Accordingly the output resolution will be
−
4096
in K per LSB.
Linearised output
Irout=A.To+B
To [degC]
Linearised output
Tempout=A.To+B
Irout
Vir
The rm opile C haract e r is tic
Signal [V]
The rm isto r ch arac te ris tic
Vir=f(To, Ta)
Ta
To [degC]
R=f(T a)
Irout [V]
Lin.
Unit
R
R(T)/Ro
Tempout[V]
Ta [degC]
Ta[degC]
Tempout
When reading the linearised data digitally by means of the SPI, a 16-bit word is returned. The 12 MSB’s
contain the temperature value as described above, the 4 LSB’s form a status register, which is the same
for both the IROUT address and the TOUT. The meaning of the individual bits is explained in the table
below.
Linearisation Status Register
S[3:0]Meaning
1 X X X Overflow flag for Tambient measurement, Ta>Tamax, TOUT[15:4] set to FFFh
X 1 X X Underflow flag for Tambient measurement, Ta<Tamin, TOUT[15:4] set to 000h
X X 1 X Flag for Fatal Error in eeprom *
X X X 0 Not used, al ways zero
*Fatal Error is the uncorrectable error in EEPROM (more than 2 wrong bits per address). When this error
occurs, the normal process flow does not change, but the results may go wrong.
.
The status register is particularly important when an overflow (or underflow) condition occurs for the Tameasurement. If the overflow condition occurs IROUT register will be set to FFFh, if underflow - IROUT
wil be 000h. If the user selects to monitor the analogue output through the DAC, then care must be taken
to ensure that Tambient will never exceed the selected range, as the over- or underflow condition is not
flagged.
Comparators and relay output
MLX90313 contains two programmable 12 bit digital comparators. For each circuit the target signal, the
threshold and hysteresis can be programmed in different configurations, according to the table below. The
principle of operation is shown in the following schematics. The threshold and hysteresis values are
stored in eeprom, the control bits are part of the configuration register. The REL1 comparator threshold
can be either read from EEPROM (address 75h) or controlled by an external potentiometer connected to
IROUT. Note that the threshold and hysteresis registers in eeprom are only 11 bits wide. Therefore a zero
is added in the LSB position to the threshold and hysteresis registers, making this register also 12 bits.
MLX90313 Programmable IR sensor InterfacePage 26Rev 1.0 21-July-2001
3901090313
Comp1 circuitry setting
Comp1 source signalComp1 Polarity
Control BitCOMP1VCOMP1P
Setting
0Tobject0Inverting
1Tambient1Non-inverting
MLX90313
Programmable IR Sensor Interface
Linearised
T
ambient
Linearised
T
object
Threshold
address:73h
12
12
12 bit
2/1 MUX
COMP1V
12
COMP1P
11+1
analog
options
12 bit
digital
comparator
Hysteresis
address:74h
Comparator1 (COMP1) Configuration diagram
Note that the threshold for COMP1, is always in eeprom address 0x73.
0Tobject0[75h]0Inverting
1Tambient1IRDATA [03h]1Non-inverti ng
Tempout
12
12
12
11+1
12 bit
2/1 MUX
REL1V
12 bit
2/1 MUX
POTMET
12
REL1P
12
12 bit
digital
comparator
Hysteresis
address:76h
REL1
IROUT
ADC
4LSB 0000
8
Linearised
T
ambient
Linearised
T
object
IRDATA
register
Threshold
address:75h
Comparator2 (REL1 pin) Configuration diagram
After the temperature data is updated in TOUT and IROUT registers (the current Ta&To are calculated)
the main state machine will enable the comparator functions of the chip if one of them is enabled.
Threshold data for both outputs is stored in addresses 73h (for Comp1) and 74h (for Rel1) in eeprom.
MLX90313 Programmable IR sensor InterfacePage 27Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
The threshold data can be calculated by the formula:
TTthr
min
Threshold value =
−
TT
−
where: Tthr is the target temperature for the comparator
Tmin, Tmax are the minimum and maximum temperature under calibration.
The hysteresis value can be calculated by following formula:
Hysteresis value =
Thys
TT
minmax×−
where: Thys is the desired hysteresis in deg C.
Tmin, Tmax are the minimum and maximum temperature under calibration
Both formulas are valid for ambient and IR temperatures. The data for hysteresis must be stored at
addresses 74h (for Comp1) and 76h (for Rel1) after adding the hamming bits in the 5 least significant bit
places. Refer to Hamming Coding in eeprom description section for details.
2048
×
.
minmax
2048
Pulse Width Modulation
The PWM signal has a period of 102.4ms typical consisting of 2048 clock cycles of 50µs. Every frame
starts with a leading buffer time, t
, during which the signal is always high, as shown in the figure below.
1
The leading buffer time is followed by a slot for the useful data signal, t2 and t3, where the ration t2/(t2+t3)
is the representation of the output value. t4 is a slot for signaling of special conditions, such as out of
range measurement of the sensor temperature, Tambient and the occurrence of a fatal EEprom error, i.e.
an error that can no longer be corrected automatically by the ECC circuitry of MLX90313.
Error signaling band
ConditionDuty cyclenominal timing
OVH: Tambient overflow68.75 %70.4 ms
OVL: Tambient underflow75 %76.8 ms
FE: Fatal Error EEprom81.25%83.2 ms
t4:Error Signaling Band
Valid Data Output Band
OVH
OVL
output signal
t
1
t2+t
3
FE
t
5
time
1
T
8
5
11
16
12
T
T
16
T
8
13
16
7
T
T
8
T0
Serial Interface
Protocol
The digital interface implemented in MLX90313 is SPI compatible. It can be used to access the on-chip
EEPROM and all internal registers. The chip will always work as a slave device. The format of any
MLX90313 Programmable IR sensor InterfacePage 28Rev 1.0 21-July-2001
3901090313
MLX90313
X
A0A1A
X
Programmable IR Sensor Interface
command is always 32 bits: 8 bits for the operation code, 8 bits for the address and 16 bits of data. The
communication protocol is presented below.
CS
SCLK
SDI
SDO
write command
CS
SCLK
SDI
SDO
read command
Every write command starts with a high to low transition of CS and ends by a low to high transition of CS
after 32 periods of the serial data clock (SCLK). MLX90313 reads the data present on SDI on the rising
edge of the clock. With a delay of 8 periods of the serial clock, the SPI will repeat the opcode, address
and the first 8 bits of data on pin SDO. This allows the external master to check command and address
and terminate the operation in case of an error by forcing CS high before the end of the complete
command cycle, i.e. before the end of the 32 clock periods.
The read command is build up similarly, except that no data has to be passed of course. On SDO the
opcode will be followed direct l y by the requested data, the address is not returned in this case.
The data on SDO is valid on the rising edge of the clock. In case of a read command, the SPI output will
be valid on SDO starting on the 17
th
rising edge of the clock (after CS low) as indicated in the figure
above.
Timing/speed
The bit-rate depends on the serial data clock (SCLK) supplied by the master controller and is limited to
125kb/s. The timing requirements are given in the figure and table below
tsclktclstsch
CS
SCLK
tsuthd
SDI
tdv
SDO
SPI timing requirements
SymbolParameterValueUnit
tsclkSclk pe riodmin 8
µs
tclsCS low to SCLK highmin 50ns
tschSCLK low to CS highmin 50ns
tsudata in setup tim emin 200ns
thddata in hold timemin 200ns
MLX90313 Programmable IR sensor InterfacePage 29Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
tdvdata out vali dmin 1
operation codes
The operation code is the first series of 8bits in a command, C[7:0] in the figure on the protocol above.
Below table summarizes the operations available in MLX90313.
Operation Codes
mnem.C[7:0]Command
WR
RD
WEPR
ER
REPR
BLWR
BLER
MLX90313 Programmable IR sensor InterfacePage 30Rev 1.0 21-July-2001
3901090313
Applications Information
MLX90313
Programmable IR Sensor Interface
IR sensor
Thermisto
MLX9024
r
high prec.
Rbias
100k
IR+
IR-
Rsens
VSS
10u
IRINP
IRINN
TINP
TINN
AGND
CREF
VDD
VSS
OPA
OPA
A/D
Digital
A/D D/A
Control and Support Blocks
D/A
Ta
12
MLX90313
To
COMP12
Ta
COMP
SPI
TEMPOUT
IROUT
REL1
VREFP
VDD1
Micro-controller I/O-port
SW1
SW2
Vref
Typical application diagram
In the above application diagram, a simple thermometer with alarm function is depicted. As external
components there are only a thermopile (like the MLX90247x) and a current setting resistor is used.
Because the current needs to be constant over temperature and time, it is advised to use a precision
resistor. The tempout pin is the output of a comparator which compares the measured object temperature
with the threshold set by the external potentiometer. The second comparator operates the relay. It
compares the ambient temperature with a fixed threshold programmed in eeprom. Both ambient and
object temperatures can be read continously by the microprocessor using the SPI interface.
For more application examples, take a look at our MLX90601 Infrared thermometer module, which
incorporates a MLX90247 thermopile sensor and the MLX90313 IR sensor interface.
MLX90313 Programmable IR sensor InterfacePage 31Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Support Tools
In a short time Melexis will provide a demo board which can demonstrate all MLX90313’s features. This
will come with software which allows easy configuration of the MLX90313. Please have a look at
www.melexis.com for latest info.
ESD Precautions
Electronic semiconductor products are sensitive to Electro Static Discharge (ESD).
Always observe Electro Static Discharge control procedures whenever handling semiconductor products.
FAQ
Q: When is the MLX90313 available ?
A: Currently Melexis only delivers the MLX90313 as part of the MLX90601x Infrared Thermometer
module. Please refer to MLX90601 datasheet for details. Samples can be obtained Q3/2001, full
production starts Q4/2001.
Hamming codingBy giving a message a extra number of bits (= so called hamming bits), one can
Integral nonlinearity
(INL)
IRInfrared. Every object emits infrared radiation in relation to its temperature. This
LinearisationThe signal from a thermopile is not linear with the object temperature. MLX90313
LSB,MSBLeast Significant Bit, Most Significant Bit
NTCSee Thermistor.
PGAProgrammable gain amplifier.
The IR signal captured by a thermopile sensor is not only dependent on the
temperature of the object (Tobject) but also on the temperature of the sensor
itself. Therefore the IR signal is compensated for this effect by means of the
measured sensor temperature (Tambient). This rather complex calculation is
performed in the linearisation unit of MLX90313.
temperature and supply voltage, like the one used in the MLX90313
Special amplifier configuration aimed at ultra low offset
The deviation of any code from an ideal 1 LSB step
non-volatile memory that can be electrically erased and rewritten. This
type of memory is used to store configuration and calibration data needed
by the MLX90313.
not only detect, but also correct a error that occurs in the stored data or the
hamming bits. The eeprom memory of the MLX90313 uses hamming coding to do
a error check and correction if needed and possible.
This is the maximum deviation from the ideal output curve and the actual output
effect can be used to measure this temperature without the need for physical
contact.
is therefore equipped with a digital calculation unit that produces an output that is
linear with the object temperature.
MLX90313 Programmable IR sensor InterfacePage 32Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
PORpower –on reset: reset circuit that starts the digital system in a known state
whenever the supply voltage is cycled
PSSRPower Supply Rejection Ratio: Measure for an amplifier’s immunity to
disturbances on the supply connections.
PTCSee Thermistor.
SPISerial Peripheral Interface. Commonly used 4 wire serial link to connect different
circuits over a short distance.
Ta, Tamb ient,
ambient temperature
Thermistor
Tobject, To and
Target Temperature
The temperature of the IR sensor.
Temperature dependant resistor. Basically there are 2 types. The types
that increase their resistance with rising temperature are PTC (positive
thermal coefficient) type. The ones that decrease their resistance with
rising temperature we call NTC (negative thermal coefficient) type. The
MLX90313 can work with both types.
commonly used terms in infrared thermometry. It refers to the temperature of the
target, at which the IR sensor is “looking”
MLX90313 Programmable IR sensor InterfacePage 33Rev 1.0 21-July-2001
3901090313
MLX90313
Programmable IR Sensor Interface
Disclaimer
Melexis reserves the right to periodically make modifications to product specifications. The information
included herein is believed to be accurate and reliable. However, Melexis assumes no responsibility for
its use; nor for any infringements of patents or other rights of third parties which may result from its use.
MLX90313 Programmable IR sensor InterfacePage 34Rev 1.0 21-July-2001
3901090313
Physical Characteristics
0.50
0.33
12.99
12.70
MLX90313
Programmable IR Sensor Interface
0.32
0.23
7.60
1.27
7.40
Notes:
1. All dimensions in millimeters.
10.45
10.15
0o to
8
1.04
0.60
o
2.66
2.45
0.290
0.127
For the latest version of this document, go to our website at:
www.melexis.com
Or for additional information contact Melexis Direct: