I got my digital IR sensors in the mail the other day and tested them out using a DC power supply and tested the output with an oscilloscope. The output wasn't what I expected (data sheets showed a zero for no detection and a square wave pulse for detection). I got a negative spike .2 V long when nothing was detected and a zero output when something was detected. Will these outputs work when coding my bot?
Check your datasheet..... the output of this sensor is open collector.... so you are going to need a pull up resistor for your square wave.
Open Collector just means that the device is only able to provide with a ground connections when detecting, when no detecting the pin will be floating. By adding a 4.7K resitor between the outoput and +5V, you will be able to get a 1, when nothing is infront of the sensor and a 0 when there is something.
GP2D15 are preset by the factory at 24cm +- 3cm( I don't remember exactly, check it). So the object can be found in this range. Out of this range, the is no object detected.