GP2D12 Problem

Hi there,
The problem - after connecting Sharp’s sensor to Arduino Uno AD converter returns maximum level of measured signal for distance < circa 0,5m. Everything’s done just like in examples. I’ve connected red cable to 5V ARduino’s output, black one to GND and sensor’s output directly to analog input A5. I’ve checked the sensor with multimeter- works properly.

Here “my” code:
int irReader = A5; // the analog input pin for the ir reader
float irVal = 0; // stores value from Ir reader

void setup()
{
Serial.begin(9600);
delay(1000);
}

void loop()
{
irVal = analogRead(irReader); //[V]
Serial.println(irVal);
delay(500);
}

Is anything else required? Or maybe I should connect Vout through pull-down resistor?

Code is elementary but OK, have you tried the other analog ports ?

you did not use the digital port 5 by accident ? would not be the first …

No, it's analog input for sure ;) No matter which channel I use the result is the same. Moreover, when I connect a channel to voltage divider's output (10k/10k), the voltage between GND and output equals 1V. It makes me think that there's something wrong with the hardware.

you could test the HW with a potmeter ...

So I did. Converter returns values 0-1023 for voltage 0-0.6V. Maybe there's something wrong with ADC amplifier's gain?