Photoresistor (LDR)

A light-dependent resistor whose resistance drops as light intensity increases.

How it works

A photoresistor (also known as a Light Dependent Resistor or LDR) is a passive component whose electrical resistance changes based on the amount of light striking its surface. In complete darkness, its resistance is extremely high (often several megaohms). When exposed to bright light, its resistance drops dramatically (often to a few hundred ohms).

Photoresistors are commonly used in voltage divider circuits to create a light-sensing voltage signal. This allows microcontrollers to detect day/night cycles, measure ambient light levels for automatic screen brightness, or trigger security alarms when a laser beam is broken.

Key Formulas

Voltage Divider OutputV_out = V_in × (R_photo / (R_fixed + R_photo))

Common Mistakes

Expecting a linear response. The resistance of an LDR changes logarithmically with light intensity (lux), meaning software running on a microcontroller needs to apply a logarithmic curve to convert the ADC voltage reading into a meaningful light level.