Designing a dark sensing circuit which outputs logic levels.


Joined Sep 8, 2017
I have seen many dusk to dawn lights blink like a strobe light at dawn and dusk... temperature may play into it as well... it warms up and affects values.... Just what happens in real life as opposed to on paper or lab setting.
Right well that's what I meant. The circuit I described doesn't implement it and almost two years after I built it for a neighbor it still hasn't exhibited any such hysteresis issues yet. He had to clean off the sensor a couple of times and eventually made a little enclosure for it but other than that the only complaint was that the circuit wasn't quite as sensitive as he had hoped. (I really should have used a comparator but it was done free of charge anyhow so...)


Joined Jan 23, 2018
The reason that most comparator circuits work much better with at least a small bit of hysteresis is that the input impedance seems to change just a bit as the comparator changes state, and unless the input source has zero output impedance, that tends to change the voltage just a bit. And since the comparator will trigger on a very small part of a millivolt change, that can make the whole thing sort of unstable and oscillate for a while. And that oscillation is seldom the design goal. Thus just a bit of hysteresis and the system works much better. So now you understand why we try to add it.

Thread Starter


Joined Jan 18, 2016
Thanks so much for the response everyone, by coincidence I got a board which had a LM324. Tried it out, works like a charm :)