50. Automatic darkness indicator

Design an automatic darkness indicator using the provided LDR LDR1, NPN transistor Q1, and Red LED LED1, powered by VCC = 5 V.

The LED should turn ON in darkness and remain OFF in bright conditions.

  • At 20 lux, LED current must remain between 5 mA and 10 mA.
  • At 200 lux and 500 lux, LED current must be below 0.1 mA.

The circuit must operate automatically without a microcontroller.

Example test cases:

Light IntensityCurrent Through LED1LED State
20 lux5–10 mAON
200 lux<0.1 mAOFF
500 lux<0.1 mAOFF