The Sun - Up Alarm can be used to provide a audible alarm for when the sun comes up or it can be used in a dark area and detect when a light comes on. It can also be used to detect a light beam, headlights etc. The circuit works as follows. The phototransistor is very sensitive to light. (Any phototransistor will work fine) The sun shining on this device will provide a high to one of the NAND gates. This will cause another NAND gate to oscillate which will drive another gate to output a 100hz tone. The transistor provides drive for the speaker.