ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 1/21 FEATURES APPLICATIONS ♦ Specially formed line image sensor comprising 129 elements ♦ High ambient light suppression of up to 100 kLux with filter glass ♦ Dynamic range of 100 dB ♦ 2 antivalent switching outputs ♦ Alarm message output ♦ High switching frequencies ♦ Low latency ♦ Power-down reset output ♦ Write protection for internal registers ♦ Diffuse reflective photoelectric sensors PACKAGES oBGA™ LO1C BLOCK DIAGRAM VDD Near Channel VREF VCC VREF ON + VREF - VTHSw VS + Adder - VTHSe AC Transimpedance Amplifier IF IN WARN KSe + Far Channel VREF KSw + VREF OF VREF + VTHD VD SO KD + + Programmable Differential Amplifier - NSO Programmable Comparators iC-LO NRES Signal Processing and FSM VDD Oscillator VCCL Power-Down Reset 2 MHz Low-SideLED Driver SPI Interface LED Bandgap Reference Configurable Photodiode Array MOSI MISO SCK NCS GND Copyright © 2012 iC-Haus GNDA GNDL http://www.ichaus.com iC-LO TRIANGULATION SENSOR ar y n i im prel Rev A1, Page 2/21 DESCRIPTION iC-LO is suitable for the assembly of diffuse reflective photoelectric sensors based on the principle of triangulation. Besides iC-LO, all that is required to create such a setup is a transmitting LED, a low-cost microcontroller, and a driver device for the switching output. The iC contains a photodiode array, consisting of one near diode, 127 middle diodes, and one far diode. The diode photocurrents are segmented on two AC amplifiers (near and far channel). The AC amplifiers ensures a very good suppression of low-frequency interference. The sum and difference are calculated from the output voltages of the amplifiers; these are evaluated by comparators. From the comparator signals a programmable filter for the evaluation of multiple measurements generates the switching signal for the light sensor and also a warning on weak received light. The gain characteristic is dynamically adjusted to the intensity of the received light and becomes a logarithmic characteristic with very powerful input signals (reflective objects). This results in a very high dynamic range. The integrated low side driver can drive an LED directly or control an external driver by CMOS output. iC-LO is configured using an SPI interface. The internal registers can be protected against overwriting. ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 3/21 CONTENTS PACKAGES 4 ABSOLUTE MAXIMUM RATINGS 5 THERMAL DATA 5 ELECTRICAL CHARACTERISTICS 6 CONFIGURATION PARAMETERS 9 REGISTER MAP 10 MEASURING SEQUENCE 11 LED DRIVER 11 NEAR/FAR CHANNEL PARTITION AND AMPLIFICATION 12 SAMPLE POINT, DIGITAL SIGNAL CONDITIONING, AND OUTPUT CONFIGURATION Digital filter . . . . . . . . . . . . Sample point in time . . . . . . . Switching matrix . . . . . . . . . Output drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 14 14 15 15 SYSTEM CLOCK 16 STARTUP BEHAVIOR, OPERATING MODES, AND STATUS REGISTER Startup behavior and operating modes . . . . Implemented commands . . . . . . . . . . . . Status register . . . . . . . . . . . . . . . . . 16 16 16 17 POWER DOWN RESET 17 CONFIGURATION NOTES 17 CHIP REVISION 17 Current/Voltage conversion . . . . . . . . . . 12 Channel partitioning . . . . . . . . . . . . . . 12 Comparator hysteresis . . . . . . . . . . . . . 13 SPI INTERFACE 18 14 APPLICATION NOTES 18 RECEIVED SIGNAL MONITORING ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 4/21 PACKAGES PIN CONFIGURATION oBGA™ LO1C PIN FUNCTIONS No. Name Function A1 A3 B1 B3 C1 C3 D1 D3 E1 E3 F1 F3 G1 G2 G3 Physical dimensions see oBGA™ package specification LO1C. MOSI NSO SCK SO MISO WARN NCS NRES GNDA VDD VCC GND VCCL LED GNDL Master Output Slave Input Antivalent Switching Output SPI Clock Switching Output Master Input Slave Output Warning Output SPI Chip Select Power-Down Reset Analogue Ground Digital Supply Analogue Supply Digital Ground LED Driver Supply LED Driver Output LED Driver Ground ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 5/21 ABSOLUTE MAXIMUM RATINGS Beyond these values damage may occur; device operation is not guaranteed. Item No. Symbol Parameter Conditions Unit Min. Max. G001 V() Supply Voltage at VCC, VDD -0.3 6 V G002 V() Voltage at digital inputs MOSI, SCK, NCS -0.3 VDD + 0.3 V G003 I() Current in WARN, NSO, SO, MISO, MOSI, SCK, NCS, NRES, GND -40 40 mA G004 I() Current in VCC, GNDA -50 50 mA G005 I() Current in VDD -40 70 mA G006 I() Current in VCCL -70 40 mA G007 I() Current in LED -40 1600 mA G008 I() Current in GNDL -1600 40 mA G009 Tj Chip-Temperature -40 125 °C G010 Ts Storage Temperature Range see package specification G011 Vd() ESD Susceptibility at all pins HBM 100 pF discharged through 1.5 kΩ 2 kV THERMAL DATA Operating Conditions: VDDA = VDD = 5 V ±10% Item No. T01 Symbol Parameter Conditions Unit Min. Ta Operating Ambient Temperature Range see package specification All voltages are referenced to Pin GNDA unless otherwise stated. All currents flowing into the device pins are positive; all currents flowing out of the device pins are negative. -40 Typ. Max. 85 °C ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 6/21 ELECTRICAL CHARACTERISTICS Operating Conditions: VCC = VDD = 5 V±10 %, Tj = -40. . . 85 °C, fOSC = 2 MHz, unless otherwise stated. Item No. Symbol Parameter Conditions Unit Min. Typ. Max. 4.5 5 5.5 4.5 5 5.5 Total Device 001 V(VCC) Permissible supply voltage analog 002 V(VDD) Permissible supply voltage digital 003 I(VCC) Supply Current in VCC Iph() = 0 004 I(VDD) Supply Current in VDD I(VCCL) = 0 005 Vc()hi Clamp Voltage hi at NCS, CLK, VZAP Vc()hi = V() − V(VDD), I() = 1 mA 0.3 1.6 V 006 Vc()hi Clamp Voltage hi at VCCL Vc()hi = V() − V(VDD), I() = 1 mA 0.3 1.6 V 007 Vc()hi Clamp Voltage hi at LED, GND Vc()hi = V() − V(VDD), I() = 1 mA 0.3 1.2 V 008 Vc()hi Clamp Voltage hi at NRES Vc()hi = V() − V(VDD), I() = 1 mA 0.6 2.6 V 009 Vc()hi Clamp Voltage hi at WARN, SO, NSO, MISO Vc()hi = V() − V(VDD), I() = 1 mA 0.3 1.6 V 010 Vc()lo Clamp Voltage lo at MOSI, SCK, I() = -1 mA MISO, NCS, GND, VDD, NRES, WARN, SO, NSO -1.2 -0.3 V 011 Vc()lo Clamp Voltage lo at VCC, VCCL, I() = -1.3 mA LED, GNDL -1.2 -0.3 V 4 V V mA 0.8 mA Fotodioden (D0..D128) with cascode 101 L() Overall length of diode array 7 mm 102 A(D0) Active area near-diode 3000 µm x (300...600) µm 0.927 mm² 103 A() Active area mid-diodes D1 to D127 29.35 µm x 600 µm 17610 µm² 104 A(D128) Active area far-diode 272.55 µm x 600 µm 163530 µm² 105 S(λ)max Efficiency λ = 680 nm 0.38 A/W 106 λar Spectral Application Range S(λar) = 0.25 x S(λ)max 107 Imax (D0) Maximum photocurrent neardiode 8 mA 108 Imax () Maximum photocurrent middiodes D1 to D127 750 µA 109 Imax (D128) Maximum photocurrent far-diode 7.5 mA 400 950 nm AC Transimpedance Amplifier 201 Iph()dc DC Photocurrent 260 µA 202 203 Iph()ac AC Photocurrent 12 mA Iph()lin Linear Transimpedance range 204 Rac Transimpedance -3 dB corner of Rac , Iph()lin = 0...Iph()ac; TIM = 0x0 TIM = 0x1 TIM = 0x2 TIM = 0x3 10 82 1280 20000 µA µA µA µA linear range, Iph()ac < Iph()lin; TIM = 0x0 TIM = 0x1 TIM = 0x2 TIM = 0x3 112.5 k 17.5 k 1350 101 Ω Ω Ω Ω -19 dB 206 deltaRac Transimpedance change in loga- deltaRac per decade Iph()ac rithmic range 208 fu Lower Cut-off Frequency linear range, Iph()ac < Iph()lin, -3 dB corner 25 kHz 209 fo Upper Cut-off Frequency linear range, Iph()ac < Iph()lin, -3dB corner 200 kHz 301 Avsum Gain 302 fo Upper Cut-off Frequency Adder 1.8 -3 dB corner 2 230 2.2 kHz ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 7/21 ELECTRICAL CHARACTERISTICS Operating Conditions: VCC = VDD = 5 V±10 %, Tj = -40. . . 85 °C, fOSC = 2 MHz, unless otherwise stated. Item No. Symbol Parameter Conditions Unit Min. Programmable Differential Amplifier (x = F, N) 401 Avn Near-Channel Gain Typ. POTx = 0x00 POTx = 0xFF 8.5 26 402 Avf Far-Channel Gain POTx = 0x00 POTx = 0xFF 26 8.5 403 fo Upper Cut-off Frequency -3 dB corner 150 Max. kHz Programmable Comparator 501 502 503 Voff Offset save by design Vhys (KD) Hysteresis KD DISHYS = 0; HYSD = 0x0 HYSD = 0xF 3 72 mV mV DISHYS = 0; HYSS = 0x0 HYSS = 0x3 2 8 mV mV Vhys (KS) Hysteresis KSw, KSe -2 2 mV 504 VTHSw Threshold Voltage for warning THSw = 0x00 THSw = 0x1F 2.8 89.6 mV mV 505 VTHSe Threshold Voltage for error THSe = 0x00 THSe = 0x1F 2.8 89.6 mV mV 506 fu Cut-off Frequency High-pass Input -3 dB corner 12 kHz Oscillator Frequency OSC = 0x8 2 MHz Oscillator 701 fOSC SPI Interface NCS, SCK, MOSI, MISO I01 Vt()hi Threshold Voltage hi at NCS, SCK, MOSI 2 I02 Vt()lo Threshold Voltage lo at NCS, SCK, MOSI I03 Vt()hys Hysteresis at NCS, SCK, MOSI I04 Ipu(NCS) Pull-Up Current in NCS V(NCS) = 0...VDD − 1 V I05 Ipd() Pull-Down Current in SCK and MOSI V(SCK) = 1 V...VDD I06 Vs(MISO)hi Saturation Voltage hi at MISO Vs(MISO)hi = VDD − V(MISO); I(MISO) = -1.6 mA I07 Vs(MISO)lo Saturation Voltage lo at MISO I(MISO) = 1.6 mA I08 Isc()hi Short-Circuit Current hi in MISO -35 I09 Isc()lo Short-Circuit Current lo in MISO 1.7 35 mA I10 f(SCK) Clock Frequency at SCK 1 MHz 0.8 V V 450 mV -70 50 -30 -5 µA 3 30 80 µA 350 mV 300 mV -1.7 mA ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 8/21 ELECTRICAL CHARACTERISTICS Operating Conditions: VCC = VDD = 5 V±10 %, Tj = -40. . . 85 °C, fOSC = 2 MHz, unless otherwise stated. Item No. Symbol Parameter Conditions Unit Min. Typ. Max. Low-Side LED driver VCCL, GNDL, LED L01 I(VCCL) Short-Circuit Current from VCCL V(VCCL) = V(GNDA) L02 Vs()hi Saturation Voltage hi at VCCL L03 I(LED)nom Nominal Current in LED -55 Vs(VCCL)hi = V(VDD) − V(VCCL); I(VCCL) = -35 mA LCC = 0x0 LCC = 0x7 LCC = 0x8 LCC = 0xF starting with LOY: LCC = 0x00 LCC = 0x07 LCC = 0x08 LCC = 0x0F LCC = 0x10 LCC = 0x17 LCC = 0x18 LCC = 0x1F L04 C L05 Vs(LED)lo Saturation Voltage lo at LED Backup Capacitor for LED driver between VCCL and GNDL Vs(LED)lo = V(LED) − V(GNDL); LCO = 0x0 (LED-driver mode), I(LED) = I(LED)nom L06 Vs(LED)hi Saturation Voltage hi at LED L07 -39 mA 0.85 V 86 180 420 825 mA mA mA mA 86 180 155 320 295 636 593 1150 mA mA mA mA mA mA mA mA 10 µF 2 V Vs(LED)hi = VDD − V(LED); LCO = 0x1 (CMOS-Output), I(LED) = -1.6 mA 350 mV Vs(LED)lo Saturation Voltage lo at LED LCO = 0x1 (CMOS-Output), I(LED) = 1.6 mA 300 mV L08 Isc()hi Short-Circuit Current hi at LED LCO = 0x1 (CMOS-Output) -35 -1.7 mA L09 L10 Isc()lo Short-Circuit Current lo at LED LCO = 0x1 (CMOS-Output) 1.7 fPER Pulse Frequency PER = 0x1 PER = 0x3 13.9 5 kHz kHz L11 tPW Pulse Width PW = 0x0 PW = 0xF 2 9.5 µs µs 35 mA Digital Outputs SO, NSO, WARN, NRES O01 Vs()hi Saturation Voltage hi at SO, NSO, WARN, NRES Vs()hi = VDD − V(); I() = -1.6 mA 350 mV O02 Vs()lo Saturation Voltage lo at SO, NSO, WARN, NRES I() = 1.6 mA 300 mV O03 Isc()hi Short circuit current hi at SO, NSO, WARN, NRES -35 -1.7 mA O04 Isc()lo Short circuit current lo at SO, NSO, WARN, NRES 1.7 35 mA 3.9 V Power-Down Reset NRES R01 Vt(VCC)hi Turn-on Threshold VCC R02 Vt(VCC)lo Turn-off Threshold VCC 3.0 R03 Hys(VCC) Hysteresis VCC R04 td Delay at NRES VCC switched on V 150 400 mV 20 40 ms iC-LO TRIANGULATION SENSOR ar y n i im prel Rev A1, Page 9/21 CONFIGURATION PARAMETERS Thresholds TIM: Transimpedance (S. 12) THSW: Warning Threshold weak received light (S. 14) THSE: Error Threshold weak received light (S. 14) HYSD: Comparator hysteresis difference (S. 13) HYSS: Comparator hysteresis sum (S. 13) DISHYS: Disable Comparator hysteresis (S. 13) Parameter set OBF = ”Object far” SPF: Diode segmentation (S. 13) POTF: Digital potentiometer (S. 13) Parameter set OBN = ”Objekt near” SPN: Diode segmentation (S. 13) POTN: Digital potentiometer (S. 13) LED Driver LCO: LCC: PW: PER: LED driver mode (S. 11) LED pulse current (S. 11) Pulse width (S. 12) Pulse frequency (S. 11) Digital Filter FIN: Number of averaged measurements (S. 14) FIM: Number of complementary measurements (S. 14) SKO: Sample point in time (S. 15) Internernal Oscillator OSC: Frequency trimming (S. 16) Output Configuration SOCNO: Output mode (S. 15) SOEN: Output enable (S. 15) TAR: Turn-on delay (S. 16) TAF: Minimum on-time (S. 16) Opcode/Status Register KD: Last comparator results (S. 17) TII: Last transimpedance value (S. 17) WARNI: Last output status / warning (S. 17) SOI: Last output (S. 17) OP: Operating modes (S. 16) Device Designator REV: Revision (S. 17) ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 10/21 REGISTER MAP OVERVIEW Adr Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 THRESHOLDS SPF(6:0) POTF(7:0) SPN(6:0) POTN(7:0) 0x00 0x01 0x02 0x03 TIM(2:0) HYSS(1:0) 0x04 0x05 DISHYS 0x06 HYSD(3:0) THSW(4:0) THSE(4:0) LED DRIVER LCO 0x07 LCC(3:0) starting with iC-LO Revision Y: LCO 0x07 LCC(4:0) PER(1:0) 0x08 PW(3:0) DIGITAL FILTERING FIM(3:0) SKO(3:0) 0x09 0x0A FIN(3:0) TAR(1:0) TAF(1:0) OSCILLATOR 0x0B OSC(3:0) 0 OUTPUT CONFIGURATION 0x0C SOEN SOCNO 0x0D INSTRUCTION REGISTER OP(7:0) 0x0E STATUS REGISTER (read only) 0x0F SOI WARNI TII(1:0) KD(3:0) DEVICE DESIGNATOR (ROM) 0x10 0x11 0x12 0x13 0x14 0x4C =ˆ ’L’ 0x4F =ˆ ’O’ REV(7:0) 0x69 =ˆ ’i’ 0x43 =ˆ ’C’ Table 4: Register layout ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 11/21 MEASURING SEQUENCE In order to determine whether the distance between an object and the sensor falls below a defined value, iC-LO initiates a light pulse that is then diffuse reflected and pictured onto the photodiode array. The spot of light diffuse reflected by the object moves along the diode array depending on the distance object to sen- sor. After the light pulse has been transmitted, at a defined point in time the signal from the photodiode array is evaluated and decided whether the distance between the object and sensor has fallen below a defined value or not. LED DRIVER iC-LO can drive a transmitting LED directly or trigger an external driver using the CMOS level output. A lowside driver is integrated to drive the LED and can supply diode currents of up to approx. 1 A with an external back-up capacitor. The type of output at pin LED (lowside driver or CMOS output) is set by parameter LCO. LCO Code Addr. 0x07; bit 4 Description 0x0 CMOS output at pin LED 0x1 Low-side driver at pin LED RW Table 5: Configuration LED output type Starting with chip version iC-LO revision Y the following applies: LCO Code Addr. 0x07; bit 5 Description 0x0 CMOS output at pin LED 0x1 Low-side driver at pin LED RW Starting with chip version iC-LO revision Y the following applies: LCC Code Addr. 0x07; bit 4:0 Description 0x0 0x1 ... 0x7 0x8 112 mA 126 mA 0x9 ... 0xF 0x10 0x11 ... 221 mA 0x17 0x18 0x19 ... 0x1F 753 mA 696 mA 796 mA RW 210 mA 193 mA 389 mA 368 mA 423 mA 1396 mA Table 8: Current in LED (low-side driver) Table 6: Configuration LED output type The parameter LCC configures the LED current. LCC Code Addr. 0x07; bit 3:0 Description 0x0 94 mA 0x1 ... 0x7 0x8 0x9 ... 110 mA 0xF 1030 mA 206 mA 470 mA 550 mA Table 7: Current in LED (low-side driver) RW The frequency of the light pulses in multiple measurement mode (see Table 18) and the duration of a light pulse is set by parameters PER and PW. PER Code Addr. 0x08; bit 5:4 Description 0x0 0x1 0x2 reserved 13.9 kHz 10.4 kHz 0x3 5 kHz Table 9: Pulse Frequency RW ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 12/21 PW Code Addr. 0x08; bit 3:0 Description 0x0 0x1 ... 0xF 2 µs 2.5 µs RW I(LCC) t(PW) 1/freq(PER) 9.5 µs Figure 1: Light pulse Table 10: Pulse Width The effect of the individual parameters is shown in Figure 1. NEAR/FAR CHANNEL PARTITION AND AMPLIFICATION Sensitivity [A/W] The typical spectral sensitivity is shown in Figure 2. Wave Length [nm ] Figure 2: Spectral sensitivity of the photodiode The diode array is partitioned into two channels (one near and one far channel). The channelwise received photocurrents are added, converted to voltages and amplified. Afterwards a differential comparator decides whether the signal of the near or far channel is greater. A greater signal in the near channel indicates an object within the defined near range and the switching output is activated. Current/Voltage conversion The transimpedance of the current/voltage conversion can be configured according to the expected photocurrents. In the static transimpedance setting modes this configuration is not altered by iC-LO. If the transimpedance amplifier exceeds a high set point it continues with a logarithmic characteristic. In the logarithmic range the parametrized switching point can shift if the digital potentiometer is used (Table 13). iC-LO thus has an automatic mode which selects the transimpedance depending on the received sum light current. The transimpedance set in the automatic modes represents the start value in operating mode STARTUP/RESET. Two comparators monitor the sum light current and switch up or down one transimpedance step when the fixed thresholds are either overshot or undershot. If the transimpedance setting is to be changed during operation, after programming the device must be reset (operating mode STARTUP/RESET). TIM Code Mode Addr. 0x04; bit 7:5 Transimpedance 0x0 0x1 0x2 0x3 0x4 0x5 static static static static auto auto 50 kΩ 7765 Ω 600 Ω 45 Ω 50 kΩ 7765 Ω 0x6 0x7 auto auto 600 Ω 45 Ω RW Table 11: Transimpedance Mode Channel partitioning The block diagram on page 1 depicts the signal chain. There are two ways in which the differential comparator input signals and thus the necessary sensing distance can be configured in iC-LO. The two setting parameters are implemented in two sets of parameters twice. One of these sets of parameters is active when the switching state is off - i.e. the object was in the far range during the last measurement (parameter set OBF). The other is used in switching state on (parameter set OBN). Depending on the difference of the switching points of the two sets of parameters, a freely selectable switching hysteresis can be set. Setting parameters for the near/far channel Diodes are partitioned to the near and far channels using parameters SPF and SPN. SPF belongs to parameter set ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 13/21 OBF and SPN to parameter set OBN. Diodes from 0 (near diode) to the set value are assigned to the near channel, with the remaining diodes up to diode 128 (far diode) assigned to the far channel. SPF SPN Addr. 0x00; bit 6:0 Addr. 0x02; bit 6:0 Code Description 0x0 0 0x1 ... 0x7F 1 RW RW 127 Table 12: Diode Assignment Setting parameter gain ratio In the subtractor the gain ratio between the near and far channel can be adjusted using a digital potentiometer. This achieves a higher measurement resolution than only partitioning the diode array. Parameters POTF (parameter set OBF) and POTN (parameter set OBN) configure the potentiometer. POTF POTN Addr. 0x01; bit 7:0 Addr. 0x03; bit 7:0 Code Gain Ratio Near/Far Channel 0x00 0x01 0.327 0.330 ... 0x7E 0x7F 0x80 0x81 ... 0.988 0.996 1.004 1.012 0xFE 0xFF 3.026 3.059 teresis of the three comparators KD(compatator difference signal), KSw(comparator warning threshold), and KSe(comparator error threshold) can be configured. The system hysteresis is switched with the sampled and filtered comparator output signals KDF, KSwF, and KSeF. Parameter HYSD is used to set the hysteresis of differential comparator KD and parameter HYSS that of sum comparators KSw and KSe. HYSD Code Addr. 0x04; bit 3:0 Hysteresis KD 0x0 0x1 0x2 0x3 0x4 3 mV 6 mV 9 mV 12 mV 15 mV 0x5 0x6 0x7 0x8 .. 0xF 18 mV 21 mV 24 mV 30 mV RW 72 mV Table 14: Comparator Hysteresis RW RW HYSS Code Addr. 0x05; bit 7:6 Hysteresis KSw, KSe 0x0 0x1 0x2 0x3 2 mV 4 mV 6 mV 8 mV RW Table 15: Comparator Hysteresis The hysteresis can be deactivated by DISHYS. Table 13: Digital Potentiometer A gain ratio of > 1 shifts the switching point towards shorter distances and vice versa. Comparator hysteresis To stabilize the comparator outputs the system hys- DISHYS Code Addr. 0x04; bit 4 Description 0x0 0x1 Hysteresis set by HYS Hysteresis deactivated Table 16: Hysteresis Deactivation RW ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 14/21 RECEIVED SIGNAL MONITORING Two sum comparators have been integrated to monitor the system and evaluate the intensity of the received light pulse. A switching threshold can be configured separately for each of the comparators. The warning threshold is configured by using VTHSW and an error threshold by using VTHSE. If the received light pulse undershoots the relevant set threshold, the corresponding comparator output (KSw and KSe, see block diagram) is set to low. It makes sense to set the warning threshold higher than the error threshold. The warning threshold could indicate that the sensor is contaminated. If the intensity of the received light pulse undershoots the error threshold, the switching output is deactivated as a decision cannot be safely made (see Table 21). THSW Addr. 0x05; bit 4:0 RW THSE Code Addr. 0x06; bit 4:0 Description RW 0x00 VTHSx = 2.8 mV 0x01 .. 0x1F VTHSx = 5.6 mV VTHSx = 89.6 mV Table 17: Thresholds Sum Comparators, x = W, E SAMPLE POINT, DIGITAL SIGNAL CONDITIONING, AND OUTPUT CONFIGURATION The signal conditioning chain between the comparator outputs and the switching outputs is shown in Figure 3. FIN Description 0x0 0x1 1 2 0x2 ... 0xF 3 Update switching output Single measurement RW 16 Table 18: Number of measurements per cycle Figure 3: Digital processing and signal output Digital filter To improve noise immunity a measurement cycle (see Figure 4), which results in an update of the switching and warning outputs, can consist of several individual measurements (see Figure 5). The number of individual measurements in a measurement cycle is set using FIN. After each individual measurement the last individual measurements set through FIN are collated to form a measurement cycle and evaluated. Addr. 0x09; bit 3:0 Code FIM Code Addr. 0x09; bit 7:4 Description 0x0 0x1 0x2 ... 0xF 1 2 3 RW 16 Table 19: Number of measurements complementary to current comparator state Measurement cycle consisting of FIN-single measurements Figure 4: Measurement cycle In doing so, each comparator output (KD, KSw, and KSe) is separately filtered. There must then be a minimum number of individual measurements complementary to the current filtered comparator output (KDF, KSwF, and KSeF) so that the corresponding filtered comparator output changes its state. This number is configured using FIM. Sample point in time The point in time at which the outputs of the three comparators are sampled during an individual measurement (tsample , see Figure 5) can be shifted using parameter SKO. This shift is always referenced to the rising edge of the light pulse generated in the LED driver. ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 15/21 Switching matrix Internal switching state SOI and warning state WARNI are determined from the filtered comparator outputs according to the following truth table (Table 21): Light pulse tsample t(SKO) Single measurement Figure 5: Single measurement SKO Code Addr. 0x0A; bit 7:4 Description 0x0 0x1 ... 1.5 µs 2 µs 0xF 9 µs RW Table 20: Shifting the sample point in time KDF 0 0 0 0 1 1 1 1 KSwF 1 0 0 1 1 0 0 1 KSeF 1 1 0 0 1 1 0 0 SOI 0 0 0 0 1 1 0 0 WARNI 0 0 0 0 0 1 0 0 System state Object detected far, enough light Object detected far, low light Object detection impossible, not enough light Invalid configuration (see page 14) Object detected near, enough light Object detected near, low light Object detection impossible, not enough light Invalid configuration (see page 14) Table 21: Switching matrix Output drivers The polarity of the switching output can be selected due to the connected switch using SOCNO. Output WARN is equivalent to the internal WARNI signal. SOCNO Code Addr. 0x0C; bit 0 Description 0 Configures the output SO as normally open and NSO as normally closed (SO = SOI) Configures the output SO as normally closed and NSO as normally open (SO = SOI) 1 Furthermore, in mode PERIODIC_MEASURE (Table 27) a rise and fall delay can be configured for the warning and switching outputs (see Figure 6 by way of example). RW SOI t < tAR t = tAR t = tAF t = tAR t = tAF SO Table 22: Output configuration Figure 6: Rise and fall delay If the switching outputs SO and NSO are not required, they can be disabled by SOEN. A zero is then output at both outputs. SOEN Code Addr. 0x0C; bit 4 Description 0 SO and NSO disabled 1 SO and NSO enabled Table 23: Output activation RW Rise delay tAR suppresses peaks that are shorter than tAR (first SOI peak in Figure 6). If SOI is active for longer than tAR , switching output SO is activated. If SOI then drops to 0, SO only switches back when fall delay time tAF has elapsed (second SOI peak in Figure 6). If SOI remains at 1 after the fall delay time has elapsed, SO trails the falling edge at SOI directly (third SOI peak in Figure 6). The fall delay time is thus equivalent to a minimum pulse duration at the outputs. ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 16/21 Warning output WARN can only be switched on at the same time as the switching output and is reset as soon as sufficient received light is detected. The delay times are configured using parameters TAR and TAF. TAR Addr. 0x0A; bit 3:2 Code Description 0x0 0x1 0 ms 5 ms 0x2 0x3 20 ms 50 ms TAF Code Addr. 0x0A; bit 1:0 Description 0x0 0x1 0x2 0x3 0 ms 5 ms 20 ms 50 ms RW Table 25: Fall delay RW Table 24: Rise delay SYSTEM CLOCK The frequency of the internal oscillator must be trimmed to ensure correct timing. For this purpose the system clock can be output at pin WARN using the command OSC_OUT_ON (Table 27). OSC Addr. 0x0B; bit 3:0 Code Description 0x0 0x1 -20% -17.5% ... 0x8 ... 0xF RW 0% 17.5% Table 26: System clock setting STARTUP BEHAVIOR, OPERATING MODES, AND STATUS REGISTER Startup behavior and operating modes After iC-LO has started up all internal registers and counters are reset to 0. Switching outputs SO and NSO are thus at 0. The warning output is activated. The device waits for further commands (operating mode STARTUP/RESET). Implemented commands By writing to address 0x0E commands can be executed and the device operating mode changed. OP Code Addr. 0x0E; bit 7:0 Command Description W 0x00 STARTUP/RESET Operating mode after power-down (reset of digital filters) 0x02 SINGLE_MEASURE 0x03 PERIODIC_MEASURE Single measurement cycle started with rising NCS edge Periodic measurement cycles, paused with NCS = ’0’ (normal operation mode) 0x04 OSC_OUT_ON 0x06 REG_PROT_ON 0x07 REG_PROT_OFF 0x08 0x09 0x0A 0x0B TST_SO_ON TST_SO_OFF TST_WARN_ON TST_WARN_OFF ...0xFF reserved for device test Output 1 MHz clock at pin WARN Disable write access to registers 0x0-0xD Enable write access to registers 0x0-0xD Output active Output inactive Set warning output to ’1’ Set warning output to ’0’ Table 27: Implemented commands ar y n i im prel iC-LO TRIANGULATION SENSOR Rev A1, Page 17/21 With command STARTUP/RESET internal state machines, counters, and the status register are reset. The device waits for further commands. Command OSC_OUT_ON enables the output of a 1 MHz clock (based on the system clock) through pin WARN. With command REG_PROT_ON the internal configuration register addresses 0x00 . . . 0x0D are protected against overwriting. This write protection can be cancelled by command REG_PROT_OFF. Status register The status register is read out on a read access to register 0x0F. The switching state, warning, and transimpedance mode from the last measurement cycle are stored here, plus the last four individual differential comparator measurements. These can originate from one measurement cycle or from various individual measurement cycles with short measurement cycles. KD(0) is the most recent and KD(3) the oldest result. The switching state stored in the register is independent of SOCNO (see 15). Coding of TII is equivalent to that of TIM(1:0) (Table 11). Command TST_SO_ON sets switching output SO to active and NSO to inactive regardless of the internal SOI state (observe SOCNO and SOEN programming). STATUS Bit Name 3:0 KD Results of difference comparator Command TST_SO_OFF sets switching output SO to inactive and NSO to active regardless of the internal SOI state (observe SOCNO and SOEN programming). 5:4 TII 6 WARNI 7 SOI Transimpedance of last measurement Warning from last measurement cycle Output from last measurement cycle Command TST_WARN_ON sets warning output WARN to 1 regardless of the internal WARNI state. Addr. 0x0F; bit 7:0 Description R Table 28: Status register 0x0F Command TST_WARN_OFF sets warning output WARN to 0 regardless of the internal WARNI state. POWER DOWN RESET The internal power-down reset (low active) is output through NRES. The enable (rising edge) is delayed (see R04). CONFIGURATION NOTES • Parameter SKO should be programmed to 0x5 so that it is adjusted to suit the signal conditioning chain in iC-LO (see Table 20). • The light pulse width programmed using parameter PW (see Table 10) should be at least 0.5 µs longer than SKO. • Operating mode SINGLE_MEASURE only functions when FIN = FIM = 0x0 (see Table 18/19). CHIP REVISION The parameter REV in the iC-LO ROM provides the chip revision. REV Code Addr. 0x12; bit 7:0 Chip revision 0x0 0x1 0x2 0x3 0x4 iC-LO 0 iC-LO 1 iC-LO ZA iC-LO ZB iC-LO ZA1 0x5 0x6 ... 0xFF iC-LO Y reserved reserved R iC-LO TRIANGULATION SENSOR ar y n i im prel Rev A1, Page 18/21 SPI INTERFACE During SPI communication (NCS low) an ongoing measurement sequence in iC-LO is halted (LED off, switching output off). • REGISTER status/data • REGISTER read (cont.) • REGISTER write (cont.) The SPI protocol is equivalent to iC-Haus standard SPI Interface A0.1. The following implemented commands are described therein: • STATUS read • INSTRUCTION write APPLICATION NOTES The diagram shows a possible IO-Link compatible system with iC-GF acting as a switch and reverse polarity protection for supply voltages of between 9 and 30 V. Configurable Photodiode Array IN IF AC Transimpedance Amplifier VREF Far Channel VREF Near Channel + - + - OF ON + - + - VD VS VTHD 2 MHz Oscillator Bandgap Reference Microcontroller SPI Interface SCK NCS VCC3 VCC3 GND GNDA Power-Down Reset and FSM KD KSe KSw VCC Low-Side LED Treiber VDD LED VCCL NRES NSO SO WARN GNDL iC-LO CVCCL 10μF CVCC 100nF CVCC 1μF VCC3 8.2K RSET GND CFP CFO/RX OEN IN2_MOSI QCFG2_SCLK IN1_TX INV1_ESPI QCFG1_NCS ISET NOVL_NDIAG NUVD_MISO CVCC3 1μF VCC Channel 2 VCC3 =1 FEEDBACK OUTPUT Toff VCC VH VHL FEEDBACK COMPARATOR SPI INTERFACE CVH 1μF DC/DC CONVERTER LVH 22μH CONFIGURATION REGISTER CONTROL LOGIC LIN. REGULATOR VBR VCC3 Overload VCC3 Channel 1 VCC3 1 Undervoltage VCC3 INPUT INTERFACE STATUS OUTPUT ..50mA VN VBR iC-GF LS2 HS2 LS1 HS1 VBO < VN LINE OUTPUT BIAS VBR VN CFI QN2 QP2 QN1 QP1 VBO CVBR 1μF CQ2 1nF CQ1 1nF CVBO 100nF VN Q2 LINE Q1 9..30 V VBO TRIANGULATION SENSOR MOSI MISO + - + - + - Signal Processing Programmable Comparators VREF VTHSe VTHSw MOSI MISO SCK NCS GND SPI Interface Programmable Differential Amplifier VREF Adder VREF VREF VDD iC-LO ar y n i im prel Rev A1, Page 19/21 Figure 7: Application schematic It would also be possible to combine iC-LO and iC-DN/DP/DX as switches and iC-WD as a voltage regulator. This would work for a supply voltage range of between 8 and 36 V. iC-LO TRIANGULATION SENSOR ar y n i im prel Rev A1, Page 20/21 iC-Haus expressly reserves the right to change its products and/or specifications. An info letter gives details as to any amendments and additions made to the relevant current specifications on our internet website www.ichaus.de/infoletter; this letter is generated automatically and shall be sent to registered users by email. Copying – even as an excerpt – is only permitted with iC-Haus’ approval in writing and precise reference to source. iC-Haus does not warrant the accuracy, completeness or timeliness of the specification and does not assume liability for any errors or omissions in these materials. The data specified is intended solely for the purpose of product description. No representations or warranties, either express or implied, of merchantability, fitness for a particular purpose or of any other nature are made hereunder with respect to information/specification or the products to which information refers and no guarantee with respect to compliance to the intended use is given. In particular, this also applies to the stated possible applications or areas of applications of the product. iC-Haus conveys no patent, copyright, mask work right or other trade mark right to this product. iC-Haus assumes no liability for any patent and/or other trade mark rights of a third party resulting from processing or handling of the product and/or any other use of the product. As a general rule our developments, IPs, principle circuitry and range of Integrated Circuits are suitable and specifically designed for appropriate use in technical applications, such as in devices, systems and any kind of technical equipment, in so far as they do not infringe existing patent rights. In principle the range of use is limitless in a technical sense and refers to the products listed in the inventory of goods compiled for the 2008 and following export trade statistics issued annually by the Bureau of Statistics in Wiesbaden, for example, or to any product in the product catalogue published for the 2007 and following exhibitions in Hanover (Hannover-Messe). We understand suitable application of our published designs to be state-of-the-art technology which can no longer be classed as inventive under the stipulations of patent law. Our explicit application notes are to be treated only as mere examples of the many possible and extremely advantageous uses our products can be put to. iC-LO TRIANGULATION SENSOR ar y n i im prel Rev A1, Page 21/21 ORDERING INFORMATION Type Package Order Designation iC-LO oBGA™ LO1C iC-LO oBGA LO1C Evaluation Board iC-LO EVAL LO1D For technical support, information about prices and terms of delivery please contact: iC-Haus GmbH Am Kuemmerling 18 D-55294 Bodenheim GERMANY Tel.: +49 (61 35) 92 92-0 Fax: +49 (61 35) 92 92-192 Web: http://www.ichaus.com E-Mail: [email protected] Appointed local distributors: http://www.ichaus.com/sales_partners