PN 8-038 BA · RS · ME / Regional academic maker initiative

Photoresistor light sensor module

Detects changes in illumination so a prototype can respond to light and darkness.

What it is and how it works

The kit includes one photoresistor module. A photoresistor, often called an LDR, changes resistance with illumination. The module converts this change into an output signal. On this style of board, a trimmer often sets a digital threshold; check the markings to determine whether an analogue output is also provided.

The sensor is useful for relative comparisons: brighter, darker or crossing a chosen threshold. A raw reading is not automatically a measurement in lux. Position, shadows, light source and differences between individual sensors affect the result. Choose thresholds in the environment where the prototype will operate.

What we can use it for

  • Build a model night light that turns on an LED after dark.
  • Display changing illumination on the OLED during the day.
  • Detect a box being opened and exposed to light.

First exercise

Read the output on a lit desk, then shade the sensor with your hand. Record several results and choose a threshold separating the two conditions. If an LED flickers around the threshold, use different turn-on and turn-off thresholds or require the change to persist briefly.

Handling notes

Check whether AO and DO labels are present and what they mean for this module. For analogue readings, select a suitable ESP32 ADC input and respect its allowed range. A 5 V module supply does not guarantee an output safe for 3.3 V inputs. Position the controlled LED away from the sensor to prevent unwanted feedback.

Source: Adafruit — Photocells.