GP2Y0A02YK0F distance sensor: specs and pinout
A Sharp infrared triangulation distance sensor, model GP2Y0A02YK0F, with an analog voltage output. Sharp's unit stamp reads 2Y0A02 F followed by a production month and year code.
Specs
| Spec | Value | Source |
|---|---|---|
| Recommended supply voltage | 4.5 to 5.5 V | source Recommended operating conditions, p.3 |
| Measuring distance range | 20 to 150 cm | source Electro-optical characteristics, p.3 |
| Average supply current | 33 mA typ, 50 mA max (L = 150 cm) | source Electro-optical characteristics, p.3 |
| Output voltage at L = 150 cm | 0.25 V min, 0.4 V typ, 0.55 V max (VCC 5 V, white paper) | source Electro-optical characteristics, p.3 |
| Output voltage difference between 20 cm and 150 cm | 1.8 V min, 2.05 V typ, 2.3 V max | source Electro-optical characteristics, p.3 |
| Output terminal voltage absolute maximum | -0.3 V to VCC + 0.3 V | source Absolute Maximum Ratings, p.3 |
| Operating temperature | -10 to +60 C | source Absolute Maximum Ratings, p.3 |
| Measurement cycle | 38.3 ms +/- 9.6 ms | source Fig. 1 timing chart, p.4 |
| Emitter wavelength | 850 nm +/- 70 nm | source Notes, p.6 |
| Size and connector | 29.5 x 13 x 21.6 mm; JST S3B-PH | source Features p.1; Outline dimensions note 2, p.2 |
Power
Pinout
Pin rows follow Sharp's connector table for the sensor unit (JST S3B-PH). Colours of any cable that comes with the sensor are not documented.
| Pin | Function | Voltage | Notes | Source |
|---|---|---|---|---|
| 1 | VO (output terminal voltage) | source Outline dimensions terminal table, p.2 | ||
| 2 | GND | source Outline dimensions terminal table, p.2 | ||
| 3 | VCC (supply voltage) | source Outline dimensions terminal table, p.2 |
Build with it
Project ideas for the GP2Y0A02YK0F distance sensor. Each link opens Soldr with the prompt filled in; Soldr assigns the pins, checks power and shows how to wire every part.
- Distance readout: The Uno gives the 5 V supply and an ADC; the sheet's output values (about 0.4 V at 150 cm, and about 2.45 V at 20 cm, derived as 0.4 V plus the 2.05 V typical difference) stay in the ADC range.
- Parking distance beeper: Beep faster as the reading rises. A learning demo within the 20-150 cm range only.
- Distance bar graph on LEDs: Light more LEDs as the object gets closer within the 20-150 cm range; each LED needs its own series resistor from the pack. The sensor draws up to 50 mA, which the Uno 5 V supply can provide. Learning project.
Common mistakes
- It needs 4.5-5.5 V (source: link, p.3); a 3.3 V supply is outside the recommended range.
- The output is not linear with distance (source: link, Fig. 2 p.5) and is specified only for 20-150 cm (p.3); convert with a lookup table or the inverse-distance curve; readings under 20 cm are not valid.
- Direct sunlight or a tungsten lamp on the detector, and mirror-like targets, can give wrong distances; Sharp also recommends a 10 uF or larger bypass capacitor across VCC and GND (source: link, p.6).
Not covered by the official source
- Sharp's stamp shows the model name followed by a production month code (1-9, X, Y, Z) and the last digit of the year; the 'F 23' in the product name reproduces that stamp, so the part is GP2Y0A02YK0F.
Sources
- link (Sharp GP2Y0A02YK0F data sheet, sheet no. E4-A00101EN, 1 Dec 2006)