Sharp IR sensor GP2Y0A21YK

OK, I set up obstacle avoidance array for my quadcopter which includes a Sharp IR sensor GP2Y0A21YK.

I initially tested the sensor using info and sktches from various sources, all with similar results. The readings seem to fluctuate too much. One of the sketches averages the readings and even kicks out the outies.

As always, I have attacked this bass ackwards. Buy, install, test, then RTFM.

Well. after I RTFM on the sharp sensor, it seems to have a timing sequence that is not addressed by any sketch that I have found and the sensor having only VCC, GND and OUT does not seem to offer any feedback or ability to detect, modify, initiate, etc. any timing.

Does anyone have any info on this or is it just one of those "cheap, sloppy, get what you pay for, suck it up and deal with it" chinese sensors that has no resolution to this issue. (which then begs the question as to why the unaccessible timing was even mentioned)

Assuming "cheap ... blah blah", is there a better CHEAP IR sensor with better documentation.

Thanks for any help or input.

the TechnoMonkey

Maybe it's better to use this

you can find cheap chinese boards with it. Maybe there are similar sensors.

If I remember well Sharp IR is not linear because is though to detect when an object is too close, if I am not wrong, so it is difficult to obtain a distance.

It is an inverse curve. Simple formula to interpret the curve.

I may try one of those sensors you suggested. I like they have an off switch.

My array consists of three sensors and they are each powered by a 2n2222 so I can have only one on at a time.

TechnoMonkeys:
each powered by a 2n2222 so I can have only one on at a time.

I would expect high-side switching, with a PNP transistor.
Post a diagram.
Leo..

I am just switching ground on the device. I just happened to have a bunch. After breadboarding, I will probably order a MPQ3906.