LabWired The easy way to build hardware
passive, analog or power part

Sharp GP2Y0A21 IR Distance Sensor

The Sharp GP2Y0A21 IR Distance Sensor is a passive, analog or power part in the LabWired part catalog. Its catalog type is gp2y0a21. It connects to the MCU over Analog (ADC). The catalog gives a supply range of 4.5–5.5 V. It has 3 pins. A registered peripheral model runs in the engine: the firmware talks to it over the real bus and gets device-accurate responses.

Key facts

CategoryPassive, analog and power parts
Catalog typegp2y0a21
InterfaceAnalog (ADC)
Supply range4.5–5.5 V
Pins3
DatasheetSharp GP2Y0A21YK0F distance measuring sensor, 10–80 cm

What LabWired simulates

What is simulated

Simulated device model

How it was validated

Built from the datasheet. Implemented from the part’s register documentation and exercised by automated tests. Nothing physical was ever placed next to it.

Sharp GP2Y0A21 IR Distance Sensor pinout

PinElectrical typeFunction
VCC Power input Supply
GND Power input Supply
VO Passive —

How to simulate the Sharp GP2Y0A21 IR Distance Sensor in LabWired

  1. Open the Playground at app.labwired.com and place an MCU board.
  2. Add the Sharp GP2Y0A21 IR Distance Sensor (catalog type gp2y0a21).
  3. Connect VCC and GND to the supply and ground of the board. Use a supply inside the catalog range of 4.5–5.5 V.
  4. Connect VO as your circuit needs.
  5. Run the firmware. It reads the output of the part with the ADC of the MCU.

Related Passive, analog and power parts

All Passive, analog and power parts · All parts

Modelled from Sharp GP2Y0A21YK0F distance measuring sensor, 10–80 cm.