Photoresistors needs a pull down resistor?

Can someone explain why a photoresistor circuit needs a pull down resistor to register anything with analogRead().

Isn't the photo resistor ALREADY a resistor?

I'm wiring it up exactly per this:

http://www.arduino.cc/playground/Learning/PhotoResistor

I don't know the specs on my PR is came with the kit I bought. Without the pull down resistor I get constant readings of 1023 on the pin. When I connect the pdr I get ~615 light down to ~125 dark.

I guess I just assumed the photoresistor would resist enough on its own to show up on the input pin.

I bet you thought that....

PhotoR +5 o---/\/\/--. | Pin 0 o-----------

... should do the trick?

It won't BECAUSE there is a very high reisistance between pin 0 and ground. Almost no current will flow through the photoresistor from the 5v supply, because there is (almost) "no place to go".

What's happening here, and the cure, is almost exactly the same thing that is happening when you wire up....

10k (switch) +5 o---/\/\/--.---- / ---o GND | D0 o-----------

... to monitor the state of a switch. (D0 being one of the digital inputs to the Arduino.)

That is explained at....

http://sheepdogguides.com/arduino/FA1inp1.htm

.... which I think might help you get farther forward faster in a variety of ways and directions, given you good question at the start of this thread.

Can someone explain why a photoresistor circuit needs a pull down resistor to register anything with analogRead().

You need to do some research on the subject of "voltage dividers". Here's a good start: http://en.wikipedia.org/wiki/Voltage_divider.

Don

Can someone explain why a photoresistor circuit needs a pull down resistor to register anything with analogRead().

Because the analogue input reads voltages it does not read resistance. The analogue input is high impedance that means when you connect it to the +5 and the input virtually no current flows. If there is no current flowing through a resistor then there is no voltage drop across it, and so it always reads high. The pull down resistor makes current flow through the photo resistor and so different light levels result in different currents and hence different voltages (ohms law) which the analogue input can measure.

Can you use the internal pullup resistors with analog inputs, tying the photoresistor (or other variable resistance you want to measure) to ground?

Sorry, shouldn't post before coffee!