1

Light Sensor

I want to modify this circuit to work properly, the LED turns on when the light is on, it should be on when the light turn off.

winny
  • 14,707
  • 6
  • 46
  • 66
daryk1
  • 11
  • 1

1 Answers1

2

The circuit as shown will turn the LED on when the LDR is about 100kΩ. If you want similar behavior, but reversed, you can do something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

This will turn on when the LDR is about 125kΩ and off when the LDR is about 100kΩ.

You might have to increase the hysteresis (by increasing R2) and/or shield the LDR from D1 to keep it from oscillating.

Q1 and Q2 form a Schmitt trigger circuit.

A more unusual (and therefore slightly more interesting) approach to adding hysteresis might be to have an "on" LED that partially illuminates LDR1 and have that shut off in favor of D1, thus making less light fall on LDR1. Left as an exercise to anyone interested.

Spehro Pefhany
  • 397,265
  • 22
  • 337
  • 893