This circuit can be used to check, for example, whether the door of a refrigerator has been properly closed. An LED sends out a beam of light, which, if the door is closed, is reflected. An optical sensor (CNY70) then detects the amount of light. If the sensor does not receive the right amount of light, the buzzer will sound after about a minute. When the door is closed (and the CNY70 receives enough light again), the buzzer turns off. The power supply for the circuit requires about 12 mA at 12 V.
Potentiometer P1 adjusts the sensitivity of the sensor. The sensor works reliably from a distance of one centimetre. If the current through the LED is increased, the distance can be increased a little. The delay can be adjusted with C3. C4 provides extra filtering for the reference voltage. The buzzer would otherwise switch on with a ‘chirping’ sound. The well-known NE555 is used to drive the buzzer. The buzzer is driven with a duty cycle of 2:1, which improves the audibility.