Automatic switch using the clap sensor makes the switch on/off just by the sound. This workout well using IC 555 and Condenser Mic, act as a sound sensor.
The Condenser Mic converts sound energy into Electrical energy. This electrical energy, in turn, triggers the timer IC 555 using a transistor. This works as a digital pulse as data flip-flop. This data turn on/off the led or bulb. This will turn ON for the first clap and for the second clap will turn OFF. This implies the digital signal will be switched according to data input.
The Condenser sensor used to sense the sound. This sound energy sways electrical energy. This prone to trigger the IC 555 using the transistor. The IC 555 remembers the previous state and stay on that state until next clap. This varies the logic level from 0 to 1 or 1 to 0. The data flip-flop used individually or as a master-slave combo. The D Flip-flop used to SET or RESET the switch. The clock pulse stands HIGH for the time constant period and becomes LOW. This modifies the circuit and the device will turn on/off.