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.
Asked
Active
Viewed 340 times
1
-
Also, consider the idea of adding some hysteresis. That will make it behave just a little more like you probably want/expect. – periblepsis Feb 10 '23 at 21:19
-
Here is a link on this site providing an example of how to add some hysteresis. It's an unusual approach. (Different from what you might usually find for something like this.) But I think it should work. – periblepsis Feb 10 '23 at 21:31
1 Answers
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:

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
