I have a device which once could switch on the load in preset intervals (it stopped working so I disassembled it). There is a jumper to choose if the device will work during the daylight of during the night and there is an UV LED for sensing the light used instead of a photoresistor. I am aware of a few approaches when using LEDs as light sensors but this schematics looks somewhat unfamiliar. Here is the schematics I made by inspecting the PCB.
I can not be sure which µC has been used because the labels have been removed but since it is 8 pin package with pin 1 = Vcc and pin 8 = GND I am assuming it might be 12F629 or similar.
Nevertheless, I would like to replace the PIC with ATtiny and the only problem is the theory of operation of the light sensing circuit. Obviously the µC's pin that is connected to the light sensing circuit can not be output because by making it HIGH the LED would be shorted to ground - meaning it is either a digital or analog input (pin 7 of 12F629 can be analog comparator input with selectable internal voltage reference).
Can anyone decipher how this light sensing circuit works?
Cliff: For the benefit of others here is the attachment: