Designing the VCNL4200 Into an Application

Similar documents
Designing the VCNL4200 Into an Application

Designing the VCNL4040 Into an Application

IR Sensor Module for Reflective Sensor, Light Barrier, and Fast Proximity Applications

IR Sensor Module for Reflective Sensor, Light Barrier, and Fast Proximity Applications

IR Receiver Module for Light Barrier Systems

IR Receiver Module for Light Barrier Systems

4 20mA Interface-IC AM462 for industrial µ-processor applications

HS0038B5. IR Receiver Modules for Remote Control Systems. Vishay Semiconductors

Dimensions. Model Number. Electrical connection emitter. Features. Electrical connection receiver. Product information. Indicators/operating means

IR Receiver for High Data Rate PCM at 455 khz Description

IR Receiver Modules for Remote Control Systems

TSOP322.. IR Receiver Modules for Remote Control Systems VISHAY. Vishay Semiconductors

Photo Modules for PCM Remote Control Systems

TSOP12.. IR Receiver Modules for Remote Control Systems VISHAY. Vishay Semiconductors

IR Receiver Modules for Remote Control Systems

IR Receiver Modules for Remote Control Systems

IR Receiver Modules for Remote Control Systems

Usually use an op-amp circuit Often found as a pre-amplifier to ADC circuitry Simple circuit to computer natural logarithm

IR Receiver Modules for Remote Control Systems

Photo Modules for PCM Remote Control Systems

IR Receiver Modules for Remote Control Systems

IR Receiver Modules for Remote Control Systems

Dimensions. Transmitter Receiver ø2.6. Electrical connection. Transmitter +UB 0 V. Emitter selection. = Light on = Dark on

EE 40 Final Project Basic Circuit

Dimensions. Transmitter Receiver ø2.6. Electrical connection. Transmitter +UB 0 V. Emitter selection. = Light on = Dark on

IR Receiver Module for Light Barrier Systems

Electrical connection

EXPERIMENT #9 FIBER OPTIC COMMUNICATIONS LINK

IR Receiver Modules for Remote Control Systems

IR Receiver Modules for Remote Control Systems

IR Receiver Modules for Remote Control Systems

Programmable DC Electronic Load 8600 Series

Programmable DC Electronic Loads 8600 Series

IR Receiver Modules for Remote Control Systems

IR Receiver Modules for Remote Control Systems

Photo Modules for PCM Remote Control Systems

ECMA st Edition / June Near Field Communication Wired Interface (NFC-WI)

Synchronization of single-channel stepper motor drivers reduces noise and interference

IR Receiver Modules for Remote Control Systems

IR Receiver Modules for Remote Control Systems

Special Features. Mechanical Data. Transmitte r with TSHFxxxx 1 OUT

IR Receiver Modules for Remote Control Systems

Programmable DC Electronic Loads 8600 Series


Retro-reflective photoelectric sensors with polarization filter. Dimensioned drawing

Installation and Operating Instructions for ROBA -brake-checker Typ

The ramp is normally enabled but can be selectively disabled by suitable wiring to an external switch.

Diodes. Diodes, Page 1

Explanation of Maximum Ratings and Characteristics for Thyristors

Control circuit for a Self-Oscillating Power Supply (SOPS) TDA8385

4.5 Biasing in BJT Amplifier Circuits

Solid-state Multi-functional Timer

Retro-reflective photoelectric sensors with polarization filter. Dimensioned drawing

IR Receiver Modules for Remote Control Systems

ECMA-373. Near Field Communication Wired Interface (NFC-WI) 2 nd Edition / June Reference number ECMA-123:2009

Application Note 5324

TEA2019 CURRENT MODE SWITCHING POWER SUPPLY CONTROL CIRCUIT DIRECT DRIVE OF THE EXTERNAL SWITCHING TRANSISTOR POSITIVE AND NEGATIVE OUTPUT CUR-

Industrial, High Repetition Rate Picosecond Laser

Trigger high-speed, retro-reflective sensors for bottles. Dimensioned drawing

PRM and VTM Parallel Array Operation

Application Note AN-1083

Primary Side Control SMPS with Integrated MOSFET

P. Bruschi: Project guidelines PSM Project guidelines.

AN303 APPLICATION NOTE

Time Control Technique

GG6005. General Description. Features. Applications DIP-8A Primary Side Control SMPS with Integrated MOSFET

EXPERIMENT #4 AM MODULATOR AND POWER AMPLIFIER

Time Control Technique

Power losses in pulsed voltage source inverters/rectifiers with sinusoidal currents

49.8. Control Relays and Timers. Contents. Product Selection Guide. Timing Relays

Investigation and Simulation Model Results of High Density Wireless Power Harvesting and Transfer Method

Retro-reflective photoelectric sensors with polarization filter for bottles. Dimensioned drawing

MODEL: M6NXF1. POWER INPUT DC Power R: 24 V DC

Power Amplifier EEA-PAM-5**-A-32 for Proportional Control Valves Contents The following power amplifier models are covered in this catalog

Sensing method Application Appearance Sensing distance Model Convergent-reflective Small type 30±3 mm

MODEL: M6SXF1. POWER INPUT DC Power R: 24 V DC

Multicolor contrast sensor. Dimensioned drawing

MX6895BETR. -550V Full Bridge Gate Driver INTEGRATED CIRCUITS DIVISION. Features. Description. Applications. Ordering Information

Designing the VCNL4035X01 Into an Application

Universal microprocessor-based ON/OFF and P programmable controller MS8122A MS8122B

Memorandum on Impulse Winding Tester

Laser retro-reflective photoelectric sensor with polarisation filter. Dimensioned drawing

ORDER INFORMATION TO pin 320 ~ 340mV AMC7150DLF

Table of Contents. 3.0 SMPS Topologies. For Further Research. 3.1 Basic Components. 3.2 Buck (Step Down) 3.3 Boost (Step Up) 3.4 Inverter (Buck/Boost)

Laser retro-reflective photoelectric sensor with polarisation filter. Dimensioned drawing. Teach button Optical axis Indicator diode

ISSCC 2007 / SESSION 29 / ANALOG AND POWER MANAGEMENT TECHNIQUES / 29.8

Laser retro-reflective photoelectric sensor with polarization filter. Dimensioned drawing

Ultracompact 6-Channel Backlight and Flash/Torch White LED Driver

Retro-reflective photoelectric sensor for foils. Dimensioned drawing

General data 8/91. Overview

Retro-reflective photoelectric sensor with polarization filter for bottles. Dimensioned drawing

CURRENT MODE PWM+PFM CONTROLLER WITH BUILT-IN HIGH VOLTAGE MOSFET

RITEC, Inc. 60 Alhambra Rd., Suite 5 Warwick, RI (401) FAX (401) Powerful Ultrasonic Research Tool. A Modular Approach

Photo-electric detectors

Obsolete Product(s) - Obsolete Product(s)

AK8777B. Overview. Features

Laser retro-reflective photoelectric sensor with polarization filter. Dimensioned drawing

VIPer12ADIP / VIPer12AS

B-MAC Tunable MAC protocol for wireless networks

Signal Characteristics

Transcription:

PS-PD ALS-PD Oscillaor VISHAY SEMICONDUCTORS www.vishay.com Opical Sensors Designing he VCNL42 Ino an Applicaion By Reinhard Schaar INTRODUCTION AND BASIC OPERATION The VCNL42 is a fully inegraed proximiy and ambien ligh sensor. I combines an infrared emier and phoodiode for proximiy measuremen, ambien ligh sensor (ALS), and signal processing IC in a single package wih a 16-bi ADC for ALS and a 12-bi / 16-bi ADC for proximiy ADC. The device provides ambien ligh sensing o suppor convenional backligh and display brighness auo-adjusmen, and proximiy sensing o recognize objecs up o a disance of 1.5 m (6"). This sand-alone componen grealy simplifies he use and design-in of a proximiy sensor (PS) in consumer and indusrial applicaions, because he embedded IRED and phoodiode are exacly mached o each oher. The VCNL42 feaures a miniaure, surface-moun 8. mm by 3. mm leadless package (LLP) wih a heigh of 1.8 mm. The device is designed specifically o mee he requiremens for applicaions where objecs need o be idenified a far disances. Through is sandard I 2 C bus serial digial inerface, he VCNL42 allows easy access o proximiy signal and ligh inensiy measuremens. The programmable inerrup funcion offers wake-up funcionaliy for he microconroller when a proximiy even or ambien ligh change occurs, which reduces processing overhead by eliminaing he need for coninuous polling. Fig. 2 - VCNL42 Boom View COMPONENTS (BLOCK DIAGRAM) The major componens of he VCNL42 are shown in he block diagram. In addiion o he ASIC wih he ambien ligh and proximiy phoodiode, he infrared emier is also implemened. Is cahode needs o be conneced o he driver exernally (see Fig. 6). GND Cahode (sensor) 1 1 SCL DSP PS 2 9 SDA daa buffer Driver VCNL42 Oupu buffer I 2 C inerface ALS 16-bi daa buffer 3 8 V DD INT Low pass filer NC 4 Temperaure sensor 7 NC Fig. 1 - VCNL42 Top View IRED Cahode Anode 6 5 (IRED) Fig. 3 - VCNL42 Deailed Block Diagram The inegraed infrared emier has a peak wavelengh of 94 nm. I emis ligh ha reflecs off an objec wihin cm of he sensor. Two added lenses help o increase peak inensiy and sensiiviy by enabling a small angle of jus ± 15 for he emier and ± 3 for he deecor, as shown in Fig. 4 and Fig. 5. Revision: 21-Mar-18 1 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9

Designing he VCNL42 Ino an Applicaion Relaive Radian Inensiy Relaive Radian Inensiy (mw/sr) Relaive Radian Inensiy Normalized Oupu (%) 1..9.8.7.6.5.4.3.2.1 Axis Tile 1 - -75-5 -25 25 5 75 Angular Displacemen Fig. 4 - Relaive Radian Inensiy vs. Angular Displacemen (Caresian view) 11 9 8 7 6 5 4 3 2 1 Axis Tile Fig. 5 - ALS Normalized Oupu vs. View Angle The ASIC delivers a curren ha is already wihin 5 ma of being high enough o drive a small exernal FET. A series resisor added o he IRED defines he waned pulse curren, as shown in Fig. 19. The infrared ligh is emied in shor pulses wih a programmable duy raio from 1/16 o 1/128. The proximiy phoodiode receives he ligh ha is refleced off he objec and convers i o a curren. I has a peak sensiiviy of 94 nm, maching he peak wavelengh of he emier. The sensiiviy of he proximiy sage is also programmable by choosing from four differen inegraion imes. I is insensiive o ambien ligh. I ignores he DC componen of ligh and looks for he pulsed ligh a he proximiy frequency used by he emier. 1-9 -6-3 3 6 9 View Angle The ambien ligh sensor receives he visible ligh and convers i o a curren. The human eye can see ligh wih wavelenghs from 4 nm o 7 nm, wih a peak of 56 nm. Vishay s ambien ligh sensor closely maches his range of sensiiviy. I has peak sensiiviy a 54 nm and a bandwidh from 43 nm o 61 nm. The applicaion-specific inegraed circui, or ASIC, includes an LED driver, I 2 C bus inerface, amplifier, inegraed analog o digial converer, oscillaor, and Vishay s secre sauce signal processor. For proximiy, i convers he curren from he phoodiode o an 12-bi / 16-bi digial daa oupu value. For ambien ligh sensing, i convers he curren from he ambien ligh deecor, amplifies i, and convers i o a 16-bi digial oupu sream. PIN CONNECTIONS Fig. 3 shows he pin assignmens of he VCNL42. The connecions include: Pin 1 - connec o ground Pin 2 - IR cahode (sensor side) Pin 3 - V DD o he power supply Pin 4 - no connecion Pin 5 - IRED cahode (IRED side) Pin 6 - IRED anode o he power supply resp. FET Pin 7 - no connecion Pin 8 - INT o microconroller Pin 9 - SDA o microconroller Pin 1 - SCL o microconroller The power supply for he ASIC (V DD ) has a defined range from 2.5 V o 3.6 V. I is bes if he V DD is conneced o a regulaed power supply and pin 6, he anode of he buil-in IRED, is conneced - via a small FET - direcly o he baery. This eliminaes any influence of he high infrared emier curren pulses on he V DD supply line. If separae power supplies for he V DD and he infrared emier are used, and here are no negaive spikes below 2.5 V, a small nf capacior should be placed close o he V DD pin and a 2.2 μf capacior a he source of he exernal driver FET. This is sufficien a he supply volage for he IRED, which needs o be beween 3.3 V and 5 V. In addiion, a 5 kω pull-up resisor is needed a he gae. A he cahode of he IRED (pin 5), a curren-defining resisor is needed. This could be as low as 2.7 Ω, which would hen lead o abou 8 ma. The SCL and SDA, as well as he inerrup lines, need pull-up resisors. The resisor values depend on he applicaion and on he I 2 C bus speed. Common values are abou 2.2 kω o 4.7 kω for he SDA and SCL, and abou 8.2 kω o 22 kω for he inerrup line. Revision: 21-Mar-18 2 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9

Designing he VCNL42 Ino an Applicaion 1.8 V o 3.6 V R1 R2 R3 2.6 V o 3.6 V C1 V DD (3) 5 V R4 = 5K R5 = 2R7 T1 = Si231 nf T1 C2 S G R4 2.2 μf D R5 Cahode (2) (driver) Anode (6) Cahode (5) (IRED) GND (1) VCNL42 SDA (9) SCL (1) INT (8) Fig. 6 - VCNL42 Applicaion Circui Hos micro conroller I 2 C bus daa SDA I 2 C bus clock SCL GPIO (INT) I is surely also possible o operae he VCNL42 wihou his addiional ransisor and connec he sensor-inernal IRED direc o power supply. Now one may chose he funcion LED_I o opimize for waned IRED curren beween 5 ma and 2 ma. 1.8 V o 3.6 V R1 R2 R3 GND (1) 2.6 V o 3.6 V 2.6 V o 5 V C2 47 nf C1 22 μf V DD (3) Anode (6) Cahode (5) (IRED) Cahode (2) (driver) VCNL42 SDA (9) SCL (1) INT (8) Hos micro conroller I 2 C bus daa SDA I 2 C bus clock SCL GPIO (INT) Fig. 7 - VCNL42 Applicaion Circui Wihou FET MECHANICAL DESIGN CONSIDERATIONS The VCNL42 is a fully inegraed proximiy and ambien ligh sensor. Compeing sensors use a discree infrared emier, which leads o complex geomerical calculaions o deermine he posiion of he emier. Wih he VCNL42, he only dimensions ha he design engineer needs o consider are he disance from he op surface of he sensor o he ouside surface of he window, and he size of he window. These dimensions will deermine he size of he deecion zone. The angle of half inensiy of he emier is abou ± 15, as shown in Fig. 8, and he sensiiviy of he phoodiodes is abou ± 3. ± 3 ± 15 Fig. 8 - Emier and Deecor Angle Revision: 21-Mar-18 3 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9

Designing he VCNL42 Ino an Applicaion To achieve a good ambien ligh response, he diameer of he deecor hole wihin he cover glass should no be oo small. An angle of ± 3 will be sufficien in mos applicaions. The package drawing shows he posiion of he IRED and phoosensiive area. The +3 line should be se a he side of he phoodiode, owards pin 1. The -3 line should be se no closer han 1 mm o ha edge. Please also noe from Fig. 5 ha he viewing angle of he ALS is very small, so accurae values will only be measured if he ligh source is direcly above he sensor. The following are dimensions for he disance from he op surface of he sensor o he ouside surface of he glass, a, and he widh of he window, d. a d α x Ligh barrier Fig. 9 - Window Diameer for Deecor Hole For he deecor hole, a diameer of 2 mm would be needed. 1.8 D For he smaller IRED hole, he diameer can be as small as 1.7 mm. Ligh barrier Fig. 11 - Window Diameers for IRED Hole The widh calculaion for disances from mm o 3 mm resuls in: a =. mm x =. d = 1.7 mm +. = 1.7 mm a =.5 mm x =.15 d = 1.7 mm +.3 = 2. mm a = 1. mm x =.3 d = 1.7 mm +.6 = 2.3 mm a = 1.5 mm x =.45 d = 1.7 mm +.9 = 2.6 mm a = 2. mm x =.6 d = 1.7 mm + 1.2 = 2.9 mm a = 2.5 mm x =.75 d = 1.7 mm + 1.5 = 3.2 mm a = 3. mm x =.9 d = 1.7 mm + 1.8 = 3.5 mm The mechanical design also needs he placemen of a ligh barrier in beween he IRED and deecor o avoid any crossalk. a d x α 1.8 D Ø 1.7 Ø 2.5 Fig. 1 - Ligh Hole Diameers The diameer needs o be increased wih disances beween he sensor and cover glass according o he following calculaion. For he deecor hole, he widh calculaion for disances from mm o 3 mm resuls in: a =. mm x =. d = 2. mm +. = 2. mm a =.5 mm x =.29 d = 2. mm +.58 = 2.58 mm a = 1. mm x =.58 d = 2. mm + 1.16 = 3.16 mm a = 1.5 mm x =.87 d = 2. mm + 1.74 = 3.74 mm a = 2. mm x = 1.16 d = 2. mm + 2.32 = 4.32 mm a = 2.5 mm x = 1.45 d = 2. mm + 2.9 = 4.9 mm a = 3. mm x = 1.74 d = 2. mm + 3.48 = 5.48 mm Revision: 21-Mar-18 4 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9

Designing he VCNL42 Ino an Applicaion PROXIMITY SENSOR The main DC ligh sources found in he environmen are sunligh and ungsen (incandescen) bulbs. These kinds of disurbance sources will cause a DC curren in he deecor inside he sensor, which in urn will produce noise in he receiver circui. The negaive influence of his DC ligh can be reduced by opical filering, bu is reduced much more efficienly by a so-called DC kill funcion. The proximiy phoodiode shows is bes sensiiviy a abou 94 nm, as shown in Fig. 12. Relaive Response (%) Axis Tile 9 8 ALS 7 6 PS 5 4 3 2 1 1 4 5 6 7 8 9 Wavelengh (nm) Fig. 12 - Specral Sensiiviy of ALS and Proximiy Phoodiode The proximiy sensor uses a shor pulse signal of abou 3 μs (PS_IT = 1T) up o 24 μs (PS_IT = 9T). The on / off duy raio seing now defines which repeiion rae o be used, which can be programmed from 1/16 up o 1/128. In addiion o DC ligh source noise, here is some reflecion of he infrared emied ligh off he surfaces of he componens surrounding he VCNL42. The disance o he cover, proximiy of surrounding componens, olerances of he sensor, ambien emperaure, and ype of window maerial used all conribue o his reflecion. The resul of he reflecion and DC noise is he producion of an oupu curren on he proximiy and ligh-sensing phoodiode. This curren is convered ino a coun called he offse coun. In addiion o he offse coun, here could also be a small noise floor during he proximiy measuremen, which comes from he DC ligh suppression circuiry. This noise is ypically jus one or wo couns. Only wih ligh sources wih srong infrared conen could i be in he range from ± 5 couns o ± 1 couns. The applicaion should ignore his offse and small noise floor by subracing hem from he oal proximiy readings. Resuls mos ofen do no need o be averaged. If an objec wih very low refleciviy or a longer range needs o be deeced, he sensor provides a regiser where he cusomer can define he number of consecuive measuremens ha he signal mus exceed before producing an inerrup. This provides sable resuls wihou requiring averaging. PROXIMITY CURRENT CONSUMPTION Boh he ambien ligh sensor and he proximiy sensor wihin he VCNL42 offer a separae shudown mode. Defaul values afer sar-up have hem boh disabled. The applicaion eiher or boh as needed. The VCNL42 s embedded LED driver drives he inernal IRED via he LED CATHODE pin wih a pulsed duy cycle. Wih he given applicaion circui in Fig. 6., he curren wih which he LED is driven depends on he series resisor R5. The value chosen for he resisor depends on he I F vs. V F characerisics as shown in Fig. 13. 1 1 1. 1.2 1.4 1.6 1.8 2. 2.2 2.4 2.6 2.8 Fig. 13 - Forward Curren vs. Forward Volage If an 8 ma drive curren is o be used, he ypical forward volage (V F ) is 2.5 V, as shown on he graph. Taking ino accoun is inernal R DSon, here will be an addiional.2 V o.3 V volage drop across he FET. A a V DD of 5 V his leaves a 2.2 V drop across R5. R = V/I = 2.2 V/.8 A = 2.7 Ω The IRED on / off duy raio is programmable by an I 2 C command a regiser PS_Duy. Depending on his pulse / pause raio, he overall proximiy curren consumpion can be calculaed. When a higher measuremen speed or faser response ime is needed, PS_Duy may be seleced o a maximum value of 1/16, which means one measuremen will be made every 5 ms, bu his will hen also lead o he highes curren consumpion: PS_Duy = 1/16: peak IRED curren = 8 ma, average curren consumpion is 8 ma/16 = 5.3 ma. For proximiy measuremens execued every 3 ms only: PS_Duy = 1/128 peak IRED curren = 8 ma, average curren consumpion is 8 ma/128 =.67 ma. Revision: 21-Mar-18 5 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9 I F - Forward Curren (ma) 1 p = μs Axis Tile V F - Forward Volage (V)

Designing he VCNL42 Ino an Applicaion The above is always valid for he normal pulse widh of T = 1T = 32 μs, as well as for 2T, 4T, 8T, and 9T. These pulse lenghs are widened according o he facor, resuling in 24 μs for 9T, bu he repeiion ime is also exended, ending in a period ime of abou 3 ms. Besides PS_IT, here is also he possibiliy for muli-pulsing, PS_MPS. Insead of one single pulse per every defined ime frame, one can program 2, 4, or even 8 pulses. This leads o a longer IRED on-ime for each proximiy measuremen, which also resuls in a higher deecion range. Bu hese eigh pulses insead of jus one could already be long enough ha he possible IRED curren needs o be reduced. The reducion is now also dependen on he duy raio. This duy raio says idenical, wheher i is jus one or up o eigh pulses ha are programmed. Wih PS_IT = 9T, which leads o abou 24 μs single pulses, he pulses will occur quickly afer each oher eigh imes (please see scope screenshos below). 9T and 1/16 = 38 ms and MP = 2 pulses So, one needs o reduce he IRED curren here o abou 5 ma (see Fig. 15 below), or he repeiion rae needs o be se o lower values, such as 1/16. For a duy cycle of 1/64, hese pulse burss will occur every 15 ms; so, abou seven measuremens per second and he pulse-pause raio will go down o 2 ms/15 ms =.13. Wih his, 6 ma will be possible. I F - Forward Curren (ma) 5 p /T =.1.2.1.1 1 2 1 p - Pulse Duraion (ms) T amb < 5 C.5.2.5.1 Fig. 15 - Pulse Forward Curren vs. Pulse Duraion 9T and 1/16 = 38 ms and MP = 4 pulses 9T and 1/16 = 38 ms and MP = 8 pulses An exremely power-efficien way o execue proximiy measuremens is o apply a PS acive force mode (regiser: PS_CONF3, command: PS_AF = 1). If only a single proximiy measuremen needs o be done, PS_AF is se o 1 and hen PS_SD = = acive. Seing PS_Trig = 1 will hen execue jus one single measuremen. In his mode, only he I2C inerface is acive. In mos consumer elecronic applicaions he sensor will spend he majoriy of ime in sleep mode; i only needs o be woken up for a proximiy or ligh measuremen. In sandby mode he power consumpion is abou.2 μa. Fig. 14 - Proximiy Measuremens Wih PS_Duy = 1/16, PS_IT = 9T, and MP For PS_MPS = 8 pulses, he oal IRED on-ime wihin one ime frame is hen 8 x 24 μs; so, abou 2 ms. The oal off-ime beween wo MPS proximiy measuremens is hen no 38 ms, bu 38 ms - 7 x.24 ms = 38 ms - 1.7 ms = 36 ms. Wih his he raio p /T = 2 ms/36 ms =.55. Revision: 21-Mar-18 6 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9

Designing he VCNL42 Ino an Applicaion INITIALIZATION AND I 2 C TIMINGS The VCNL42 conains nine 16-bi command codes for operaion conrol, parameer se up, and resul buffering. All regisers are accessible via I 2 C communicaion. The buil-in I 2 C inerface is compaible wih he sandard and high speed I 2 C modes. The I 2 C H-level volage range is from 2.5 V o 3.6 V. There are only hree regisers ou of he eigh ha ypically need o be defined: 1. PS_Duy = 1/16 o 1/128 (proximiy duy raio), PS_IT (proximiy inegraion ime = pulse lengh), PS_PERS (number of consecuive measuremens above / below hreshold), and PS_SD (PS power_on) 2. ALS_IT (ALS_inegraion ime) ALS_PERS (number of consecuive measuremens above / below hreshold), and ALS_SD (ALS power_on) REGISTER ALS_CONF # [xh] 3. Definiion of he hreshold value from he number of couns he deecion of an objec should be signaled: Proximiy TOP Threshold REGISTER, PS_THDL_L in lower bye for #6, and PS_THDL_H in upper bye of #6 To define he infrared emier curren, as well as he inegraion ime (lengh of he proximiy pulsing), evaluaion ess should be performed using he leas reflecive maerial a he maximum disance specified. Fig. 16 shows he ypical digial couns oupu versus disance for an inegraion ime of 9T, bu wihou muli-pulsing. The reflecive reference medium is he Kodak Gray card. This card shows approximaely 18 % refleciviy a 94 nm. Proximiy Value (couns) Proximiy Value (couns) 1 1 Axis Tile Media: Kodak Gray Card 9T and 8 ma (MPS = 1) 1.1 1 1 Disance o Reflecing Card (mm) Fig. 16 - Proximiy Value vs. Disance for PS_IT= 9T and I_IRED = 8 ma 1 The above diagram shows he possible deecion couns wih a pulse of 24 μs. Fig. 17 - Proximiy Value vs. Disance for PS_IT = 9T, MPS = 8 pulses and I_IRED = 8 ma Applying eigh muli-pulses wih each 24 μs will surely lead o sauraion for low disances of an objec, especially for whie cards. Fig. 18 - Proximiy Value vs. Disance (axis wih linear values) Presening he graph above in linear view shows daa values beween 2 cm and 1 m. Revision: 21-Mar-18 7 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9 Proximiy Value (couns) Proximiy Value (couns) Proximiy Value (couns) Proximiy Value (couns) 1 1 Axis Tile Media: Kodak Gray Card 9T and 8 ma (MPS = 8) 1.1 1 1 45 4 35 3 25 2 15 5 Disance o Reflecing Card (mm) Axis Tile 2 4 6 Media: Kodak Gray Card 9T and 8 ma (MPS = 8) 8 Disance o Reflecing Card (mm) 1 1

Designing he VCNL42 Ino an Applicaion Proximiy Value (couns) Proximiy Value (couns) 2 18 16 14 12 8 6 4 2 Axis Tile 5 75 125 Disance o Reflecing Card (mm) 1 2 Fig. 19 - Proximiy Couns vs. Disance Jus for > 5 cm Disance Reducing his graph o jus more han.5 m shows abou 2 couns a a disance of 1.5 m, even for he Kodak Gray card. Wih defining he duy ime (PS_Duy), he repeiion rae = he number of proximiy measuremens per second (speed of proximiy measuremens) is defined. This is possible beween 5 ms (more han measuremens/s) by programming PS_Duy wih 1/16 and 34 ms (abou 3 measuremens/s) wih programming PS_Duy wih 1/128. I ends up a abou 3 ms duy ime when programmed o he longes possible pulse of.24 ms (PS_IT = 9T). 1T = 32 μs 1T and 1/16 = 4.2 ms Media: Kodak Gray Card 9T and 8 ma (MPS = 8) 15 175 9T = 24 μs Fig. 21 - Proximiy Measuremens Wih PS_Duy = 1/128 and PS_IT = 9T This duy cycle also deermines how fas he applicaion reacs when an objec appears in, or is removed from, he proximiy zone. Reacion ime is also deermined by he number of couns ha mus be exceeded before an inerrup is se. This is possible o define wih proximiy persis: PS_PERS. Possible values are from 1 o 4. To define all hese regiser values, an evaluaion es should be performed. The SensorXplorer TM allows you o perform evaluaion ess and properly se he regisers for your applicaion. The SensorXplorer and he VCNL42 sensor board is available from any of Vishay s disribuors. Timing For an I 2 C bus operaing a khz, o wrie or read an 8-bi bye, plus sar (or sop) and bi acknowledgemen, akes μs. Togeher wih he slave address bye and he 8-bi command code bye, plus he 16-bi daa, his resuls in a oal of 4 μs. When he device is powered on, he iniializaion wih jus hese five regisers needs 5 x 4 byes (slave address, command regiser, and 16-bi daa) for a oal of 2 byes. So, 2 x μs = 2 μs = 2 ms. Send Bye Wrie Command o VCNL42 9T and 1/128 = 34 ms 1 7 1 1 8 1 8 1 8 1 1 S Slave Address Wr A Command Code A Daa Bye Low A Daa Bye High A P Fig. 2 - Proximiy Measuremens Wih PS_Duy = 1/16 and PS_IT = 1T The read-ou of 16-bi daa would ake a oal of five byes (slave address, command code, slave address wih read bi se) and 16-bi daa sen from he VCNL42. So, 5 μs: Receive Bye Read Daa from VCNL42 Power Up The release of he inernal rese, he sar of he oscillaor, and he signal processor need 2.5 ms Revision: 21-Mar-18 8 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9 1 S 7 Slave Address 1 1 8 1 1 7 1 1 8 1 8 1 1 Wr A Command Code A S Slave Address Rd A Daa Bye Low A Daa Bye High A P

Designing he VCNL42 Ino an Applicaion Iniialize Regisers Wrie o hree regisers 12 μs - Proximiy duy raio - ALS inegraion ime - Proximiy inerrup TOP hreshold Afer programming command code 6 wih he evaluaed hreshold values, command code 4 wih he provided and proposed values, and command code wih he needed ALS inegraion ime, he command code 3 will power up he sensor wih he needed proximiy pulse and in he waned duy cycle. Asking for one forced proximiy measuremen For (acive forced, PS_IT = 2) Time o rigger [.5 x PS_IT] DC-kill ambien ligh [3 x PS_IT] Proximiy measuremen [1 x PS_IT] IRED shudown [1 x PS_IT] Read ou of he proximiy daa oal:.5t 3T 1T 1T 4 μs 5 μs 3 μs μs μs 5 μs 64 μs AMBIENT LIGHT SENSING Ambien ligh sensors are used o deec ligh or brighness in a manner similar o he human eye. They allow seings o be adjused auomaically in response o changing ambien ligh condiions. By urning on, urning off, or adjusing feaures, ambien ligh sensors can conserve baery power or provide exra safey by eliminaing he need for manual adjusmens. Illuminance is he measure of he inensiy of a ligh inciden on a surface and can be correlaed o he brighness perceived by he human eye. In he visible range, i is measured in unis called lux. Ligh sources wih he same lux measuremen appear o be equally brigh. In Fig. 21, he incandescen ligh and sunligh have been scaled o have he same lux measuremen. In he infrared region, he inensiy of he incandescen ligh is significanly higher. A sandard silicon phoodiode is much more sensiive o infrared ligh han visible ligh. Using i o measure ambien ligh will resul in serious deviaions beween he lux measuremens of differen ligh sources and human eye percepion. Using Vishay s ambien ligh sensors will solve his problem because hey are mos sensiive o he visible par of he specrum. Fig. 22 - Timing Specificaion for Acive Forced Mode Proximiy Value (couns) Relaive Specral Sensiiviy 1.2 1..8.6.4.2 Ambien ligh sensor Axis Tile Visible infrared Incandescen ligh Silicon phoodiode Human eye 25 5 75 Phoopic peak 55 nm Wavelengh (nm) Wavelengh (nm) 125 1 15 Fig. 23 - Relaive Specral Sensiiviy vs. Wavelengh The human eye can see ligh wih wavelenghs from 4 nm o approximaely 7 nm. The ambien ligh sensor array in he VCNL42 closely maches his range of sensiiviy and provides a digial oupu based on a 16-bi signal. Revision: 21-Mar-18 9 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9

Designing he VCNL42 Ino an Applicaion AMBIENT LIGHT MEASUREMENT, RESOLUTION, AND CALCULATION The ambien ligh sensor s measuremen resoluion is defined o abou.3 lux/coun for he highes sensiiviy wih a 64 ms inegraion ime. The 16-bi digial resoluion is equivalen o 65 536 couns. This yields a measuremen range from.3 lux o 1311 lux. For higher illuminance, a shorer inegraion ime needs o be seleced, which resuls in lower resoluion. ALS RESOLUTION AND MAXIMUM DETECTION RANGE ALS_IT (7 : 6) ALS_IT INTEGRATION TIME SENSITIVITY (lx/sep) MAXIMUM DETECTION RANGE (lx) (, ) 5 ms.24 1573 (, 1) ms.12 786 (1, ) 2 ms.6 393 (1, 1) 4 ms.3 197 AMBIENT LIGHT SENSOR CURRENT CONSUMPTION The ambien ligh sensor can operae wih four selecable inegraion imes from 8 ms o 64 ms. During ALS measuremens, he device consumes approximaely 213 μa. AMBIENT LIGHT INITIALIZATION AND I 2 C INTERFACE For ambien ligh sensing, only he low bye of command code # needs o be iniialized: ALS_SD (bi = = ALS Power_on) ALS_INT_EN (bi 1 = 1 = ALS inerrup enable) ALS_PERS (bi 2, 3: no. of inerrup persisence) ALS_IT (bi 6, 7: inegraion ime) The rae for self-imed measuremens is dependen on he inegraion ime. For unknown brighness condiions, i should always be sared wih he shores inegraion ime. This avoids possible overload / sauraion. Only if ambien ligh resul regiser values are very low, e.g. no conen wihin he high bye of he 16-bi regiser (#9), should he nex more sensiive inegraion ime be used. Calculaing he available lux level is done by muliplying he ambien ligh resul value from regiser 9 (L and H bye) wih he inegraion ime / resoluion. Example: inegraion ime is a ms and x9h and x9l show 11 and 11111, expressed in decimals: 21 622 couns leading o 21 622 x.12 o 259 lx. Wihin he ready-made applicaion, his facor should be fine-uned, as cover glass and he size of he opening will also impac he resul. Inerrup The VCNL42 feaures a very inelligen inerrup funcion. The inerrup funcion enables he sensor o work independenly unil a predefined proximiy or ambien ligh even or hreshold occurs. I hen ses an inerrup which requires he microconroller o awaken. This helps cusomers reduce heir sofware effor, and reduces power consumpion by eliminaing polling communicaion raffic beween he sensor and microconroller. The inerrup pin, pin 8, of he VCNL42 should be conneced o a dedicaed GPIO of he conroller. A pull-up resisor is added o he same power supply ha he conroller is conneced o. This INT pull-up resisor may be in he range of 8.2 kω o kω. The evens ha can generae an inerrup include: 1. A lower and an upper hreshold for he proximiy value can be defined. If he proximiy value falls below he lower limi or exceeds he upper limi, an inerrup even will be generaed. In his case, an inerrup flag bi in he read-ou regiser xb will be se and he inerrup pad of he VCNL will be pulled o low by an open drain pull-down circui. In order o eliminae false riggering of he inerrup by noise or disurbances, i is possible o define he number of consecuive measuremens ha have o occur before he inerrup is riggered 2. A lower and an upper hreshold for he ambien ligh value can be defined. If he ambien ligh value falls below he lower limi or exceeds he upper limi, an inerrup even will be generaed. There are wo ses of high and low hreshold regisers, so boh hresholds for proximiy and ambien ligh can be observed in parallel Besides his normal inerrup mode, an auomaic mode is also available, which is called he logic oupu mode. This mode auomaically pulls he inerrup pin low when an objec exceeds he programmed upper hreshold and also reses i if he lower hreshold is exceeded. So no acions from he conroller are needed if, for example, a smarphone is held close o an ear bu is quickly aken away (e.g. for a shor look a he display). Applicaion Example The following example will demonsrae he ease of using he VCNL42 sensor. Cusomers are srongly encouraged o purchase a SensorXplorer and VCNL42 sensor board from any lised disribuer: vishay.com/opoelecronics/sensorxplorer Revision: 21-Mar-18 1 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9

Designing he VCNL42 Ino an Applicaion Offse During developmen, he applicaion-specific offse couns for he sensor were deermined. As previously menioned, he offse coun is affeced by he componens surrounding he VCNL42, he window or cover being used, he disance from he sensor o he cover, and emier inensiy, defined by he forward curren, which is dependen on he value of he series resisor used. In he following example, wih a cover over he sensor and choosing a 2.7 Ω series resisor, abou 8 ma peak curren flows hrough he sensor s inernal IRED and he offse couns are seven couns (Fig. 24). Offse couns vary by applicaion and can be anywhere from couns o several ens of couns. I is imporan o noe ha he offse coun may change slighly over ime due o, for example, he window becoming scrached or diry, or being exposed o high emperaure changes. If possible, he offse value should occasionally be checked and, if necessary, modified. Proximiy Value (cou Relaive Specral Sens.8.6.4.2 Human eye 25 5 75 Phoopic peak 55 nm Wavelengh (nm) Wavelengh (nm) Fig. 24 Silicon phoodiode 125 1 15 12 bi value FF (495) Offse: 7 Inerrup flag A Time o A: power up inerrup hreshold = inerrup hreshold = FF (495) Inerrup flag =, inerrup line high High limi (close) and low limi (away) flags = Fig. 25 By seing he number of occurences before generaing an inerrup o four, a single proximiy value above or below he hresholds will have no effec, as shown in Fig. 26. 12 bi value FF (495) hreshold: 1 hreshold: 8 (OC: 7) Time A: μc sleep inerrup hreshold = 1 inerrup hreshold = 7 Inerrup flag =, inerrup line high High limi (close) and low limi (away) flags = hreshold hreshold Power Up As menioned, here are hree variables for proximiy measuremen ha need o be se in he regiser when he sensor is powered up: he number of occurrences ha mus exceed a hreshold o generae an inerrup, he hreshold values, and he number of proximiy measuremens per second. The sensor should deec persons a a disance of cm. Developmen esing deermined ha a curren of 8 ma produces adequae couns for deecion. The proximiy measuremen rae is se so ha abou 1 measuremens are done wihin a second and he number of occurrences o rigger an inerrup is se o four. Based on developmen esing, wih a person wearing quie dark clohes a abou a cm disance, he resuling oal coun is 1. This will be used as he upper hreshold (high hreshold). Inerrup flag Revision: 21-Mar-18 11 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9 A Fig. 26 Home appliance applicaions such as inelligen coffee machines and ovens and ohers will wake up when a person comes close and urns on heir display. For oher applicaions, such as auomaic dispensing, he soap or owel will be dispensed.

Designing he VCNL42 Ino an Applicaion 12 bi value FF (495) hreshold: 1 Time B: single even above upper hreshold Inerrup hreshold = 8 inerrup hreshold = 1 Inerrup flags =, inerrup line high 12 bi value FF (495) Time C: upper hreshold exceeded Time D: number of occurrence > 4 Inerrup is generaed Inerrup flag: ps_if_close is se o 1 Inerrup line goes low hreshold: 8 (OC: 7) hreshold hreshold hreshold: 1 hreshold: 8 (OC: 7) hreshold hreshold Inerrup flag A B Inerrup flag A B C D Fig. 27 In some applicaions, he boom hreshold will also be programmed and wai for an inerrup signal. The ps_if_away is also se o 1 and he ps_if_close cleared by reading i, since he objec is close o he sensor. A lower hreshold will occur when he objec (person) is no longer ha close before he sensor and he display and / or ligh will no longer be illuminaed. For his example, he lower hreshold is also se o a defined level, here jus eigh couns, which is jus one coun more han he ypical offse coun. aue FF (495) hreshold: 1 hreshold: 8 (OC: 7) Fig. 28 hreshold hreshold Inerrup flag A B C D E Fig. 29 Revision: 21-Mar-18 12 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9

Designing he VCNL42 Ino an Applicaion Some measuremens and feaures are shown wih he demo ool and demo sofware wih a cover glass a abou a 1 mm disance. 1. Proximiy se-up wih 9T wide pulses, 8 ma emier curren, and a duy cycle of 1/64, which resuls in abou six measuremens per second (MPS = 1). Fig. 3 2. If a hand or skin now comes as close as 5 cm, hese seven couns rise up o more han 1 couns. Fig. 31 Revision: 21-Mar-18 13 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9

Designing he VCNL42 Ino an Applicaion 3. Here he hresholds are programmed as 1 for he upper and eigh for he lower. To see hese, boh Show buons are acivaed. The presence of an objec should only be recognized when four consecuive measuremens are above ha hreshold. Fig. 32 4. Jus one or wo measuremens above he hreshold will no acivae he inerrup. Fig. 33 Revision: 21-Mar-18 14 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9

Designing he VCNL42 Ino an Applicaion 5. Wih more han four measuremens above he hreshold, however, he inerrup is pulled low, as indicaed by he red LED on he demo board and he red ligh: In Pin Triggered PS. Fig. 34 Revision: 21-Mar-18 15 Documen Number: 84327 ARE SUBJECT TO SPECIFIC DISCLAIMERS, SET FORTH AT www.vishay.com/doc?9