GP2AP054A00F SHARP | Alldatasheet

Document overview

  • Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
  • PDF pages: 25

Technical content

Sheet No.: OP14043EN <Appendix> GP2AP054A00F Table of contents 1. Abstract 2. Recommended operating mode/Procedure of register setting 3. INT terminal output mode 4. Register Mapping 5. Register settings for Basic operation 5.2. Proximity detection/non-detection sensing result :PROX. . . .. . .. . . . . . . . . . . . . . .Attachment-14 5.3. Interrupt result :FLAG_P,FLAG_A,FLAG_G....Attachment-14 5.5. Interrupt type setting :INTTYPE[2:0] . . . .. . . .. . . . ...Attachment-14 6. Register settings for ALS 6.1. Resolution/Measuring duration setting for ALS mode :RES_A[1:0]...... . . . . .. . . . . ..Attachment-15 6.2. Maximum measurable range for ALS mode :RANGE_A[3:0] . . . . . . . . . . . . . .Attachment-15 6.3. ALS Detection result :D5[15:0],D6[15:0] . . . . . . . . . . . .Attachment-15 7. Register settings for GS and PS 7.2. Resolution/Measuring duration setting for PS mode :RES_P[1:0]. . . . . . . . . . . . . . . . . .Attachment-16 7.6. Gesture and Proximity low threshold (Loff) :PL[15:0]. . . . . . . . . . . . . . . . . . . .Attachment-17 7.7. Gesture and Proximity high threshold (Lon) :PH[15:0]. . . . . . . . . . . . . . . . . . . .Attachment-17 7.9. GS/PS Detection result :D0-3[13:0],D4[15:0]. . . . . . . . . . .Attachment-18 7.10. Saturation Detection result of the integrator :SATx. . . . . . . . . . . . . . . . . . . . . . .Attachment-18 7.11. PANEL count subtraction :PANEL[5:0]. . . . . . . . . . . . . . . . .Attachment-18 7.12. Intermittent operating function :INTV AL_P[2:0]. . . . . . . . . . . . . .Attachment-19

Sheet No.: OP14043EN 8. Average consumption current 9. Example of setting sequence 10. Device driver 11. Recommended Window Size (Reference) 12. Data (Reference)

Sheet No.: OP14043EN 1. Abstract GP2AP054A00F is ambient light sensor and gesture sensor/proximity sensor with function ambient light sensing and gesture sensing/proximity sensing by setting register. Proximity sensor (PS) mode: Judgment result of object existence can be referred by reading register value (14bit) via I2C bus interface. INT terminal can be changed either interrupt output or sensing result output (detection/non-detection status) by setting register in PS mode. Ambient light sensor (ALS) mode: Detection result of ambient light can be referred by reading register value (16bit) via I2C bus interface. INT terminal can be changed interrupt output by setting register in PS mode. This product is possible to operate both PS and ALS modes alternately. Fig.1 Operating mode of GP2AP054A00F (GS and ALS sensor) 1.1. Features

  • Design This product is composed of following two chips in one package, which is IC with a built -in photodiode (PD) (Clear (visible and infrared) photodiode and Infrared photodiode) for ambient light sensors and gesture sensors/proximity sensors, and infrared LED. Achieving Small all-in-one package by Doubly-integrally-molded, transparent resin and light shield resin. Spectral sensitivity (ALS) of the human eye without infrared light effects can be obtain by deducting Infrared Photodiode from Clear photodiode.
  • I2C bus interface This product has 7bit slave address adherence to I2C bus interface and can change register value for each function via I2C bus.
  • INT terminal setting INT terminal can be changed either interrupt output or sensing result output (detection/non-detection status) by setting register in PS mode. ALS mode has only interrupt output setting.
  • Power save mode Software-shutdown/Hardware-shutdown Software-shutdown mode Proximity sensor (PS) mode Ambient light sensor (ALS) mode GS and ALS alternating mode Gesture sensor (GS) mode PS and ALS alternating mode

status can be read via I2C bus. Table 1. Terminals for I2C bus interface are as follows. Basic data format are as follows. DATA : Data which write into internal register/read from internal register. Table 2. I2C slave address will be end with inputting stop-condition. WordAddress : 01H PROX, FLAG_P,FLAG_A and FLAG_G register in 01H are read only. WordAddress : 14H ~ 39H D0 ~ D6 registers from 14H to 39H are read only. Enable to read data in register. Following address can be read sequentially by inputting ACK after reading data. Reading data will be stopped by inputting NACK. Stop-condition after setting Word address can be deleted since it corresponds to repeat -start-condition. Reading read data is done by not opening I2C bus interface. This product doesn’t support Clock-stretch function and General-call-address function.

  1. Recommended operating mode/Procedure of register setting

When the GS mode, PS mode and ALS mode switch, please shut down and switched again. in order to eliminate the influence of ambient light. Table 3. Example of setting for GS mode and total value of each channel data at D4[15:0].

in order to eliminate the influence of ambient light. Table 4. Example of setting for PS mode Proximity sensing result can be read at D4[15:0] register through I2Cbus interface. D4[15:0] exceed/fall below judgment threshold level(PH[15:0]/PL[15:0]) set before sensing operation.

Table 5. Example of setting for ALS mode *1 The range (×1 or ×512) is switched according to the D5 data. Ambient light sensing results can be read at D5[15:0] and D6[15:0] register through I 2C bus interface. The device continues to execute integration operation until set measuring time (30msec, recommended) passes. (user side) to get illuminance value with calculation of both CLEAR data at D5[15:0] and IR data at D6[15:0]. The results of without infrared light can be obtained by some calculation using D5[15:0] and D6[15:0]. α and β factor are decided by ratio of D6 [15:0]/D5 [15:0]. These factors might be necessary to be adjusted according to the case panel in use.

This product is possible to operate both GS and ALS modes alternately. Table 6. Example of setting for GS and ALS alternating mode *1 The range (×1 or ×512) is switched according to the D5 data. [2]In Count period, this device convert from a signal charge to digital value. sensing judgment is done if reflective object is there or not. (recommended value:7.7msec), and then outputs the detection results to D5[15:0] and D6[15:0] respectively.

This product is possible to operate both PS and ALS modes alternately. Table 7. Example of setting for PS and ALS alternating mode *1 The range(×1 or ×512) is switched according to the D5 data. Control power supply to the circuit. LED drive circuit is always off in shutdown mode. After power on, start with shutdown. due to the increased power consumption, it is recommended that you clear the interrupt. Table 8. Example of setting for Shutdown mode

is able to be read out via I2C bus interface and output from INT terminal with negative logic. Table 9. INT terminal setting (Proximity detection mode)

000 Interrupt output for

Operates as interrupt output mode by setting PIN[2:0] register (Address 02H) 001 ,010,100: interrupt output mode. Table 10. INT terminal setting (PIN[2:0] register)

001 Interrupt output for PS only FLAG_P

010 Interrupt output for ALS only FLAG_A

100 Interrupt output for GS only FLAG_G

(Address 02H) 000 or 111. Below is a description of the level interrupt type. Table 11. INT terminal setting (INTTYPE[2:0] register)

000 Level interrupt

111 Pulse interrupt

will hold L level until interrupt is cleared. are cleared automatically in 1 clock (about 0.47us). will be hold L level until interrupt is cleared. Interrupt will be cleared in writing 0 data in FLAG_x register. after FLAG_A and FLAG_P register clear.

When Vcc power is supplied, GP2AP054A00F starts up with initializing all registers. Table 12. Register Mapping

  • Please start setting registers after power-supply voltage becomes stable up to 90% or more set value.

Please wait for some 1msec before setting registers from power-on.

  • PROX, FLAG_P,FLAG_A and FLAG_G registers are able to be cleared by writing 0 data in each register.

Functions and set contents of the registers are shown below. Table 13. description of the register function

  1. Register settings for Basic operation

Select Software shutdown or ALS or GS (PS) or alternating mode (GS(PS) + ALS). Control power supply to the circuit. LED drive circuit is always off in shutdown mode. Detection result of clear photodiode is output to D5[15:0] register (Address 36H, 37H). Detection result of infrared photodiode is output to D6[15:0] register (Address 38H, 39H). Sensing result of detection/non-detection is output to PROX register (Address 01H). Detection result of distance is output to D4[15:0] register (Address 34H, 35H). FLAG_P register is output interrupt result for PS mode. FLAG_A register is output interrupt result for ALS mode. FLAG_G register is output interrupt result for GS mode. There is a function which clears by writing 0 in FLAG register. Select output mode in INT terminal by setting PIN register (Address 02H). The outputs by PROX, FLAG_P, FLAG_A and FLAG_G can be selected. Table 14. INT terminal setting

000 Interrupt output for PROX

Select level interrupt type or pulse interrupt type by setting INTTYPE register (Address 02H). Table 15. INT terminal setting (INTTYPE[2:0] register) Initialize all registers by writing 1 in RST register. RST register is also initialized automatically and becomes 0. Device Identification Register is 0110_0000 (60h).

  1. Register settings for ALS

If resolution is low, measuring tolerance becomes large. Please have an adjustment at your system. Table 16. Resolution/Measuring duration setting for ALS mode *Grayed-out portions is not recommended. Select maximum measurable range for ALS mode by setting RANGE_A [3:0] register (Address 03H). exceeding maximum measurable range. It is necessary to set them considering the condition in the actual use and evaluating at your syste m. Table 17. Maximum measurable range for ALS mode Detection result of clear photodiode is output to D5[15:0] register (Address 36H, 37H). Detection result of infrared photodiode is output to D6[15:0] register (Address 38H, 39H). The results of without infrared light can be obtained by some calculation using D5[15:0] and D6[15:0]. α and β factor are decided by ratio of D6 [15:0]/D5 [15:0]. These factors might be necessary to be adjusted according to the case panel in use.

  1. Register settings for GS and PS

detection/non-detection is over threshold continuously more than the set cycles in PRST[2:0] register. This judgment result is done in using the detection result of distance (D4[15:0]). Table 18. Number of measurement cycles setting ・Algorithm for detecting object in PS is as follows. Select measuring resolution and measuring duration by setting RES_P[1:0] register (Address 05H). If resolution is low, measuring tolerance becomes large. Please have an adjustment at your system. Table 19. Resolution/Measuring duration setting *Grayed-out portions is not recommended.

  1. 3. Maximum measurable range: RANGE_P[2:0] (ADDRESS 05H)

Select maximum measurable range by setting RANGE [2:0] register (Address 05H). them considering the condition in the actual use and evaluating at your system. Table 20. Maximum measurable range *Grayed-out portions is not recommended.

Enable to select LED drive peak current by setting IS[2:0] register (Address 06H). In case of changing this setting, the count will change correspond to the set LED drive peak current. LED drive peak current will depend on Vcc and VLED voltage. Table 21. LED drive peak current *Grayed-out portions is not recommended. Select LED pulse setting by setting SUM[2:0] register (Address 06H). If LED pulse setting is low, measuring tolerance becomes large. Please have an adjustment at your system. Number of LED pulses can be changed from 4times to 32times. Table 22. LED pulse setting *Grayed-out portions is not recommended. Sets proximity low threshold in PL[15:0] register at PS mode. Please set it with confirming at optical mounting condition in the actual use. Sets proximity high threshold in PH[15:0] register at PS mode. Please set it with confirming at optical mounting condition in the actual use. Sets gesture offset in OS[13:0] register at GS mode. If there is Panel crosstalk, you will be able to subtract the Panel crosstalk count by using gesture offset. Please set it with confirming at optical mounting condition in the actual use.

Sheet No.: OP14043EN 7.9. GS Detection result: D0[13:0],D1[13:0],D2[13:0],D3[13:0] (ADDRESS 2CH~33H) Detection result of gesture sensing is output to D0[13:0],D1[13:0],D2[13:0] and D3[13:0] register (Address 2CH~33H). Detection result is defined as follows, Detection result(D0[13:0]) = Raw count(D0[13:0], include panel crosstalk) – Offset(OS_D0[13:0]) Detection result(D1[13:0]) = Raw count(D1[13:0], include panel crosstalk) – Offset(OS_D1[13:0]) Detection result(D2[13:0]) = Raw count(D2[13:0], include panel crosstalk) – Offset(OS_D2[13:0]) Detection result(D3[13:0]) = Raw count(D3[13:0], include panel crosstalk) – Offset(OS_D3[13:0]) Gesture detection: If the detected object on the right, D0[13:0]+D3[13:0] > D1[13:0]+D2[13:0]. If the detected object on the left, D0[13:0] +D3[13:0] < D1[13:0]+D2[13:0]. If the detected object on the top, D0[13:0]+D1[13:0] > D2[13:0]+D3[13:0]. If the detected object on the bottom, D0[13:0]+D1[13:0] < D2[13:0]+D3[13:0]. Fig.12 The built-in Photodiodes position(PD0, PD1, PD2, PD3). Photodiode0(PD0) count value is stored to the raw count of D0[13:0]. Photodiode1(PD1) count value is stored to the raw count of D1[13:0]. Photodiode2(PD2) count value is stored to the raw count of D2[13:0]. Photodiode3(PD3) count value is stored to the raw count of D3[13:0]. 7.10. Saturation Detection result of the integrator: SAT0, SAT1, SAT2, SAT3 (ADDRESS 01H) Saturation detection result of the integrator is output to SAT0, SAT1, SAT2, SAT3 register (Address 01H). If the integrator(PD0) is saturated, SAT0 register is set to 1. If the integrator(PD1) is saturated, SAT1 register is set to 1. If the integrator(PD2) is saturated, SAT2 register is set to 1. If the integrator(PD3) is saturated, SAT3 register is set to 1. 7.11. PANEL count Subtraction: PANEL[5:0] (ADDRESS 41H) Sets PANEL count Subtraction in PANEL[5:0] register at GS mode. If there is Panel crosstalk, you will be able to subtract the Panel crosstalk count by using PANEL count Subtraction. Detection result D0[13:0] and D3[13:0] is subtracted by PANEL[5:3] register. Detection result D1[13:0] and D2[13:0] is subtracted by PANEL[2:0] register. Please set it with confirming at optical mounting condition in the actual use. PD3 PD2 PD0 PD1

by setting INTV AL_P[2:0] register. Setting a longer intermittent operating duration makes LED average consumption current lower. However, update period of the detection result becomes long. It will make response time of detecting longer. Enable to change intermittent operating periods by setting INTV AL_P [2:0] register. Table 23. Intermitting time setting *Grayed-out portions is not recommended. For GS mode, quiescent operation will be after GS operation. For GS and ALS alternating mode, ALS operation will be after GS operation.

Sheet No.: OP14043EN 8. Average consumption current Average consumption current in operation is the sum of the average current consumption value with Vcc terminal and LED consumption. The LED driven current flows from LEDA terminal to GND terminal. 8.1. Average consumption current with Vcc terminal Average consumption current at GS mode is typical 0.32mA. Average consumption current at ALS mode is typical 0.1mA. Average consumption current at Shutdown mode is typical 0.004mA. 8.2. Average consumption current with VLED terminal In case of continuous operation, average consumption current in LED is estimated as below. [LED average consumption current] = LED drive peak current × (LED pulse setting × 7.5usec) / (measuring time + Intermittence time) [LED drive peak current]: IS[2:0] register. 011 : 19mA, 100 : 38mA, 101 : 75mA, 110 : 150mA [LED pulse setting]: SUM[2:0] register. 000 : x4, 001 : x8, 010 : x12, 011 : x16, 100 : x20, 101 : x24, 110 : x28, 111 : x32 [measuring time] : Enable to set with RES_P[1:0] register. 00 : 7.7msec(14bit), 01 : 1.9msec(12bit), 10 : 0.48msec(10bit), 11 : 0.12msec(8bit) [Intermittence operating time] : Enable to set with INTV AL_P[2:0] register. 000 : 0msec, 001 : 1.9msec, 010 : 7.7msec, 011 : 30msec 100 : 61msec, 101 : 123msec, 110 : 246msec, 111 : 492msec For example, [LED drive peak current] : 150mA IS[2:0]=110 [LED pulse setting] : x16 SUM[2:0]=011 [measuring time] : 1.9msec(12bit) RES_P[1:0]=01 [Intermittence operating time] : 7.7msec INTV AL_P[2:0]=010 In the above case, [LED averaging consumption current] =150mA×16×7.5usec/(1.9msec+7.7msec)=1.87mA Also, using auto-shut down function, it will be automatically shutdown after one operation. Utilizing it with adjusting your system, it contributes to reduce averaging consumption current in LED.

Sheet No.: OP14043EN Active Operating condition Setting Shutdown mode Shutdown condition Wait for at least 1ms Power-Off 9. Example of setting sequence 9.1. From Power-On to operating condition The internal register of GP2AP054A00F are all initialized after powering on. (Power-On-Reset) Insert a wait for at least 1ms until the Power-On-Reset state stabilizes. Fig.14 From Power-On to operating condition 9.2. From operating condition to Power-Off Insert a wait for at least 1ms until shutdown state stabilizes. Fig.15 From operating condition to Power-Off 9.3. Power-On and Power-Off The following figure shows configuration sequence at Power-On and Power-Off Fig.16 Power-On and Power-Off Power-On Power-On-Reset Shutdown condition Wait for at least 1ms Start I2C setting Operating condition >=1ms Vcc VLED SDA/SCL >=0us >=1ms Power-On sequence Power-Off sequence >=0us Operating condition Power-On-Reset Shutdown

Sheet No.: OP14043EN 10. Device Driver 10.1. Device Driver We can provide a device driver for this product. If you need support for the software, please contact me feel free. 11. Recommended Window Size (Reference) 11.1. Without light shield GP2AP054A00F h = 0.95 mm Cg = (h+g) × tan30° R = (h+g) × tan30° g≦0.4mm (recommended) g : distance between sensor and panel t≦0.7mm (recommended) t : thickness of panel Fig.17 Recommended window size (Without light shield) 1. Please print or tape up not to transmit infrared. 2. Please execute the Light Shielding between windows. 3. Even recommended window size may cause malfunction depending on the reflection from the panel. In this case, it is effective to be extended the printing area between windows, but affects detection distance and ALS output. 4. Please confirm that there is no problem with an actual machine in consideration of the implementation gap, the misalignment of the windows and voltage variation. 5. The recommended transmissivity (400nm≦λ≦1100nm) of the window is more than 85%. 9 0.95 t Light Shielding area Window R 2.65 1.275 1.375 30° 30° Light Shielding area IR Emitter Detector

Sheet No.: OP14043EN 12. Data (Reference) 12.1. LED drive peak current 12.1.1. LED drive peak current vs. VLED (Vcc=3V) Fig.18 LED drive peak current vs. VLED 12.1.2. LED drive peak current vs. Vcc (VLED=3V) Fig.19 LED drive peak current vs. Vcc LED drive current vs. VLED (Vcc=3.0V) VLED [V] ILED=19mA (IS[2:0]=011) ILED=38mA (IS[2:0]=100) ILED=75mA (IS[2:0]=101) ILED=150mA (IS[2:0]=110) 100 110 120 130 140 150 160 170 180 190 200 LED drive current [mA] LED drive current vs. Vcc (VLED=3.0V) Vcc [V] ILED=19mA (IS[2:0]=011) ILED=38mA (IS[2:0]=100) ILED=75mA (IS[2:0]=101) ILED=150mA (IS[2:0]=110) 100 110 120 130 140 150 160 170 180 190 200 LED drive current [mA]

Sheet No.: OP14043EN 12.2. Spectral Responsivity Fig.20 Spectral Responsivity 12.3. Proximity sensor (PS) mode Sensor output counts vs. distance Fig.21 Sensor output counts vs. distance Spectral Responsivity Normalized Responsivity 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 300 500 700 900 1100 CLR IR Wavelength [nm] PS count vs distance 4000 3500 3000 2500 2000 1500 1000 500 Count Vcc=VLED=3.0V, Res=12bit, Range=×2, sum=16, ILED=150mA White Card (r=0.9) Gray Card (r=1.8) 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 Distance (mm)

Sheet No.: OP14043EN 12.4. Angular dependence Fig.22 Angular dependence Angular dependence Normalized Responsivility angle [ °] 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 1.1 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90