-
Notifications
You must be signed in to change notification settings - Fork 4
photoresistor
¦ photoresistor ¦ LDR ¦ light dependent resistor ¦ photo cell ¦
In a voltage divider
An LDR can be used anywhere that a simple resistor can be used, where the minimum and maximum (dark and light) values will allow the circuit to function. A simple way of using it to measure light intensity is to create a voltage divider from an LDR in series with a fixed resistor. One end of the pair is connected to ground, the other end to a fixed DC voltage source. Measuring the voltage at the junction between the 2 resistors allows calculation of LDR resistance with the current incident light using Ohm´s Law. In a series resistance circuit, the current is the same in all of the resistors. This can be calculated from the voltage across the fixed resistor and it´s know value.
I (amps) = V (volts) / R (ohms)
The voltage across the LDR and that current then give the LDR resistance.
R (ohms) = V (volts) / I (amps)
What that value actually means, in terms of the light intensity, will depend on the specific LDR being used. Read the data sheet.
Often the exact resistance value is not needed. It is enough to know that brighter light gives lower resistance. Knowing the dark resistance, and the resistance at the brightest expected light though will simplify picking an appropriate fixed series resistor, tuning any software parameters that use the measured voltage.