Sharp GP2Y0D810Z0F Digital Distance Sensor 2-10 cm

Sharp GP2Y0D810Z0F Digital Distance Sensor 2-10 cm © LGPL

Lets talk about this Sharp Distance Sensor

  • 905 views
  • 1 comment
  • 1 respect

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

Sharp distance sensors are usually used to measure distances: depending on the product, this can be between 2 cm and 5 m.

In my case I had the product GP2Y0D810Z0F at hand and had to jump over 2 hurdles. My contribution here describes my experience.

The GP2Y0D810Z0F belongs to the family of two other sensors: the GP2Y0D815Z0F and GP2Y0D805Z0F.

Germans can buy here in ebay-Store.

These sensors come with and sometimes without a breakout board.

Hurdle 1 - a carrier board is needed

Only the naked sensor was available to me and so I acquired a so-called "Carrier Board" (Pololu # 1133). The first hurdle was easy to take by 2-3 euros. The website of Pololu provides information on which side to set the solder points: the sensor has to lie flat on the PCB. On the side of the existing components, the solder points for the PINs of the sensor are attached. There are 2 PIN headers with 3 PINs each for the Carrier Board packet: straight and curved, so that you can fit the sensor into your project later on. GND, VCC and signal are to be created as usual.

The Carrier Board also brings a lot of comfort: a red LED lights up as soon as an object is detected within the distance of 2 - 10 cm from infrared (= low). Outside this measurable range, the LED goes out (= high). If the LED bothers you can disable the LED with a cut. More about this on the Pololu-Schematic.

Hurdle 2 - no distance?

I then learned how important it is to read the data sheet or at least the product description: instead of obtaining different analogue input voltages and then converting them into distances using a mathematical formula, this sensor delivers "low" in the measuring range (2 - 10 cm ) and otherwise "high" outside this range. Visually, this is supported by the red LED of the carrier board.

This means you can still connect the sensor to the analog port, but also on the digital port.

"Note that these sensors will only tell you if there is an object within the detection range along their lines of sight; they will not tell you how far away the object is.", source.

The square pad is ground, the middle pad is VIN (2.7 – 6.2 V), and the remaining pad is the sensor output, OUT. Depending on your power source, you might notice an increase in performance by placing a large (>10 uF) capacitor between power and ground somewhere near the sensor.

Thats all you need:

void setup(){
Serial.begin(9600);
}
void loop(){
Serial.print("Digital Signal:");
Serial.println(digitalRead(3),BIN);
delay(50);
}

You can play a bit around with this:

int IRpin = 0; // Analogeingang
double value, volts;
void setup()
{
Serial.begin(9600);
}
void loop()
{
value = analogRead(IRpin);
volts = value*5.0/1024.0;
Serial.println(volts);
delay(50);
}

Comments

Similar projects you might like

Complete Digital Clock Including Alarm and Motion Sensor

Project tutorial by LAGSILVA

  • 20,247 views
  • 22 comments
  • 70 respects

Arduino Bluetooth Robot for Android Device

Project showcase by aip06

  • 4,020 views
  • 2 comments
  • 18 respects

Simple Arduino Digital Clock Without RTC

Project in progress by Annlee Fores

  • 120,270 views
  • 32 comments
  • 107 respects

Control LED By Clap Using Arduino and Sound Sensor

by IoTBoys

  • 82,708 views
  • 20 comments
  • 46 respects
Add projectSign up / Login