47. Light sensor interface

Circuit

Loading simulator…

Design Approach

An LDR changes resistance with illumination, but an ADC reads voltage. A divider converts the resistance change into ADC_IN, chosen to rise as light intensity increases.

How the Circuit Works

  1. Choose the divider orientation. The supplied LDR1 connects from VCC = 3.3 V to the output junction. The solution adds R_FIXED = 2.2 kΩ from that junction to GND.
  2. Convert resistance to voltage. The output follows:VADC_IN=3.3V×RFIXEDRLDR+RFIXEDV_{\mathrm{ADC\_IN}}=3.3\,\mathrm{V}\times\frac{R_{\mathrm{FIXED}}}{R_{\mathrm{LDR}}+R_{\mathrm{FIXED}}}

    The LDR resistance decreases with increasing lux, so the output voltage increases.

  3. Set sensitivity with the fixed resistor. At low light, R_LDR is large and most supply voltage falls across it, keeping ADC_IN low. As illumination grows, R_LDR decreases and the lower resistor receives a larger fraction of 3.3 V.
  4. Interpret the thresholds. The task expects ADC_IN≤0.5V\mathrm{ADC\_IN} \le 0.5\,\mathrm{V} at 10 lux, between 1.3 V and 1.8 V at 100 lux, and at least 2.5 V at 500 lux. The reference 2.2 kΩ resistor is selected to satisfy those checks using the given LDR model.

Verify the Circuit

Set LDR1 to 10, 100, and 500 lux in EWsim. Observe the monotonic rise of ADC_IN and compare with the task limits. Swap the positions of LDR1 and R_FIXED as a learning experiment: the voltage then falls as light increases.

Key Learnings

  • Sensor placement in a divider determines whether output voltage rises or falls with the measured quantity.
  • The fixed resistor determines the useful sensitivity region of a resistive sensor interface.