Melexis MLX90313 Technical data

查询MLX90313供应商
MLX90313
Programmable IR Sensor Interface
Features and Benefits
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 Package Temperature Range MLX90313 K DF -40C to 125C Automotive
Functional Diagram Description
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 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. Additional the circuit can perform simple control applications using on-board comparators
MLX90313 Programmable IR sensor Interface Page 1 Rev 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)
Parameter Symbol Test Conditions Min Typ Max Unit Regulator and consumption
Supply voltage range Vin1 VDD1 7 80 V Supply voltage range Vin VDD 4.5 5 5.5 V Supply current Idd Regulated supply voltage Vreg VDD, 10uF ext. cap 4.7 5 5.3 V Regulated voltage temperature
coefficient POR threshold voltage Vpor 1.1 1.3 1.5 V
Band-gap reference
Analog ground voltage Agnd 2.3 2.5 2.7 V Analog ground thermal coefficient TCbg 15 50 Reference current mirror load
drive voltage
IR-chain amplifier and output driver
Common mode input range CMIR -0.1 Vdd-3 V Common mode rejection ratio CMRR
Power supply rejection ratio PSSR Available gain settings Air 55 5500 V/V Gain tolerance Amplifier offset Voff 4 Input referred white noise Vnir rms-value 25 Chopper frequency fc 8 KHz Output voltage range IROUT 0 Vdd-
Output source current Iod IROUT 1 mA Output sink current Ios IROUT 20 DC Output impedance, drive rod IROUT 10 DC Output impedance, sink ros IROUT 100 Capacitive load IROUT pin Cmax IROUT 50 pF Amplifier bandwidth BW 500 Hz
Temp-chain amplifier and output driver
Common mode input range CMIR 0.1 Vdd-3VV
TCvr -2.35
Vcref 1.8 2 2.2 V
δGir
@ Ta=25°C
f 100kHz Rsens < 60kΩ * f 100kHz
75 dB
75 dB
-6.5 +6.5 %
55.6mA
mV/°
µV/°
µV
nV/Hz
V
0.2
µA Ω Ω
Common mode rejection ratio CMRR Power supply rejection ratio PSSR TINP bias current Itpb bias current enabled 1/7 .1 iCref* Available gain settings Atemp 1 40 V/V
MLX90313 Programmable IR sensor Interface Page 2 Rev 1.0 21-July-2001 3901090313
f 100kHz f 100kHz
75 dB 75 dB
MLX90313
Programmable IR Sensor Interface
Parameter Symbol Test Conditions Min Typ Max Unit
Gain tolerance Amplifier offset Voff 4 Input referred white noise Vntemp rms-value 400 Chopper frequency fc 8 kHz Output voltage range ORtemp TEMPOUT 0 Vdd-
Output source current Iod TEMPOUT 1 mA Output sink current Ios TEMPOUT 20 uA DC Output impedance, drive rod TEMPOUT 10 DC Output impedance, sink ros TEMPOUT 100 Capacitive load TEMPOUT pin Cmax TEMPOUT 50 pF Amplifier bandwidth BW 500 Hz
Rel1 open drain relay driver
High voltage protection 32 V output impedance Ro 10
Comp1 comparator
Potentiometer input range IRirout IROUT 0 100 % of
ADC
Input stage gain 2.95 3 3.05 V/V
δGtemp
bias current enabled -6.5 +6.5 %
µV nV/Hz
V
0.2
Ω Ω
Vrefp
External Reference voltage Vrefpex 1 3.3 V Internal Reference voltage Vrefp 2.4 2.5 2.6 V Vrefp input leakage current Ilvrefp Resolution 12 bit Monotonicity guaranteed by design Differential non-linearity DNL 0.4 LSB Integral non-linearity INL ½ LSB Gain error full scale 1 LSB Total input-referred noise Vref=3V 0.2 LSB
DAC
Resolution 8 bit Monotonicity guaranteed by design Differential non-linearity DNL ½ LSB Integral non-linearity INL ½ 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 Interface Page 3 Rev 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 Susceptibility 2 kV Rel1 output impedance 10 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 Interface Page 4 Rev 1.0 21-July-2001 3901090313
Pin-out
MLX90313
Programmable IR Sensor Interface
VSS
1 2 3 4 5 6 7 8 9 10 11
TINP
TINN IRINP IRINN
REL1
IROUT
SDIN
TOUT1 TOUT2 CREF
20 19 18 17 16 15 14 13 12
TEMPOUT CSB SDOUT SCLK TSTCLK VDD VDD1 AGND VREFP
Pin Symbol Description 1 TINP Temp-chain amplifier positive input 2 TINN Temp-chain amplifier negative input 3 IRINP IR-chain am plif ier positi ve in put 4 IRINN IR-chain amplifier negative input 5 VSS Supply pin 6 REL1 Open-drain relay driver output 7 IROUT IR-chain am plif ier output 8 SDIN SPI data input 9 TOUT1 Test pin/ Oscillator output 10 TOUT2 Test pin, leave open 11 CREF Bias current reference 12 VREFP Reference voltage input/output 13 AGND Analog ground, band-gap reference voltage 14 VDD1 Automotive Ignition supply pin 15 VDD Regulated supply pin 16 TSTCLK Clock for test mode; leave open 17 SCLK SPI clock input 18 SDOUT SPI data output 19 CSB SPI chip select active low 20 TEMPOUT Temp-chain amplifier output
MLX90313 Programmable IR sensor Interface Page 5 Rev 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 Interface Page 6 Rev 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 12­bit 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 Interface Page 7 Rev 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 Interface Page 8 Rev 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 IR­sensors, 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
GCI0 GCI3 GCI2 GCI1 GCI4 GCI7 GCI6 GCI5
010
120*1112515
G
b
0XX5 0001.067 10010 0011.143 10115 0101.231 11020
G
pa
01
G
l
0111.333
1001.455
1011.600
1101.778
1112.000
MLX90313 Programmable IR sensor Interface Page 9 Rev 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
GCT2 GCT1 GCT0 GCT5 GCT4 GCT3 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
IRSEL2 IRSEL1 IRSEL0
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 Interface Page 10 Rev 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
RSEL[4:0] Refir [V] RSEL[4:0] Refir [V] RSEL[4:0] Refir [V] RSEL[4:0] Refir [V]
11111b 3.25 10111b 2.85 01111b 2.45 00111b 2.05 11110b 3.20 10110b 2.80 01110b 2.40 00110b 2.00 11101b 3.15 10101b 2.75 01101b 2.35 00101b 1.95
11100b 3.10 10100b 2.70 01100b 2.30 00100b 1.90 11011b 3.05 10011b 2.65 01011b 2.25 00011b 1.85 11010b 3.00 10010b 2.60 01010b 2.20 00010b 1.80 11001b 2.95 10001b 2.55 01001b 2.15 00001b 1.75 11000b 2.90 10000b 2.50 01000b 2.10 00000b 1.70
=
70
+××
, Where K=0:31 depending on the selected value of Rsel[4:0]
MLX90313 Programmable IR sensor Interface Page 11 Rev 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
x3 ADC
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:
SELDR2 SELDR1 SELDR0 ENDREFDIV VREFP
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 Interface Page 12 Rev 1.0 21-July-2001 3901090313
SELDR(2:0)
MLX90313
Programmable IR Sensor Interface
AGND
ENDREFDIV
DAC
IRout Tout
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 pin IROUT TEMPOUT Control
IROUTC[1:0] Configuration TOUTC[1:0] Configuration
Bits
00b IR-c hain out 00b Temp-chain out
Setting
01b Linear Tobject 01b Linear Tambient 10b Threshold Rel1 input 10b Comp1 out 11b PWM out 11b PWM 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 Interface Page 13 Rev 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 settings 0 00h Test mode No
IR-chain settings 1 01h Test mode No Temp-chain settings 2 02h Test mode No Configuration 3 03h Test mode Always Configuration 4 04h Test mode Always Oscillator 5 05h Test mode No Bandgap control 6 06h Test mode No Low Pass Filter 7 07h Test mode No ADC output data 8 08h Test mode Always Tobject (lin) 9 09h Test mode Always Tambient (lin) 10 0Ah Test mode Always IR-chain output 11 0Bh Test mode Always Temp-chain output 12 0Ch Test mode Always IR-chain offset 13 0Dh Test mode Always Temp-chain offset 14 0Eh T est m ode Alwa ys Main state machine 15 0Fh Test mode No Test mode control 16 10h Always No Temporary register for test Test mode No Accumulator A Test mode No Accumulator B Test mode No Test control 20 14h Test mode No Accumulator C Test mode No Accumulator E Testmode No ADC test control 23 17h Test mode No
Eeprom write protect
Address Access via spi Dec Hex Write Read
24­31
18h­1Fh
Always No
MLX90313 Programmable IR sensor Interface Page 14 Rev 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
Bit functions
REGISTERH B15 B14 B13 B12 B11 B10 B9 B8 REGISTERLB7B6B5B4B3B2B1B0 IRGAIN1H ENDREFDIV ENDAC ENLN GCI7 GCI6 GCI5 GCI4 GCI3 IRGAIN1L GCI2 GCI1 GCI0 IRGAIN2H AGNDC3 AGNDC2 AGNDC1 AGNDC0 SELDR2 SELDR1 SELDR0 RSEL3 IRGAIN2L RSEL2 RSEL1 RSEL0 TEMPGAINH TRSEL1 TRSEL0 IRSEL2 IRSEL1 IRSEL0 GCT5 GCT4 GCT3 TEMPGAINL GCT2 GCT1 GCT0 CONFREG1H ERROR ENVR HVSUP SELADREF POTMET COMP1V COMP1P BYPTEMP CONFREG1L REL1V REL1P EEWREN TESTMODE CONFREG0H IROUTC1 IROUTC0 TOUTC1 TOUTC0 SUBINC SUBDEC NTC TIMEOS3 CONFREG0L TIMEOS2 TIMEOS1 TIMEOS0 OSCH ENAGNDB OSCL BGH BGL LPFH RSEL4 ENOSM ENTAV IROS TOS LPFIR2 LPFIR1 LPFIR0 LPFL LPFT2 LPFT1 LPFT0 TESTH1011001 TESTL TESTCTRL1H TESTCTRL1L TESTCTRL 2H TESTCTRL 2L WPH WPL 1100101
Register Descriptions
IRGAIN1
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
Name POR val Function ENDREFDIV X
1 Divide 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. ENDAC X 1 Enable the DAC regulator ENLIN X 1 Enable low noise. GCI[7:0]
X
00000000­11111111
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
Bit POR val Function
AGNDC [3:0] SELDR [2:0]
X 0000-1111 Reserved X Adjustment of the DAC reference. X
X X X
000 Vref = 2V 001 Vref =2.5V 010 Vref = 3V 011 Vref = 3.5V
MLX90313 Programmable IR sensor Interface Page 15 Rev 1.0 21-July-2001 3901090313
MLX90313
Programmable IR Sensor Interface
IRGAIN2 bit functions
Bit POR val Function
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
Bit POR val Function
TRSEL[1:0] IRSEL[2:0]
GCT[5:0]
X X X
100 Vref = 4V 101 Vref = 4.5V 0000-1111 Select the value of the analog ground for IR signal path.The bits are
5, RSEL4 is in LPF register (see ‘ADC’ part)
00-11 Reference voltage for Tambient measurement at ADC interface
input.
000-111 Current mirror ratio: See under M in table ‘Temp chain gain settings’
in the section on the Temp-amplifier chain (analog features) 000000­111111
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
Bit POR val Function
Fatal Error
X ENVR HVSUP 1 1 Enable the regulator for battery supply. NOTE!!! After POR this regulator will be
POTMET COMP1V
BYPTEMP REL1V REL1P
EEWREN 0 1 Enables write access in EEPROM *write protect TESTMODE 0 1 Indicates 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
1 Flags 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)
1 Stops 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. 0 External supply of ADC reference to AGND pin.SELADREF X 1 Enable the internal ADC reference (connected to AGND pin). 0 Sets threshold level for Rel1 to THRel1 in EEprom (address 75h) 1 Sets potentiometer input (pin IROUT) as threshold level 0 Sets Tobject as target voltage for comparator Comp1 1 Sets Tambient as target voltage for comparator Comp1 0 Sets polarity of Comp1: InvertingCOMP1P X 1 Sets polarity of Comp1: Non-inverting 0 Output of Temp amplifier path is connected to ADC 1 Connects TINP-TINN directly to the ADC, bypassing the Temp-chain 0 Sets Tobject as target voltage for Rel1 1 Sets Tambient as target voltage for Rel1 0 Sets polarity of Rel1: Inverting 1 Sets polarity of Rel1: Non-inverting
MLX90313 Programmable IR sensor Interface Page 16 Rev 1.0 21-July-2001 3901090313
mode.
CONFREG0
CONFREG0 bit functions
Bit POR val Function
IROUTC[1:0]
TOUTC[1.0]
TIMEOS[3:0]
00b IROUT pin function: IR-chain out 01b IROUT pin function: Linear Tobject 10b IROUT pin function: Threshold Rel1 input 11b IROUT pin function: PWM out 00b TEMPOUT pin function: Temp-chain out 01b TEMPOUT pin function: Linear Tambient 10b TEMPOUT pin function: Comp1 out 11b TEMPOUT pin function: PWM out 0 2nd order derivative of thermistor function is positive (used if NTC=0)SUBINC 1 2nd order derivative of thermistor function is negative (used if NTC=0) 0 2nd order derivative of thermistor function is positive (used if NTC=1)SUBDEC 1 2nd order derivative of thermistor function is negative (used if NTC=1) 0 Used thermistor is PTCNTC 1 Used thermistor is NTC 0000 Offset calibration interval: 0'00" 0001 Offset calibration interval: 0'02" 0010 Offset calibration interval: 0'17" 0011 Offset calibration interval: 0'19" 0100 Offset calibration interval: 1'07" 0101 Offset calibration interval: 1'09" 0110 Offset calibration interval: 1'24" 0111 Offset calibration interval: 1'26" 1000 Offset calibration interval: 2'14" 1001 Offset calibration interval: 2'16" 1010 Offset calibration interval: 2'31" 1011 Offset calibration interval: 2'33" 1100 Offset calibration interval: 3'21" 1101 Offset calibration interval: 3'23" 1110 Offset calibration interval: 3'38" 1111 Offset 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 Interface Page 17 Rev 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
Bit POR Val Function RSEL4 0 Refer to ADC interface setting
0 Enable offset measurement of both IR & Temp channels.ENOSMB 1 Disable offset measurement of both IR &Temp channels. 0 Reserved for future development. Reset it for all applications.ENTAV 1 Reserved for future development. Reset it for all applications.
IROS*
LPFIR[2:0]
LPFT[2:0]
0 1 Number of averaged offset measurements for IR chain: 1024 0 Number of averaged offset measurements for Temp chain: 512TOS* 1 Number of averaged offset measurements for Temp chain: 1024 Number of averaged points for IR measurement 00b 64 01b 128 10b 256 11b 512 100b Number of averaged points for Temp measurement 00b 64 01b 128 10b 256 11b 512 100b 1024
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
Name D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 OVH OVL FE Res
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. Res Not used, always zero.
MLX90313 Programmable IR sensor Interface Page 18 Rev 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
Name D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 OVH OVL FE Res
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. Res Not 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 Interface Page 19 Rev 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 Bit POR val Function
B[15:9] 0000000b B[8:0] 000000000bX
1011001b Forces chip in test mode any other Normal 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.
EEprom write protect register Bit POR val Function B[15:9] 000000000bX
B[6:0] 0000000b
* The addresses 00-07h and 79-7Fh will be still protected. Write access here requires also ‘Test mode’.
1100101b Enables write access to Eeprom* any other Sets EEprom write protect
MLX90313 Programmable IR sensor Interface Page 20 Rev 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.
Eeprom map overview
Address list eeprom
Register name Function IRGAIN1 IR-chain settings 0 00h test mode**
IRGAIN2 IR-chain settings 1 01h test mode TEMPGAIN Temp-chain settings 2 02h test mode CONFREG1 Configuration 3 03h test mode CONFREG2 Configuration 4 04h test mode OSCCTRL Oscillator control 5 05h test mode BGCTRL Bandgap control 6 06h test mode LPF Low Pass Filter 7 07h test mode
CALIBRATION IOS-TEMP Initial offset Temp-chain 112 70h WP
IOS-IR Initial offset IR-chain 113 71h WP RESERVED 114 72h WP
THCOMP1 HSCOMP1 THREL1 HSREL1
RESERVED 119 77h CHIP-ID Data 120-127 78h-7Fh 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
Address Write access Dec Hex
8-111 08h-6Fh WP*
115 73h WP 116 74h WP 117 75h WP 118 76h WP
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 Interface Page 21 Rev 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.
EEPROM BIT DEF ENITIONS
ADDRESS REGISTERH B15 B14 B13 B12 B11 B10 B9 B8
(HEX) REGISTERL B7B6B5B4B3B2B1B0
0x00 IRGAIN1H
IRGAIN1L GCI2 GCI1 GCI0 K H4 H3 H2 H1
0x01 IRGAIN2H AGNDC3 AGNDC2 AGNDC1 AGNDC0 SELDR2 SELDR1 SELDR0 RSEL3
IRGAIN2L RSEL2 RSEL1 RSEL0 K H4 H3 H2 H1
0x02 TEMPGAINH TRSEL1 TRSEL0 IRSEL2 IRSEL1 IRSEL0 GCT5 GCT4 GCT3
TEMPGAINL GCT2 GCT1 GCT0 K H4 H3 H2 H1
0x03 CONFREG1H ENVR HVSUP
CONFREG1L REL1P RES RES K H4 H3 H2 H1
0x04 CONFREG0H IROUTC1 IROUTC0 TOUTC1 TOUTC0 SUBINC SUBDEC NTC TIMEOS3
CONFREG0L TIMEOS2 TIMEOS1 TIMEOS0 K H4 H3 H2 H1
0x05 OSCH RES RES ENAGNDB RES RES RES RES RES
OSCL RES RES RES K H4 H3 H2 H1
0x06 BGH RES RES RES RES RES RES RES RES
BGL RES RES RES K H4 H3 H2 H1
0x07 LPFH RSEL4 ENOSM ENTAV IROS TOS LPFIR2 LPFIR1 LPFIR0
LPFL LPFT2 LPFT1 LPFT0 K H4 H3 H2 H1
0x73 THComp1 THR10
0x74 HSComp1 HST10 HST9 HST8 HST7 HST6 HST5 HST4 HST3
0x75 THRel1 THR10 THR9 THR8 THR7 THR6 THR5 THR4 THR3
0x76 HSRel1 HST10 HST9 HST8 HST7 HST6 HST5 HST4 HST3
0x78 - 0x7F USER1..7 UDATA10 UDATA9 UDATA8 UDATA7 UDATA6 UDATA5 UDATA4 UDATA3
ENDREFDIV
THR2
HST2 HST1 HST0 K H4 H3 H2 H1
THR2 THR1 THR0 K H4 H3 H2 H1
HST2 HST1 HST0 K H4 H3 H2 H1
UDATA2 UDATA1 UDATA0 K H4 H3 H2 H1
ENDAC ENLN GCI7 GCI6 GCI5 GCI4 GCI3
POTMET COMP1V COMP1P BYPTEMP REL1V
THR7
K
THR6
H4
THR5
H3
THR4
H2
THR3
H1
THR9 THR1
SELADREF
THR8 THR0
Eeprom Hamming coding
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
name D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 K H4 H3 H2 H1
The hamming bits are calculated as follows: H1 = P(D0,D1,D3,D4,D6,D8,D10)
MLX90313 Programmable IR sensor Interface Page 22 Rev 1.0 21-July-2001 3901090313
MLX90313
Programmable IR Sensor Interface
H2 = P(D0,D2,D3,D5,D6,D9,D10) H3 = P(D1,D2,D3,D7,D8,D9,D10) H4 = P(D4,D5,D6,D7,D8,D9,D10)
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 Interface Page 23 Rev 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 Interface Page 24 Rev 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 IRINP­IRINN 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 Interface Page 25 Rev 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 Ta­measurement. 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 Interface Page 26 Rev 1.0 21-July-2001 3901090313
Comp1 circuitry setting
Comp1 source signal Comp1 Polarity
Control Bit COMP1V COMP1P Setting
0 Tobject 0 Inverting 1 Tambient 1 Non-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.
Rel1 circuitry setting
Rel1 source signal Rel1 Threshold source Rel1 Polarity
Control Bit REL1V POTMET REL1P Setting
0 Tobject 0 [75h] 0 Inverting 1 Tambient 1 IRDATA [03h] 1 Non-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 Interface Page 27 Rev 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
Condition Duty cycle nominal timing OVH: Tambient overflow 68.75 % 70.4 ms OVL: Tambient underflow 75 % 76.8 ms FE: Fatal Error EEprom 81.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 Interface Page 28 Rev 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.
C7 C0C1C2C3C4C5C6 A7 A0A1A2A3A4A5A6 D15 D8D9D10D11D12D13D14 D7 D 0D1D2D3D4D5D6 X
C7 C0C1C2C3C4C5C 6 A7 A0A1A2A3A4A5A6 D15 D 8D9D10D11D12D13D14X X
C7 C0C1C2C3C4C5C6 A7
C7 C0C1C2C3C4C5C6 D7 D0D1D2D3D4D5D6D15 D8D9D10D11D12D13D14
2A3A4A5A6
X
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
tsclktcls tsch
CS
SCLK
tsu thd
SDI
tdv
SDO
SPI timing requirements Symbol Parameter Value Unit tsclk Sclk pe riod min 8
µs tcls CS low to SCLK high min 50 ns tsch SCLK low to CS high min 50 ns tsu data in setup tim e min 200 ns thd data in hold time min 200 ns
MLX90313 Programmable IR sensor Interface Page 29 Rev 1.0 21-July-2001 3901090313
MLX90313
Programmable IR Sensor Interface
tdv data out vali d min 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
X101X0XX X10010XX
0001XXXX 001XXXXX X0001XXX 1001XXXX 101XXXXX
Write internal register Read internal register Write Eeprom Erase EEprom Read Eeprom Block Write Eeprom Block erase Eeprom
µs
MLX90313 Programmable IR sensor Interface Page 30 Rev 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 Interface Page 31 Rev 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.
Glossary of Terms
ADC Analog-to-digital converter Ambient Compensation
ASIC application specific integrated circuit Band-gap Circuit to generate accurate absolute voltages. Usually they are independent of
Chopper compensated amplifier DAC Digital-to-analog converter Differential nonlinearity (DNL) ECC Error Checking and Correction Eeprom
Hamming coding By giving a message a extra number of bits (= so called hamming bits), one can
Integral nonlinearity (INL) IR Infrared. Every object emits infrared radiation in relation to its temperature. This
Linearisation The signal from a thermopile is not linear with the object temperature. MLX90313
LSB,MSB Least Significant Bit, Most Significant Bit NTC See Thermistor. PGA Programmable 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 Interface Page 32 Rev 1.0 21-July-2001 3901090313
MLX90313
Programmable IR Sensor Interface
POR power –on reset: reset circuit that starts the digital system in a known state
whenever the supply voltage is cycled
PSSR Power Supply Rejection Ratio: Measure for an amplifier’s immunity to
disturbances on the supply connections. PTC See Thermistor. SPI Serial 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 Interface Page 33 Rev 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 Interface Page 34 Rev 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:
Europe and Japan: All other locations:
Phone: +32 13 61 16 31 Phone: +1 603 223 2362
E-mail: sales_europe@melexis.com E-mail: sales_usa@melexis.com
MLX90313 Programmable IR sensor Interface Page 35 Rev 1.0 21-July-2001 3901090313
Loading...