I just want a detector to tell if its day or night. Easy, right?
I started out with a photo resistor (CdS Photoconductive Photocell I believe) in a voltage divider feeding a comparator. Worked fine on the bench. Worked fine outside the first day. Stopped working the second day (failed to detect night) and when I brought it in and tested it, the photo resistor was measuring a whole new range of resistances. For example it originally measured 1M ohm dark and 100k ohm light...after a day in the sun it reads 100k ohm dark and 10k ohm light. I believe this is due to saturation, but see no mention of this in a data sheet.
Next I tried a photo transistor. Simple enough... light hits transistor, transistor turns on. This worked fine for a few months, however a couple days ago it failed to detect dark. I swapped out the detector and brought the faulty one in to test. The transistor was on all the time...acting like it was in bright sunlight, even when it was in total darkness. This was after it had been in the dark for at least an hour. A day later, the transistor was working normally again. I believe this is also a saturation problem, and the device seems to recover after a while, but I'm looking for a solution that works all the time, not just most of the time. The data sheets don't seem to mention this problem, or if they do I'm not understanding what they are saying. Could someone help? I can switch sensors if thats the problem.
Thanks
Dan