# 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…

[HTML version](https://soldr.ai/docs/components/gp2y0a02-distance)

[Docs](https://soldr.ai/docs) / [Components](https://soldr.ai/docs/components)

A Sharp infrared triangulation distance sensor, model GP2Y0A02YK0F, with an analog voltage output. Sharp&#x27;s unit stamp reads 2Y0A02 F followed by a production month and year code.

Every value cites its sourceOfficial pinout

[Buy on Compoden](https://compoden.com/products/sharp-gp2y0a02-f-23-distance-sensor-20-150cm-analog-output)

## 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

| | Value | Source |
|---|---|---|
| Supply | 4.5 to 5.5 V | source p.3 |
| Current | 33 mA typ, 50 mA max | source p.3 |

## Pinout

Pin rows follow Sharp&#x27;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](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20distance%20readout%20with%20an%20Arduino%20Uno%2C%20a%20Sharp%20analog%20distance%20sensor%20and%20a%2016x2%20I2C%20LCD): The Uno gives the 5 V supply and an ADC; the sheet&#x27;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](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20parking%20distance%20beeper%20demo%20with%20an%20Arduino%20Uno%2C%20a%20Sharp%20analog%20distance%20sensor%20and%20an%20active%20buzzer): Beep faster as the reading rises. A learning demo within the 20-150 cm range only.
- [Distance bar graph on LEDs](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20distance%20bar%20graph%20with%20an%20Arduino%20Uno%2C%20a%20Sharp%20analog%20distance%20sensor%20and%20assorted%205mm%20LEDs): 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](https://www.pololu.com/file/0J156/gp2y0a02yk0f.pdf), p.3); a 3.3 V supply is outside the recommended range.
- The output is not linear with distance (source: [link](https://www.pololu.com/file/0J156/gp2y0a02yk0f.pdf), 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](https://www.pololu.com/file/0J156/gp2y0a02yk0f.pdf), p.6).

## Not covered by the official source

- Sharp&#x27;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 &#x27;F 23&#x27; in the product name reproduces that stamp, so the part is GP2Y0A02YK0F.

## Sources

- [link](https://www.pololu.com/file/0J156/gp2y0a02yk0f.pdf) (Sharp GP2Y0A02YK0F data sheet, sheet no. E4-A00101EN, 1 Dec 2006)
