Getting Started with IR Distance Click

Last Updated on 25 July 2017


IR distance click carries Sharp’s GP2Y0A60SZ0F distance measuring sensor. The sensor module comprises an integrated PSD (position sensitive detector), an infrared LED and a signal processing circuit. The measuring range is between 10 and 150 cm.

The sensor is not easily influenced by the reflectivity of the object, but it’s important to keep the lens clean. The click board outputs an analog voltage corresponding to the distance of the object (through the mikroBUS™ AN pin). An Enable (EN) pin is also utilized.

The board is designed to use either a 3.3V or a 5V power supply.


  • 10 to 150 cm measurement range.
  • Sensor consists of PSD, IR LED, and signal processing IC.
  • Can use either 3.3V or 5V power supply.
  • Analog output.
  • Supported in all MikroElektronika compilers.
  • Application: Touch-less switches, various energy-saving devices, robots.


This tutorial is required the following items:

1. IR Distance Click comes with unsolder header pins. A good hardware connection will help a lot to accomplish your project. You can follow the following steps.

Put the header pins into breadboard.

Insert IR Distance Click into header pins.

Solder each pin properly.

2. By default, IR Distance Click is set to working at 3V. You can change it to 5V by desoldering the 0 ohm jumper and solder to 5V pad. For beginner, we recommend to stick at 3V. So the connection is:

CONNECTIONIR Distance ClickArduino Uno
Operating Voltage3V33.3V
Input SignalOUTA0


The output from the IR Distance Click is analog, what is the analog represent for? We will discuss it later. Now we test this sensor first by displaying ADC and voltage from the OUT – A0 pin.

Upload the code to Arduino Uno then open Serial Monitor with 9600 bps. You will get the following result.

Yes the sensor is working well, when I put the object near to the sensor, the voltage goes high (~2V), when no object, the reading shows below 0.5V. The next step, how to determine the distance in cm? At this stage, you can refer to the Sharp’s GP2Y0A60SZ0F datasheet to know the sensor characteristics in order to determine the relation between voltage and distance.

Below is the Electro-optical Characteristics table for Sharp’s GP2Y0A60SZ0F:

The first table is for 3V operating voltage and second table is 5V operating voltage. For this tutorial, we need to refer the first table. 2 parameters that related to distance calculation, which are Output Terminal Voltage and Output Voltage Difference.

  • Output Terminal Voltage: Voltage reading for L = 150cm.
  • Output Voltage Difference: Voltage different between L = 10cm and L = 150cm.

Now, you can create a formula based on the data above to get the distance in cm.

So, thank you for reading this post, I hope it helps on your project journey. All the best! 🙂


  1. IR Distance Click Product Page.
  2. IR Distance Click MikroElektronika.
  3. GP2Y0A60SZ0F datasheet.

If you have further questions, please go to our technical forum as we seldom check the comment here. Thanks and have a good day!

, , ,

Related Post

[BM]Arduino VS Raspberry Pi- Perbezaan Asas Diantara Arduino dan Raspberry Pi

Getting Started with Colour Sensor Module (SN-COLOUR-MOD)

Getting Started with Tilt Sensor (SN-TILT)

Getting Started with Vibration Sensor Module (Normally Off) (SN-VIBRATE-MOD)

Leave a Reply

Your email address will not be published. Required fields are marked *