GP2Y0E02A/GP2Y0E02B/GP2Y0E03

GP2Y0E02A.GP2Y0E02B.GP2Y0E03
GP2Y0E02A,GP2Y0E02B,GP2Y0E03 Application Note
Table of Contents
Page
1. Introduction ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2
2. Outline and terminals ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2
3. Electro-Optical Characteristic ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3
4. Timing Chart ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3
4-1 Power on/off timing ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3
4-2 Active/Stand-by timing sequence ・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3
5. Principle of Optical Distance Measurement Sensor ・・・・・・・・・・・・・・・・・・・・・・・・ 6
6. Notes on Using ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 6
6-1 Emitting Lens and Receiving Lens ・・・・・・・・・・・・・・・・・・・・・・・・・・ 6
6-2 Mirror Reflector ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 6
6-3 Object near the Optical Path ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 7
6-4 Reflective Object with Boundary Line ・・・・・・・・・・・・・・・・・・・・・・・・・ 7
6-5 Reflective Object Size ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 7
6-6 Tilt of Reflective Object ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 9
6-7 Protection Cover ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 9
6-8 Multiple Operation and Optical Interference with Other Devices ・・・・・・・・・・・・・
10
7. Response Time ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 11
8. Ambient Temperature Characteristic ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 11
9. Ambient Light Characteristic ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 12
10. I2C interface ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 12
10-1 I2C data transfer format ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 13
10-2 Write Format
・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 13
10-3 Read Format
・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 13
10-4 I2C Bus Timing ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 14
10-5 I2C DC Timing Characteristic ・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 15
10-6 Register Map ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 15
11. Functions which is possible to be set ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 18
11-1 Slave Address ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 18
11-2 Maximum Pulse Width of Emitting ・・・・・・・・・・・・・・・・・・・・・・・・・・ 19
11-3 Signal Accumulation ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 19
11-4 Median Filter
・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 19
11-5 Cover Compensation ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 20
11-6 Error Judgment of Distance Measurement ・・・・・・・・・・・・・・・・・・・・・・・ 23
11-7 Maximum Output Distance ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 26
11-8 Active/Stand-by State Control ・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 26
11-9 Software Reset ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 26
12. E-Fuse Programming ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 27
12-1 Set-up for Programming ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 27
12-2 Electrical Specification ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 28
12-3 Programming Flow ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 29
12-4 E-Fuse Bit Map ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 29
12-5 E-Fuse Bit Replacement ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 37
12-6 Example of E-Fuse Programming ・・・・・・・・・・・・・・・・・・・・・・・・・・ 37
Sheet No.: OP13021EN
Attachment-1
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
1. Introduction
The GP2Y0E series are active optical distance measurement sensors. These sensors measure the distance to an object by
detecting the light spot position of reflection on the detector. It is possible to measure the distance with high accuracy by
adoption of CMOS image sensor. It is not necessary for the customer to calibrate the distance output. The three models
have differing output types and operating voltages. The differences are shown in table.01.
Table.01 The list of GP2Y0E series
Distance output
GP2Y0E02A
Analog
GP2Y0E02B
Digital(I2C bus)
Analog
GP2Y0E03
Digital(I2C bus)
Terminals
4
4
7
VDD
2.7~3.3V
2.7~3.3V
2.7~5.5V
(*)
(*)
In case of applying it
below 3.3V, VDD and
VIN(IO) could be used
same power supply line.
In case of using it over 3.6V
(for example, VDD=5.0V),
it is necessary to apply the
voltage over 3.3V to the
VIN(IO) terminal.
Detection range
4~50cm
4~50cm
4~50cm
2. Outline and terminals
The GP2Y0E series line-up is GP2Y0E02A , GP2Y0E02B and GP2Y0E03. Fig.01 shows the outline comparison
between the three models. GP2Y0E03 has both analog output and digital output through I 2C bus. Table.02 shows the list
of outline and terminal information.
GP2Y0E03
GP2Y0E02A
Emitter
Side
8
①
②
③
④
Receiver
Side
Sensor
Emitter
Side
Receiver
Side
16.7
18.9
Sensor
GP2Y0E02B
Emitter
Side
8
①
②
③
④
Receiver
Side
①②③④⑤⑥⑦
11
18.9
Fig.01 Outline of GP2Y0E series
Table.02 Outline and terminals
L
W
[mm] [mm]
GP2Y0E02A
GP2Y0E02B
GP2Y0E03
18.9
18.9
11.0
8.0
8.0
16.7
H
[mm]
5.2
5.2
5.2
Terminals
①
VDD
VDD
VDD
②
GND
GND
Vout(A)
③
Vout(A)
SDA
GND
④
GPIO1
SCL
VIN(IO)
⑤
GPIO1
⑥
SCL
⑦
SDA
・Symbol of terminals
VDD:
Power supply
GND:
Ground
Vout(A): Analog output voltage
GPIO1: Active / stand-by condition switching terminal
SDA:
I2C data bus
SCL:
I2C clock
Input/output voltage of I2C communication and input
voltage of GPIO1 terminal is determined by the input
VIN(IO): I/O supplying voltage
voltage of VIN(IO) terminal.
The same sensor is used in the GP2Y0E series. The connector and board on which the sensor is mounted is different for
each model. GP2Y0E03 has independent input terminals for VDD, GPIO1 and VIN(IO). VIN(IO) terminal is connected
to VDD terminal in the GP2Y0E02A board. VIN(IO) and GPIO1 terminal is connected to VDD terminal in the
GP2Y0E02B board.
Sheet No.: OP13021EN
Attachment-2
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
3. Electro-optical Characteristics
Electro-optical characteristics of three models are same because same sensor portion is used in GP2Y0E series, though
each board is different.
Table.03 Electro-optical characteristic
(Ta=25°C, VDD=3.0V)
4. Timing Chart
4-1 Power On/Off timing sequence
(GP2Y0E02A)
The specification for power on/off timing is not fixed .Because VDD is connected to VIN(IO) internal board.
GPIO1 should be set after or at the same time VDD has turned on. (refer to Fig.3a)
In case that VDD is off, GPIO1 should be pull Low. (not shown in Fig.)
(GP2Y0E02B)
The specification for power on/off timing is not fixed .Because VDD is connected to VIN(IO) internal board.
I2C communication with other devices connected to the same bus is not allowed after VDD is turned off.
(refer to Fig.3b)
In case that VDD is off SCL and SDA should be pull Low. (not shown in Fig.)
(GP2Y0E03)
VDD
T1
T2
T3
T4
VIN(IO)
Vpp
T1,T2,T3,T4 : Refer to Table.04
Fig.02 Power on/off timing sequence
VIN(IO) should be turned off before VDD is turned off, or at the same time when VDD is turned off. (refer to Fig.3)
I2C communication with other devices connected to the same bus is not allowed after VDD or VIN(IO) is turned off. In
case that both of VDD and VIN(IO) is turned off, GPIO1, SCL and SDA should be pull low. In case that only VIN(IO)
is turned off, GPIO1, SCL and SDA should be pull low.
If this product is operated under the condition other than the above, this product or other device around it may suffer
damage due to excessive current.
4-2 Active/Stand-by timing sequence
Active or Stand-by states of GP2Y0E02A can be changed by the input voltage (Hardware) in GPIO1 terminal.
The states of GP2Y0E02B can be changed by the register setting (Software) through I 2C bus. The states of GP2Y0E03
can be changed by Hardware and Software. Timing charts of each model are shown in Fig.03. I 2C bus timing chart of
GP2Y0E02A is shown in Fig.03a because this communication is used by I 2C from the contact pad on the back of board
only in case that some data is written in E-Fuse (refer to 12. E-Fuse Programming, Fig.38)
Hardware : GPIO1 is set High or Low.
Hardware : GPIO1=「High」 : Active state
Hardware : GPIO1=「Low」 : Stand-by state
Software : I2C register program (refer to 11-8 active/stand-by state control)
Software : Software control is effective when GPIO1 is high.
Sheet No.: OP13021EN
Attachment-3
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
4-2-1 GP2Y0E02A
(1) Controlled by GPIO1
VDD
GPIO1
T5
T6
I 2C
T6
Access
Register
State
Active
Stand-by
Access
Register
Active
(2) Controlled by register setting through I 2C bus
VDD
GPIO1
T5
T6
I 2C
Active
command
Stand-by
command
State
Active
Access
Register
Stand-by
Active
T7
Fig.03(a) Timing chart of active/stand-by state control (GP2Y0E02A)
4-2-2 GP2Y0E02B
(1) Controlled by register setting through I 2C bus
VDD
I 2C
State
T8
Active
command
Stand-by
command
Active
Access
Register
Stand-by
Active
T7
Fig.03(a) Timing chart of active/stand-by state control (GP2Y0E02B)
Sheet No.: OP13021EN
Attachment-4
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
4-2-3 GP2Y0E03
(1) Controlled by GPIO1
VDD
VIN(IO)
T8
GPIO1
T9
T6
I 2C
T6
Access
Register
State
Active
Access
Register
Stand-by
Active
(2) Controlled by register setting through I2C bus
VDD
VIN(IO)
GPIO1
T8
T6
I2C
Active
command
Stand-by
command
State
Active
Access
Register
Active
Stand-by
T7
Fig.03 Timing chart of active/stand-by state control (GP2Y0E03)
Table.04 Specification of timing
Description
Min
Max
Unit
T1
IO power delay after VDD power on
0
5
ms
T2
VIN(IO) leading to VDD power off
0
-
us
T3
Vpp power delay after VIN(IO) power on
0
-
us
T4
Vpp leading to VIN(IO) power off
0
-
us
T5
GPIO1 delay after VDD power on
0
-
us
I C access delay after GPIO1 high
500
-
us
T7
I C access delay after active command completed
500
-
us
T8
I2C access delay after VDD power on
500
-
us
T9
GPIO1 delay after VIN(IO) power on
0
-
us
2
T6
2
Sheet No.: OP13021EN
Attachment-5
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
5. Principle of optical distance measurement sensor
GP2Y0E series is the active type distance measurement sensor which
is based on triangulation. Light spot position of reflection which is
condensed on the optical detector (CMOS image sensor) is measured.
Since the spot position changes with the distance to a reflective object
as shown in Fig.04, the distance to a reflective object can be calculated
by using measured spot position.
Reflector
D2
D1
6. Notes on using
Since the distance is measured by using the principle of the above,
however, in actual use, please note the following points.
6-1 Emitting Lens and Receiving Lens
LED
Detector
The lens of this device should be kept clean. There are cases that dust,
water or oil can deteriorate the characteristics of this device. Please
Fig.04 triangulation
consider in actual application.
Please don’t wash this sensor because the optical characteristics may be changed. When using this sensor, please make
sure that it is possible to carry out in accordance with the measurement environment because this sensor does not have
chemical resistance.
6-2 Mirror Reflector
The distance between sensor and mirror reflector cannot be measured exactly. Fig.05(a) shows that mirror reflector is
placed to be parallel to the sensor at the distance of D1. Emitting beam with the directional angle shown in Fig.10 is
irradiated at the surface of mirror. Right edge of the ray is detected by detector as shown in Fig.05(a) because the ray is
specular reflection on the mirror. Reflected ray (dashed line) by the scattering reflector at the distance of D2 has same
path as the specular reflection of right edge ray by the mirror at the distance of D1. Therefore, D2 is measured under
this condition. On the other hand, Fig.05(b) shows the mirror reflector is placed to have tilt angle ofθat the distance of
D1. Left edge of the ray is detected by detector as shown in Fig.05(b). Reflected ray by the scattering reflector at the
distance of D3 has same path with the specular reflection of left edge ray by the mirror at the distance of D1. Therefore,
D3 is measured under this condition.
In this way, specular reflection of mirror object has large influence to the light spot position. The light spot position is
changed by the tilt angle between the mirror object and the sensor even if the mirror object is placed at the same
distance.
Scattering Reflector
Reflection A
Ray by
Scattering
D2
Mirror Reflector
Reflection B
φ
Mirror
Reflector
θ
Object
Specular
Reflection
D1
Emitting
Beam
Reflector
D3
(a)
Object
Scattering
D1
Reflector
(b)
Fig.06 Case that object is near the sensor
Fig.05 Mirror Reflector
Sheet No.: OP13021EN
Attachment-6
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
6-3 Object near the Optical Path
In case that an object is near the optical path, the light spot position may change because a part of reflection by the
reflector may incident in the light receiving portion after reflection by the object near the sensor as shown in reflection
A (dashed line) of Fig.06. In addition, the light spot position may be changed because a part of emitting beam is
scattered by the object near the sensor as shown in reflection B (solid line) of Fig.06. For this reason, it may not satisfy
the specification of the electro-optical characteristic.
GP2Y0E series have the error judgment function that distance output is fixed to maximum value in order to avoid
distance measurement error in case that receiving light spot profile is affected by the object near the sensor. There is
case that distance output is fixed to maximum in case that reflection intensity from A and B is large enough compared
with that from the reflector. Please refer to 11-6 Error Judgment of Distance Measurement for the details.
Please use it after confirming that the distance output does not changed by this object with customer’s product.
6-4 Reflective Object with Boundary Line
In case that reflective object has a boundary line, there is case
that distance can not be measured exactly. Emitting beam is
reflected by the high reflectance portion and low reflection
portion when the reflective object boundary line and the center
of optical axis is in agreement. Fig.07 shows an example case
that left side of reflector has high reflectance and right side
has low reflectance. The intensity of reflection A is larger than
that of reflection B as shown in Fig.07. Measuring distance may
have an error because light spot position is shifted toward
reflection A compared with reflection with uniform reflectance.
At that time, if direction of boundary line and the line between
emitter center and detector center are parallel, it is possible to
decrease deviation of measuring distance.
High
Reflectance
Low
Reflectance
Reflection B
(small intensity)
Reflection A
(large intensity)
Fig.07 Reflective object with boundary line
GP2Y0E02A/GP2Y0E02B
<×>
<○>
Sensor
Board
GP2Y0E03
<×>
<○>
Sensor
Board
Fig.08 Recommended measurement of reflective object with boundary line
GP2Y0E series have the error judgment function that distance output is fixed in order to avoid distance measurement
error. Please refer to 11-6 Error Judgment of Distance Measurement for the details.
6-5 Reflective Object Size
For satisfying the specification of the electro optical characteristic, it is necessary to install a flat object vertically to the
emitted light, and it is necessary to reflect the whole emitted light as shown in Fig.09. As shown in the example of
directional angle of emitting beam of Fig.10, the angle is around 6 ° (±3°) where emission becomes 10% of peak. The
object needs to exist in around 10 degrees (±5 degrees) area including the variation of peak position. For example,
when the object is in 50 cm, it is necessary to install the object of at least 9cm diameter parallel to the surface of this
sensor as follows. However above example doesn’t guarantee specification, please use it after confirming with
customer’s product.
Sheet No.: OP13021EN
Attachment-7
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
Sensor
6°
9cm
5°
Relative Value
1.2
Reflective Object
(Example : R=90%, matt)
1
0.8
0.6
0.4
0.2
50cm
0
-10
0
5
10
Angle [°]
Fig.10 Example of Directional Angle of Emitting Beam
Fig.09 Reflective Object Size
-5
In case that a part of the reflective object is irradiated by emitting beam, there is case that distance can not be measured
exactly for the same reason of section 6-4 Reflective Object with Boundary Line. In case that whole emitting beam is
reflected by reflective object (not shown in Fig.11), light spot is incidented at the position of reflection A (dashed line)
in Fig.11. However, in case that reflective object is shifted toward emitter side as shown in Fig.11, light spot is
incidented at the position of reflection B (solid line) because a part of emission beam is reflected. Under this condition,
light spot is formed at the position where is shifted toward right side compared with reflection A. So, measured distance
becomes smaller than distance to reflective object as shown in Fig.11.
For above reason, in order to decrease measuring error due to moving direction of reflective object, we recommend to
mount the sensor as shown in Fig.12.
Reflection A
(whole reflection)
Reflective Object
Measured
distance
Reflection B
(partial reflection)
Distance to
Reflective object
Light spot position
Fig.11 Partial Reflection of Emitting Beam
GP2YE02A/GP2Y0E02B
<×>
<○>
Moving Direction
Moving Direction
GP2Y0E03
<×>
<○>
Moving Direction
Moving Direction
Fig.12 Moving Reflective Object
Sheet No.: OP13021EN
Attachment-8
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
GP2Y0E series have the error judgment function that distance output is fixed to be maximum (64cm) to avoid distance
measurement error. Please refer to 11-6 Error Judgment of Distance Measurement for the details.
Object
Object
+θ
(a)
+φ
(b)
Distance output(I2C)[cm]
6-6 Tilt of Reflective Object
For satisfying the specification of the electro optical characteristic, it is necessary to install a flat object vertically to the
emitted light, and it is necessary to reflect the whole emitted light as shown in Fig.09. There is the case that it is not
possible to measure distance exactly in case that reflective object is installed with tilt angle to the sensor. Fig.13 is
shown in the example case that reflective object is installed with the tilt angle to the sensor. Fig.13(a) is shown that
reflective object is installed with the tilt angle ofθto the axis which the light emitting and receiving lens are arranged.
Fig.13(b) is shown in the example case that reflective object is installed with the tilt angle ofφin the direction
perpendicular to Fig.13(a). Fig.14 is shown in the example of tilt angle dependence in case that reflective object
(R=90%, matt) is installed at the distance of 50cm from the sensor. The distance output changes in dependence of the
tilt angle forθdirection. But the tilt angle dependence of distance output forφdirection is small. This characteristic is
reference data measured by the arbitrarily extracted sample and not guaranteed. Please use it after confirming with
customer’s product.
In case that tilt angle forθis large, there is the case that the light spot size is changed largely compared with
recommendation condition of Fig.09. GP2Y0E series have the error judgment function that distance output is fixed to
be maximum to avoid distance measurement error. Please refer to 11-6 Error Judgment of Distance Measurement for
the details.
60
55
Reflective Object
(R=90%, matt) @50cm
◆ tilt ofθ
□ tilt ofφ
50
45
40
-25 -20 -15 -10 -5 0
5 10
Tilt Angle[°]
Fig.13 Reflective Object with Tilt Angle
15
20
25
Fig.14 Tilt Angle Dependence of distance output
6-7 Protection Cover
In case that protection cover is set in front of this sensor, the protection cover shall be recommended to use material
which doesn’t scatter light and be matted finish. And the protection cover which has the most efficient transmittance at
the emitting wavelength range of LED for this product (λ=850nm±70nm). This protection cover is recommended to be
flat. This protection cover shall be recommended to be parallel to the emitter and detector portion. In case that
protection cover is set in front of this sensor, it emits reflected light from this protection cover. If this reflective light
reaches in detector portion, the output distance of this product may be changed. The output distance characteristics of
this product may be changed with according to material (①) or transmittance (②) or the thickness (③) or the distance
between the protection cover and this product (④) or the angle between surface and back (⑤) or the angle between this
cover and this sensor (⑥). In case that protection cover is set, please design to consider that this reflective light is
minimized. It shall be effective to put light shield wall between emitting lens and receiving lens as shown in Fig.16.
Reference conditions in case of using protection cover are shown in Table.05. Where, bellow are fixed condition that
①material=acrylic, ②transmittance>90%@850nm, ⑤angle between surface and back of cover=parallel, ⑥angle
between sensor and cover=parallel. In addition of above, surface and back face of cover has mirror polished surface.
Sheet No.: OP13021EN
Attachment-9
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
Protection
Cover
③thickness
④space
GP2Y0E02A (example)
Fig.15 Protection Cover Installation
Table.05 Install condition of protection cover
Condition
③thickness
④space
No1
1mm
0mm
No2
1mm
1mm
No3
2mm
0mm
No4
2mm
1mm
Light shield wall
-
without
-
with
Direct reflective light increases as Distance from sensor to protection cover and thickness of this cover increases. In
case thickness is 2mm and distance is 1mm, measuring distance is changed shift larger from actual distance than other
condition. Shifts can make small by using installation of light shield and cover compensation function (refer to 11-5
Cover Compensation). However, there are the cases that distance error does not decrease even if cover compensation
function is used in a sensor, depending on the conditions of protection cover.
・Noted for installation of light shield
Inner distance between lens of detector and lens of emitter is around 0.6mm (reference). So the width of light shield is
recommended to be less than 0.6mm. In case the width of light shield is longer than inner distance, measuring distance
is changed by shielding a part of emitter lens or detector lens. Please confirm that there is no problem under the actual
equipment. And in case between protection cover and light shield or between light shield and this sensor exists space,
the effect of light shield is small because light from emitter leaks. The light shield wall is recommended to use the
material that have the low transmittance at the emitting wavelength range of LED for this product (λ=850nm±70nm).
When the material of light shield wall is hard, and the power stress in which it is added to this product is large,
measuring distance may shift from actual distance.
Width of
Light shield Wall
Light Shield Wall
Protection
Cover
Light Shield Wall
Fig.16 Example of light shield installation
Neither installation of a light shield wall nor use of a compensation function guarantees the distance characteristic.
These improve error shift of the distance characteristic. Regardless of usage of a light shield wall or a compensation
function, please use it after confirming with customer’s product.
6-8 Multiple Operation and Optical Interference with Other Devices
In case that some devices which emits modulated infrared light are operated at the same time, there is a possibility that
this sensor would malfunction by incidence of emitted light by other devices. There is also a possibility that other
devices would malfunction by incidence of emitted light by this sensor. Please consider the design of the finish product
that the detector of this device does not receive the light emitted from the other devices. Or, please turn this sensor to
the stand-by state when other devices operate, so that emitted light by other devices do not detect. GP2Y0E02A and
GP2Y0E03 has GPIO1 terminal which role is the control of active/stand-by condition. And GP2Y0E02B and
GP2Y0E03 have the register for active /stand-by state control through I2C communication. When some these sensors
are used for the same bus, slave address of I2C can be changed to one of the 16 states by using of E-Fuse. So, it is
possible to control some sensors via I2C communication.
Sheet No.: OP13021EN
Attachment-10
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
7. Response Time
It is possible for this distance measuring sensor to detect the distance from 50cm to 4cm and the reflective object from
high reflectance to low reflectance. Detector of this sensor has the function (**) that signal intensity is automatically
adjusted in order to detect the reflection with wide dynamic range. Time to output the first distance value is changed by
the condition of reflective object because it takes time that this auto adjustment function operates, though this sensor
outputs measured distance value after first measurement. Response time defined in electro-optical characteristic of the
specification sheet means maximum time to operate auto adjustment function. Digital output (I2C bus) keeps maximum
distance of output (64cm) and analog output is 0V till first measurement is completed. It takes approx 2ms to stabilize
Vout(A) because analog output has built-in Low-Pass filter in the board. Response time of specification includes this
stabilization time of analog output.
If operating condition such as signal accumulation and median filter is changed, response time is not satisfied with one
defined in specification sheet. Please refer to 11-2 maximum pulse width of emitting and 11-3 signal accumulation for
the change of operating condition.
(**)The function that measurement is repeated while adjusting gain etc of signal processing circuit till signal intensity
becomes suitable level for distance calculation. After adjustment to become suitable level of signal intensity, distance
measurement starts. (Refer to Fig.22)
8. Ambient Temperature Characteristic
Operating temperature range of GP2Y0E series is maximum +60°C and minimum -10°C. Fig.17 shows that reference
data of ambient temperature dependence of digital (I 2C bus) and analog output in case of white reflector (R=90%, matt)
is placed at 50cm from sensor. This characteristic is reference data measured by the arbitrarily extracted sample and not
guaranteed.
GP2Y0E02A/GP2Y0E03
GP2Y0E02B/GP2Y0E03
60
1
R=90%,matt, reflector@50cm
Distence(I C)[cm]
0.6
0.4
0.2
0
-20
R=90%,matt,reflector@50cm
55
2
Vout(A) [V]
0.8
0
20
40
60
80
50
45
40
-20
Ta [℃]
0
20
40
60
80
Ta [℃]
Fig.17 Example of ambient temperature characteristic
Sheet No.: OP13021EN
Attachment-11
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
9. Ambient Light Characteristic
Reflective object (R=90%,matt,@50cm)
GP2Y0E series have the function to remove light by the
cancellation function of ambient light, a visible light cut
lens, etc. Fig.17 shows the reference data of ambient
Measurement
light characteristic for digital (I2C bus) and analog output.
Point of
Reflective object (R=90%, matt) is placed at the distance
45°
Illuminance
of 50cm from the sensor. Ambient light is irradiated at
same point with emitting beam of sensor at the angle of
45 degrees as shown in Fig.18. Ambient source of
Halogen Lamp (Toshiba lighting & technology
corporation) is used in this measurement. The source has
similar spectrum of sunlight. Each outputs of Fig.19 are
the maximum, average and minimum in 100 times
measurement for a same sample, respectively. The
illuminance is measured on the surface of reflective
Halogen Lamp
object. This characteristic is reference data measured by
TOSHIBA Lighting & Technology Corporation
the arbitrarily extracted sample and not guaranteed.
JDR110V100W/K7SE
Fig.18 Apparatus of ambient light characteristic measurement
GP2Y0E02A/GP2Y0E03
1
70
R=90%, matt @50cm
R=90%, matt @50cm
Distance(I2C)[cm]
Vout(A) [V]
0.8
0.6
0.4
0.2
0
GP2Y0E02B/GP2Y0E03
60
50
40
30
0
10000
20000
30000
40000
50000
0
10000
20000
30000
40000
Illuminance on reflector[lx]
Illuminance on reflector [lx]
Fig.19 Ambient Light Characteristic
50000
GP2Y0E series have the function to remove ambient light. But when the detector receives direct light from the sun,
tungsten lamp and so on, there are cases that it can not measure the distance exactly. Please consider the design that the
detector does not receive direct light from such light source. When you operate the customer’s set installing this product
by the remote control, please consider that the output of this product being disregarded at the time of remote control
operation by software.
10. I2C Interface
GP2Y0E series have 7 bits slave address which comply with I 2C bus standard (max 400kHz), so a measured distance
value can be read through I2C bus. This besides, this product can change register value for each function through I2C bus.
GP2Y0E02B and GP2Y0E03 have SCL and SDA terminal in the connecter terminal. GP2Y0E02A has SCL and SDA
open pad on the back face of board (refer to Fig.37) in order to use it when cover compensation coefficient is
programmed in E-Fuse.
Table.06 I2C bus terminal
Name
Description
SCL
I2C clock
SDA
I2C data bus
Sheet No.: OP13021EN
Attachment-12
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
10-1 I2C data transfer format
Symbols explaining read and write format of GP2Y0E series are shown in the Table.07.
Table.07 Symbol of I2C
Symbol
Description
Note
S
Start
Master output
A
ACK
Master/Slave output
NA
NACK
Master/Slave output
P
Stop
Master output
Address
Register address
Master output
Data
Data
Master/Slave output
10-2 Write format
Maste output
Slave output
0x80(default)
1. Master generates start condition.
2. Master places 1st byte data that include slave address (7bit) with a read/write control bit.
3. Slave issues acknowledgment.
4. Master places 2nd byte address data on SDA.
5. Slave issues acknowledgment.
6. Master places 8 bits data on SDA.
7. Slave issues acknowledgement.
8. Master generates a stop condition to end this write cycle.
10-3 Read format
(1st cycle)
(2nd cycle)
0x80(default)
0x81(default)
1st cycle
1. Master generates a start condition.
2. Master places 1st byte data that are combined slave address (7bits) with a read/write control bit (R/W=0)
to SDA.
3. Slave issues acknowledgement.
4. Master places 2nd byte address data on SDA.
5. Slave issues acknowledgement.
6. Master generates a stop condition to end 1st cycle.
2nd cycle
7. Master generates a start condition.
8. Master places 1st byte data that are combined slave address (7bits) with a read/write control bit (R/W=1)
to SDA.
9. Slave issues acknowledgement.
10. 8 bits data is read from internal control register of this product which address was assigned by 1st cycle.
11. Master generates negative acknowledgement.
12. Master generates a stop condition to end this read cycle.
Sheet No.: OP13021EN
Attachment-13
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
GP2Y0E series supports the continuation read-out function (Burst-Read), so it can read register value from specified
address (8.) by ACK that Master transmits (11.). When read-out of data is stopped, Master transmits NACK. Since it
don’t need to specify address, it is possible to shorten time reading register value. Also Since this product supports
Repeat-Start function, it is able to skip (6.) process. Since I2C bus is not opened between 1st cycle and 2nd cycle by
skipping (6.), cross talk can be prevented also when two or more Master(s) exist on the same bus.
・Burst-Read without repeat start
0x80(default)
0x81(default)
Data(0) is the register value which was assigned by Address. Data(1) and Data(2) are the register value of Address+1
and Address+2, respectively.
・Burst-Read with repeat start
0x80(default)
0x81(default)
10-4 I2C Bus Timing
Fig.20
I2C Bus Timing
Table.08 I2C Bus Timing
Parameter
SCL clock frequency
Hold time for Start/Repeat Start.
After this period, the first clock pulse is generated.
Set-up time for a repeated start.
Low period of SCL clock.
High period of SCL clock
Data hold time. For I2CTM-bus device.
Data set-up time.
Rise time of both SDA and SCL signals.
Fall time of both SDA and SCL signals.
Set-up time for STOP condition.
Bus free time between a STOP and START.
Capacitive load for each bus line.
Noise margin at LOW level for each connected device.
Noise margin at HIGH level for each connected device.
(Ta = 25°C)
Unit
kHz
Symbol
fscl
Min.
-
Max.
400
tHD:STA
0.6
-
us
tSU:STA
tLOW
tHIGH
tHD:DAT
tSU:DAT
tr
tf
tSU:STO
tBUF
Cb
VnL
VnH
0.6
1.3
0.6
100
0.6
1.3
0.1VDD
0.2VDD
0.9
300
300
150
-
us
us
us
us
ns
ns
ns
us
us
pF
V
V
Sheet No.: OP13021EN
Attachment-14
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
10-5 I2C DC Timing Characteristic
・GP2Y0E02A/GP2Y0E02B
Table.09 I2C DC Timing Characteristic 1
Parameter
Standard Mode
Min.
Max.
-0.3
0.3VDD
0.7VDD
VDD+0.3
-
Symbol
Low level input voltage
High level input voltage
Hysteresis of Schmitt trigger inputs
Low level output voltage (open drain of
open collector) at 3mA sink current
Output fall time from VIHmin to VILmax
with a bus capacitance from 10pF to 400pF
Pulse width of spikes which must be
suppressed by the input filter
Input current each I/O pin with an input
voltage between 0.1VDD and 0.9VDDmax
VIL
VIH
Vhys
VOL
0
0.4
0
0.4
V
TOF
-
250
-
250
ns
tSP
-
-
0
50
ns
II
-10
10
-10
10
uA
・GP2Y0E03
Table.10 I2C DC Timing Characteristic 2
Parameter
Symbol
(Ta = 25°C)
Fast Mode
Unit
Min.
Max.
-0.3
0.3VDD
V
0.7VDD
VDD+0.3
V
0.05VDD
V
Standard Mode
Min.
Max.
-0.3
0.3VIN(IO)
(Ta = 25°C)
Fast Mode
Unit
Min.
Max.
-0.3
0.3VIN(IO)
V
Low level input voltage
VIL
High level input voltage
VIH
0.7VIN(IO)
VIN(IO)+0.3
3.9
0.7VIN(IO)
VIN(IO)+0.3
3.9
V
V
Vhys
-
-
0.05VIN(IO)
0.1VIN(IO)
-
V
V
0
-
0.4
-
0
0
0.4
0.2VIN(IO)
V
V
TOF
-
250
-
250
ns
tSP
-
-
0
50
ns
II
-10
10
-10
10
uA
Hysteresis of Schmitt trigger inputs
VIN(IO) > 2V
VIN(IO) < 2V
Low level output voltage (open drain
of open collector) at 3mA sink current
VIN(IO) > 2V
VIN(IO) < 2V
Output fall time from VIHmin to
VILmax with a bus capacitance from
10pF to 400pF
Pulse width of spikes which must be
suppressed by the input filter
Input current each I/O pin with an
input voltage between 0.1VIN(IO)
and 0.9VIN(IO)max
VOL
10-6 Register Map
Bank0 is register band for digital function control Bank3 is E-Fuse mapped register bank. Register 0xEF is used to
switch target register bank for register access. Setting 0x00 in the register 0xEF access to bank0, and setting 0x03
access to bank3.
Table.11 Register Map (Bank0)
Address
Register Name
(Hex)
Slave ID (write cycle)
Slave ID (read cycle)
0x03
Hold Bit
Reg
Field
[0]
Default
R/W
0x80
0x81
R
R
0x01
R/W
Description
0x00=Hold
0x01=Device enable normally
Register avoid update during Hold.
Sheet No.: OP13021EN
Attachment-15
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
0x13
0x1C
0x2F
0x33
0x34
Maximum Emitting Pulse
Width
Spot Symmetry Threshold
Signal Intensity Threshold
Maximum Spot Size
Threshold
Minimum Spot Size
Threshold
[2:0]
0x07
R/W
[4:0]
[6:0]
0x0E
-
R/W
R/W
0x07=320us, 0x06=240us, 0x05=160us,
0x04=80us, 0x03=40us
Default is set in each sensor by E-Fuse.
[7:0]
0x7F
R/W
-
[6:0]
-
R/W
Default is set in each sensor by E-Fuse.
0x35
Shift Bit
[2:0]
0x02
R/W
0x3F
Median Filter
[5:4]
0x30
R/W
0x4C
SRAM Access
[4]
-
W
0x5E
Distance[11:4]
[7:0]
-
R
0x5F
Distance[3:0]
[3:0]
-
R
0x64
AE[15:8]
[7:0]
-
R
0x65
AE[7:0]
[7:0]
-
R
0x67
AG[7:0]
[7:0]
-
R
0x8D
Cover Compensation[5:0]
[7:2]
0x00
R/W
0x8E
Cover Compensation[10:6]
[4:0]
0x00
R/W
0x8F
Cover Compensation
Enable Bit
[1:0]
0x03
R/W
0x90
Read out Image Sensor
Data
[4:0]
0x00
R/W
0xA8
Signal Accumulation
Number
[1:0]
0x03
R/W
[0]
0x00
R/W
[0]
0x00
R/W
[0]
0x01
R/W
[0]
0x00
R/W
0x80
R/W
[7:0]
0x00
R/W
[0]
0x00
R/W
[7:0]
0x00
R/W
0xBC
0xBD
0xBE
0xBF
Enable Bit
(Signal Intensity)
Enable Bit
(Minimum spot size)
Enable Bit
(Maximum spot size)
Enable Bit
(Spot symmetry)
E-Fuse Target Address
0xC8
0xC9
0xCA
0xCD
E-Fuse Read Out
E-Fuse Enable Bit
E-Fuse Bit Number
E-Fuse Bank Assign
E-Fuse Program
Enable Bit
E-Fuse Program Data
[5:0]
[6]
[7]
0x01=Maximum Display 128cm
0x02=Maximum Display 64cm
0x00= Data number of median calculation 7
0x10= Data number of median calculation 5
0x20= Data number of median calculation 9
0x30= Data number of median calculation 1
0x10=Access SRAM
Distance Value
=(Distance[11:4]*16+Distance[3:0])/16/2^n
n : Shift Bit (Register 0x35)
AE=AE[15:8]*256 + AE[7:0]
Before read out,
it need to write Address(0xEC) = Data(0xFF)
Before read out,
it need to write Address(0xEC) = Data(0xFF)
Cover compensation coefficient =
Cover Comp.[10:6]*64 + Cover Comp.[5:0]
Cover Comp.[5:0] is assigned in Reg Field[7:2] of
register 0x8D. So, it need to shift 2 bits toward
right.
0x02=Enable
0x03=Disable
0x00=Disable
0x10=Low Level (L)
0x11=Middle Level (M)
0x12=High Level (H)
Intensity=H*65536 + M*256 + L
0x00=1 time accumulation
0x01=5 times accumulation
0x02=30 times accumulation
0x03=10 times accumulation
0x00=enable (Default)
0x01=disable
0x00=enable (Default)
0x01=disable
0x00=enable
0x01=disable (Default)
0x00=enable (Default)
0x01=disable
Specify E-Fuse address in the target bank.
Ex. A[0]=0x00, B[10]=0x0A, C[63]=0x3F
1=load E-Fuse data to Register (Bank3)
0=Enable, 1=Disable
Assign bit number in the register 0xC9 [7:4]
Assign bank select in the register 0xC9 [3:0].
1:BankA, 2:BankB, 3:BankC, 4:BankD, 5:BankE
0x00=Disable
0x01=Enable
Sheet No.: OP13021EN
Attachment-16
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
0xE8
Active/Stand-by State
Control
0xEC
[0]
0x00
R/W
Clock Select
[7:0]
0x00
R/W
0xEE
Software Reset
[2:1]
-
W
0xEF
Bank Select
[1:0]
0x00
R/W
0xF8
0xF9
0xFA
Right Edge Coordinate (C)
Left Edge Coordinate (A)
Peak Coordinate (B)
[7:0]
[7:0]
[7:0]
-
R
R
R
Object
0x00=Active state
0x01=Stand-by state
0x7F=auto clock
0xFF=manual clock
0x06=software reset
0x00=Bank0
0x03=Bank3 (E-Fuse)
Spot Size = C-A (=0xF8[7:0]-0xF9[7:0])
Spot Symmetry=|(C-A)-2*B|
(=|(0xF8[7:0]-0xF9[7:0])-2*0xFA[7:0])|)
Intensity
A : left edge coordinate
(emitter side)
B : peak coordinate
C : right edge coordinate
expansion
Threshold
A B
Detector
Pixel coordinate
on Image sensor
C
Fig.21 Coordinate of spot profile
Table.12 Register Map (Bank3)
Address Register
Bit Select
(Hex)
Name
Address
(Hex)
Register
Name
Bit Select
Address
(Hex)
Register
Name
Bit Select
0x00
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
0x0B
0x0C
0x0D
0x0E
0x0F
0x10
0x11
0x12
0x13
0x14
0x15
0x16
0x17
0x18
0x19
0x1A
0x1B
B[15:8]
B[7:0]
C[63:56]
C[55:48]
C[47:40]
C[39:32]
C[31:24]
C[23:16]
C[15:8]
C[7:0]
D[63:56]
D[55:48]
D[47:40]
D[39:32]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
0x1C
0x1D
0x1E
0x1F
0x20
0x21
0x22
0x23
0x24
0x25
0x26
0x27
D[31:24]
D[23:16]
D[15:8]
D[7:0]
E[63:56]
E[55:48]
E[47:40]
E[39:32]
E[31:24]
E[23:16]
E[15:8]
E[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
A[63:56]
A[55:48]
A[47:40]
A[39:32]
A[31:24]
A[23:16]
A[15:8]
A[7:0]
B[63:56]
B[55:48]
B[47:40]
B[39:32]
B[31:24]
B[23:16]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
[7:0]
Sheet No.: OP13021EN
Attachment-17
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
11. Functions which is possible to be set
GP2Y0E series has 7 bits slave address which complies with I 2C bus standard (max400kHz), so various functions of this
product can be set by changing register value. Besides, GP2Y0E series has E-Fuse which is a nonvolatile OTP (One
Time Programmable Memory), so various functions of this product can be set by programming E-Fuse. In case power
supply of this sensor is OFF, this sensor keeps some programs that is written in E-Fuse. So when power supply is ON
again, this sensor operates under the programmed condition as before.
Table.13 shows the list of functions which can be set in GP2Y0E series.
Table.13 Functions which can be set by programming E-Fuse and through I2C bus
No
Description
E-Fuse
I2C Default (Recommand) Value
Write : 0x80
1
Slave Address
○
×
Read : 0x81
Maximum Pulse Width
2
320us
○
○
of Emitting
Affected Characteristic
-
3
Signal Accumulation
○
○
10
4
Median Filter
○
○
1
5
Cover Compensation
Error Judgment
(Signal Intensity)
Error Judgment
(Minimum spot size)
Error Judgment
(Maximum spot size)
Error Judgment
(Spot Symmetry)
Maximum Output Distance
Active/Stand-by State Control
Software Reset
○
○
Disable
Operating Average Current
Stability of Distance Output
Response Time
Stability of Distance Output
Response Time
Stability of Distance Output
Distance Characteristic
Configured
○
Individual value
Distance Characteristic
Configured
○
Individual value
Distance Characteristic
○
○
Disable
Distance Characteristic
Configured
○
14
Distance Characteristic
Configured
×
×
○
○
○
64cm
-
Analog Output
-
6-1
6-2
6-3
6-4
7
8
9
11-1 Slave Address
GP2Y0E02B and GP2Y0E03 can be changed to 16 kinds of slave address in order to avoid overlap with other device
connecting with same bus, or when several this products are used connecting with same bus. Please refer to 12-4 (1) I2C
slave address with respect to the detail changing method.
Table.14 shows the list of slave address which can be changed.
Table.14 List of Slave Address (GP2Y0E02B、GP2Y0E03)
No Write Cycle Read Cycle Note
No Write Cycle Read Cycle
1 0x00
0x01
9 0x80
0x81
2 0x10
0x11
10 0x90
0x91
3 0x20
0x21
11 0xA0
0xA1
4 0x30
0x31
12 0xB0
0xB1
5 0x40
0x41
13 0xC0
0xC1
6 0x50
0x51
14 0xD0
0xD1
7 0x60
0x61
15 0xE0
0xE1
8 0x70
0x71
16 0xF0
0xF1
Note
Default
-
Sheet No.: OP13021EN
Attachment-18
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
11-2 Maximum Pulse Width of Emitting
GP2Y0E series have the function which adjust emitting power by detecting signal intensity. Emitting power is adjusted
by control of emitting pulse width. Average current consumption decrease by restricting maximum emitting pulse
width. However, distance characteristic change, especially distance output may become unstable in case of detecting
reflector at far distance and with low reflectance because signal intensity is also decreased by restricting maximum
emitting pulse width. Response time does not change even if maximum emitting pulse width is decreased.
In case that maximum pulse width of emitting is changed, there is the case that electro optical characteristic described
in specification sheet becomes not to be satisfied. Please use it after confirming with customer’s product. Table.15
shows the relation between maximum pulse width of emitting (setting value) and operating average current
consumption. Please refer to the register 0x13 in register map (bank0) of table.11 with respect to the method of
bank0 register setting. And, please refer to 12-4(2) maximum pulse width of emitting with respect to programming
in E-Fuse.
Table.15 Maximum pulse width of emitting and operating average current consumption
Max. pulse width of emitting
No
Average current consumption
Note
(setting value)
1
320us
Approx. 26mA
Default
2
240us
Approx. 22mA
3
160us
Approx. 18mA
4
80us
Approx. 14mA
5
40us
Approx. 12mA
11-3 Signal Accumulation
GP2Y0E series calculate the light spot position after accumulation of several emitting pulse signals and calculate the
distance value. Response time can decrease by decreasing of signal accumulation times. However, distance
characteristic change, especially the distance output may become unstable in the case of detecting reflector at far
distance and the case with low reflectance, because signal intensity is decreased by decreasing signal accumulation
times. Response time does not change even if signal accumulation times are decreased. In case that signal accumulation
times are changed, there is the case that electro optical characteristic described in specification sheet becomes not to be
satisfied. Please use it after confirming with customer’s product. Please refer to the register 0xA8 in register map
(bank0) of table.11 with respect to the method of bank0 register setting. And, please refer to 12 -4(3) signal
accumulation with respect to programming in E-Fuse.
Table.16 Signal accumulation times and response time
No
Signal Accumulation Times
Response Time (Max)
1
1
20ms
2
5
30ms
3
10
40ms
4
30
80ms
Measurement Period
Approx. 1.9ms
Approx. 9.5ms
Approx. 19ms
Approx. 57ms
Note
Default
-
11-4 Median Filter
GP2Y0E series have the median calculation function by using several distance outputs in order to get stable output.
Response time increases though distance output becomes stable by using median calculation function. Median
calculation number can be selected to 5, 7 or 9. That is, in case of 5, a median of 5 distance values is output after 5
times measurement. This sensor outputs measured distance after first measurement. However, output distance before
finishing the measurement times is not the result that median was calculated. Fig.22 shows the example that median
filter is set to 5.
Sheet No.: OP13021EN
Attachment-19
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
・State
Stand-by
Active
・Measurement
Distance Measurement Period
1st
2nd
3rd
4th
5th
6th
7th
2nd
3rd
4th
5th
6th
Auto Adjustment of
Signal Intensity
・Output
1st
t=t0
t=t1
t=t2
t=t3
Fig.22 Median Filter
t=t4
t=t5
t=t6
Output from t0 to t5 is indefinite value because 5 times measurement is not finished before t5. However, there is the
case that output before t5 is same with one after t5 in the case that signal intensity is enough to be large. 6th output is the
median value of 5 times measurements from 2 nd measurement to 6th measurement. After that, distance output is updated
every one measurement. Measurement period in table.16 is defined as one measurement period as shown in Fig.22.
Table.17 shows the relation of response time with number of median filter (11-4) and signal accumulation times (11-3).
Please refer to the register 0x3F in register map (bank0) of table.11 with respect to the method of bank0 register
setting. And, please refer to 12-4(4) Median Filter with respect to programming in E-Fuse. In case that median filter
function is turned enable, there is the case that electro optical characteristic described in specification sheet becomes not
to be satisfied. Please use it after confirming with customer’s product.
Table.17 Median Filter and Response Time
Response time (signal accumulation)
No Number of data
(1time)
(5times)
(10times) (30times)
1
1
20ms
30ms
40ms
80ms
2
5
27ms
70ms
120ms
310ms
3
7
30ms
90ms
160ms
430ms
4
9
35ms
110ms
200ms
550ms
Note
Default (signal accumulation : 10)
-
11-5 Cover Compensation
GP2Y0E series have the cover compensation function that distance error generated by direct reflection from protection
cover which is set in customer’s product is compensated. Only tail of light spot is detected by detector (CMOS image
sensor) as shown in Fig.23, because direct reflection from flat protection cover which is set to be parallel to the sensor
enters with large incident angle to the detector. On the other hand, whole light spot with peak is formed on the detector
by the reflection of reflective object after transmitting protection cover (not shown in Fig.23). Therefore, in case that
protection cover is set in front of sensor, light spot profile has the shape of a tilt as shown in Fig.24.
Reflector
Intensity
Light spot by reflection of protection
cover and reflective object
Reflection by reflector
Light spot from
Protection cover
Protection Cover
Reflection by cover
Pixel coordinate
of Image sensor
Detector
Fig.23 light spot from protection cover
Fig.24 light spot profile of cover and reflective object
Sheet No.: OP13021EN
Attachment-20
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
Cover compensation function can be adopted under the condition that the light spot profile like Fig.25. Light spot from
protection cover is possible to be approximated linearly as shown in Fig.25. The calculated slope of linear
approximation is defined as k. k is set in signal circuit of sensor in advance before measurement of distance. Direct
reflection from protection cover is removed by subtraction of k from light spot profile before calculation of light spot
position. As described above, k is the cover compensation coefficient. Light spot profile that direct reflection from
protection cover was subtracted is the light spot profile by only reflection of reflective object as shown in Fig.26.
Therefore, distance error by installation of protection cover is decreased.
Intensity
Light spot by reflection of
only protection cover
Intensity
Light spot by reflection of
only reflective object
(after compensation)
Linear
approximation
slope=k
Pixel coordinate
of Image sensor
Pixel coordinate
of Image sensor
Fig.25 Light spot profile of protection cover
Fig.26 Light spot profile after compensation
Cover compensation function is effective only when light spot profile of direct reflection from protection cover can be
approximated linearly. Incident angle of direct reflection from protection cover is decreased as increasing the distance
between protection cover and sensor, and it is also decreased as increasing cover thickness. Therefore, distance
accuracy is decreased. Also, slope k has different value from the material, shape, installation conditions and so on.
There is the case that slope k has different value by dispersion of sensor, even if installation condition is same. It is
necessary for customer to decide the compensation coefficient (slope k) to use cover compensation function under the
condition that customer’s protection cover is installed. Compensation coefficient (slope k) has dispersion by the sensor,
protection cover, installation condition and so on.
Fig.27 shows an example of measurement environmental of cover compensation coefficient (slope k) .
GP2Y0E
series
Emitting
Beam
>3m
Reflectance(@850nm)
approx.2%
I 2C
MCU
I/F
PC
Protection Cover
Fig.27 Example of measurement environmental of cover compensation coefficient
Under dark condition, protection cover is installed in front of this sensor at the given position. Black reflective object
with around 2% or less reflectance is installed at the distance of 3m or more. Most reflected light does not enter into
detector under this condition. So, light spot profile like Fig.25 is detected. Light spot is measured under this condition,
and slope k of linear approximation is calculated by the least-square method by using MCU and so on. Below shows the
measurement procedure of cover compensation coefficient by using I 2C interface.
・Measurement procedure of compensation coefficient
(01) Data(0x00) is set in Address(0xEF).
(02) Data(0xFF) is set in Address(0xEC).
(03) Wait for 4*(N+10) [ms] (N : signal accumulation times)
(04) Read out data of Address(0x64), and record it as AE[15:8].
(05) Read out data of Address(0x65), and record it as AE[7:0].
(06) Calculate AE = AE[15:8]*256 + AE[7:0]
(07) Read out data of Address(0x67), and record it as AG[7:0].
(08) Calculate AG  2
AG[ 7:0 ]
16
*
AG[3 : 0]  16
16
(09) Data(0x00) is set in Address(0x03).
Sheet No.: OP13021EN
Attachment-21
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
(10) Wait for 2*(N+10) [ms]. (N : signal accumulation times)
(11) Data(0x10) is set in Address(0x4C).
(12) Wait for 2*(N+10) [ms]. (N : signal accumulation times)
(13) Data(0x10) is set in Address(0x90). (Read out setting of Low Level Data)
(14) Read out 220pcs of data with burst read from Address(0x00) to Address(0xDB), and record them as L[1:220].
Burst Read : refer to 10-3 Read Format
(15) Data(0x11) is set in Address(0x90). (Read out setting of Middle Level Data)
(16) Read out 220pcs of data with burst read from Address(0x00) to Address(0xDB), and record them as M[1:220].
(17) Data(0x12) is set in Address(0x90). (Read out setting of High Level Data)
(18) Read out 220pcs of data with burst read from Address(0x00) to Address(0xDB), and record them as H[1:220].
(19) Calculate profile[1 : 220] 
8
295
*
* H [1 : 220] * 65536  M [1 : 220] * 256  L[1 : 220]
AG AE
where, 1 and 220 of profile[1:220] shows X coordinate、Profile[1] shows Y coordinate of X=1.
Profile[1:220] shows the function of Y=profile[X].
(refer to Fig.28)
(20) Data(0x00) is set in Address(0x90).
(21) Data(0x01) is set in Address(0x03).
(22) Calculate k by using least-square method from Profile[1:220].
profile[X]
Linear approximation by least square method
(slope : k)
1
220
X
Fig.28 Read out light spot data
Material of protection cover : Acrylic (transmittance>90%@850nm)
Angle between surface and back face of protection cover : parallel
Angel between sensor and protection cover : parallel
Thickness of protection cover : 2mm
Distance between sensor and protection cover : 1mm
Reference value of slope k is around 350 under the above condition. This k value is reference data measured by the
arbitrarily extracted sample and not guaranteed. There is the case that it has large difference with the coefficient
measured under the customer’s condition. Please use it after confirming with customer’s product.
In case that k=350 is set in register (bank0), cover compensation [10:0] is separated into cover compensation
[5:0] = 0b011110 and cover compensation [10:6] = 0b00101. Cover compensation [5:0] is available in register 0x8D of
bank0 and cover compensation [10:6] is available in register 0x8E of bank0 as shown in register map(bank0) of
Table.11. Setting value in register 0x8E is 0x05 because cover compensation [10:6] is available in Reg Field [4:0].
However, setting value in register 0x8D is 0x78 because cover compensation [5:0] is available in Reg Field [7:2].
That is, 0b011110 should be shifted left by 2 bits and 0b01111000 (=0x78) is calculated. Moreover, compensated
distance value is output after cover compensation function turns enable by setting data (0x02) in register 0x8F.
Please refer to 12-4(5) Cover Compensation with respect to the method of programming compensation coefficient in
E-Fuse.
Sheet No.: OP13021EN
Attachment-22
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
11-6 Error Judgment of Distance Measurement
(11-6-1)Signal Intensity
Intensity
GP2Y0E series have the function that distance output is fixed to
64cm (below 0.2V for the analog output) which is the maximum
Threshold level
distance of output in case that signal intensity of reflection is not
of signal intensity
enough to calculate distance. Because reflective intensity from the
distant reflective object is so small, the intensity of light spot
becomes very small. Distance accuracy is decreased because light
spot position which is calculated from such spot profile is unstable.
In order to prevent decrease of distance accuracy like this, the
Pixel coordinate
threshold level of signal intensity is already programmed in E-Fuse,
of Image sensor
and this product outputs the calculated distance only in case signal
Fig.29 Threshold level of signal intensity
intensity over threshold is detected. Eigenvalue of the threshold
level is programmed in E-Fuse for the each sensor so that error is
judged under the same reflection condition.
It is possible to change the threshold level by register setting of bank0, because it is already programmed in E-Fuse at
the shipment. It is necessary to set the register again after power (VDD) on when power (VDD) was once turned off,
because initial value in E-Fuse is loaded. Setting value in register bank0 is kept by switching active state to stand-by
state. So, it is not necessary that register is set again. It is possible to change threshold level by setting given value in
register 0x2F of bank0 as shown inTable.11. When VDD turns on, initial value programmed in E-Fuse is loaded in the
register 0x2F. Threshold level increases by setting value larger than read out value in register 0x2F. And, this function is
enabled in the initial state. Please turn disable by setting 0x01 in register 0xBC when this function is not used.
However, when it is disabled, unstable distance is output even if there are no reflection such as infinity. We recommend
that you use a certain threshold level is set to enable.
(11-6-2)Minimum Spot Size
GP2Y0E series have the function that distance output is fixed to 64cm (below 0.2V for the analog output) which is the
maximum distance of output in case that spot size detected on image sensor is out of specified range. As described in
chapter 6-4 and 6-5, there is the case that the shape of light spot is deformed for the case of reflective object with
boundary line or partial reflection of emitting. Reflection A with hatching area is shown in Fig.30 for the case of left
side partial reflection of emitting, and reflection B (dashed line) is shown for the case of whole reflection with uniform
reflectance. In case of whole reflection B, light spot profile is shown as dashed line in Fig.31. On the other hand, in case
of partial reflection A, light spot profile of left side is deformed as shown in hatching area of reflection A in Fig31.
Therefore, error of distance measurement generates because light spot position shifts toward right compared with
reflection B. In order to prevent decrease of distance accuracy like this, the threshold level of minimum spot size is
already programmed in E-Fuse, and this product outputs the calculated distance only in case spot size over minimum
threshold is detected. Measurement condition with error can be detected for the case of incomplete spot size, because
φA which generates error is smaller than φB. Eigenvalue of the spot size threshold is programmed in E-Fuse for the
each sensor so that error is judged under the same reflection condition.
It is possible to change the threshold level by register setting of bank0, because it is already programmed in E-Fuse at
time of the shipment. It is necessary to set the register again after power (VDD) on when power (VDD) was once turned
off, because initial value in E-Fuse is loaded. Setting value in register bank0 is kept by switching active state to
stand-by state. So, it is not necessary that register is set again. It is possible to change threshold spot size by setting
given value in register 0x34 of bank0 as shown inTable.11. When VDD turns on, initial value programmed in E-Fuse is
loaded in the register 0x34. Threshold of spot size increases by setting value larger than read out value in register 0x34.
And, this function is enabled in the initial state. Please disable by setting 0x01 in register 0xBD when this function is
not used.
Sheet No.: OP13021EN
Attachment-23
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
Intensity
Reflective Object
Reflection A
Light spot of
Reflection B
Light spot of
Reflection A
Reflection B
φA
φB
Fig.30 Partial and Whole Reflection of Emitting Beam
Pixel coordinate
of Image sensor
Fig.31 Spot size of partial and whole reflection
(11-6-3)Maximum Spot Size
Intensity
In addition to minimum spot size threshold described in
11-6-2, maximum spot size threshold also can be set.
Normal Reflection
There is the case that spot size of incomplete reflection such
Incomplete
as the reflection from a fraction of emitting beam and the
Reflection
reflection from the reflective object with complex boundary
line becomes large by deformed spot profile compared with
spot size of normal reflection. Fig.32 shows an example of
these reflections. It is possible that calculated distance by
using this incomplete spot profile has large distance error.
In order to prevent decrease of distance accuracy like this,
Pixel coordinate
the maximum threshold of spot size can be set in register of
φB
of Image sensor
bank0 and programmed in E-Fuse. This product outputs the
φ
A
calculated distance only in case spot size below threshold is
Fig.32 Spot size of incomplete and normal reflection
detected.
This threshold is not programmed in E-Fuse at the shipment. This can be programmed in E-Fuse at customer side. And,
this also can be set in register of bank0. It is necessary to set the register again after power (VDD) on when power
(VDD) was once turned off, because this function operates disable. Setting value in register bank0 is kept by switching
active state to stand-by state. It is possible to change threshold spot size by setting given value in register 0x33 of bank0
as shown inTable.11. Threshold spot size increases by setting value larger than read out value in register 0x33. And, this
function is disabled in the initial state. Please turn enable by setting 0x00 in register 0xBE when this function is used.
Spot size measurement data can be read out from the register 0xF8 and 0xF9. Please refer to 12-4(6) Maximum Spot
Size Threshold of Measurement Error Judgment with respect to programming it in E-Fuse.
(11-6-4)Spot Symmetry
GP2Y0E series have the function that distance output
is fixed to 64cm (below 0.2V for the analog output) which
Intensity
is the maximum distance of output in case that spot
symmetry detected on image sensor is out of specified range.
There is the case that the shape of light spot is deformed
for the case of reflective object with boundary line and so on.
In this case, spot size may be between minimum and
maximum threshold of spot size. However, distance output
φL φR
has error because light spot position is shifted in case that
Left spot size (φL) is different with Right spot size (φR).
Pixel coordinate
In order to prevent decrease of distance accuracy like this,
of Image sensor
the threshold level of spot symmetry (fixed value : 14) is
already programmed in E-Fuse, and this product outputs
Fig.33 Asymmetric Light Spot
the calculated distance only in case spot symmetry below
threshold is detected.
It is possible to change the threshold level by register setting of bank0, because it is already programmed in E-Fuse at
the shipment. It is necessary to set the register again after power (VDD) on when power (VDD) was once turned off,
because initial value in E-Fuse is loaded. Setting value in register bank0 is kept by switching active state to stand-by
state. So, it is not necessary that register is set again. It is possible to change threshold of spot symmetry by setting
Sheet No.: OP13021EN
Attachment-24
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
given value in register 0x1C of bank0 as shown inTable.11. When VDD turns on, initial value programmed in E-Fuse is
loaded in the register 0x1C. Threshold of spot symmetry increases by setting value larger than read out value in register
0x1C, and calculated distance from deformed spot is output. Spot symmetry measurement data can be read out from the
register 0xF8, 0xF9 and 0xFA. This function is enabled in the initial state. Please turn disable by setting 0x01 in register
0xBF when this function is not used.
・Correlation between distance detection accuracy and close range distance measurement
As described above, it is possible to decrease the distance measurement error by using each error judgment function.
However, threshold value of spot size and spot symmetry affects the close range distance characteristic (below 4cm).
Fig.34 shows the example of distance characteristic when the error judgment is enable and Fig.35 shows the example
of distance characteristic when the error judgment is disable. When error judgment is used as shown in Fig.34, distance
output below 4cm is fixed to 64cm which is maximum distance output even if whole emitting beam is reflected by the
reflective object with uniform reflectance, though it depends on threshold value of error judgment. The distance is
about 3cm for the case of GP2Y0E series. On the other hand, as shown in Fig.35, measured distance is decreased
continuously at the distance below 4cm though it does not have linearity, when error judgment is not used. When
reflective object is placed at the distance which is very close to sensor, this sensor outputs maximum distance of 64cm
because reflective light does not enter the receiving area. This is because signal intensity is under the threshold level of
signal intensity.
With error judgment
Measured
Distance
64
[cm]
50
Measured
Distance
64
[cm]
50
4
4
50 64
4
Distance to
reflective
object [cm]
Fig.34 Distance characteristic with error judgment
Without error judgment
(except signal intensity)
4
50 64
Distance to
reflective object
[cm]
Fig.35 Distance characteristic without error judgment
In this way, there is the case that distance measurement is fixed to 64cm as error by the judgment of light spot size or
symmetry threshold, when the reflective object is very close to sensor.
Fig.36 shows the flow-chart of each error judgment described in chapter 11-6. Enable bit is installed in each error
judgment function. Each function can be selected to enable or disable by this bit. These error judgment functions of
GP2Y0E series are enable except maximum spot size threshold. So, maximum spot size error judgment is skipped.
Sheet No.: OP13021EN
Attachment-25
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
Measurement of light spot
No
Signal Intensity>Threshold?
Yes
No
Spot Size>Min. Threshold ?
Yes
No
Spot Size<Max. Threshold ?
Yes
No
Maximum
Distance Output
Spot Symmetry < Threshold ?
Yes
Normal Distance Output
Fig.36 Flow-Chart of error judgment
There is the case that electro-optical characteristic described in specification sheet is not satisfied if threshold value of
each error judgment is changed and if error judgment is added or removed. Please use it after confirming best output
for customer’s product.
11-7 Maximum Output Distance
Maximum output distance of GP2Y0E02B and GP2Y0E03 is 64cm, however it can be changed to 128cm by setting
register. Distance characteristic of digital output in specification is not changed, though maximum output distance can
be changed. Please use it after confirming output for customer’s product with respect of distance accuracy of the far
distance of 50cm, because it is not guaranteed in specification.
Distance output from far distance is unstable because reflection is too small. There is the possibility that output
distance can be stable by increasing signal accumulation (refer to 11-3) and setting median filter (refer to 11-4).
However, pay attention with respect to using of analog output (Vout(A) terminal), because maximum output distance
cannot be used in case that it is changed. Please refer to address 0x35 (bank0) of Table.11 with respect to setting
register.
11-8 Active/Stand-by State Control
Active and Stand-by state of GP2Y0E02A and GP2Y0E03 can be changed by input voltage in GPIO1 terminal. It turns
to active state by input H level in GPIO1 terminal, it turns to stand-by state by input L level. H and L voltage level is
decided by input voltage to VIN(IO) terminal. Please be attention in wiring of VIN(IO) in case that VDD is over 3.6V
because VIN(IO) cannot be connected to VDD. For example of VDD=5V, it is necessary of another input voltage below
3.6V. Active and stand-by state can be changed by connecting GPIO1 to VDD and GND because VIN(IO) is connected
to VDD in PCB board.
Moreover, active and stand-by state of GP2Y0E02B and GP2Y0E03 can be changed by register setting. It is necessary
of H level input voltage to GPIO1 terminal. Please refer to address 0xE8 (bank0) of Table.11 with respect to register
setting. Please refer to 4-2 with respect to timing of active/stand-by state change.
11-9 Software Reset
Register value which is set individually is cleared and all register value can be reset to initial value (setting value in
E-Fuse) by executing software reset. Procedure of software reset is shown in below.
(1) Data=0x00 is set in Address=0xEF.
(2) Data=0xEF is set in Address=0xEC.
(3) Data=0x06 is set in Address=0xEE.
(4) Data=0x7F is set in Address=0xEC.
Sheet No.: OP13021EN
Attachment-26
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
12. E-Fuse Programming
E-Fuse is a nonvolatile memory which is possible to write program only one time. So it is able to change some settings
of this sensor by E-Fuse programming, Also compensation function can be active by E-Fuse programming. In case
power supply of this sensor is OFF, this sensor keeps some programs that is written in E-Fuse. So when power supply is
ON again, this sensor operates under the programmed condition as before.
12-1 Set-up for Programming
Fig.37 is the basic set-up to program data in E-Fuse.
PC
I/F
ex.USB
MPU with I2C
communication
Sensor
(GP2Y0E series)
2
IC
enable
Power Supply
3.3±0.3V
50mA
E-Fuse
(Vpp terminal)
Fig.37 Block Diagram of E-Fuse Programming Environment
PC is used when different data is programmed to each sensor. It is unnecessary when same data which was set in MPU
is programmed. Vpp terminal is on the back side of this sensor as shown in Fig.35. SCL and SDA terminal are prepared
in back side of GP2Y0E02A, because their terminals are necessary to program in E-Fuse. (Refer to Fig.38)
SCL
GP2Y0E02A
SDA
Vpp
GP2Y0E02B
Vpp
GP2Y0E03
Vpp
Fig.38 Back side of Board
Sheet No.: OP13021EN
Attachment-27
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
12-2 Electrical Specification
12-2-1) Power Requirement
Table.18 Power requirement of Vpp
Vpp
Min.
Typ.
Max.
Voltage
3.0
3.3
3.6
Current
50
-
-
Unit
V
mA
12-2-2) Power Timing
VDD
Vpp
T_poweron
E-Fuse
Program
T_program
E-Fuse
Read
Tf
T_read
E-Fuse
Program
Tr
T_program
Fig.39 Power Timing of Vpp
T_poweron : E-Fuse power should be turn on 1ms later than VDD is applied.
Tf
: E-Fuse power falling time.
T_program : Programming time. (from stage5 to stage6 in Fig.40)
T_read
: Read time depends on how many bits are read.
Tr
: E-Fuse power rising time.
Sheet No.: OP13021EN
Attachment-28
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
12-3 Program Flow
E-Fuse program through I2C is byte base (8bits can be programmed at one programming cycle), if more than 8bits need
to be programmed, two or more cycles are necessary. Fig.40 is program flow chart.
The list of setting value in E-Fuse for each function (Table.13) is shown in Table.20. Please refer to it when you
program E-Fuse at each stage in Fig.40.
Stage 3
Set m(#1) and n(#2) as
0xmn in address 0xC9.
Bit number : m(#1)
Bank value : n(#2)
Stage 2
Set E-Fuse bit map
(LSB) in address 0xC8.
Stage 1
Set data 0xEF in address
0xEC.
3.3V is applied in Vpp.
(#1) bit number : m
m = bit number - 1
(#2) bank value
Bank A = 1、Bank B = 2、Bank C = 3、
Bank D = 4、Bank E = 5
Stage 4
Set program data in
E-Fuse in address 0xCD.
1st cycle
Program
2nd, 3rd …cycle
program
No
Stage 5
Set data 0x01 in address
0xCA.
(*)
Stage 6
Set data 0x00 in address
0xCA.
3.3V is stopped in Vpp.
Program
Finish ?
Yes
Program
done
Yes
Stage 9
Programmed
data is correct ?
Stage 8
Set data 0x06 in address
0xEE.
Stage 7
Set data 0x00 in address 0xEF.
Set data0x40 in address 0xC8.
Set data 0x00 in address 0xC8.
No
(*) Delay time
Waiting time during data
programming : 500us
Stage 10
Check fail bit and execute
E-Fuse bit replacement.
Fig.40 E-Fuse Program Flow
12-4 E-Fuse Bit Map
There are 5 blocks (Bank A, Bank B, Bank C, Bank D and Bank E) in this sensor. Each block has 64bits. Initial value of
each bit is 1. Setting value, operation condition, compensation function and so on of below six items can be changed by
programming specified bit shown in Table.19 to 0. It may not be satisfied with the specification of the electro-optical
characteristic in case that compensation function turns enable or operation condition is changed. Please use it after
confirming with customer’s product.
E-Fuse bit map is shown in Table.19. Mapped Reg in Table.19 is the address in the bank3 register.
(refer to Table.12)
Sheet No.: OP13021EN
Attachment-29
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
Table.19A
Bank A
Bit Map
A[0] A[1] A[2]
item
×
×
×
Mapped Reg
Bit Map
A[16] A[17] A[18]
Max. Puls Width
item
A[3] A[4]
×
×
not use
A[19] A[20]
Accumulation
A[5]
×
A[6]
×
A[7]
×
A[8]
×
A[9]
×
A[10] A[11] A[12]
×
×
×
not use
A[21] A[22] A[23] A[24] A[25] A[26] A[27] A[28]
×
×
×
×
×
×
×
×
A[29] A[30] A[31]
×
×
×
0x05
A[34] A[35] A[36]
×
×
×
not use
A[50] A[51] A[52]
×
×
×
not use
not
A[37] A[38] A[39] A[40] A[41] A[42] A[43]
×
×
×
×
×
×
×
not
A[53] A[54] A[55] A[56] A[57] A[58] A[59]
×
×
×
×
×
×
×
not
B[2]
×
B[4]
×
use
B[20]
×
use
B[36]
×
use
B[52]
×
use
B[5]
×
B[10] B[11] B[12]
×
×
×
not use
B[21] B[22] B[23] B[24] B[25] B[26] B[27] B[28]
×
×
×
×
×
×
×
×
not use
B[37] B[38] B[39] B[40] B[41] B[42] B[43] B[44]
×
×
×
×
×
×
×
×
not use
B[53] B[54] B[55] B[56] B[57] B[58] B[59] B[60]
×
×
×
×
×
×
×
×
not use
B[13] B[14] B[15]
×
×
×
C[3] C[4]
×
×
not use
C[18] C[19] C[20]
×
×
×
not
use
Mapped Reg
Bit Map
C[32] C[33] C[34] C[35] C[36]
item
×
×
×
×
×
not use
Mapped Reg
Bit Map
C[48] C[49] C[50] C[51] C[52]
item
×
×
×
0x11
Mapped Reg
C[5]
×
C[10] C[11] C[12]
×
×
×
not use
C[21] C[22] C[23] C[24] C[25] C[26] C[27] C[28]
×
×
×
×
×
×
×
×
not use
C[37] C[38] C[39] C[40] C[41] C[42] C[43] C[44]
×
×
×
×
×
×
×
×
not use
C[53] C[54] C[55] C[56] C[57] C[58] C[59] C[60]
Cover Compensation
0x10
C[13] C[14] C[15]
×
×
×
D[5]
×
D[13] D[14] D[15]
×
×
×
Mapped Reg
Bit Map
A[32] A[33]
item
×
×
Mapped Reg
Bit Map
A[48] A[49]
item
×
×
Mapped Reg
Table.19B
B[3]
×
not
B[18] B[19]
×
×
not
Reg
B[32] B[33] B[34] B[35]
×
×
×
×
not
Reg
B[48] B[49] B[50] B[51]
×
×
×
×
not
Reg
Table.19C
A[61] A[62] A[63]
×
×
×
B[6]
×
B[7]
×
B[8]
×
B[9]
×
B[29] B[30] B[31]
×
×
×
B[45] B[46] B[47]
×
×
×
B[61] B[62] B[63]
×
×
×
Bank C
Bit Map
C[0] C[1]
ite
×
×
Mapped Reg
Bit Map
C[16] C[17]
item
×
×
Table.19D
A[45] A[46] A[47]
×
×
×
Bank B
Bit Map
B[0] B[1]
item
×
×
Mapped Reg
Bit Map
B[16] B[17]
item
×
×
Mapped
Bit Map
item
Mapped
Bit Map
item
Mapped
use
A[44]
×
use
A[60]
×
use
A[13] A[14] A[15]
×
×
×
C[2]
×
C[6]
×
C[7]
×
C[8]
×
C[9]
×
C[29] C[30] C[31]
×
×
×
C[45] C[46] C[47]
×
×
×
C[61] C[62] C[63]
Bank D
Bit Map
D[0] D[1]
item
×
×
Mapped Reg
Bit Map
D[16] D[17]
item
×
×
Mapped Reg
Bit Map
D[32] D[33]
item
×
×
Mapped Reg
Bit Map
D[48] D[49]
item
×
×
Mapped Reg
D[2]
×
D[3]
×
not
D[18] D[19]
×
×
not
D[4]
×
use
D[20]
×
use
D[34] D[35] D[36]
×
×
×
not use
D[50] D[51] D[52]
×
×
×
0x19
D[6]
×
D[7]
×
D[8]
×
D[9]
×
D[10] D[11] D[12]
×
×
×
not use
D[21] D[22] D[23] D[24] D[25] D[26] D[27] D[28]
×
×
×
×
×
×
×
×
not use
D[29] D[30] D[31]
×
×
×
D[37] D[38] D[39] D[40] D[41] D[42] D[43] D[44] D[45] D[46] D[47]
×
×
×
×
×
×
×
×
×
×
×
not use
D[53] D[54] D[55] D[56] D[57] D[58] D[59] D[60] D[61] D[62] D[63]
E-Fuse Bit Replacement
×
×
0x18
Sheet No.: OP13021EN
Attachment-30
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
Table.19E
Bank E
Bit Map
item
E[0]
E[1]
E[2]
E[3]
E[4]
2
I C Slave ID
E[5] E[6] E[7]
Median Filter ×
E[8]
×
E[9]
×
E[10] E[11] E[12] E[13] E[14] E[15]
×
×
×
×
×
×
0x27
not use
Mapped Reg
Bit Map
E[16] E[17] E[18] E[19] E[20] E[21] E[22] E[23] E[24] E[25] E[26] E[27] E[28] E[29] E[30] E[31]
Max Spot Size Threshold
item
×
×
×
×
×
×
×
×
×
×
×
×
not use
Mapped Reg
Bit Map
E[32] E[33] E[34] E[35] E[36]
Max Spot Size Threshold
item
0x23
Mapped Reg
Bit Map
E[48] E[49] E[50] E[51] E[52]
item
×
×
×
×
×
not use
Mapped Reg
0x24
E[37] E[38] E[39] E[40] E[41] E[42] E[43] E[44] E[45] E[46] E[47]
×
×
×
×
×
×
×
×
×
×
×
not use
E[53] E[54] E[55] E[56] E[57] E[58] E[59] E[60] E[61] E[62] E[63]
×
×
×
×
×
×
×
×
×
×
×
not use
×: not use or already done
Table.20 is shown the list of E-Fuse program flow.(Base on that program flow in Fig.40 and the bitmap in Table19)
Table.20 List of E-Fuse program flow and setting value
Stage
Stage1
R/W
W
Stage2
W
Stage3
W
Stage4
W
Stage5
Stage6
W
W
Stage7
W
Stage8
①
Slave
Adress
W
Stage9
W
R
W
address
data
address
data(1st cycle)
data(2nd cycle)
address
data(1st cycle)
data(2nd cycle)
address
data(1st cycle)
data(2nd cycle)
address
data
address
data
address1
data1
address2
data2
address3
data3
address
data
address1
data1
address2
data2
address3
data3
address1
address2
address4
data4
address5
data5
②
Max. Pulse
Width
0x00
-
0x10
-
0x45
-
0x21
-
Table.21
-
Table.22
-
0x27[4:0]
-
0x05[2:0]
-
③
④
Signal
Median
Accumulation Filter
0xEC
0xFF
0xC8
0x13
0x05
0xC9
0x11
0x15
0xCD
Table.23
Table.24
0xCA
0x01
0xCA
0x00
0xEF
0x00
0xC8
0x40
0xC8
0x00
0xEE
0x06
0xEF
0x00
0xEC
0xFF
0xEF
0x03
0x05[4:3]
0x27[6:5]
0xEF
0x00
0xEC
0x7F
⑤
Cover
Compensation
⑥
Max
Spot Size
0x33
0x3B
0x1C
0x24
0x73
0x33
0x75
0x05
*1
*2
Table.25
0x00
0x10[7:0]
0x11[7:3]
0x23[4:0]
0x24[7:4]
(1) I2C Slave Address
This product operates on I2C bus as slave device. This product has 16 kinds of address by programming upper
4 bits of slave address. Bank E is used in order to change slave address. E[3:0] is the bit for address
assignment, and E[4] is an enable bit. Changed E[3:0] turns effective after E[4] is programmed to be 0.
Sheet No.: OP13021EN
Attachment-31
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
Table.21 List of Slave ID
A7
A6
A5
A4
E[3] E[2] E[1] E[0]
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1
0
1
0
0
0
1
0
1
0
1
1
0
0
1
1
1
1
0
0
0
1
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
1
1
0
1
1
1
1
0
1
1
1
1
A3
×
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
A2
×
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
A1
×
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
A0
R/W
※
※
※
※
※
※
※
※
※
※
※
※
※
※
※
※
Slave ID
Write
Read
0x00
0x01
0x10
0x11
0x20
0x21
0x30
0x31
0x40
0x41
0x50
0x51
0x60
0x61
0x70
0x71
0x80
0x81
0x90
0x91
0xA0
0xA1
0xB0
0xB1
0xC0
0xC1
0xD0
0xD1
0xE0
0xE1
0xF0
0xF1
※R/W
Notes
Default
Write:0、Read:1
Stage1, Stage5~Stage8
Please refer to flow chart in Fig.40 and Table.20
Stage2
Data 0x00 is set in Address 0xC8 because LSB of bit map is 0 (=E[0]).
Stage3
Data 0x45 is set in Address 0xC9 because programming bit number is 5(=E[4:0]) and bank value is 5(=Bank E).
Note) Data is defined as 0xmn, where m=bit number – 1 and n = bank value.
Stage4
Data 0x00 is set in Address 0xCD in case that Slave ID(write) is set to 0x00.
Data 0x10 is set in Address 0xCD in case that Slave ID(write) is set to 0x01.
Stage9
Programmed data in E-Fuse is checked whether it is correct or not by the following step.
E-Fuse programming is done when 0x27[4:0] is equal to E[4:0]. If 0x27[4:0] is not equal to E[4:0], E-Fuse bit
replacement should be executed because programming error occurs. (Refer to12-5 E-Fuse bit replacement)
(2) Maximum Pulse Width of Emitting
GP2Y0E series have the function which adjust emitting power by detecting signal intensity. Emitting power is
adjusted by control of emitting pulse width. Average current consumption decrease by restricting maximum
emitting pulse width. However, distance characteristic change, especially distance output may become unstable in
case of detecting reflector at far distance and with low reflectance because signal intensity is also decreased by
restricting maximum emitting pulse width. In case that maximum pulse width of emitting is changed, there is the
case that electro optical characteristic described in specification sheet is not satisfied. Please use it after
confirming with customer’s product. Table.22 value is the reference.
Sheet No.: OP13021EN
Attachment-32
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
Table.22 Maximum Pulse Width of Emitting
A[18] A[17]
A[16]
Max. Pulse Width
1
1
1
Approx. 320us
1
1
0
Approx. 240us
1
0
1
Approx. 160us
1
0
0
Approx. 80us
0
1
1
Approx. 40us
Average current
26mA
22mA
18mA
14mA
12mA
Note
Default
Stage1, Stage5~Stage8
Please refer to flow chart in Fig.40 and Table.20
Stage2
Data 0x10 is set in Address 0xC8 because LSB of bit map is 16 (=A[16]).
Stage3
Data 0x21 is set in Address 0xC9 because programming bit number is 3(=A[18:16]) and bank value is 1(=Bank A).
Stage4
Data 0x05 is set in Address 0xCD in case that maximum pulse width is set to 160us.
Data 0x03 is set in Address 0xCD in case that maximum pulse width is set to 40us.
Stage9
Programmed data in E-Fuse is checked whether it is correct or not by the following step.
E-Fuse programming is done when 0x05[2:0] is equal to A[18:16]. If 0x05[2:0] is not equal to A[18:16], E-Fuse bit
replacement should be executed because programming error occurs. (Refer to12-5 E-Fuse bit replacement)
(3) Signal Accumulation
GP2Y0E series have the function which change the accumulation number of emitting signal. Signal intensity can
be controlled by changing accumulation number. Response time is increased by increasing accumulation number,
however stability of distance output is increased because signal intensity is also increased. In case that signal
accumulation times are changed, there is the case that electro optical characteristic described in specification sheet
is not satisfied. Please use it after confirming with customer’s product. Response time in Table.23 is reference
value.
Table.23 Signal Accumulation Number
A[20] A[19] Accumulation
Response Time
0
0
1 time
20ms
0
1
5 times
30ms
1
0
30 times
80ms
1
1
10 times
40ms
Note
Default
Stage1, Stage5~Stage8
Please refer to flow chart in Fig.40 and Table.20
Stage2
Data 0x13 is set in Address 0xC8 because LSB of bit map is 19 (=A[19]).
Stage3
Data 0x11 is set in Address 0xC9 because programming bit number is 2(=A[20:19]) and bank value is 1(=Bank A).
Stage4
Data 0x00 is set in Address 0xCD in case that signal accumulation is set to 1 time.
Data 0x02 is set in Address 0xCD in case that signal accumulation is set to 30 times.
Stage9
Programmed data in E-Fuse is checked whether it is correct or not by the following step.
Sheet No.: OP13021EN
Attachment-33
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
E-Fuse programming is done when 0x05[4:3] is equal to A[20:19]. If 0x05[4:3] is not equal to A[20:19], E-Fuse bit
replacement should be executed because programming error occurs. (Refer to12-5 E-Fuse bit replacement)
(4) Median Filter
GP2Y0E series have the median calculation function by using several distance outputs in order to get output stable.
Response time increases though distance output gets stable by using median calculation function. Median
calculation number can be selected to 5, 7 or 9. That is, in case of 5, a median of 5 distance values is output after 5
times measurement. Reference value of response time by combination of accumulation and median filter is shown
in Table.24. In case that median filter function is turned enable, there is the case that electro optical characteristic
described in specification sheet becomes not to be satisfied. Please use it after confirming with customer’s
product.
Table.24 Median Filter
E[6]
E[5]
0
0
1
1
0
1
0
1
Data
Number of
Median
7
5
9
1
Response Time (Accumulation)
(1time)
(5times)
(10times)
(30times)
30ms
27ms
35ms
20ms
90ms
70ms
110ms
30ms
160ms
120ms
200ms
40ms
430ms
310ms
550ms
80ms
Note
Default (10times)
Stage1, Stage5~Stage8
Please refer to flow chart in Fig.40 and Table.20
Stage2
Data 0x05 is set in Address 0xC8 because LSB of bit map is 5 (=E[5]).
Stage3
Data 0x15 is set in Address 0xC9 because programming bit number is 2(=E[6:5]) and bank value is 5(=Bank E).
Stage4
Data 0x00 is set in Address 0xCD in case that data number of median calculation is set to 7.
Data 0x02 is set in Address 0xCD in case that data number of median calculation is set to 9.
Stage9
Programmed data in E-Fuse is checked whether it is correct or not by the following step.
E-Fuse programming is done when 0x27[6:5] is equal to E[6:5]. If 0x27[6:5] is not equal to E[6:5], E-Fuse bit
replacement should be executed because programming error occurs. (Refer to12-5 E-Fuse bit replacement)
(5) Cover Compensation
Compensation coefficient (k) is measured by the procedure and measurement environment as described in 11-5
cover compensation k is programmed in C[62:52], and C[51] is enable bit. Programmed C[62:52] turns enable by
programming 0 in C[51]. There are total 12 bits in programming cover compensation coefficient. It is necessary 2
cycles shown in 12-3 Program Flow because they are over 8 bits. In case that k is programmed to 350, programmed
data is C[62:51] = 0b001010111100 including enable bit C[51]. So, programmed data at 1 st cycle in address 0xCD
is 0xBC = 0b10111100 and programmed data at 2nd cycle in address 0xCD is 0x02 = 0b00000010.
Sheet No.: OP13021EN
Attachment-34
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
1st cycle
Stage1, Stage5~Stage6
Please refer to flow chart in Fig.40 and Table.20
Stage2
Data 0x33 is set in Address 0xC8 because LSB of bit map is 51 (=C[51]).
Stage3
Data 0x73 is set in Address 0xC9 because programming bit number is 8(=C[58:51]) and bank value is 3(=Bank C).
Stage4
Data 0xBC is set in Address 0xCD in case cover compensation coefficient (k) is set to 350.
2nd cycle
Stage1, Stage5~Stage8
Please refer to flow chart in Fig.40 and Table.20
Stage2
Data 0x3B is set in Address 0xC8 because LSB of bit map is 59 (=C[59]).
Stage3
Data 0x33 is set in Address 0xC9 because programming bit number is 4(=C[62:59]) and bank value is 3(=Bank C).
Stage4
Data 0x02 is set in Address 0xCD in case that cover compensation coefficient (k) is set to 350.
Stage9
Programmed data in E-Fuse is checked whether it is correct or not by the following step.
E-Fuse programming is done when 0x10[7:0] is equal to E[63:56] and 0x11[7:3] is equal to E[55:51]. If 0x10[7:0]
is not equal to E[63:56] and 0x11[7:3] is not equal to E[55:51], E-Fuse bit replacement should be executed because
programming error occurs. (Refer to12-5 E-Fuse bit replacement)
(6) Maximum Spot Size Threshold of Measurement Error Judgment
Maximum spot size threshold of GP2Y0E series can be set. There is the case that spot size of incomplete reflection
such as the reflection from a fraction of emitting beam and the reflection from the reflective object with complex
boundary line becomes large by deformed spot profile compared with spot size of normal reflection. It has high
possibility that calculated distance by using this incomplete spot profile has large distance error. In order to prevent
decrease of distance accuracy like this, the maximum threshold of spot size can be programmed in E-Fuse. This
product outputs the calculated distance only in case spot size below threshold is detected. Table.25 shows a part of
example of maximum spot size threshold setting. Maximum spot size threshold is set in E[35:28]. E[36] is an
enable bit of this function. Programmed E[35:28] turns enable by changing E[36] to 0. There are total 9bits for
maximum spot size threshold setting. It is necessary 2 cycles in 12-3 Program Flow because they are over 8bits.
Measuring data of spot size can be read out by I2C bus. Please refer to register 0xF8 and 0xF9 (bank0) in register
map.
Sheet No.: OP13021EN
Attachment-35
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
Table.25 Maximum Spot Size Threshold
E[36] E[35] E[34] E[33] E[32] E[31]
E[30]
E[29]
E[28]
Max. spot size threshold value
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
Specify threshold in E[35:28]
E[36] is Enable Bit.
Enable : E[36]=0, Disable : E[36]=1
0
0
1
0
1
0
0
0
0
80
0
0
1
0
1
0
0
0
1
81
0
0
1
0
1
0
0
1
0
82
0
0
1
0
1
0
0
1
1
83
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
0
1
1
1
1
1
1
0
0
252
0
1
1
1
1
1
1
0
1
253
0
1
1
1
1
1
1
1
0
254
0
1
1
1
1
1
1
1
1
255
1st cycle
Stage1, Stage5~Stage6
Please refer to flow chart in Fig.40 and Table.20
Stage2
Data 0x1C is set in Address 0xC8 because LSB of bit map is 28 (=E[28]).
Stage3
Data 0x75 is set in Address 0xC9 because programming bit number is 8(=E[35:28]) and bank value is 5(=Bank E).
Stage4
Data 0x50 is set in Address 0xCD in case that maximum spot size threshold is set to 80.
Data 0x5A is set in Address 0xCD in case that maximum spot size threshold is set to 90.
2nd cycle
Stage1, Stage5~Stage8
Please refer to flow chart in Fig.40 and Table.20
Stage2
Data 0x24 is set in Address 0xC8 because LSB of bit map is 36 (=E[36]).
Stage3
Data 0x05 is set in Address 0xC9 because programming bit number is 1(=E[36]) and bank value is 5(=Bank E).
Stage4
Data 0x00 is set in Address 0xCD because enable bit is programmed to 0.
Stage9
Programmed data in E-Fuse is checked whether it is correct or not by the following step.
E-Fuse programming is done when 0x23[4:0] is equal to E[36:32] and 0x24[7:4] is equal to E[31:28]. If 0x23[4:0]
is not equal to E[36:32] and 0x24[7:4] is not equal to E[31:28], E-Fuse bit replacement should be executed because
programming error occurs. (Refer to12-5 E-Fuse bit replacement)
Sheet No.: OP13021EN
Attachment-36
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
12-5 E-Fuse Bit Replacement
There is the possibility that E-Fuse bit programmed fail (Fail rate is 20ppm/bit). Default value of each bit of E-Fuse is
all “1”, specified bit can be changed to “0” by executing program flow of Fig.37. If the bit cannot be programmed to
“0” (always “1”), then this bit is fail bit. GP2Y0E series has the function that fail bit can be replaced. The bit number
which can be replaced is one. If 2 bits are fail in this product, then this cannot be used.
(1) E-Fuse Bit Replacement Sequence
E-Fuse bit replacement is executed by specifying replace bit in D[63:55] of E-Fuse bit map. LSB of Bank A is “0”,
and MSB of Bank E is “319”. Fail bit can be shown as 9bit number, the number is programmed in D[63:55] to
replace it.
・The case of A[1] replacement
Programmed value in D[63:55] is “1”. (= 1+64*0 = 0x0001, where 0 is the bank value of bank A)
・The case of C[51] replacement
Programmed value in D[63:55] is “179”. (= 51+64*2 = 0x00B3, where 2 is the bank value of bank C)
・The case of E[4] replacement
Programmed value in D[63:55] is “260”. (=4+64*4 = 0x0104, where 4 is the bank value of bank E)
12-6 Example of E-Fuse Programming
The case where slave address is changed to 0x10(write) and 0x11(read) is shown in below concretely.
Stage1
Data=0xFF is set in Address=0xEC.
3.3V is applied in the Vpp terminal.
Stage2
Data=0x00 is set in Address=0xC8.
Stage3
Data=0x45 is set in Address=0xC9.
Stage4
Data=0x01 is set in Address=0xCD.
Stage5
Data=0x01 is set in Address=0xCA.
Wait for 500us.
Stage6
Data=0x00 is set in Address=0xCA.
Vpp terminal is grounded.
Stage7
Data=0x00 is set in Address=0xEF.
Data=0x40 is set in Address=0xC8.
Data=0x00 is set in Address=0xC8.
Stage8
Data=0x06 is set in Address=0xEE.
Stage9
Data=0xFF is set in Address=0xEC.
Data=0x03 is set in Address=0xEF.
Read out the data in Address=0x27.
Data=0x00 is set in Address=0xEF.
Data=0x7F is set in Address=0xEC.
When lower 5bits data[4:0] is 00001, E-Fuse program is finished.
When lower 5bits data[4:0] is not 00001, go to stage10(bit replacement).
Sheet No.: OP13021EN
Attachment-37
GP2Y0E02A.GP2Y0E02B.GP2Y0E03
Stage10
The case where the lower 5bits data is 10001 is assumed, and is shown in below flow.
When E[4] is replaced, Data=0x04 is programmed in D[55:62] in 1 st cycle and Data=0x01 is
programmed in D[63] in 2nd cycle because programmed value is 260(=0x0104).
Stage10-1
Data=0xFF is set in Address=0xEC.
3.3V is applied in Vpp terminal.
Stage10-2
Data=0x37 is set in Address=0xC8.
Stage10-3
Data=0x74 is set in Address=0xC9.
Stage10-4
Data=0x04 is set in Address=0xCD.
Stage10-5
Data=0x01 is set in Address=0xCA.
Wait for 500us.
Data=0x00 is set in Address=0xCA.
Vpp terminal is grounded.
Stage10-6
Stage10-1’
Data=0xFF is set in Address=0xEC.
3.3V is applied in Vpp terminal.
Stage10-2’
Data=0x3F is set in Address=0xC8.
Stage10-3’
Data=0x04 is set in Address=0xC9.
Stage10-4’
Data=0x01 is set in Address=0xCD.
Stage10-5’
Data=0x01 is set in Address=0xCA.
Wait for 500us.
Stage10-6’
Data=0x00 is set in Address=0xCA.
Vpp terminal is grounded.
Stage10-7
Data=0x00 is set in Address=0xEF.
Data=0x40 is set in Address=0xC8.
Data=0x00 is set in Address=0xC8.
Stage10-8
Data=0x06 is set in Address=0xEE.
Stage10-9
Data=0xFF is set in Address=0xEC.
Data=0x03 is set in Address=0xEF.
Read out the data in Address=0x18 and Address=0x19.
When Data=0x82 in the Address of 0x18 and Data=0 in the address of 0x19[7],
program is finished.
When Data≠0x82 in the Address of 0x18 or Data≠0 in the address of 0x19[7],
it is not possible to correct (=NG).
Sheet No.: OP13021EN
Attachment-38