Bum IR distance sensor?
Moderators: adafruit_support_bill, adafruit

Bum IR distance sensor?

by can0beans on Sat Jan 19, 2013 12:17 am

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....
can0beans
 
Posts: 1
Joined: Sat Jan 19, 2013 12:07 am

Re: Bum IR distance sensor?

by adafruit_support_bill on Sat Jan 19, 2013 7:58 am

OK. Contact support@adafruit.com with a link to this thread and ask for a replacement sensor.
User avatar
adafruit_support_bill
 
Posts: 30794
Joined: Sat Feb 07, 2009 10:11 am

Re: Bum IR distance sensor?

by Zener on Sat Jan 19, 2013 4:08 pm

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.
Zener
 
Posts: 2638
Joined: Sat Feb 21, 2009 2:38 am

Re: Bum IR distance sensor?

by brianb3 on Thu Jan 24, 2013 11:04 am

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.
brianb3
 
Posts: 2
Joined: Fri Jan 11, 2013 10:43 pm

Re: Bum IR distance sensor?

by adafruit_support_bill on Thu Jan 24, 2013 11:13 am

How are you powering the sensor when you do these tests? Can you post a photo showing your connections?
User avatar
adafruit_support_bill
 
Posts: 30794
Joined: Sat Feb 07, 2009 10:11 am

Re: Bum IR distance sensor?

by brianb3 on Sat Jan 26, 2013 3:08 pm

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.
brianb3
 
Posts: 2
Joined: Fri Jan 11, 2013 10:43 pm

Re: Bum IR distance sensor?

by adafruit_support_bill on Sun Jan 27, 2013 7:30 am

OK. Contact support@adafruit.com with a link to this thread and ask for a replacement sensor.
User avatar
adafruit_support_bill
 
Posts: 30794
Joined: Sat Feb 07, 2009 10:11 am