Bum IR distance sensor?

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
can0beans
 
Posts: 1
Joined: Sat Jan 19, 2013 12:07 am

Bum IR distance sensor?

Post by can0beans »

I purchased an IR sensor IR distance sensor includes cable (20cm-150cm) - GP2Y0A02YK connecting to an Arduino and I'm getting garbage data from it -- both using the GP2Y0A02YK library that has been published and just trying to read the analog pin. My incoming data is pretty close to random. I Verified my code and set-up with a friend who has an identical IR sensor -- so I think I have a bum IR sensor....

User avatar
adafruit_support_bill
 
Posts: 88091
Joined: Sat Feb 07, 2009 10:11 am

Re: Bum IR distance sensor?

Post by adafruit_support_bill »

OK. Contact [email protected] with a link to this thread and ask for a replacement sensor.

User avatar
zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: Bum IR distance sensor?

Post by zener »

It is nice that Adafruit will send you a new one, but it does not appear that you have not done very conclusive testing of the one you have. This is an analog output device. You need to disconnect it from the Arduino and just connect power and ground to it. Then measure the output voltage from it with a volt meter. When you put a reflective object about a foot away from it, it should put out about 2V, 8" away about 2.5V, 2 feet away about 1V. Please do that test and report back.

brianb3
 
Posts: 2
Joined: Fri Jan 11, 2013 10:43 pm

Re: Bum IR distance sensor?

Post by brianb3 »

Hi, I seem to have an issue with my IR distance sensor (20cm-150cm) - GP2Y0A02YK as well. I hooked it up to a voltmeter to check the output and no matter what distance I my object is at the voltage doesn't change. And my friend hooked it up to an oscilloscope and tested it and we couldn't get the output to change at all.

User avatar
adafruit_support_bill
 
Posts: 88091
Joined: Sat Feb 07, 2009 10:11 am

Re: Bum IR distance sensor?

Post by adafruit_support_bill »

How are you powering the sensor when you do these tests? Can you post a photo showing your connections?

brianb3
 
Posts: 2
Joined: Fri Jan 11, 2013 10:43 pm

Re: Bum IR distance sensor?

Post by brianb3 »

We were using a power supply that was outputting 5 volts. We connected gnd of the power supply to pin 2 of the sensor and attached +5V to pin 3 of the sensor according to the data sheet and measured the output from pin 1 using both a volt meter and oscilloscope and were unable to get a change from that pin. I'm sorry I am unable to post a photo of my connections at this time.

User avatar
adafruit_support_bill
 
Posts: 88091
Joined: Sat Feb 07, 2009 10:11 am

Re: Bum IR distance sensor?

Post by adafruit_support_bill »

OK. Contact [email protected] with a link to this thread and ask for a replacement sensor.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”