Read a Photoresistor With a Simple Voltage Divider
By admin

A light-dependent resistor, often called an LDR or photoresistor, changes resistance when the amount of light on its sensing surface changes. Common photoresistors have lower resistance in bright conditions and higher resistance in the dark. Pair one with a fixed resistor and you can turn that resistance change into a voltage that a multimeter or an analogue input can read.
Build the divider and take three readings
Connect the photoresistor between a low-voltage supply and the measurement node. Connect a fixed resistor between that node and ground. Join the meter’s reference to the same ground. With this arrangement, the node voltage rises when light increases. Put the fixed resistor on the supply side and the LDR on the ground side if you want the voltage to fall as the sensor sees more light.
Start with a 10 kΩ fixed resistor and a 3.3 V supply. If the LDR measures about 5 kΩ in bright light, the first arrangement gives about 2.2 V at the measurement node. At 50 kΩ under darker conditions, the node gives about 0.55 V. Individual photoresistors and lighting conditions vary. Take your own readings with the LDR covered, in room light and with the brightest light that the application normally sees. Record both the voltage and where you placed the sensor.
Match the circuit to your project
If your readings cluster near one end of the voltage range, try a fixed resistor closer to the LDR resistance under the condition you care about most. Disconnect power and isolate the sensor before using a meter’s resistance mode. For a light-sensitive switch, focus on getting a clear difference around the intended switching point.
When connecting the divider to a microcontroller, check the ADC’s valid voltage range and configuration. A 3.3 V-powered controller may have a narrower calibrated ADC range than its power rail. A reading is useful for relative changes such as light versus shade, while a meaningful lux reading requires reference calibration. Position and shield the sensor so it sees the light you want to monitor. A short hood can help when nearby indicator LEDs or side lighting disturb the reading.
