Why do you need a 2nd resister when using a photo-resister?

Hello,

A photo-resister is already a resister and will limit the voltage in the circuit. Why can't this be connected to a pin and measured? Why is a second resister needed to connect the photo-resister to ground.

Thank you

Jason

Why do you need a second resister to setup a voltage divider to measure the divided voltage?

It is not a voltage divider it is a pull up resistor.
The sensor changes resistance, the only way you can measure this is to put a current through and see it change. The only way you can see current change is by the voltage drop it produces across a resistor, that is the same resistor that goes to a rail.

A photo-resister or potentiometer

No a potentiometer has three terminals and a photo resistor only has two, they are different things.

Get a potentiometer and connect one end to ground, no other connections. Now get your multimeter and read the voltage on the wiper with respect to gnd when you turn it. Not a lot there is there?

Now connect a resistor to 5v and connect the other end to the wiper of the potentiometer and read the wiper again as you turn it.

The input pin needs to have a voltage to read. Therefore you need to tie it to 5v to form a voltage divider when you use a photo resistor. The change in the resistance of the photo resistor changes the current through the R string and hence the voltage that the arduino measures.

When you use a digital pin, you need to have a reference to detect a change. Without the resistor tying the input to 5v or gnd the input "floats" without a definite level so will give weird results.

Weedpharma

Three ways to measure a resistance:

  1. ratiometric using a resistance bridge (such as simple resistor divider)

  2. constant-current source driving the resistor, measure voltage across

  3. constant voltage across resistor and measure current through it.

  4. isn't convenient on Arduino as the ADC measures voltage, not current. All work with
    a multimeter.