Working of the circuit is simple, transistor BC 547 is working as a switch here. When the light dependent resistor (LDR) receives no light on its surface then its resistance will increase which will switch on the BC547 transistor and current starts passing through it and activates the UM66 IC. The 2N3904 NPN transistor is used to amplify the output of the melody IC to drive an 8 ohms speaker. A 500K variable resistor is used to adjust sensitivity of the circuit. The circuit can be operated with two 1.5 volt batteries of any size.