8

I used the following circuit to control the outdoor light, and it works as I wanted.

I am trying to understand the circuit and it looks like a comparator circuit, but I don't understand the use of 100 kOhm feedback resistor. Also how to choose the resistor values 100 kOhm, 15 kOhm and 100 kOhm pot?

circuit schematic

Brock Adams
  • 332
  • 2
  • 9
vtc
  • 89
  • 5
  • 2
    The resistors picked depend on the LDR used and what you want to achive. About the feedback resistor : the comparator has Hysteresis so at the treshold point the RL1 doesn't switch on and off for multiple times. – pantarhei Dec 17 '18 at 11:40

1 Answers1

17

The point of the 100k feedback resistor is to provide hysteresis. Without it, if the LDR was very close to the threshold, it could switch on and off rapidly. Adding the feedback resistor will change the voltage level of the non-inverting input when the comparator is activated. This will mean that the LDR will have a bit of headroom to once again reach the threshold voltage.

enter image description here

This picture shows how the hysteresis helps. You can see that once the non-inverting input has reached the lower threshold, the OUT changes LOW. Only when it reaches the upper threshold will it go back high again.

Without hysteresis, you could end up with an unstable output, especially if the light level is very close to the threshold

enter image description here

Some further reading on this can be found in a nice application note by Maxim Integrated: Application note 3616

This application note goes through the math required to select values for your resistors. The only one it cannot select is your LDR. You can, however, calculate a fixed resistor, then choose a suitable LDR from that.

MCG
  • 11,809
  • 4
  • 34
  • 70
  • Without the hysteresis, you can also get a stable, *oscillating* output as the lamp's light is reflected back to the photo cell -- switching the lamp off. This is a very common problem for many porch lights (even with hysteresis and time delays). – Brock Adams Dec 17 '18 at 21:46