At the first clap, the output of gate N3 goes low and diode D1 conducts, discharging capacitor C4. The reset input of IC2 goes low, releasing its reset state. All the J and K inputs of the four flip-flops are low and so these do not change state, even though their clock inputs receive pulses. When the reset input of IC2 is low, each clock pulse causes IC2 to advance by one count and its outputs go high successively, lighting up the corresponding LEDs and pulling high the J and K inputs of the four flip-flops, one after the other. Resistor R8 limits the current through LEDs 1 through 8 to about 2 mA. Larger current might cause malfunction due to the outputs of IC2 being pulled down below the logic 1 state input voltage.
If a second clap is detected while the J input of a particular flip-flop is high, its Q output will go high, regardless of what state it was in previously. Similarly, if its K input was high, the output will go low. (If both J and K are high, the output will change state at each clock pulse.) Thus although all flip-flops receive the clap signal at their clock inputs, only the one selected by the active output of IC2 will change state. Resistor R9 and capacitor C6 ensure that the flip-flops start in the off state when power to the circuit is switched on, by providing a positive power-on-reset pulse to the reset input pins when power is applied. The preset input pins are not used and are therefore connected directly to ground.
When, after eight clock pulses, output Q8 of IC2 becomes high, diode D2 Conducts, charging capacitor C4, there by resetting IC2 and making its Q0 output high. And there it stays, awaiting the next clap.
The four Q outputs of IC3 and IC4 are buffered by npn transistors, fed through current limiting resistors and LEDs (to indicate the on/off state of the loads) to the gates of four triacs. Four lamps operating on the mains may thus be controlled. For demonstrations, it might be better to drive small lamps (drawing less than 100 mA at 12V) directly from the emitters of the transistors. In this case the triacs, LEDs and their associated current limiting resistors may be omitted.
It has to be noted that one side of the mains has to be connected to the negative supply line of this circuit when mains loads are to be controlled. This necessitates safe construction of the circuit such that no part of it is liable to be touched. The advantage is that it may be mounted out of reach of curious hands since it does not need to be handled during normal operation. It is advisable to start with the low voltage version and then upgrade to mains operation, once you are sure everything else is working satisfactorily.
CMOS ICs are used in this circuit for implementing the amplifying and logic functions. Use of a dedicated supply is recommended because the integrated circuits will be damaged if the supply voltage is too high, or is of wrong polarity. An external power supply may get connected up the wrong way around, or be inadvertently set to too high a voltage.
Therefore it is a good idea to start by constructing the power supply section and then add the other components of the circuit. If the clock is working, you may turn your attention to the amplifier. LED9 should be off, and should flash when the terminals of capacitor C2 are touched with a wet finger (the classic wet finger test). Preset VR1 may need to be adjusted until LED9 just turns off.
The output of gate N2 will be at about half the supply voltage. The output of gate N3 would normally be high. The voltage at the input of gate N3 should vary when preset VR1 is varied. High-efficiency LEDs should preferably be used in this circuit.
The microphone has two terminals, one of which is connected to its body. This terminal has to be connected to circuit ground, and the other to the junction of resistor R2 and capacitor C2. These wires are preferably kept short (one or two centimetres) to avoid noise pickup. With the microphone connected, a loud sound (a clap) should result in LED9 blinking. Adjust preset VR1 so that LED9 stays off on the loudest of background noises but starts glowing when you clap.
If the clap-to-start feature is not required, it may be disabled by omitting components D1, D2, R5, C4 and connecting a wire link in place of diode D2. Then IC2 will be alive and kicking all the time.