Arduino Analog Pins saturated?

Hey all,

So I've built a IR Light sensor using a photo transistor and a resistor and basically measuring potential drop across the photo transistor. I've wired 4 of these to analog pins 0-3 on the arduino, but somehow i'm getting values of 1023 constantly even as i vary the amount of lighting. The voltmeter reading shows that the sensors are working fine though. Anyone knows anythign about this?

Thanks, ZQ

How have you wired the sensors up?


Once you manage to turn on the transistor, its voltage drop is fixed at its forward voltage (~.5v)

Oh yes, I assumed you said a photo-resistor. A transistor will basically switch on and off, not vary current flow. Which is why you get stable full[ish] or low readings.


My bad, its a photo resistor. As the amount of light present changes, the voltage changes as well. I've verified that the voltage changes as the light changes, but the arduino still shows 1023

Also I've verified that the voltage going to the pins on the AtMega varies with amount of light. If it helps, I'm also running the Wire library on analog pins 4 and 5

What voltage are you measuring at the analog input pin when it's reading saturated high? Without a drawing showing the connections and voltages being used it's hard to tell you what's wrong.


My guess would be that:- 1) The ground is not connected correctly. 2) The software is reading the wrong thing.

Can you post the software (use the hash button on the top row of icons in the reply box)